Skip to content

Commit fba073e

Browse files
committed
Experimental MacOS Catalina app notarization code
1 parent ce37eb7 commit fba073e

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

installer/build-mac-dmg.sh

+28-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ echo "Found Version $VERSION"
77

88
# Set path to app bundle
99
OS_APP_NAME="OpenShot Video Editor.app"
10+
OS_APP_ZIP="OpenShot-$VERSION.zip"
1011
OS_DMG_NAME="OpenShot-$VERSION.dmg"
1112
OS_PATH="build/$OS_APP_NAME/Contents"
1213
echo "Fixing App Bundle ($OS_PATH)"
@@ -52,8 +53,12 @@ if [ -d "$OS_PATH/MacOS/python3.6" ]; then
5253
mv "$OS_PATH/MacOS/python36.zip" "$OS_PATH/Resources/python36.zip"; ln -s "../../Resources/python36.zip" "$OS_PATH/MacOS/lib/python36.zip";
5354
fi
5455

56+
echo "Loop through bundled files and sign all binary files"
57+
find "build" \( -iname '*.so' -o -iname '*.so' \) -exec codesign -s "OpenShot Studios, LLC" --timestamp=http://timestamp.apple.com/ts01 --force "{}" \;
58+
5559
echo "Code Sign App Bundle (deep)"
56-
codesign -s "OpenShot Studios, LLC" "build/$OS_APP_NAME" --deep --force
60+
codesign -s "OpenShot Studios, LLC" --force --options runtime --timestamp=http://timestamp.apple.com/ts01 "build/$OS_APP_NAME/Contents/MacOS/openshot-qt"
61+
codesign -s "OpenShot Studios, LLC" --force --options runtime --timestamp=http://timestamp.apple.com/ts01 "build/$OS_APP_NAME"
5762

5863
echo "Verifying App Signing"
5964
spctl -a -vv "build/$OS_APP_NAME"
@@ -62,7 +67,27 @@ echo "Building Custom DMG"
6267
appdmg "installer/dmg-template.json" "build/$OS_DMG_NAME"
6368

6469
echo "Code Sign DMG"
65-
codesign -s "OpenShot Studios, LLC" "build/$OS_DMG_NAME" --force
70+
codesign -s "OpenShot Studios, LLC" --force --timestamp=http://timestamp.apple.com/ts01 "build/$OS_DMG_NAME"
71+
72+
echo "Create Zip of .App for Notarization"
73+
ditto -c -k --keepParent "build/$OS_APP_NAME" "build/$OS_APP_ZIP"
74+
75+
echo "Notarize Zip file (send to apple)"
76+
# No errors uploading '/Users/jonathan/builds/7d5103a1/0/OpenShot/openshot-qt/build/test.zip'.
77+
# RequestUUID = cc285719-823f-4f0b-8e71-2df4bbbdaf72
78+
xcrun altool --notarize-app --primary-bundle-id "org.openshot.openshot-qt.zip" --username "[email protected]" --password "@keychain:NOTARIZE_AUTH" --file "build/$OS_APP_ZIP"
79+
80+
echo "Check Notarization Progress..."
81+
#xcrun altool --notarization-history 0 -u "[email protected]" -p "@keychain:NOTARIZE_AUTH"
82+
83+
echo "Check Notarization Info"
84+
# No errors getting notarization info.
85+
#
86+
# Date: 2020-07-05 21:22:35 +0000
87+
# Hash: ef939ddefec14d7f0b7fe467c5761cdccab3414425a33c066a5629dd71eff626
88+
# RequestUUID: cc285719-823f-4f0b-8e71-2df4bbbdaf72
89+
# Status: in progress
90+
#xcrun altool --notarization-info ****ID**** -u "[email protected]" -p "@keychain:NOTARIZE_AUTH"
6691

6792
echo "Verifying DMG Signing"
68-
spctl -a -vv "build/$OS_DMG_NAME"
93+
spctl -a -t open --context context:primary-signature -v "build/$OS_DMG_NAME"

0 commit comments

Comments
 (0)