Developing a cross-platform source-code auto-updater


#1

I’ve been looking at moving from node-webkit to atom-shell and one of the things I had to solve was replacing my auto-updater for ‘nw’ files.

It’s fairly simple - it takes source-code committed/released in GitHub and packages it as an ‘nw’ archive - so all I had to do was change that to make an ‘asar’ and fix paths etc.

It’s a BIT clumsier because ‘nw’ files are just zip archives so I can pull code from GitHub and repack it ‘in memory’ but “asar” only supports building from a filesystem so you need to write the files somewhere (I am looking at whether I have the skills to add .pipe() support to the asar package tho)

Meanwhile, I’ve created 2 demo projects to see if people like the idea - they’re very, very barebones and mostly uncommented/untested (completely untested outside of Windows!) but they should give you some idea of what I’m trying to do.

The demo Express Server (which does the GitHub->asar work)
https://github.com/shrewdlogarithm/atom-shell-auto-update-express/tree/master

The demo client (which downloads and replaces the asar and then restarts the application)
https://github.com/shrewdlogarithm/atom-shell-auto-update-demo

You could, of course, put all the code in the client - but I found doing that with node-webkit TREBLED the size of the update downloads - and asar is native so that would mean finding a way of doing platform-specific releases (yuck)

I’ll develop those projects of course, fixing issues and commenting more - if people are interested in the idea?

It’s been REALLY useful for my node-webkit stuff - it’s a “one click instant update” for users and ‘push and release and you’re done’ for developers.


#2

Hi shrewdlogarithm,

I will be super interested in your solution. Would love to get any updates, and contribute wherever I can.


#3

Is there any update ?