Right now desktop apps usually update themselves. Node-webkit do not have this functionality out of the box. Which is reasonable because such functionality would hardly rely on specific implementation.
So I created webkit-updater. It relies on suggestion that your app will be packaged with grunt-node-webkit-builder, compressed with grunt-contrib-compress and with windows package unzip.exe will be packaged. Basically the example of packaging app you can find here.
how does it work
It gives you api to:
- Check the manifest for version.
- If the version is different from local one download new package to temp.
- Unpack the package to temp.
- Run new version from temp and exit the process.
- The new version from temp will copy itself to original folder.
- The new version will run itself from original folder and exit the process.
you should build this logic by yourself though. As a reference you can use example.
what are the plans
There should be bugs, probably. Need to stabilize it and test it extensively in real world app.
It would also be great to have different rates of updates:
- update assets only without page reload (..x)
- update assets with page reload (.x.)
- update assets and node-webkit engine - full cycle (x..)
There is a bug for newer versions of linux. Updater should resolve things like that. Also there should be some preInstall and postInstall scripts handling.
You are welcome to use and commit.