sparkle-project / Sparkle

A software update framework for macOS
https://sparkle-project.org
Other
7.37k stars 1.05k forks source link

Show "Install on Quit" if update was downloaded and requires user authorization #2426

Closed zorgiepoo closed 11 months ago

zorgiepoo commented 1 year ago

Currently we only show "Install on Quit" if the update was downloaded and does not require user authorization (so installation already started). We could also show "Install on Quit" if update was only downloaded and let the user authorize. We may either need to tell the update driver to not send user driver events, or hide UI from the standard user driver in such a case. Not sure which one is better, may be leaning towards latter. I'll exclude this change for package-based updates.

george-continua commented 1 year ago

In the case of my app (iTerm2) users often do not quit until it's time to reboot the machine, which is an awful time to install an update. "Install on Next Launch" would seem to be less obtrusive.

zorgiepoo commented 1 year ago

I disagree. To me, apps that automatically install an update & relaunch on launch is obstrusive. Installing an update on quit or shutdown silently is not noticeable. In the vast majority of cases installing an update in Sparkle 2 is fast and I'm making more changes to ensure it's just an atomic swap. We could make changes though to ensure the update process on quit stays around long enough and is canceled if it takes too long (e.g. > a few hundred ms). But it hasn't so far been much of a problem in practice (foreground processes are asked to quit before background ones) and Sparkle's automatic updates have always been on quit (although Sparkle 1 did not support shut down case).

edit: I've done a much of tests and installing on shutdown in the vast majority case is not a problem. I could purposefully delay install by a couple hundred ms (which is a long a time) and it would still be enough time to do the install. Note we also support the same case when the user goes through installing a not-already-downloaded update UI in Sparkle 2 but doesn't relaunch the app or minimizes that window -- it gets installed on quit/shutdown.

zorgiepoo commented 11 months ago

I'm uncertain on second thought I want to change the less common authorization-required case so not making changes for now. Install on quit would still require the user to enter their password immediately (which may be deceptive in thinking no other action is needed) and that's more action required than current Remind Me Later which allows them to still defer the decision for a bit. On the other hand they can also begin the install and later decide when to finish installing it / relaunch.