electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.64k stars 1.74k forks source link

Improve minimumSystemVersion to check for latest compatible version instead of just latest #8461

Open wartab opened 1 month ago

wartab commented 1 month ago

It is nice to have a feature that checks for minimumSystemVersion, however if a user hasn't update their app in a while, the user will be stuck on the ancient version, despite multiple versions inbetween the current version and the latest version technically being available.

It would be nice to allow to download the last compatible version given minimumSystemVersion.

beyondkmp commented 1 month ago

Are you looking for this feature? (https://github.com/electron-userland/electron-builder/pull/8108)

wartab commented 1 month ago

No, this feature request is in response to that PR.

Example: Let's say one of our users uses Windows 7 on our app at version 1.0.0. Now we release 1.1.0, 1.2.0, all compatible with Windows 7. The user doesn't update while 1.1.0 or 1.2.0 is released. We release 2.0.0, which requires Windows 10. That user on Windows 7, still being on 1.0.0 won't be able to update to 1.1.0, because electron-updater only checks for the latest release.

The way we currently did handle this situation is by creating a new Github repo for every Electron version that drops support for some OS.

But this does force people to go through the "last" version of a repo and may force them to do two consecutive updates.

Note that the same issue exists for staged rollouts.

mmaietta commented 3 weeks ago

The way we currently did handle this situation is by creating a new Github repo for every Electron version that drops support for some OS.

Wow, this definitely seems like something electron-builder could handle internally.

I'm not sure how to handle this on electron-updaters side for GitHub releases since either the latest version would need a history of all previous releases (update metadata), or we need to fetch every release from Github and check the latest-.yml for it (could be VERY high latency for projects with hundreds of releases though). The downside is that I don't think that'd work with s3 and other publishers that don't have access to previous releases (I think) as latest-.yml is stored a root and there's no history of releases stored in there. I'm not sure how to approach this feature implementation requested

wartab commented 3 weeks ago

It does seem quite tricky, I agree.

I am considering trying to build this myself, since the next major Electron version will drop support for macOS10.15 and many of our customers are stuck on that version. However, I'm afraid that I'll not have the time to do this.

I'm down to share my solution if it happens to be generic enough.