Skip to content

Commit 744382e

Browse files
committed
WIP: Improve mac build script
1 parent 2061e1a commit 744382e

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

TemplateProject/scripts/makedist-mac.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ if [ -d build-mac ]; then
1111
fi
1212

1313
#---------------------------------------------------------------------------------------------------------
14-
#variables
14+
# variables
1515

1616
IPLUG2_ROOT=../iPlug2
1717
XCCONFIG=$IPLUG2_ROOT/../common-mac.xcconfig
1818
SCRIPTS=$IPLUG2_ROOT/Scripts
1919

20-
# CODESIGN disabled by default.
21-
CODESIGN=0
20+
# CODE_SIGN disabled by default.
21+
CODE_SIGN=0
22+
NOTARIZE=0
2223

2324
# macOS codesigning/notarization
2425
NOTARIZE_BUNDLE_ID=com.AcmeInc.TemplateProject
@@ -115,7 +116,7 @@ echo ""
115116
touch *.cpp
116117

117118
#---------------------------------------------------------------------------------------------------------
118-
#remove existing binaries
119+
# remove existing binaries
119120

120121
echo "remove existing binaries"
121122
echo ""
@@ -147,7 +148,7 @@ fi
147148
#---------------------------------------------------------------------------------------------------------
148149
# build xcode project. Change target to build individual formats, or add to All target in the xcode project
149150

150-
xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -target "All" -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]}
151+
xcodebuild -project ./projects/$PLUGIN_NAME-macOS.xcodeproj -xcconfig ./config/$PLUGIN_NAME-mac.xcconfig DEMO_VERSION=$DEMO -configuration Release | tee build-mac.log | xcpretty #&& exit ${PIPESTATUS[0]}
151152

152153
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
153154
echo "ERROR: build failed, aborting"
@@ -206,7 +207,7 @@ if [ -d "${AAX}" ]; then
206207
strip -x "${AAX}/Contents/MacOS/$PLUGIN_NAME"
207208
fi
208209

209-
if [ $CODESIGN == 1 ]; then
210+
if [ $CODE_SIGN == 1 ]; then
210211
#---------------------------------------------------------------------------------------------------------
211212
# code sign AAX binary with wraptool
212213

@@ -244,15 +245,15 @@ if [ $BUILD_INSTALLER == 1 ]; then
244245

245246
./scripts/makeinstaller-mac.sh $FULL_VERSION
246247

247-
if [ $CODESIGN == 1 ]; then
248+
if [ $CODE_SIGN == 1 ]; then
248249
echo "code-sign installer for Gatekeeper on macOS 10.8+"
249250
echo ""
250251
mv "${PKG}" "${PKG_US}"
251252
productsign --sign "${DEV_ID_INST_STR}" "${PKG_US}" "${PKG}"
252253
rm -R -f "${PKG_US}"
253254
fi
254255

255-
#set installer icon
256+
# set installer icon
256257
./$SCRIPTS/SetFileIcon -image resources/$PLUGIN_NAME.icns -file "${PKG}"
257258

258259
#---------------------------------------------------------------------------------------------------------
@@ -271,9 +272,9 @@ if [ $BUILD_INSTALLER == 1 ]; then
271272

272273
sudo rm -R -f build-mac/installer/
273274

274-
if [ $CODESIGN == 1 ]; then
275+
if [ $NOTARIZE == 1 ]; then
275276
#---------------------------------------------------------------------------------------------------------
276-
#notarize dmg
277+
# notarize dmg
277278
echo "notarizing"
278279
echo ""
279280
# you need to create an app-specific id/password https://support.apple.com/en-us/HT204397
@@ -340,7 +341,7 @@ echo ""
340341
zip -r ./build-mac/$ARCHIVE_NAME-dSYMs.zip ./build-mac/*.dSYM
341342

342343
#---------------------------------------------------------------------------------------------------------
343-
# auval
344+
# auval tools
344345
sudo rm -R -f build-mac/*-auval.zip
345346

346347
echo "packaging auval script"

0 commit comments

Comments
 (0)