phonegap / phonegap-app-desktop

PhoneGap Desktop App
Apache License 2.0
840 stars 312 forks source link

See if the OSX Auto-Updater can be initiated by user input #605

Closed hermwong closed 8 years ago

hermwong commented 8 years ago

Currently the OSX auto-updater will notify the user that an update is available and then perform the auto-update.

We would like to see if we can modify this behavior so that it follows these steps:

  1. notify user update is available
  2. user can choose to update or cancel
  3. if user chooses to update, the auto-updater will update the app
hermwong commented 8 years ago

We may need to migrate from squirrel.mac (Electron's default auto-updater) to electron-updater to add the desired workflow to the auto-update workflow.

hermwong commented 8 years ago

The electron-updater writes an error log at this location ~/Library/Application Support/PhoneGap/logs/updater.log

hermwong commented 8 years ago

Docs on configuring binary updates:

  1. https://github.com/EvolveLabs/electron-updater/issues/21
  2. https://github.com/EvolveLabs/electron-updater/issues/20
hermwong commented 8 years ago

From reading the docs:

The app will try to update using NPM; we have the option of hosting our own npm server.

Looks like electron-updater uses .tgz for binary distribution.

More details.

hermwong commented 8 years ago

Compress to .tgz from OSX terminal.

hermwong commented 8 years ago

Another option suggested by @mwbrooks:

"Modify our existing code to do the manual update checking and piggy back on Electron's auto-updater."

Pros:

hermwong commented 8 years ago
screen shot 2016-06-14 at 3 15 28 pm
hermwong commented 8 years ago

Auto-updater now works with the Update Now workflow.

We probably need to add is some type of indicator to the user that the update is happening.

Currently when the user clicks on the Update Now button, the Update Available dialog disappears and the Desktop App just appears to be in normal state while the update is downloading in the background.

mwbrooks commented 8 years ago

@hermwong awesome! Yea, I agree that we need to show that the download is in progress. It feels pointless to allow the user to navigate around the app, since it will suddenly close and restart when the download is complete. @jahoni should be looped in to help. She may even have a design setup already.

jahoni commented 8 years ago

as we chatted about (briefly) @hermwong - it'd be great if we could show the notification in a modal. once the user chooses "Update Now", a determinate progress indicator should appear. After a very quick look I couldn't find any open source determinate progress indicators out there...maybe you'll have more luck?

let me know if you need a mock-up.

hermwong commented 8 years ago

Will take another look at Electron's auto-update APIs to see if we can get the download progress information.

hermwong commented 8 years ago

It doesn't look like the Electron Auto Updater API exposes the download progress.

jahoni commented 8 years ago

Well, that settles it then - we'll need to go with an indeterminate progress indicator. The circular one used on app load is cool.

hermwong commented 8 years ago

Should the screen look like the initial loading screen with the exception of the copy "Update is in progress..."

jahoni commented 8 years ago

I think that'll work....

hermwong commented 8 years ago

See here for reminder of the existing loading screen: https://github.com/phonegap/phonegap-app-desktop/issues/575#issuecomment-207828410

Should the copy be placed above or below the loader animation.

jahoni commented 8 years ago

Text above the loader, same colour blue

hermwong commented 8 years ago

screen recording 2016-06-20 at 11 35 am