-
-
Notifications
You must be signed in to change notification settings - Fork 792
/
sign
executable file
路36 lines (28 loc) 路 1.35 KB
/
sign
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Name of your app.
APP="Medis"
# The path of you app to sign.
APP_PATH="sign/$APP.app"
# The path to the location you want to put the signed package.
RESULT_PATH="$APP.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: Zihua Li (35DFNA47LC)"
INSTALLER_KEY="3rd Party Mac Developer Installer: Zihua Li (35DFNA47LC)"
FW_PATH="$APP_PATH/Contents/Frameworks"
mkdir sign
cp -a "$APP.app" sign
echo "Signing..."
codesign --verbose -fs "$APP_KEY" --entitlements child.plist "$FW_PATH/Electron Framework.framework/Libraries/libnode.dylib"
codesign --verbose -fs "$APP_KEY" --entitlements child.plist "$FW_PATH/Electron Framework.framework/Versions/A"
codesign --verbose -fs "$APP_KEY" --entitlements child.plist "$FW_PATH/$APP Helper EH.app"
codesign --verbose -fs "$APP_KEY" --entitlements child.plist "$FW_PATH/$APP Helper NP.app"
codesign --verbose -fs "$APP_KEY" --entitlements child.plist "$FW_PATH/$APP Helper.app"
codesign --verbose -fs "$APP_KEY" --entitlements parent.plist "$APP_PATH"
echo ""
echo "Verifying signatures..."
codesign --verify --deep --display --verbose=4 "$APP_PATH"
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
# echo ""
# echo "Veriyfing Gatekeeper acceptance..."
# spctl --ignore-cache --no-cache --assess --type execute --verbose=4 "$APP_PATH"
rm -rf sign