From 8faacfc53c36579972e7164083c7bfebddeb8ec3 Mon Sep 17 00:00:00 2001 From: FriwiDev Date: Sat, 26 Feb 2022 14:35:25 +0100 Subject: [PATCH] Sign jogl and gluegen-rt dylibs in jar to perform notarization on complete build --- macosx_codesign.sh | 7 +++++++ macosx_codesign_zip.sh | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100755 macosx_codesign_zip.sh diff --git a/macosx_codesign.sh b/macosx_codesign.sh index ac4cf07..f9b3046 100755 --- a/macosx_codesign.sh +++ b/macosx_codesign.sh @@ -23,6 +23,7 @@ ENTITLEMENTS_BROWSER=entitlements/entitlements-browser.plist chmod -R 777 $APP_DIR/$APP_NAME chmod +x macosx_notarize.sh +chmod +x macosx_codesign_zip.sh #Sign helpers echo "Signing helpers..." @@ -45,6 +46,12 @@ codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME" bash macosx_notarize.sh "$APP_DIR/$APP_NAME/$FRAMEWORKS_DIR/$FRAMEWORK_NAME" "$2" $3 org.cef.framework $4 $5 codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME/Contents/Java/libjcef.dylib" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/gluegen-rt-natives-macosx-universal.jar" "natives/macosx-universal/libgluegen_rt.dylib" "$2" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libnativewindow_awt.dylib" "$2" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libnativewindow_macosx.dylib" "$2" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libjogl_mobile.dylib" "$2" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libnewt_head.dylib" "$2" +bash macosx_codesign_zip.sh "$APP_DIR/$APP_NAME/Contents/Java/jogl-all-natives-macosx-universal.jar" "natives/macosx-universal/libjogl_desktop.dylib" "$2" codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$2" --timestamp --verbose "$APP_DIR/$APP_NAME" bash macosx_notarize.sh "$APP_DIR/$APP_NAME" "$2" $3 org.jcef.jcef $4 $5 diff --git a/macosx_codesign_zip.sh b/macosx_codesign_zip.sh new file mode 100755 index 0000000..d1deba8 --- /dev/null +++ b/macosx_codesign_zip.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ $# -lt 3 ] + then + echo "Usage: ./macosx_codesign_zip.sh " + echo "" + echo "path: the absolute(!) target path" + echo "zippath: the path inside the zip" + echo "certname: the apple signing certificate name. Something like \"Developer ID Application: xxx (yyy)\"" + exit 1 +fi + +#Set workdir local +cd "$( dirname "$0" )" +ENTITLEMENTS_BROWSER=entitlements/entitlements-browser.plist + +mkdir tmp +unzip "$1" "$2" -d tmp +cd tmp +codesign --force --options runtime --entitlements "$ENTITLEMENTS_BROWSER" --sign "$3" --timestamp --verbose "$2" +zip --update "$1" "$2" +cd .. +rm -rf tmp