Skip to content

Commit 905b8b0

Browse files
committed
WIP: Improve mac build script
1 parent 142c15d commit 905b8b0

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
@@ -118,7 +119,7 @@ echo ""
118119
touch *.cpp
119120

120121
#---------------------------------------------------------------------------------------------------------
121-
#remove existing binaries
122+
# remove existing binaries
122123

123124
echo "remove existing binaries"
124125
echo ""
@@ -154,7 +155,7 @@ fi
154155
#---------------------------------------------------------------------------------------------------------
155156
# build xcode project. Change target to build individual formats, or add to All target in the xcode project
156157

157-
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]}
158+
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]}
158159

159160
if [ "${PIPESTATUS[0]}" -ne "0" ]; then
160161
echo "ERROR: build failed, aborting"
@@ -221,7 +222,7 @@ if [ -d $CLAP ]; then
221222
strip -x $CLAP/Contents/MacOS/$PLUGIN_NAME
222223
fi
223224

224-
if [ $CODESIGN == 1 ]; then
225+
if [ $CODE_SIGN == 1 ]; then
225226
#---------------------------------------------------------------------------------------------------------
226227
# code sign AAX binary with wraptool
227228

@@ -259,15 +260,15 @@ if [ $BUILD_INSTALLER == 1 ]; then
259260

260261
./scripts/makeinstaller-mac.sh $FULL_VERSION
261262

262-
if [ $CODESIGN == 1 ]; then
263+
if [ $CODE_SIGN == 1 ]; then
263264
echo "code-sign installer for Gatekeeper on macOS 10.8+"
264265
echo ""
265266
mv "${PKG}" "${PKG_US}"
266267
productsign --sign "${DEV_ID_INST_STR}" "${PKG_US}" "${PKG}"
267268
rm -R -f "${PKG_US}"
268269
fi
269270

270-
#set installer icon
271+
# set installer icon
271272
./$SCRIPTS/SetFileIcon -image resources/$PLUGIN_NAME.icns -file "${PKG}"
272273

273274
#---------------------------------------------------------------------------------------------------------
@@ -286,9 +287,9 @@ if [ $BUILD_INSTALLER == 1 ]; then
286287

287288
sudo rm -R -f build-mac/installer/
288289

289-
if [ $CODESIGN == 1 ]; then
290+
if [ $NOTARIZE == 1 ]; then
290291
#---------------------------------------------------------------------------------------------------------
291-
#notarize dmg
292+
# notarize dmg
292293
echo "notarizing"
293294
echo ""
294295
# you need to create an app-specific id/password https://support.apple.com/en-us/HT204397
@@ -359,7 +360,7 @@ echo ""
359360
zip -r ./build-mac/$ARCHIVE_NAME-dSYMs.zip ./build-mac/*.dSYM
360361

361362
#---------------------------------------------------------------------------------------------------------
362-
# auval
363+
# auval tools
363364
sudo rm -R -f build-mac/*-auval.zip
364365

365366
echo "packaging auval script"

0 commit comments

Comments
 (0)