Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
[gulp] Refactor and Ethereum-Wallet NSIS installer (#1642)
Browse files Browse the repository at this point in the history
* Add Ethereum-Wallet NSIS installer

* minor changes

* improve makensis call

* Improve Uploader

* Refactor

* refactor

* remove eth node

* remove build-dist.js

* added 'options.platforms' and 'options.activePlatforms'

* remove squirrel

* fix

* cleanup

* string formating, windows compatibility

* md5 checksum platform compatibiliy

* cleanup Linter errors

* update travis.yml

* minor fix

* improve platform usage hint (don't show 'mac' on non macOS systems)

* Rectifying documentation

* update Readme

* typo in readme

* add clarification on available platforms on the host platform

* remove unnessecary linux dep

* cleanup patch string
  • Loading branch information
luclu authored and alexvansande committed Apr 3, 2017
1 parent d4eb221 commit 51f8bfe
Show file tree
Hide file tree
Showing 55 changed files with 638 additions and 678 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ rules:
import/no-extraneous-dependencies: ## checks if required modules are missing in packages.json
- error
- devDependencies: ## declares files, whose imports belong to devDependencies
- "**/scripts/build-dist.js"
- "**/tests/_base.js"
- "**/*.test.js"
- "**/gulpTasks/*.js"

globals: # don't warn about missing declarations
i18n: true
Expand Down
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ matrix:
- sudo dpkg --add-architecture i386 && sudo add-apt-repository ppa:ubuntu-wine/ppa -y
- sudo apt-get update -q
- sudo apt-get install --no-install-recommends -y mono-devel ca-certificates-mono wine1.8
after_script:
- makensis -V2 scripts/windows-installer.nsi


# LINUX
- os: linux
Expand Down Expand Up @@ -71,14 +68,13 @@ install:

script:
- if [[ $TRAVIS_BRANCH != "master" ]]; then unset CSC_LINK CSC_KEY_PASSWORD; fi # disable macOS code-signing (production certificate) on develop branch
- travis_wait 60 gulp mist --platform $GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp wallet --platform $GULP_PLATFORM; fi # also build wallet if on master branch
- travis_wait 60 gulp --$GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then travis_wait 60 gulp --wallet --$GULP_PLATFORM; fi # also build wallet if on master branch
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi
- if [[ $GULP_PLATFORM != "win" ]]; then gulp test-mist; fi
- if [[ $GULP_PLATFORM != "win" ]]; then gulp test; fi

after_success:
- gulp mist-checksums --platform $GULP_PLATFORM
- if [[ $TRAVIS_BRANCH == "master" ]]; then gulp wallet-checksums --platform $GULP_PLATFORM; fi
- if [[ $TRAVIS_BRANCH == "master" ]]; then gulp uploadQueue --$GULP_PLATFORM; fi

notifications:
webhooks:
Expand Down
84 changes: 41 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,60 +136,61 @@ $ electron . --rpc ~/Library/Ethereum/geth.ipc --node-networkid 1234 --node-dat
_NOTE: since `ipcpath` is also a Mist option you do not need to also include a
`--node-ipcpath` option._

You can also run `geth` separately yourself with the same options prior to start
Mist normally.
You can also launch `geth` separately with the same options prior starting
Mist.


### Deployment

Our build system relies on [gulp](http://gulpjs.com/) and [electron-builder](https://github.com/electron-userland/electron-builder/).

To create a binaries you need to install [`electron-builder` dependencies](https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#macos):
#### Dependencies

[meteor-build-client](https://github.com/frozeman/meteor-build-client) bundles the [meteor](https://www.meteor.com/)-based interface. Install it via:

// tools for the windows binaries
$ brew install wine --without-x11 mono makensis
// tools for the Linux binaries
$ brew install gnu-tar libicns graphicsmagick xz
// general dependencies
$ npm install -g meteor-build-client

To generate the binaries simply run:
Furthermore cross-platform builds require additional [`electron-builder` dependencies](https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build#linux). On macOS those are:

$ cd mist
$ gulp
// windows deps
$ brew install wine --without-x11 mono makensis

// Or to generate the wallet (using the https://github.com/ethereum/meteor-dapp-wallet -> master)
$ gulp wallet
// linux deps
$ brew install gnu-tar libicns graphicsmagick xz

This will generate the binaries inside the `dist_mist/release` or `dist_wallet/release` folder.
#### Generate packages

#### Options
To generate the binaries for Mist run:

##### platform
$ gulp

Additional you can only build the windows, linux, mac or all binary by using the `platform` option:
To generate the Ethereum Wallet (this will pack the one Ðapp from https://github.com/ethereum/meteor-dapp-wallet):

$ gulp update-nodes --platform mac
$ gulp --wallet

// And
$ gulp mist --platform mac
The generated binaries will be under `dist_mist/release` or `dist_wallet/release`.

// Or
$ gulp mist --platform mac,win

#### Options

Options are:
##### platform

To build binaries for specific platforms (default: all available) use the following flags:

// on mac
$ gulp --win --linux --mac

- `mac` (Mac OSX)
- `win` (Windows)
- `linux` (Linux)
- `all` (default)
// on linux
$ gulp --win --linux

// on win
$ gulp --win

##### walletSource

With the `walletSource` you can specify the branch to use, default ist `master`:
With the `walletSource` you can specify the Wallet branch to use, default is `master`:

$ gulp mist --walletSource develop
$ gulp --wallet --walletSource develop


Options are:
Expand All @@ -198,28 +199,25 @@ Options are:
- `develop`
- `local` Will try to build the wallet from [mist/]../meteor-dapp-wallet/app

##### mist-checksums | wallet-checksums
*Note: applicable only when combined with `--wallet`*

Spits out the SHA256 checksums of distributables.
#### Checksums

Spits out the MD5 checksums of distributables.

It expects installer/zip files to be in the generated folders e.g. `dist_mist/release`

$ gulp mist-checksums
$ gulp checksums [--wallet]

3f726fff186b85c600ea2459413d0bf5ada2dbc98877764efbefa545f96eb975 ./dist_mist/release/Mist-0.8.1-ia32.exe
ab4d26d5ebc66e9aba0fa610071266bacbb83faacbb7ed0dd2acb24386190bdb ./dist_mist/release/Mist-0.8.1.exe
909b0fb4c7b09b731b2a442c457747e04ffdd9c03b6edc06079ae05a46200d13 ./dist_mist/release/Mist-0.8.1-ia32.deb
e114d6188963dfdae0489abf4e8923da58b39ff9cdbaad26e803af27c7ce55d1 ./dist_mist/release/Mist-0.8.1.deb
930787dd2f5ed6931068bff9244bccc01f397f552c48ded0f08e515e276dd080 ./dist_mist/release/Mist-0.8.1.dmg

### Code signing for production
## Testing

**As of [#972](https://github.com/ethereum/mist/pull/972) we've updated the build process and thus need to redo code-signing.**
First make sure to build Mist with:

$ gulp [--wallet]

## Testing
Then run the tests:

First make sure to build Mist with:
`gulp mist --platform [mac,linux]` or `gulp wallet --platform [mac,linux]`.
$ gulp test [--wallet]

Then run `gulp test-mist` or `gulp test-wallet`, accordingly.
*Note: Integration tests are not yet supported on Windows.*
Loading

0 comments on commit 51f8bfe

Please sign in to comment.