evil-mad / robopaint

The software for your friendly painting robot kit!
126 stars 34 forks source link

Application Auto-updating #163

Open techninja opened 9 years ago

techninja commented 9 years ago

This is a placeholder, but I saw this in the NW queue and new it's been on the agenda, it just never got ticketed.

https://github.com/edjafarov/node-webkit-updater

Now using Electron, see these resources:

docprofsky commented 8 years ago

Electron has support for auto-updating on Windows and OS X now. For Linux the preferred way for updates is to use the system package manager. https://github.com/atom/electron/blob/master/docs/api/auto-updater.md

OS X Squirrel server requirements https://github.com/Squirrel/Squirrel.Mac#server-support Windows allows using GitHub for distributing the releases https://github.com/Squirrel/Squirrel.Windows/blob/master/docs/using/github.md

If we want to avoid having to setup a server for Squirrel we could try using electron-updater, which uses npm for the updates. https://www.npmjs.com/package/electron-updater

techninja commented 8 years ago

I have a PHP server available, so can easily write a PHP script that simply pulls information from publicly available Github API resources. That's kind of what I wanted to do anyways, have this all be powered by Github.

docprofsky commented 8 years ago

How do we want to implement the UX for updating? @oskay might have some ideas for this.

oskay commented 8 years ago

One method is to put up a dialog box during startup, if there is a new version available. Another would be to put the text where the current version number is written now.

docprofsky commented 8 years ago

I thought about that, but I want to avoid going out to the network without informing the user before. I am thinking of something where it prompts the user if they want auto-update or want to check for updates manually before going out to the internet.

Also should we add some configuration for a proxy server when checking for updates?

oskay commented 8 years ago

A "check for updates" button is a fine thing to do as well.

oskay commented 8 years ago

Do you see a particular need for a proxy server option? I don't see that it's obviously necessary.

docprofsky commented 8 years ago

I do not see a need for a proxy server option that much.

Where should the check for updates button be located?

oskay commented 8 years ago

How about top-center of the settings window -- in the title bar?

docprofsky commented 8 years ago

That should work fine. What about a toggle to check for updates on startup? How should the user be prompted to restart and install the update?

oskay commented 8 years ago

Yes, a toggle is a fine idea... but since that's a setting, it should go further down in the settings menu.

The mechanism of the update depends a good deal on how we'll be installing it. If there's a full installer, it could prompt the user to quit RoboPaint. If it's just an application to drag, as on the Mac, that's another issue altogether. Not sure of the best way to handle that.

docprofsky commented 8 years ago

I am planning on using the updating facilities built into Electron for Windows and OS X. This should be the same (UX and backend) auto-update system used by Atom. On OS X the UX would be clicking "Check For Updates", in the settings menu, or starting the software and be prompted to install the update. If they click the button to "Relaunch and update" the app will then close and open with the updated version.

docprofsky commented 7 years ago

From @oskay on #34:

A minimally annoying version would have a message that is displayed on the splash screen saying "A new version (1.0.1) is available. Click here to download." It wouldn't need to interrupt what you're doing.

OTOH, it may be helpful to be a total PITA if there's an urgent security update.

techninja commented 7 years ago

In Atom, there's a little "toast" style message that appears, or sometimes ever less obvious. I can imaging doing this on the bottom left. The way updates usually work for Atom is that the update is downloaded, and you only tell the user that they'll get the new version on the next launch. It's easily the least intrusive, and allows people who opened the application to keep from having to get redirected to some update procedure. If we're fine with not giving users a choice about getting updates (could have a checkbox in settings for this of course), then I think it's the smoothest way to go. Still some unanswered questions, but it's all very doable and there's a LOT more complete and unified documentation about how to get this setup out there than there was when work was started on this.