From 98b4354a27c762cffebf653380d14b411fbed029 Mon Sep 17 00:00:00 2001 From: Dylan Marcus Date: Tue, 30 Jul 2024 13:57:20 -0400 Subject: [PATCH] fixed cmake for case sensitive build systems and updated the makefile --- CmakeLists.txt => CMakeLists.txt | 0 Makefile | 48 ++++++++++++++++---- Makefile.variables | 24 ++++++++++ Resources/{CmakeLists.txt => CMakeLists.txt} | 0 Source/{CmakeLists.txt => CMakeLists.txt} | 0 5 files changed, 62 insertions(+), 10 deletions(-) rename CmakeLists.txt => CMakeLists.txt (100%) create mode 100644 Makefile.variables rename Resources/{CmakeLists.txt => CMakeLists.txt} (100%) rename Source/{CmakeLists.txt => CMakeLists.txt} (100%) diff --git a/CmakeLists.txt b/CMakeLists.txt similarity index 100% rename from CmakeLists.txt rename to CMakeLists.txt diff --git a/Makefile b/Makefile index fe87173..9c643c9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Mach1 plugin build and codesign # local paths are in this file -include ~/m1-globallocal.mk +include ./Makefile.variables # getting OS type ifeq ($(OS),Windows_NT) @@ -10,15 +10,43 @@ else detected_OS := $(shell uname) endif -insstall: +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 ) -build: - $(JUCE_CLI) --status "./m1-notepad.jucer" - $(JUCE_CLI) --resave "./m1-notepad.jucer" - xcodebuild -project ./Builds/MacOSX/M1-NotePad.xcodeproj -scheme "M1-NotePad - All" -configuration Release clean - xcodebuild -project ./Builds/MacOSX/M1-NotePad.xcodeproj -scheme "M1-NotePad - All" -configuration Release build - # aax - $(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(M1_GLOBAL_GUID) --signid $(APPLE_ID) --in /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --out /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --autoinstall on +install: + +configure: + cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release + +build: + cmake --build build --config "Release" codesign: - $(WRAPTOOL) sign --verbose --account $(PACE_ID) --wcguid $(M1_GLOBAL_GUID) --signid $(APPLE_ID) --in /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --out /Library/Application\ Support/Avid/Audio/Plug-Ins/M1-NotePad.aaxplugin --autoinstall on +ifeq ($(detected_OS),Darwin) + /usr/bin/codesign --timestamp --force --deep -s "Developer ID Application" build/M1-Notepad_artefacts/Release/AU/M1-Notepad.component -v + /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 +endif + +package: get_bundle_id get_version configure build codesign +ifeq ($(detected_OS),Darwin) + pkgbuild --identifier ${BUNDLE_ID}.au --version ${VERSION} --component build/M1-Notepad_artefacts/Release/AU/M1-Notepad.component \ + --install-location "/Library/Audio/Plug-Ins/Components" build/M1-Notepad_artefacts/Release/M1-Notepad.au.pkg + 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 + 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 +endif + +get_bundle_id: + echo " -- Using $(BUNDLEID)" + +get_version: + echo " -- Building version: $(VERSION)" \ No newline at end of file diff --git a/Makefile.variables b/Makefile.variables new file mode 100644 index 0000000..17e867d --- /dev/null +++ b/Makefile.variables @@ -0,0 +1,24 @@ +# This file is used to setup local variables and paths for +# configuring, building and packaging the m1-notepad +# project cross-platform +# +# Please rename and fill in the variables below to be used +# with the Makefile in this directory or +# copy these variables as environment variables as needed +# + +WRAPTOOL= +PACE_ID= + +APPLE_TEAM_CODE= +APPLE_CODESIGN_ID="Developer ID Application: XXXXX ($(APPLE_TEAM_CODE))" +APPLE_CODESIGN_CODE= +APPLE_CODESIGN_INSTALLER_ID="Developer ID Installer: XXXXX ($(APPLE_TEAM_CODE))" + +WIN_INNO_PATH= +WIN_SIGNTOOL_PATH= +WIN_SIGNTOOL_ID= +WIN_SIGNTOOL_PASS= +WIN_CODESIGN_CERT_PATH= + +WRAP_GUID= \ No newline at end of file diff --git a/Resources/CmakeLists.txt b/Resources/CMakeLists.txt similarity index 100% rename from Resources/CmakeLists.txt rename to Resources/CMakeLists.txt diff --git a/Source/CmakeLists.txt b/Source/CMakeLists.txt similarity index 100% rename from Source/CmakeLists.txt rename to Source/CMakeLists.txt