You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -22,7 +23,7 @@ You should build this logic by yourself though ([basic example](https://github.c
22
23
23
24
## nwjs-autoupdater
24
25
25
-
The tiny golang application (when built it is just ~2MB), which can be bundled with NWJS application and then used to unpack updates.
26
+
The tiny golang application (when built it is just ~2MB), which can be bundled with NWJS application and then used to unpack updates.
26
27
To update target application updater needs to know two things - where zip archive with the new version is located and where is the app's executable to restart application after update. These can be passed to updater via command line arguments `--bundle` and `--inst-dir`, where `--bundle` is the path to the zip archive with the new app version and `--inst-dir` is the path to app's executable.
27
28
28
29
There are multiple advantages over `node-webkit-updater`:
@@ -31,4 +32,19 @@ There are multiple advantages over `node-webkit-updater`:
31
32
- Doesn't require elevated privilegies (unless application itself has been installed in the folder which require elevated privilegies).
32
33
- Updater's executalbe has way smaller size as it doesn't require bundling the whole new NWJS application with the main application.
33
34
34
-
The logic to check for updates needs to be built on your own too. The [example](https://github.com/oaleynik/nwjs-autoupdater/blob/master/examples/index.js) shows the way how to use javascript module as an entry point for NWJS application and check for updates in background.
35
+
The logic to check for updates needs to be built on your own too. The [example](https://github.com/oaleynik/nwjs-autoupdater/blob/master/examples/index.js) shows the way how to use javascript module as an entry point for NWJS application and check for updates in background.
36
+
37
+
## nw-autoupdater
38
+
39
+
The NPM module provides API similar to one of `node-webkit-updater`, but extended, adapted for NW.js with Node 7.x and based on clean async/await syntax. Namely it allows to:
40
+
- Read the manifest from the remote release server
41
+
- Check if the version in the remote manifest greater than one of the local manifest
42
+
- Download the latest available version matching the host platform (according to the `packages` map of the remote manifest)
43
+
- Subscribe for download progress events
44
+
- Unpack it in a temporary directory (zip or tar.gz)
45
+
- Subscribe for install progress events
46
+
- Close the app and launch it (as a detached process) from the downloaded release (from temporary directory)
47
+
- Backup actual version and replace it with the new one
48
+
- Restart the updated app from its original location
49
+
50
+
The package includes examples of release server and client.
0 commit comments