Skip to content

Update to nw@0.20.1

username-removed-892863 requested to merge feature/update-nw-js2 into master

Update to nw@0.20.1


If you want to see the devtools, https://www.npmjs.com/package/nw#install-a-specific-build-type-of-nwjs

npm install nw --nwjs_build_type=sdk

Now using nw-autoupdater for auto-update. We still have node-webkit-updater in place to facilitate the v3 to v4 update.

The reason for moving to nw-autoupdater is because node-webkit-updater is no longer maintained and doesn't work with the latest NW.js because it relies on being able to have multiple instances running which isn't supported in NW.js >= 0.13.

single-instance is deprecated and it’s always true. You CANNOT have multiple instances for your app unless you’re using different user data directory (by --user-data-dir). You may also want to use the open event: the first instance will be notified with this event when user tries to launch the second instance.

http://docs.nwjs.io/en/latest/For%20Users/Migration/From%200.12%20to%200.13/#manifest-format

Here are 3 PRs I made to improve nw-autoupdater:


We can't use the latest nw@0.23.5 because on macOS we run into https://github.com/nwjs/npm-installer/issues/56 - Even applying the patch manually results in other errors(WARNING:chrome_main_delegate.cc(569)] final extension:, no more info after that). Using nw@0.20.1 instead.


Update notes

  • Create new OAuth apps for all platforms with redirect_uri: https://gitter.im/login/desktop/callback
  • Update nwapp/oauth.json with these new apps for builds

Todo


Tested on

  • Windows 10 (Creators Update)
  • Windows 8.1
  • macOS 10.12.5
  • Ubuntu 16.04.2

Other notes

  • npm start -- --remote-debugging-port=1234 --passthrough-remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose
  • Open already intalled app with args
    • Windows: "C:\Users\MLM\AppData\Local\Programs\Gitter\Gitter.exe" --remote-debugging-port=1234 --passthrough-remote-debugging-port=1234 --update-url=http://localhost:5350
    • macOs: open /Applications/Gitter.app --args --remote-debugging-port=1234 --passthrough-remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose
    • Linux: /usr/local/bin/gitter --remote-debugging-port=1234 --passthrough-remote-debugging-port=1234 --update-url=http://192.168.1.163:5350 --verbose
  • The dataPath user data directory C:\Users\MLM\AppData\Local\Gitter
Edited by username-removed-892863

Merge request reports