Skip to content

Commit f90563e

Browse files
committed
Fix codesign for macOS
1 parent aef23ca commit f90563e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

scripts/build-shotcut.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,7 @@ function deploy_mac
19031903
log fixing rpath of executable "$exe"
19041904
cmd install_name_tool -delete_rpath "$FINAL_INSTALL_DIR/lib" "$exe" 2> /dev/null
19051905
cmd install_name_tool -delete_rpath "$QTDIR/lib" "$exe" 2> /dev/null
1906+
cmd install_name_tool -delete_rpath "/opt/local/lib" "$exe" 2> /dev/null
19061907
cmd install_name_tool -add_rpath "@executable_path/../Frameworks" "$exe"
19071908
done
19081909
cmd cp -p /opt/local/lib/libaom.3.dylib Frameworks
@@ -1914,6 +1915,8 @@ function deploy_mac
19141915
log fixing rpath of executable "whisper-cli"
19151916
cmd install_name_tool -delete_rpath "$SOURCE_DIR"/whisper.cpp/build/src MacOS/whisper-cli 2> /dev/null
19161917
cmd install_name_tool -delete_rpath "$SOURCE_DIR"/whisper.cpp/build/ggml/src MacOS/whisper-cli 2> /dev/null
1918+
cmd install_name_tool -delete_rpath "$SOURCE_DIR"/whisper.cpp/build/ggml/src/ggml-blas MacOS/whisper-cli 2> /dev/null
1919+
cmd install_name_tool -delete_rpath "$SOURCE_DIR"/whisper.cpp/build/ggml/src/ggml-metal MacOS/whisper-cli 2> /dev/null
19171920
cmd install_name_tool -add_rpath "@executable_path/../Frameworks" MacOS/whisper-cli
19181921

19191922
# MLT plugins

scripts/codesign_and_notarize.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sudo xcode-select -s /Applications/Xcode.app/
44

55
SIGNER="Developer ID Application: Meltytech, LLC (Y6RX44QG2G)"
66
find ~/Desktop/Shotcut.app -type d -name __pycache__ -exec rm -r {} \+
7-
find ~/Desktop/Shotcut.app/Contents \( -name '*.o' -or -name '*.a' \) -exec rm {} \;
7+
find ~/Desktop/Shotcut.app/Contents \( -name '*.o' -or -name '*.a' -or -name '*.dSYM' \) -exec rm {} \;
88
xattr -cr ~/Desktop/Shotcut.app
99

1010
# Strip any pre-existing signatures so we can overwrite (Qt SDK, etc.)
@@ -18,20 +18,23 @@ find ~/Desktop/Shotcut.app/Contents/MacOS -type f -exec \
1818
# Re-sign all dylibs and plugins
1919
find ~/Desktop/Shotcut.app/Contents -type f \( -name '*.dylib' -o -name '*.so' \) -exec \
2020
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
21-
{} \;
21+
--preserve-metadata=identifier,entitlements \
22+
{} \;
2223

2324
# Re-sign executables with entitlements
2425
find ~/Desktop/Shotcut.app/Contents/MacOS -type f -exec \
2526
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
27+
--preserve-metadata=identifier,entitlements \
2628
--entitlements ./notarization.entitlements \
2729
{} \;
2830

2931
# Re-sign the app bundle last
3032
codesign --options=runtime --timestamp --force --verbose --sign "$SIGNER" \
31-
--entitlements ./notarization.entitlements \
33+
--preserve-metadata=identifier,entitlements \
34+
--entitlements ./notarization.entitlements --generate-entitlement-der \
3235
~/Desktop/Shotcut.app
3336

34-
codesign --verify --deep --strict --verbose=2 ~/Desktop/Shotcut.app
37+
codesign --verify --deep --strict --verbose=4 ~/Desktop/Shotcut.app
3538
spctl -a -t exec -vv ~/Desktop/Shotcut.app
3639

3740
TMP=$(mktemp -d)

0 commit comments

Comments
 (0)