forked from ethereum/mist
-
Notifications
You must be signed in to change notification settings - Fork 1
/
codesign
executable file
·45 lines (34 loc) · 2.02 KB
/
codesign
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
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Name of your app.
APP="Ethereum-Wallet"
# The path of you app to sign.
APP_PATH="dist_wallet/Ethereum-Wallet-macosx64-0-4-0/Ethereum-Wallet.app"
# The path to the location you want to put the signed package.
RESULT_PATH="dist_wallet/$APP.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: Stiftung Ethereum (3W6577R383)"
#"Mac Developer: Fabian Vogelsteller (YK2P3ZENMX)"
#"3rd Party Mac Developer Application: Stiftung Ethereum (3W6577R383)"
INSTALLER_KEY="3rd Party Mac Developer Installer: Stiftung Ethereum (3W6577R383)"
cd $APP_PATH && find . -name "*.DS_Store" -type f -delete
cd ../../../
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper EH.app/"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/$APP Helper NP.app/"
if [ -d "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A" ]; then
# Signing a non-MAS build.
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Mantle.framework/Versions/A"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/ReactiveCocoa.framework/Versions/A"
codesign --deep -fs "$APP_KEY" --entitlements child.plist "$FRAMEWORKS_PATH/Squirrel.framework/Versions/A"
fi
codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/eth/eth"
codesign --deep -fs "$APP_KEY" --entitlements nodes.plist "$FRAMEWORKS_PATH/node/geth/geth"
codesign -fs "$APP_KEY" --entitlements parent.plist "$APP_PATH"
# codesign --force --verify --verbose --sign "$APP_KEY" "$APP_PATH"
#productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
echo "################"
echo "### verifing app"
codesign --verify -vvvv "$RESULT_PATH"
spctl -a -vvvv "$RESULT_PATH"