11#! /bin/bash
2+ #
3+ # Script to sign macOSX pkg.
4+ # https://www.electronjs.org/docs/tutorial/mac-app-store-submission-guide
5+ #
26
37# Name of your app.
48APP=" Moodle Desktop"
5- # The path of your app to sign.
6- APP_PATH=" desktop/dist/mas/Moodle Desktop.app"
7- # The path to the location you want to put the signed package.
8- RESULT_PATH=" desktop/dist/mas/$APP .pkg"
99# The name of certificates you requested.
1010APP_KEY=" 3rd Party Mac Developer Application: Moodle Pty Ltd (2NU57U5PAW)"
1111INSTALLER_KEY=" 3rd Party Mac Developer Installer: Moodle Pty Ltd (2NU57U5PAW)"
12+
13+
14+ BASEPATH=" desktop/dist/mas"
15+ # The path of your app to sign.
16+ APP_PATH=" ${BASEPATH} /${APP} .app"
17+ # The path to the location you want to put the signed package.
18+ RESULT_PATH=" ${BASEPATH} /${APP} .pkg"
19+
1220# The path of your plist files.
1321CHILD_PLIST=" desktop/assets/mac/child.plist"
1422PARENT_PLIST=" desktop/assets/mac/parent.plist"
23+ LOGINHELPER_PLIST=" desktop/assets/mac/loginhelper.plist"
1524
1625FRAMEWORKS_PATH=" $APP_PATH /Contents/Frameworks"
1726
@@ -21,11 +30,9 @@ codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electr
2130codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /Electron Framework.framework"
2231codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper.app/Contents/MacOS/$APP Helper"
2332codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper.app/"
24- codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper EH.app/Contents/MacOS/$APP Helper EH"
25- codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper EH.app/"
26- codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper NP.app/Contents/MacOS/$APP Helper NP"
27- codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $FRAMEWORKS_PATH /$APP Helper NP.app/"
33+ codesign -s " $APP_KEY " -f --entitlements " $LOGINHELPER_PLIST " " $APP_PATH /Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
34+ codesign -s " $APP_KEY " -f --entitlements " $LOGINHELPER_PLIST " " $APP_PATH /Contents/Library/LoginItems/$APP Login Helper.app/"
2835codesign -s " $APP_KEY " -f --entitlements " $CHILD_PLIST " " $APP_PATH /Contents/MacOS/$APP "
2936codesign -s " $APP_KEY " -f --entitlements " $PARENT_PLIST " " $APP_PATH "
3037
31- productbuild --component " $APP_PATH " /Applications --sign " $INSTALLER_KEY " " $RESULT_PATH "
38+ productbuild --component " $APP_PATH " /Applications --sign " $INSTALLER_KEY " " $RESULT_PATH "
0 commit comments