зеркало из https://github.com/electron/osx-sign.git
Distribution guide added in Getting Started
Родитель
3bfd6e7ed1
Коммит
866e1fefb7
|
@ -61,14 +61,50 @@ Under `Xcode > Preferences (⌘,) > Accounts`, you may add your Apple ID. With y
|
|||
|
||||
#### Install The Tools
|
||||
|
||||
We will be installing these tools globally (-g). You may install them locally for your project however if you do you may need to adjust paths.
|
||||
We will be installing these tools globally (`-g`). You may install them locally for your project however if you do you may need to adjust paths.
|
||||
|
||||
```sh
|
||||
# install maxogden's electron-packager
|
||||
# Install maxogden's electron-packager
|
||||
npm install https://github.com/maxogden/electron-packager -g
|
||||
|
||||
# install electron-osx-sign for more customization
|
||||
# Install electron-osx-sign for more customization
|
||||
npm install electron-osx-sign -g
|
||||
```
|
||||
|
||||
*Note: If the installation fails with disk permissions as it being globally, please re-try these commands again with superuser, with `sudo su` and your account password. This procedure may fail if your account isn't previously assigned with a password. To do so, you may navigate to `System Preferences > Users & Groups` and set up a password for your account.*
|
||||
|
||||
#### Distribution
|
||||
|
||||
##### Inside the Mac App Store
|
||||
|
||||
```sh
|
||||
# EITHER pack your app and sign it both at once
|
||||
electron-packager . "My App" --platform=mas --arch=x64 --version=0.35.6 --app-bundle-id="com.mysite.myapp" --app-version="1.0.0" --build-version="1.0.100" --sign
|
||||
|
||||
# OR pack your app first then manually sign it
|
||||
electron-packager . "My App" --platform=mas --arch=x64 --version=0.35.6 --app-bundle-id="com.mysite.myapp" --app-version="1.0.0" --build-version="1.0.100"
|
||||
# Code-sign app bundle with custom entitlements
|
||||
electron-osx-sign "My App-mas-x64/My App.app"
|
||||
|
||||
# Create installer package for shipping
|
||||
electron-osx-flat "My App-mas-x64/My App.app"
|
||||
```
|
||||
|
||||
Notice that the `platform` we use here is `mas` to indicate this build is for Mac App Store, in which certain libraries and private API calls are removed to avoid rejection from app review. If you have only one set of production certifications from iTunes Connect, then you can sign your app without specifying a signing identity, and allow `electron-osx-sign` to automatically detect your available certificate.
|
||||
|
||||
##### Outside the Mac App Store
|
||||
|
||||
```sh
|
||||
# EITHER pack your app and sign it both at once
|
||||
electron-packager . "My App" --platform=darwin --arch=x64 --version=0.35.6 --app-bundle-id="com.mysite.myapp" --app-version="1.0.0" --build-version="1.0.100" --sign
|
||||
|
||||
# OR pack your app first then manually sign it
|
||||
electron-packager . "My App" --platform=darwin --arch=x64 --version=0.35.6 --app-bundle-id="com.mysite.myapp" --app-version="1.0.0" --build-version="1.0.100"
|
||||
# Code-sign app bundle with custom entitlements
|
||||
electron-osx-sign "My App-mas-x64/My App.app"
|
||||
|
||||
# OPTIONAL: Create installer package for shipping
|
||||
electron-osx-flat "My App-mas-x64/My App.app"
|
||||
```
|
||||
|
||||
Notice that the `platform` we use here is `darwin` to indicate this build is for OS X (not Mac App Store). If you have only one set of production certifications from iTunes Connect, then you can sign your app without specifying a signing identity, and allow `electron-osx-sign` to automatically detect your available certificate.
|
||||
|
|
Загрузка…
Ссылка в новой задаче