Update to nw@0.20.1
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
:
- https://github.com/dsheiko/nw-autoupdater/pull/13
- https://github.com/dsheiko/nw-autoupdater/pull/14
- https://github.com/dsheiko/nw-autoupdater/pull/16
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
-
Get auto-update in working order -
from v3 to v4 -
from v4 to future v4 -
Not working on macOS 😕 The copy command never seems to finish. But perhaps it doesn't matter because we don't officially push the NW.js app for macOS and we don't have to push the manifest to annoy the few users who use the app.
-
-
Hide oauth callback sooner so we don't see a flash of 404 -
App shows up in process-list as nwjs
- Fixed in https://github.com/nwjs-community/nw-builder/pull/459
- References:
- https://github.com/nwjs-community/nw-builder/issues/315
- https://github.com/nwjs-community/nw-builder/issues/196
- https://github.com/nwjs/nw.js/issues/5809
- https://github.com/nwjs/nw.js/issues/5807
- https://github.com/nwjs/nw.js/issues/4293
- https://github.com/nwjs/nw.js/issues/2160
- https://github.com/nwjs/nw.js/issues/5829
-
Migrate legacy 3.x gitter_preferences.json
to new user data directory (changed in latest NW.js)- Windows:
C:\Users\xx\AppData\Local\Gitter\gitter_preferences.json
->C:\Users\xxx\AppData\Local\Gitter\User Data\Default\gitter_preferences.json
- macOS:
/Users/xxx/Library/Application Support/Gitter
-> - Linux:
/home/xxx/.config/Gitter/gitter_preferences.json
->/home/xxx/.config/Gitter/Default/gitter_preferences.json
- Windows:
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
- Windows:
- The
dataPath
user data directoryC:\Users\MLM\AppData\Local\Gitter