Skip to content

Commit 895c4f5

Browse files
committed
Add initial mac app store plists and build script
1 parent c9524fc commit 895c4f5

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

assets/mac/child.plist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.inherit</key>
8+
<true/>
9+
</dict>
10+
</plist>

assets/mac/info.plist

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<string>Electron API Demos Protocol</string>
1414
</dict>
1515
</array>
16+
<key>ElectronTeamID</key>
17+
<string>VEKTX9H2N7</string>
1618
</dict>
1719
</plist>

assets/mac/parent.plist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.app-sandbox</key>
6+
<true/>
7+
<key>com.apple.security.application-groups</key>
8+
<string>VEKTX9H2N7.com.electron.electron-api-demos</string>
9+
</dict>
10+
</plist>

script/mas.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# Name of your app.
4+
APP="Electron API Demos"
5+
6+
# The path of your app to sign.
7+
APP_PATH="./out/Electron API Demos-mas-x64/Electron API Demos.app"
8+
9+
# The path to the location you want to put the signed package.
10+
RESULT_PATH="./out/Electron API Demos.pkg"
11+
12+
# The name of certificates you requested.
13+
APP_KEY="3rd Party Mac Developer Application: GitHub (VEKTX9H2N7)"
14+
INSTALLER_KEY="3rd Party Mac Developer Installer: GitHub (VEKTX9H2N7)"
15+
16+
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
17+
18+
CHILD_PLIST="./assets/mac/child.plist"
19+
PARENT_PLIST="./assets/mac/parent.plist"
20+
21+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
22+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
23+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libnode.dylib"
24+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
25+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
26+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
27+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/Contents/MacOS/$APP Helper EH"
28+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/"
29+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/Contents/MacOS/$APP Helper NP"
30+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/"
31+
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
32+
33+
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
34+
35+
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"

0 commit comments

Comments
 (0)