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

Integrating electron-builder for better distributables building #972

Merged
merged 31 commits into from
Sep 15, 2016

Conversation

hiddentao
Copy link
Contributor

@hiddentao hiddentao commented Jul 15, 2016

This replaces electron-packager with electron-builder so that we can build distributables with installers for both Mist and the Wallet.

  • Creates installers for Windows, Mac and Linux (debian) 👊
  • Builds for 32-bit on all platforms where supported
  • Streamlined node download and unzipping process
  • Renames darwin to mac inside code and gulpfile because that's what electron-builder uses
  • Upon success, builds are placed into either dist_mist/release or dist_wallet/release depending on chosen app type (mist, wallet)

@hiddentao hiddentao added this to the 0.8.2 milestone Jul 15, 2016
@luclu luclu mentioned this pull request Jul 17, 2016
19 tasks
@@ -1,7 +1,17 @@
{
"name": "Mist",
"version": "0.8.0",
"version": "0.8.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@hiddentao
Copy link
Contributor Author

Got distributables building for all platforms, but when I try to install on Windows it comes up with a JS syntax error. I wasn't getting this before either. Need to figure it out.

@frozeman
Copy link
Contributor

frozeman commented Aug 3, 2016

Are you making sure that when you rename darwin to mac, that files are properly catched, as the electron builder uses darwin and also the downloadable geth packages

@hiddentao
Copy link
Contributor Author

I need to double-check everything obviously. But fairly sure that's all working now.

@hiddentao
Copy link
Contributor Author

Finally this is ready for review!

@alexvandesande
Copy link
Collaborator

Tried running it but wasn't able to build anything:

(node:14282) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
You can select a platform like: --platform <mac|win|linux|all>
App type: mist
Mist version: 0.8.2
Electron version: 1.3.5
Selected platform: [ 'darwin' ]
[20:08:51] Using gulpfile ~/dev/mist/gulpfile.js
[20:08:51] Starting 'mist'...
[20:08:51] Starting 'set-variables-mist'...
[20:08:51] Finished 'set-variables-mist' after 352 μs
[20:08:51] Starting 'clean:dist'...
[20:08:51] Starting 'checkNodes'...
[20:08:51] Finished 'checkNodes' after 933 μs
[20:10:00] Finished 'clean:dist' after 1.15 min
[20:10:00] Starting 'copy-app-source-files'...
[20:10:00] Starting 'copy-node-folder-files'...
[20:10:02] Finished 'copy-app-source-files' after 1.98 s
[20:10:02] Starting 'copy-app-folder-files'...
cp: /Users/alex/dev/mist/node_modules/webdriverio/node_modules/.bin/supports-color: No such file or directory
Error symlinking node_modules
[20:12:19] 'copy-app-folder-files' errored after 2.28 min
[20:12:19] Error: cp: /Users/alex/dev/mist/node_modules/webdriverio/node_modules/.bin/supports-color: No such file or directory

    at formatError (/usr/local/lib/node_modules/gulp/bin/gulp.js:169:10)
    at Gulp.<anonymous> (/usr/local/lib/node_modules/gulp/bin/gulp.js:195:15)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/alex/dev/mist/node_modules/orchestrator/index.js:264:8)
    at /Users/alex/dev/mist/node_modules/orchestrator/index.js:275:23
    at finish (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:29:3)
    at Gulp.<anonymous> (/Users/alex/dev/mist/gulpfile.js:284:16)
    at module.exports (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/alex/dev/mist/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/alex/dev/mist/node_modules/orchestrator/index.js:214:10)
    at /Users/alex/dev/mist/node_modules/orchestrator/index.js:279:18
    at finish (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:52:4
    at f (/Users/alex/dev/mist/node_modules/once/once.js:17:25)
[20:12:19] 'mist' errored after 3.47 min
[20:12:19] Error in plugin 'run-sequence(copy-app-folder-files)'
Message:
    cp: /Users/alex/dev/mist/node_modules/webdriverio/node_modules/.bin/supports-color: No such file or directory

Stack:
    at finish (/Users/alex/dev/mist/node_modules/run-sequence/index.js:56:13)
    at Gulp.onError (/Users/alex/dev/mist/node_modules/run-sequence/index.js:67:4)
    at emitOne (events.js:101:20)
    at Gulp.emit (events.js:188:7)
    at Gulp.Orchestrator._emitTaskDone (/Users/alex/dev/mist/node_modules/orchestrator/index.js:264:8)
    at /Users/alex/dev/mist/node_modules/orchestrator/index.js:275:23
    at finish (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:21:8)
    at cb (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:29:3)
    at Gulp.<anonymous> (/Users/alex/dev/mist/gulpfile.js:284:16)
    at module.exports (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/alex/dev/mist/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/alex/dev/mist/node_modules/orchestrator/index.js:214:10)
    at /Users/alex/dev/mist/node_modules/orchestrator/index.js:279:18
    at finish (/Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/alex/dev/mist/node_modules/orchestrator/lib/runTask.js:52:4
    at f (/Users/alex/dev/mist/node_modules/once/once.js:17:25)

@hiddentao
Copy link
Contributor Author

This PR is out of date now, I need to refactor it.

# Conflicts:
#	nodes/eth/mac-x64/libevmasm.dylib
#	nodes/eth/mac-x64/liblll.dylib
#	nodes/eth/mac-x64/libnatspec.dylib
#	nodes/eth/mac-x64/libsolidity.dylib
#	nodes/eth/mac-x64/libtestutils.dylib
#	nodes/eth/win-x64/eth.ilk
#	nodes/eth/win-x64/eth.pdb
#	nodes/eth/win-x64/msvcp120.dll
#	nodes/eth/win-x64/msvcr120.dll
#	package.json
@hiddentao
Copy link
Contributor Author

Merged with develop and fixed some issues.

@hiddentao
Copy link
Contributor Author

Also upgraded to Electron 1.3.5 as part of fix.

@evertonfraga
Copy link
Member

When building from mac, make sure to:

  • have both node and npm up to date.
  • brew install mono
  • brew install graphicsmagick
  • brew install gnu-tar

After setting up, I managed to build everything. I'll test properly on all platforms and improve the DMG background.

@hiddentao question: what are those .nupkg generated on windows folders? I guess it's something related to VisualStudio development – so we'd better use the .exe, right?

@hiddentao
Copy link
Contributor Author

@evertonfraga The .nupkg files are just intermediates, and can be ignored. Exe's are what you want.

@evertonfraga evertonfraga merged commit b81a0ae into ethereum:develop Sep 15, 2016
@lock
Copy link

lock bot commented Mar 31, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants