Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to auto install after download when using win_sparkle_check_update_with_ui() #229

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nickdademo
Copy link
Contributor

When win_sparkle_check_update_with_ui() is used to allow the user to manually check for an update (i.e. via a menu item), the flow is the following (assuming an update is available):

  1. Click menu item to check for updates
  2. WinSparkle dialog shows that a new version is available
  3. User clicks "Install update"

image

  1. Update starts downloading
  2. After download is complete, the user must then again click "Install update"

image

This PR allows the additional (and maybe redundant?) confirmation at Step (5) to be skipped and the update to be automatically installed after downloading, via an arg: win_sparkle_check_update_with_ui(1);

This is achieved in code by using two flags for the auto logic: one each for download and install

@vslavik
Copy link
Owner

vslavik commented Apr 30, 2021

I don't think it makes much sense to have this configurable — if the current UI is bad, then it should be improved unconditionally.

The flow mirrors that of Sparkle for Mac, but perhaps with bad labels:

  1. Release notes are shown, with Install update button.
  2. After clicking it, the update is downloaded, with a Cancel button shown. This can take a while.
  3. After the download completes, Sparkle shows Install and relaunch button (but WinSparkle repeats "Install update").

The reason for explicit confirmation in step 3 is that step 2 may be lengthy and unpredictable. You don't want the app to shut down under the user's hands a minute or two later, when they started working on something.

If I understand what you dislike correctly, then the "proper" solution is to add support for downloading updates in the background before the prompt with release notes is even shown (Sparkle for Mac supports this too). Then there would be a single Install update action, which would be instantaneous.

@nickdademo
Copy link
Contributor Author

The reason for explicit confirmation in step 3 is that step 2 may be lengthy and unpredictable. You don't want the app to shut down under the user's hands a minute or two later, when they started working on something.

Definitely! Though, aren't we already doing this if we call win_sparkle_check_update_with_ui_and_install()? (lengthy download followed by an install with no confirmation - which could occur while the user returns to working with the app)

If I understand what you dislike correctly, then the "proper" solution is to add support for downloading updates in the background before the prompt with release notes is even shown (Sparkle for Mac supports this too). Then there would be a single Install update action, which would be instantaneous.

Agreed - that would be a lot nicer, or alternatively: download starts when the dialog is opened (showing progress) and the "Install update" button is only enabled after the download is complete.

@vslavik
Copy link
Owner

vslavik commented May 1, 2021

Definitely! Though, aren't we already doing this if we call win_sparkle_check_update_with_ui_and_install()? (lengthy download followed by an install with no confirmation - which could occur while the user returns to working with the app)

Well, yes, but the context is a bit different, see #77 — it's essentially meant for forced updates at launch.

Which part of the UI do you take issue with? That the button is labeled the same, or that an extra click is required? Renaming the first "Install update" to "Download update" probably makes sense to address the former...

@nickdademo
Copy link
Contributor Author

Definitely! Though, aren't we already doing this if we call win_sparkle_check_update_with_ui_and_install()? (lengthy download followed by an install with no confirmation - which could occur while the user returns to working with the app)

Well, yes, but the context is a bit different, see #77 — it's essentially meant for forced updates at launch.

Which part of the UI do you take issue with? That the button is labeled the same, or that an extra click is required? Renaming the first "Install update" to "Download update" probably makes sense to address the former...

The feedback from several customers has been something like this: "We already made the decision to install the update when we first clicked 'Install update' - why do we have to click it again after the download?"

I understand this feedback. So perhaps just renaming the first button to "Download update" might be enough for now.

Though, I also think that auto-installing after the download is not so unexpected to the user as he/she had just clicked "Install update" a few seconds / minutes prior - this is the motivation for this PR.

Anyway, will close this PR for now - I'll investigate downloading the update earlier and making this a single-click workflow when I get some time.

@nickdademo nickdademo closed this May 10, 2021
@vslavik vslavik reopened this May 10, 2021
@Mapashito1

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants