Created
August 23, 2019 22:04
-
-
Save jdan/3c4e8686a69af0e7e1128df768cc19ff to your computer and use it in GitHub Desktop.
some electron signing stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| mkdir App.iconset | |
| sips -z 16 16 Icon1024.png --out App.iconset/icon_16x16.png | |
| sips -z 32 32 Icon1024.png --out App.iconset/icon_16x16@2x.png | |
| sips -z 32 32 Icon1024.png --out App.iconset/icon_32x32.png | |
| sips -z 64 64 Icon1024.png --out App.iconset/icon_32x32@2x.png | |
| sips -z 128 128 Icon1024.png --out App.iconset/icon_128x128.png | |
| sips -z 256 256 Icon1024.png --out App.iconset/icon_128x128@2x.png | |
| sips -z 256 256 Icon1024.png --out App.iconset/icon_256x256.png | |
| sips -z 512 512 Icon1024.png --out App.iconset/icon_256x256@2x.png | |
| sips -z 512 512 Icon1024.png --out App.iconset/icon_512x512.png | |
| cp Icon1024.png App.iconset/icon_512x512@2x.png | |
| iconutil -c icns App.iconset | |
| rm -R App.iconset | |
| # npm version patch -m "Build %s" | |
| VERSION=$(node -e "console.log(require('./package.json').version)") | |
| electron-packager ./ Shade \ | |
| --platform=$PLATFORM \ | |
| --asar \ | |
| --icon=App.icns \ | |
| --ignore '^/src|\.sh$|\.provisionprofile$' \ | |
| --app-bundle-id=com.halogen.shade \ | |
| --app-version=$VERSION \ | |
| --build-version=1.0.3 \ | |
| --overwrite | |
| # Delete all the language files | |
| cd "Shade-$PLATFORM-x64/Shade.app/Contents/Resources" | |
| rm -rf $(ls | grep "lproj" | grep -v "en\." | xargs) | |
| cd ../../../../ | |
| # add these if you want to the test the signed MAS build | |
| # ... provisions and all! | |
| # --type=development \ | |
| # --provisioning-profile="embedded.provisionprofile" \ | |
| electron-osx-sign "Shade-$PLATFORM-x64/Shade.app" \ | |
| --entitlements=parent.entitlements \ | |
| --platform=$PLATFORM \ | |
| --verbose | |
| electron-osx-flat "Shade-$PLATFORM-x64/Shade.app" \ | |
| --platform=$PLATFORM \ | |
| --verbose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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/> | |
| <key>com.apple.security.network.client</key> | |
| <true/> | |
| <key>com.apple.security.network.server</key> | |
| <true/> | |
| </dict> | |
| </plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment