Skip to content

Commit

Permalink
add a setup step and more ignores
Browse files Browse the repository at this point in the history
  • Loading branch information
himwho committed Jul 31, 2024
1 parent 2b4b4e7 commit 83aad51
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ extras/Projucer/JUCECompileEngine.dylib

.vscode
/build
/Builds
distribution.xml

CMakeUserPresets.json

Expand Down
21 changes: 18 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ endif
VERSION := $(shell grep VERSION: .github/workflows/workflow.yml | cut -d ':' -f 2 | cut -d ' ' -f 2 | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
BUNDLEID := $(shell grep BUNDLE_ID: .github/workflows/workflow.yml | cut -d ':' -f 2 | sed '1p;d' | cut -d ' ' -f 2 )

setup-codesigning:
ifeq ($(detected_OS),Darwin)
security find-identity -p basic -v
xcrun notarytool store-credentials 'notarize-app' --apple-id $(APPLE_USERNAME) --team-id $(APPLE_TEAM_CODE) --password $(ALTOOL_APPPASS)
endif

configure:
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release

Expand All @@ -25,6 +31,8 @@ ifeq ($(detected_OS),Darwin)
/usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/VST3/M1-Notepad.vst3 -v
/usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin -v
$(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(WRAP_GUID) --signid $(APPLE_CODESIGN_ID) --in build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin --out build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin
else ifeq ($(detected_OS),Windows)
$(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid "$(WRAP_GUID)" --signid $(WIN_SIGNTOOL_ID) --in build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin --out build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin
endif

package: get_bundle_id get_version build codesign
Expand All @@ -34,17 +42,24 @@ ifeq ($(detected_OS),Darwin)
pkgbuild --identifier $(BUNDLE_ID).vst3 --version $(VERSION) --component build/M1-Notepad_artefacts/Release/VST3/M1-Notepad.vst3 \
--install-location "/Library/Audio/Plug-Ins/VST3" build/M1-Notepad_artefacts/Release/M1-Notepad.vst3.pkg
pkgbuild --identifier $(BUNDLE_ID).aaxplugin --version $(VERSION) --component build/M1-Notepad_artefacts/Release/AAX/M1-Notepad.aaxplugin \
--install-location "/Library/Application\ Support/Avid/Audio/Plug-Ins" build/M1-Notepad_artefacts/Release/M1-Notepad.aaxplugin.pkg
--install-location "/Library/Application Support/Avid/Audio/Plug-Ins" build/M1-Notepad_artefacts/Release/M1-Notepad.aaxplugin.pkg
productbuild --synthesize \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.au.pkg" \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.vst3.pkg" \
--package "build/M1-Notepad_artefacts/Release/M1-Notepad.aaxplugin.pkg" \
distribution.xml
productbuild --sign "Developer ID Installer" --distribution distribution.xml --package-path build/M1-Notepad_artefacts/Release build/M1-Notepad_artefacts/Release/M1-Notepad.pkg
codesign --force --sign $(APPLE_CODESIGN_CODE) --timestamp build/M1-Notepad_artefacts/Release/M1-Notepad.pkg
mkdir -p build/M1-Notepad_artefacts/Release/signed
productsign --sign $(APPLE_CODESIGN_INSTALLER_ID) "build/M1-Notepad_artefacts/Release/M1-Notepad.pkg" "build/M1-Notepad_artefacts/Release/signed/M1-Notepad.pkg"
xcrun notarytool submit --wait --keychain-profile 'notarize-app' --apple-id $(APPLE_USERNAME) --password $(ALTOOL_APPPASS) --team-id $(APPLE_TEAM_CODE) "build/M1-Notepad_artefacts/Release/signed/M1-Notepad.pkg"
xcrun stapler staple build/M1-Notepad_artefacts/Release/signed/M1-Notepad.pkg
else ifeq ($(detected_OS),Windows)
$(WIN_INNO_PATH) "-Ssigntool=$(WIN_SIGNTOOL_PATH) sign -f $(WIN_CODESIGN_CERT_PATH) -p $(WIN_SIGNTOOL_PASS) -t http://timestamp.digicert.com $$f" "${CURDIR}/Resources/InnoSetup.iss"
endif

get_bundle_id:
echo " -- Using $(BUNDLEID)"
echo "-- Using $(BUNDLEID)"

get_version:
echo " -- Building version: $(VERSION)"
echo "-- Building version: $(VERSION)"

0 comments on commit 83aad51

Please sign in to comment.