-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for signing Open3d viewer app on MacOS (#6568)
- Loading branch information
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
|
||
echo $# | ||
if [[ $# != 6 ]]; then | ||
echo "Usage: $0 path/to/Open3d.app path/to/Open3d.entitlements apple-id cert_id team-id password" | ||
exit 1 | ||
fi | ||
|
||
echo "Running as $1 $2 $3 $4 $5 $6" | ||
|
||
# Sign app | ||
echo "Signing $1 with entitlements $2 cert: $4..." | ||
codesign --deep --force --options runtime --timestamp --entitlements $2 --sign $4 $1 | ||
|
||
# Verify signing worked | ||
echo "Verifying signing..." | ||
codesign -dvv --strict $1 | ||
|
||
appname=$1 | ||
zipname="${appname%.app}.zip" | ||
|
||
# Create zip with ditto | ||
echo "Zipping to prepare for notarization..." | ||
ditto -c -k --rsrc --keepParent $1 $zipname | ||
|
||
# Send signed app in for notarization | ||
# Note: this command returns the result | ||
echo "Submitting for notarization..." | ||
xcrun notarytool submit $zipname --apple-id $3 --team-id $5 --password $6 --wait | ||
|
||
# Staple the original app | ||
xcrun stapler staple $1 | ||
|
||
# Delete old zip and create a new one for distribution | ||
rm $zipname | ||
ditto -c -k --keepParent $1 $zipname |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters