Merge pull request #2514 from crazyserver/MOBILE-3534

MOBILE-3534 mac: Adapt sign script to electron 4
main
Juan Leyva 2020-09-09 16:39:57 +02:00 committed by GitHub
commit 65a540179e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 9 deletions

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
</dict>
</plist>

View File

@ -1,17 +1,26 @@
#!/bin/bash
#
# Script to sign macOSX pkg.
# https://www.electronjs.org/docs/tutorial/mac-app-store-submission-guide
#
# Name of your app.
APP="Moodle Desktop"
# The path of your app to sign.
APP_PATH="desktop/dist/mas/Moodle Desktop.app"
# The path to the location you want to put the signed package.
RESULT_PATH="desktop/dist/mas/$APP.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: Moodle Pty Ltd (2NU57U5PAW)"
INSTALLER_KEY="3rd Party Mac Developer Installer: Moodle Pty Ltd (2NU57U5PAW)"
BASEPATH="desktop/dist/mas"
# The path of your app to sign.
APP_PATH="${BASEPATH}/${APP}.app"
# The path to the location you want to put the signed package.
RESULT_PATH="${BASEPATH}/${APP}.pkg"
# The path of your plist files.
CHILD_PLIST="desktop/assets/mac/child.plist"
PARENT_PLIST="desktop/assets/mac/parent.plist"
LOGINHELPER_PLIST="desktop/assets/mac/loginhelper.plist"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
@ -21,10 +30,8 @@ codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electr
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/Contents/MacOS/$APP Helper EH"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/Contents/MacOS/$APP Helper NP"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"