Update electron-builder

This commit is contained in:
Igor Gassmann 2017-12-20 11:48:38 -03:00
parent 93d63865be
commit 01dd124d60
6 changed files with 140 additions and 110 deletions

View file

@ -32,9 +32,9 @@ Run `yarn dev`
This will set up a server that will automatically compile any changes made inside `src\` folder and automatically reload the app without losing the state.
### Packaging
### Build
Run `yarn dist`
Run `yarn build`
We use [electron-builder](https://github.com/electron-userland/electron-builder)
to create distributable packages.
@ -60,16 +60,16 @@ exit
python -m pip install -r build\requirements.txt
npm install -g yarn
yarn install
yarn dist
yarn build
```
3. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `dist\`
### Building lbry-app
Run `yarn dist`
3. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `static\daemon`
### Ongoing Development
Run `yarn dev`
### Build
Run `yarn build`
This will set up a server that will automatically compile any changes made inside `src\` folder and automatically reload the app without losing the state.
## Internationalization

View file

@ -26,7 +26,7 @@ dir static\daemon\ # verify that daemon binary is there
rm daemon.zip
# build electron app
yarn dist
yarn build
dir dist # verify that binary was built/named correctly
python build\upload_assets.py

View file

@ -77,7 +77,7 @@ if [ "$FULL_BUILD" == "true" ]; then
security unlock-keychain -p ${KEYCHAIN_PASSWORD} osx-build.keychain
fi
yarn dist
yarn build
# electron-build has a publish feature, but I had a hard time getting
# it to reliably work and it also seemed difficult to configure. Not proud of

View file

@ -1,7 +1,7 @@
{
"appId": "io.lbry.LBRY",
"mac": {
"category": "public.app-category.entertainment",
"category": "public.app-category.entertainment"
},
"dmg": {
"iconSize": 128,

View file

@ -14,17 +14,17 @@
"name": "LBRY Inc.",
"email": "hello@lbry.io"
},
"main": "src/main/index.js",
"scripts": {
"extract-langs": "node src/renderer/extractLocals.js",
"extract-langs": "node build/extractLocals.js",
"dev": "electron-webpack dev",
"compile": "electron-webpack && yarn extract-langs",
"dist": "yarn compile && electron-builder",
"dist:dir": "yarn dist -- --dir -c.compression=store -c.mac.identity=null",
"build": "yarn compile && electron-builder build",
"postinstall": "electron-builder install-app-deps",
"precommit": "lint-staged",
"lint": "eslint src/"
"lint": "eslint src/",
"pretty": "prettier src/ --write"
},
"main": "src/main/index.js",
"keywords": [
"lbry"
],
@ -65,6 +65,7 @@
"y18n": "^4.0.0"
},
"devDependencies": {
"babel-eslint": "^8.0.3",
"babel-plugin-module-resolver": "^3.0.0",
"babel-plugin-react-require": "^3.0.0",
"babel-polyfill": "^6.20.0",
@ -74,10 +75,10 @@
"bluebird": "^3.5.1",
"devtron": "^1.4.0",
"electron": "^1.7.9",
"electron-builder": "^19.48.2",
"electron-builder": "^19.49.0",
"electron-devtools-installer": "^2.2.1",
"electron-webpack": "^1.11.0",
"electron-webpack-eslint": "^1.2.0",
"eslint": "^4.13.1",
"eslint-config-airbnb": "^16.1.0",
"eslint-config-prettier": "^2.9.0",
"eslint-import-resolver-webpack": "^0.8.3",
@ -109,7 +110,7 @@
"license": "MIT",
"lint-staged": {
"src/**/*.{js,jsx}": [
"prettier --trailing-comma es5 --write",
"prettier --write",
"git add"
]
},

213
yarn.lock
View file

@ -171,7 +171,7 @@ agentkeepalive@^3.3.0:
dependencies:
humanize-ms "^1.2.1"
ajv-keywords@^2.0.0, ajv-keywords@^2.1.0:
ajv-keywords@^2.0.0, ajv-keywords@^2.1.0, ajv-keywords@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.1.tgz#617997fc5f60576894c435f940d819e135b80762"
@ -200,6 +200,15 @@ ajv@^5.3.0:
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
ajv@^5.5.1:
version "5.5.2"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965"
dependencies:
co "^4.6.0"
fast-deep-equal "^1.0.0"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.3.0"
align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
@ -281,14 +290,14 @@ anymatch@^1.3.0:
micromatch "^2.1.5"
normalize-path "^2.0.0"
app-package-builder@1.5.3:
version "1.5.3"
resolved "https://registry.yarnpkg.com/app-package-builder/-/app-package-builder-1.5.3.tgz#a24776370dae3b7c35e7aedfbc77b93137d2ab4c"
app-package-builder@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/app-package-builder/-/app-package-builder-2.0.0.tgz#f0a6cbd2010e68fc79a44e9844c4a512e33ae55e"
dependencies:
bluebird-lst "^1.0.5"
builder-util "^3.4.3"
builder-util-runtime "^3.3.0"
fs-extra-p "^4.4.4"
builder-util "^3.4.4"
builder-util-runtime "^3.4.0"
fs-extra-p "^4.5.0"
int64-buffer "^0.1.10"
rabin-bindings "~1.7.4"
@ -510,7 +519,7 @@ babel-core@^6.24.1, babel-core@^6.26.0:
slash "^1.0.0"
source-map "^0.5.6"
babel-eslint@^8.0.1:
babel-eslint@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.3.tgz#f29ecf02336be438195325cd47c468da81ee4e98"
dependencies:
@ -1579,7 +1588,16 @@ buffers@~0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/buffers/-/buffers-0.1.1.tgz#b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb"
builder-util-runtime@3.3.0, builder-util-runtime@^3.3.0:
builder-util-runtime@3.4.0:
version "3.4.0"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-3.4.0.tgz#34883f50a3bbf6502abc40902926a1a8dfef5d43"
dependencies:
bluebird-lst "^1.0.5"
debug "^3.1.0"
fs-extra-p "^4.5.0"
sax "^1.2.4"
builder-util-runtime@^3.3.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-3.3.0.tgz#6374029211544f1a380fc7275658b0616b0e9ae1"
dependencies:
@ -1588,7 +1606,37 @@ builder-util-runtime@3.3.0, builder-util-runtime@^3.3.0:
fs-extra-p "^4.4.4"
sax "^1.2.4"
builder-util@3.4.3, builder-util@^3.4.2, builder-util@^3.4.3:
builder-util-runtime@^3.3.1, builder-util-runtime@^3.4.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-3.4.1.tgz#5fb4cea5bb2bdfae1262aba099c21b2bdcecd742"
dependencies:
bluebird-lst "^1.0.5"
debug "^3.1.0"
fs-extra-p "^4.5.0"
sax "^1.2.4"
builder-util@3.4.4, builder-util@^3.4.4:
version "3.4.4"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-3.4.4.tgz#cab30f37c1ee4fb23d33b20ac71e76e3c8451d28"
dependencies:
"7zip-bin" "^2.3.4"
bluebird-lst "^1.0.5"
builder-util-runtime "^3.3.1"
chalk "^2.3.0"
debug "^3.1.0"
fs-extra-p "^4.4.5"
ini "^1.3.5"
is-ci "^1.0.10"
js-yaml "^3.10.0"
lazy-val "^1.0.3"
node-emoji "^1.8.1"
semver "^5.4.1"
source-map-support "^0.5.0"
stat-mode "^0.2.2"
temp-file "^3.0.0"
tunnel-agent "^0.6.0"
builder-util@^3.4.2:
version "3.4.3"
resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-3.4.3.tgz#c7d6908ffc56fa3c4de0ec804dbcb9bbf6aa2ab4"
dependencies:
@ -1917,10 +1965,6 @@ coa@~1.0.1:
dependencies:
q "^1.1.2"
coalescy@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/coalescy/-/coalescy-1.0.0.tgz#4b065846b836361ada6c4b4a4abf4bc1cac31bf1"
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@ -2704,51 +2748,51 @@ ejs@^2.5.7:
version "2.5.7"
resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a"
electron-builder-lib@19.48.2:
version "19.48.2"
resolved "https://registry.yarnpkg.com/electron-builder-lib/-/electron-builder-lib-19.48.2.tgz#1b088d219937c0acdcefdd68c4933074cfa2e309"
electron-builder-lib@19.49.0:
version "19.49.0"
resolved "https://registry.yarnpkg.com/electron-builder-lib/-/electron-builder-lib-19.49.0.tgz#352e334dfcbb4073bb5e78e28a32acb723789895"
dependencies:
"7zip-bin" "^2.3.4"
app-package-builder "1.5.3"
app-package-builder "2.0.0"
asar-integrity "0.2.3"
async-exit-hook "^2.0.1"
bluebird-lst "^1.0.5"
builder-util "3.4.3"
builder-util-runtime "3.3.0"
builder-util "3.4.4"
builder-util-runtime "3.4.0"
chromium-pickle-js "^0.2.0"
debug "^3.1.0"
dmg-builder "2.1.8"
ejs "^2.5.7"
electron-osx-sign "0.4.7"
electron-publish "19.46.5"
fs-extra-p "^4.4.4"
electron-publish "19.49.0"
fs-extra-p "^4.5.0"
hosted-git-info "^2.5.0"
is-ci "^1.0.10"
isbinaryfile "^3.0.2"
js-yaml "^3.10.0"
lazy-val "^1.0.2"
lazy-val "^1.0.3"
minimatch "^3.0.4"
normalize-package-data "^2.4.0"
plist "^2.1.0"
read-config-file "1.2.0"
read-config-file "1.2.1"
sanitize-filename "^1.6.1"
semver "^5.4.1"
temp-file "^3.0.0"
electron-builder@^19.48.2:
version "19.48.2"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-19.48.2.tgz#3de27d1e53ffbe715725d461add287f201d056e4"
electron-builder@^19.49.0:
version "19.49.0"
resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-19.49.0.tgz#f7a2754353ffd5dfe26e0cbe5dfe92d89e5cea0c"
dependencies:
bluebird-lst "^1.0.5"
builder-util "3.4.3"
builder-util-runtime "3.3.0"
builder-util "3.4.4"
builder-util-runtime "3.4.0"
chalk "^2.3.0"
electron-builder-lib "19.48.2"
electron-builder-lib "19.49.0"
electron-download-tf "4.3.4"
fs-extra-p "^4.4.4"
fs-extra-p "^4.5.0"
is-ci "^1.0.10"
lazy-val "^1.0.2"
read-config-file "1.2.0"
lazy-val "^1.0.3"
read-config-file "1.2.1"
sanitize-filename "^1.6.1"
update-notifier "^2.3.0"
yargs "^10.0.3"
@ -2809,30 +2853,21 @@ electron-osx-sign@0.4.7:
minimist "^1.2.0"
plist "^2.1.0"
electron-publish@19.46.5:
version "19.46.5"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-19.46.5.tgz#eb545af247edc78297a9ace6ebb2bad7c0fcc2a4"
electron-publish@19.49.0:
version "19.49.0"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-19.49.0.tgz#ca75482f7767683f14428d47344f34e9bf78c2d4"
dependencies:
bluebird-lst "^1.0.5"
builder-util "^3.4.2"
builder-util-runtime "^3.3.0"
builder-util "^3.4.4"
builder-util-runtime "^3.4.0"
chalk "^2.3.0"
fs-extra-p "^4.4.4"
fs-extra-p "^4.5.0"
mime "^2.0.3"
electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.27:
version "1.3.27"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d"
electron-webpack-eslint@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/electron-webpack-eslint/-/electron-webpack-eslint-1.2.0.tgz#34772534e3941273ce6dcae7f26366c28bd7dfa1"
dependencies:
babel-eslint "^8.0.1"
eslint "^4.9.0"
eslint-friendly-formatter "^3.0.0"
eslint-loader "^1.9.0"
electron-webpack-js@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/electron-webpack-js/-/electron-webpack-js-1.1.0.tgz#c7c1cf375f6d32638ba62f46e1bd31445b7f1018"
@ -3111,16 +3146,6 @@ eslint-config-prettier@^2.9.0:
dependencies:
get-stdin "^5.0.1"
eslint-friendly-formatter@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/eslint-friendly-formatter/-/eslint-friendly-formatter-3.0.0.tgz#278874435a6c46ec1d94fa0b1ff494e30ef04290"
dependencies:
chalk "^1.0.0"
coalescy "1.0.0"
extend "^3.0.0"
minimist "^1.2.0"
text-table "^0.2.0"
eslint-import-resolver-node@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc"
@ -3144,16 +3169,6 @@ eslint-import-resolver-webpack@^0.8.3:
resolve "^1.2.0"
semver "^5.3.0"
eslint-loader@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.9.0.tgz#7e1be9feddca328d3dcfaef1ad49d5beffe83a13"
dependencies:
loader-fs-cache "^1.0.0"
loader-utils "^1.0.2"
object-assign "^4.0.1"
object-hash "^1.1.4"
rimraf "^2.6.1"
eslint-module-utils@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449"
@ -3214,7 +3229,7 @@ eslint-scope@^3.7.1:
esrecurse "^4.1.0"
estraverse "^4.1.1"
eslint@^4.9.0:
eslint@^4.13.1:
version "4.13.1"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.13.1.tgz#0055e0014464c7eb7878caf549ef2941992b444f"
dependencies:
@ -3440,7 +3455,7 @@ ext-name@^5.0.0:
ext-list "^2.0.0"
sort-keys-length "^1.0.0"
extend@^3.0.0, extend@~3.0.0, extend@~3.0.1:
extend@~3.0.0, extend@~3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
@ -3609,14 +3624,6 @@ find-babel-config@^1.1.0:
json5 "^0.5.1"
path-exists "^3.0.0"
find-cache-dir@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-0.1.1.tgz#c8defae57c8a52a8a784f9e31c57c742e993a0b9"
dependencies:
commondir "^1.0.1"
mkdirp "^0.5.1"
pkg-dir "^1.0.0"
find-cache-dir@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-1.0.0.tgz#9288e3e9e3cc3748717d39eade17cf71fc30ee6f"
@ -3786,6 +3793,13 @@ fs-extra-p@^4.4.4:
bluebird-lst "^1.0.4"
fs-extra "^4.0.2"
fs-extra-p@^4.4.5, fs-extra-p@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/fs-extra-p/-/fs-extra-p-4.5.0.tgz#b79f3f3fcc0b5e57b7e7caeb06159f958ef15fe8"
dependencies:
bluebird-lst "^1.0.5"
fs-extra "^5.0.0"
fs-extra@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
@ -3804,6 +3818,14 @@ fs-extra@^4.0.0, fs-extra@^4.0.1, fs-extra@^4.0.2:
jsonfile "^4.0.0"
universalify "^0.1.0"
fs-extra@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^4.0.0"
universalify "^0.1.0"
fs-vacuum@~1.2.10:
version "1.2.10"
resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36"
@ -5104,6 +5126,10 @@ lazy-val@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.2.tgz#d9b07fb1fce54cbc99b3c611de431b83249369b6"
lazy-val@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.3.tgz#bb97b200ef00801d94c317e29dc6ed39e31c5edc"
lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
@ -5235,13 +5261,6 @@ load-json-file@^2.0.0:
pify "^2.0.0"
strip-bom "^3.0.0"
loader-fs-cache@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.1.tgz#56e0bf08bd9708b26a765b68509840c8dec9fdbc"
dependencies:
find-cache-dir "^0.1.1"
mkdirp "0.5.1"
loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
@ -5716,7 +5735,7 @@ mixin-object@^2.0.1:
for-in "^0.1.3"
is-extendable "^0.1.1"
mkdirp@0.5, mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
mkdirp@0.5, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
@ -6272,10 +6291,6 @@ object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
object-hash@^1.1.4:
version "1.2.0"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.2.0.tgz#e96af0e96981996a1d47f88ead8f74f1ebc4422b"
object-keys@^1.0.6, object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
@ -7303,7 +7318,21 @@ read-cmd-shim@~1.0.1:
dependencies:
graceful-fs "^4.1.2"
read-config-file@1.2.0, read-config-file@^1.2.0:
read-config-file@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.2.1.tgz#f889ea5c13372319433f5df09d7a9742c72d0b25"
dependencies:
ajv "^5.5.1"
ajv-keywords "^2.1.1"
bluebird-lst "^1.0.5"
dotenv "^4.0.0"
dotenv-expand "^4.0.1"
fs-extra-p "^4.4.4"
js-yaml "^3.10.0"
json5 "^0.5.1"
lazy-val "^1.0.2"
read-config-file@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-1.2.0.tgz#1fd7dc8ccdad838cac9f686182625290fc94f456"
dependencies:
@ -8533,7 +8562,7 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"
text-table@^0.2.0, text-table@~0.2.0:
text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"