Skip to content

Commit

Permalink
fixed cmake for case sensitive build systems and updated the makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
himwho committed Jul 30, 2024
1 parent 2d0fb47 commit 98b4354
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 10 deletions.
File renamed without changes.
48 changes: 38 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)"
24 changes: 24 additions & 0 deletions Makefile.variables
Original file line number Diff line number Diff line change
@@ -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=
File renamed without changes.
File renamed without changes.

0 comments on commit 98b4354

Please sign in to comment.