Skip to content

Commit

Permalink
ubuntu library loading workaround
Browse files Browse the repository at this point in the history
* unpacking "sodium-native" building linux package
  • Loading branch information
vladimiry committed Jan 6, 2018
1 parent 050d068 commit b6485a2
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 42 deletions.
26 changes: 18 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,18 @@ matrix:
- os: osx
osx_image: xcode9.0
- os: linux
sudo: false
sudo: required
dist: trusty
group: stable
addons:
apt:
packages:
- bsdtar
- g++-multilib
- gcc-multilib
- gnome-keyring
- icnsutils
- libgnome-keyring-dev
- libsecret-1-dev
- python-gnomekeyring
- rpm
- xz-utils
services:
- docker
env:
global:
- ELECTRON_CACHE=$HOME/.cache/electron
Expand All @@ -36,6 +32,7 @@ cache:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
- $HOME/.cache/snapcraft
before_install:
- pip install --user awscli ; export PATH=$PATH:$HOME/.local/bin
- |
Expand All @@ -51,7 +48,20 @@ install:
- npm install
script:
- npm run app:dist
- npm run electron-builder:release
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then npm run electron-builder:release:x64; fi
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
docker run --rm -ti \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
-v ~/.cache/snapcraft:/root/.cache/snapcraft \
electronuserland/builder:8 \
/bin/bash -c "apt-get update && apt-get install libsecret-1-dev -y && npm run electron-builder:release:x64:linux"
fi
after_failure:
- $(git ls-files -o | grep -Fv -e node_modules -e app -e dist >> failure-files.list)
- find /home/travis/.npm/_logs/*.log >> failure-files.list
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,17 @@ is an unofficial [ProtonMail](https://protonmail.com/) desktop client. It's basi
- Run `nvm use 8`.
- [keytar](https://github.com/atom/node-keytar) module requires compiling prebuild node files and for that Python and C++ compiler need to be installed on your system:
- **`On Windows`**: the simplest way to install all the needed stuff on Windows is to run `npm install --global --production windows-build-tools` CLI command.
- **`On Linux`**: `python v2.7`, `make` and a C/C++ compiler toolchain, like `GCC` are most likely already installed.
- **`On Linux`**: `python v2.7`, `make` and a C/C++ compiler toolchain, like `GCC` are most likely already installed. Besides there is a need to install `libsecret` dependency, see `Installing` section [here](https://github.com/atom/node-keytar).
- **`On Mac OS X`**: `python v2.7` and [Xcode](https://developer.apple.com/xcode/download/) need to be installed. You also need to install the `Command Line Tools` via Xcode, can be found under the `Xcode -> Preferences -> Downloads` menu.
- [Clone](https://help.github.com/articles/cloning-a-repository/) this project to your local device. If you are going to contribute, consider cloning the [forked](https://help.github.com/articles/fork-a-repo/) into your own GitHub account project.
- Install dependencies running `npm install`.
- Build app running `npm run app:dist`. It's better to not touch a mouse during the process, since it might interfere with the `e2e` tests running at the end of the process.
- Build the final Electron binary running `npm run electron-builder:dist`. Outcome will be placed under the `./dist` folder.
- Build a package to install running `npm run electron-builder:dist` command to build Windows/Mac OS X package and one of the following commands to build Linux package:
- `electron-builder:dist:linux:appimage`
- `electron-builder:dist:linux:deb`
- `electron-builder:dist:linux:freebsd`
- `electron-builder:dist:linux:pacman`
- `electron-builder:dist:linux:rpm`
- `electron-builder:dist:linux:snap`
- If you don't need a package to install, but a folder to execute app from, simply run `electron-builder:dir` command.
- Outcome, whether it's a folder or package to install, comes into the `./dist` folder.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ build_script:
- node --version
- npm --version
- npm run app:dist
- npm run electron-builder:release
- npm run electron-builder:release:x64
10 changes: 3 additions & 7 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ files: [
"!node_modules/stacktrace-gps/dist",
"!node_modules/stacktrace-js/dist",
]
asar: true
compression: maximum
asar: true

mac:
icon: ./app/assets/icons/mac/icon.icns
Expand All @@ -39,12 +39,8 @@ linux:
icon: ./app/assets/icons/png
category: Office
packageCategory: Office
target:
- {target: AppImage}
- {target: deb}
- {target: freebsd}
- {target: pacman}
- {target: rpm}
asarUnpack:
- "**/node_modules/sodium-native/**/*"

win:
artifactName: ${name}-${version}-windows-${arch}.${ext}
Expand Down
56 changes: 32 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
"postinstall:cross-os": "cross-os 7zip-bin",
"electron-builder:dir": "electron-builder --dir",
"electron-builder:dist": "electron-builder",
"electron-builder:release": "electron-builder -p onTagOrDraft --x64",
"electron-builder:dist:linux": "electron-builder --linux AppImage deb freebsd pacman rpm snap",
"electron-builder:dist:linux:appimage": "electron-builder --linux AppImage",
"electron-builder:dist:linux:deb": "electron-builder --linux deb",
"electron-builder:dist:linux:freebsd": "electron-builder --linux freebsd",
"electron-builder:dist:linux:pacman": "electron-builder --linux pacman",
"electron-builder:dist:linux:rpm": "electron-builder --linux rpm",
"electron-builder:dist:linux:snap": "electron-builder --linux snap",
"electron-builder:release:x64": "electron-builder -p onTagOrDraft --x64",
"electron-builder:release:x64:linux": "electron-builder -p onTagOrDraft --x64 --linux AppImage deb freebsd pacman rpm snap",
"dist": "npm-run-all app:build electron-builder:dist",
"app:dist": "cross-env NODE_ENV=production npm-run-all lint test:electron:main app:clean app:compile app:assets test:e2e",
"app:clean": "rimraf ./app/",
Expand Down Expand Up @@ -64,7 +72,7 @@
"deep-equal": "1.0.1",
"electron-log": "2.2.13",
"electron-unhandled": "1.0.0",
"electron-updater": "2.18.0",
"electron-updater": "2.18.2",
"fs-json-store": "1.0.0",
"fs-json-store-encryption-adapter": "0.0.2",
"jimp": "0.2.28",
Expand All @@ -77,17 +85,17 @@
},
"devDependencies": {
"@angular-devkit/build-optimizer": "0.0.36",
"@angular/animations": "5.1.2",
"@angular/common": "5.1.2",
"@angular/compiler": "5.1.2",
"@angular/compiler-cli": "5.1.2",
"@angular/core": "5.1.2",
"@angular/forms": "5.1.2",
"@angular/http": "5.1.2",
"@angular/language-service": "5.1.2",
"@angular/platform-browser": "5.1.2",
"@angular/platform-browser-dynamic": "5.1.2",
"@angular/router": "5.1.2",
"@angular/animations": "5.1.3",
"@angular/common": "5.1.3",
"@angular/compiler": "5.1.3",
"@angular/compiler-cli": "5.1.3",
"@angular/core": "5.1.3",
"@angular/forms": "5.1.3",
"@angular/http": "5.1.3",
"@angular/language-service": "5.1.3",
"@angular/platform-browser": "5.1.3",
"@angular/platform-browser-dynamic": "5.1.3",
"@angular/router": "5.1.3",
"@angularclass/hmr": "2.1.3",
"@ngrx/effects": "4.1.1",
"@ngrx/router-store": "4.1.1",
Expand All @@ -96,15 +104,15 @@
"@types/keytar": "4.0.1",
"@types/lodash.pick": "4.4.3",
"@types/mkdirp": "0.5.2",
"@types/node": "8.5.2",
"@types/node": "8.5.7",
"@types/randomstring": "1.1.6",
"@types/sinon": "4.1.2",
"@types/stacktrace-js": "0.0.32",
"@types/valid-url": "1.0.2",
"@types/webdriverio": "4.8.7",
"@types/webpack": "3.8.1",
"@types/webpack": "3.8.2",
"@types/webpack-env": "1.13.3",
"autoprefixer": "7.2.3",
"autoprefixer": "7.2.4",
"ava": "0.24.0",
"ava-ts": "0.23.0",
"awesome-typescript-loader": "3.4.1",
Expand All @@ -115,28 +123,28 @@
"cross-env": "5.1.3",
"cross-os": "1.2.2",
"cross-spawn": "5.1.0",
"css-loader": "0.28.7",
"css-loader": "0.28.8",
"cssnano": "3.10.0",
"devtron": "1.4.0",
"electron": "1.8.2-beta.3",
"electron-builder": "19.50.0",
"electron-builder-squirrel-windows": "19.50.0",
"electron-builder": "19.52.1",
"electron-builder-squirrel-windows": "19.52.0",
"electron-rebuild": "1.6.0",
"exports-loader": "0.6.4",
"extended-define-webpack-plugin": "0.1.3",
"extract-text-webpack-plugin": "3.0.2",
"file-loader": "1.1.6",
"font-awesome": "4.7.0",
"gulp": "3.9.1",
"html-loader": "0.5.1",
"html-loader": "0.5.4",
"html-webpack-plugin": "2.30.1",
"less-loader": "4.0.5",
"mkdirp": "0.5.1",
"ngx-bootstrap": "2.0.0-rc.0",
"node-sass": "4.7.2",
"npm-run-all": "4.1.2",
"postcss-custom-properties": "6.2.0",
"postcss-loader": "2.0.9",
"postcss-loader": "2.0.10",
"postcss-url": "7.3.0",
"pre-commit": "1.2.2",
"ps-tree": "1.1.0",
Expand All @@ -156,15 +164,15 @@
"stylus-loader": "3.0.1",
"to-string-loader": "1.1.5",
"ts-node": "4.1.0",
"tsconfig-paths": "2.6.0",
"tsconfig-paths": "2.7.3",
"tslint": "5.8.0",
"tslint-rules-bunch": "0.0.3",
"typescript": "2.6.2",
"uglifyjs-webpack-plugin": "1.1.5",
"uglifyjs-webpack-plugin": "1.1.6",
"url-loader": "0.6.2",
"wait-on": "2.0.2",
"webpack": "3.10.0",
"webpack-dev-server": "2.9.7",
"webpack-dev-server": "2.10.0",
"webpack-merge": "4.1.1",
"webpack-split-by-path": "2.0.0",
"zone.js": "0.8.19"
Expand Down

0 comments on commit b6485a2

Please sign in to comment.