Skip to content

Commit

Permalink
docs: add link to #379 and #326
Browse files Browse the repository at this point in the history
  • Loading branch information
develar committed Jun 2, 2016
1 parent f6c47f7 commit 7c2a3bc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ Why the two package.json structure is ideal and how it solves a lot of issues
1. Native npm modules (those written in C, not JavaScript) need to be compiled, and here we have two different compilation targets for them. Those used in application need to be compiled against electron runtime, and all `devDependencies` need to be compiled against your locally installed node.js. Thanks to having two files this is trivial.
2. When you package the app for distribution there is no need to add up to size of the app with your `devDependencies`. Here those are always not included (because reside outside the `app` directory).

Please see [#379](https://github.com/electron-userland/electron-builder/issues/379#issuecomment-218503881) and [#326](https://github.com/electron-userland/electron-builder/issues/326#issuecomment-211124807).

# Configuration

See [options](https://github.com/electron-userland/electron-builder/wiki/Options), but consider to follow simple guide outlined below at first.

For a production app you need to sign your application.
It costs only $59 (and 2 weeks), see [Where to buy code signing certificate](https://github.com/electron-userland/electron-builder/wiki/Code-Signing#where-to-buy-code-signing-certificate).
For a production app you need to sign your application, see [Where to buy code signing certificate](https://github.com/electron-userland/electron-builder/wiki/Code-Signing#where-to-buy-code-signing-certificate).

## In short
1. Specify standard fields in the application `package.json`[name](https://github.com/electron-userland/electron-builder/wiki/Options#AppMetadata-name), `description`, `version` and [author](https://docs.npmjs.com/files/package.json#people-fields-author-contributors) (for Linux [homepage](https://github.com/electron-userland/electron-builder/wiki/Options#AppMetadata-homepage) and [license](https://github.com/electron-userland/electron-builder/wiki/Options#AppMetadata-license) are also required).
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- sudo apt-get install git-lfs=1.2.0
- ssh [email protected] git-lfs-authenticate $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git download
- git lfs pull
- docker run --rm --env-file ./test/docker-env.list -v ${PWD}:/project -v ~/.electron:/root/.electron -v ~/.cache:/root/.cache electronuserland/electron-builder:$([ "$CIRCLE_NODE_INDEX" == "3" ] && echo "4" || echo "wine") /test.sh
- docker run --rm --env-file ./test/docker-env.list -v ${PWD}:/project -v ~/.electron:/root/.electron -v ~/.cache:/root/.cache electronuserland/electron-builder:$([ "$CIRCLE_NODE_INDEX" == "2" ] && echo "4" || echo "wine") /test.sh

test:
override:
Expand Down
9 changes: 5 additions & 4 deletions docs/Code Signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ On a OS X development machine valid and appropriate identity from your keychain
To sign app on build server you need to set `CSC_LINK`, `CSC_KEY_PASSWORD` (and `CSC_INSTALLER_LINK`, `CSC_INSTALLER_KEY_PASSWORD` if you build for Mac App Store):

1. [Export](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW7) certificate.
[Strong password](http://security.stackexchange.com/a/54773) must be used. Consider to not use special characters (for bash) because “*values are not escaped when your builds are executed*”.
2. Upload `*.p12` file (e.g. on Google Drive, use [direct link generator](http://www.syncwithtech.org/p/direct-download-link-generator.html) to get correct download link).
Consider to not use special characters (for bash) in the password because “*values are not escaped when your builds are executed*”.
2. Encode file to base64 (osx/linux: `base64 -i yourFile.p12 -o envValue.txt`).

Or upload `*.p12` file (e.g. on Google Drive, use [direct link generator](http://www.syncwithtech.org/p/direct-download-link-generator.html) to get correct download link).

Or encode file to base64 (osx/linux: `base64 -in yourFile.p12 -out envValue.txt`).
3. Set `CSC_LINK` and `CSC_KEY_PASSWORD` environment variables (and `CSC_INSTALLER_LINK`/`CSC_INSTALLER_KEY_PASSWORD` in addition if you build MAS). See [Travis](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings) or [AppVeyor](https://www.appveyor.com/docs/build-configuration#environment-variables) documentation.
Recommended to set it in the CI Project Settings, not in the `.travis.yml`/`appveyor.yml` files to avoid special characters (for bash) issues.
Recommended to set it in the CI Project Settings, not in the `.travis.yml`/`appveyor.yml`. If you use link to file (not base64 encoded data), make sure to escape special characters (for bash) accordingly.

In case of AppVeyor, don't forget to click on lock icon to “Toggle variable encryption”.

Expand Down
1 change: 1 addition & 0 deletions test/docker-env.list
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ NPM_TOKEN
CI
TEST_FILES
SKIP_WIN
CIRCLE_NODE_TOTAL
CIRCLE_NODE_INDEX
TRAVIS
TRAVIS_PULL_REQUEST
Expand Down

0 comments on commit 7c2a3bc

Please sign in to comment.