Open StinkySlinky1218 opened 1 month ago
Looking into it, there is code for it, but it seems to be broken.
Most of the update paths require a code signing certificate, which we don't have.
Wouldn't it simply be a manner of checking some online resource (this github?) for a newer version and downloading that?
I've went through this in a note to hearmeneigh before I realized he responded to this issue like a few hours before, but the tl;dr is:
You probably could go around all that and write all of the updating manually, but that's a major security risk. Technically you could get it working for x64 Windows really easily (it's a single line that's broken and calls a broken API path), but unless you completely want to shaft the other platforms you'd still write snowflake code for them to at least check the Github API for a new release. And at that point, why not just make it work the exact same on every platform?
I've went through this in a note to hearmeneigh before I realized he responded to this issue like a few hours before, but the tl;dr is:
1. The NodeJS library used for Electron updates is electron-updater, which uses Squirrel (and Squirrel.Mac) as its backend for checking, fetching and installing newer versions 2. [Github releases](https://github.com/hearmeneigh/fchat-rising/releases) are stored with a flat URL path (github.com///releases/download//<filename) 3. Squirrel requires specific filenames both for the installer and certain meta files (like a .nupak and RELEASES) file, which would cause a conflict for the ARM64 and x64 versions of windows 4. Squirrel requires Mac apps to be code-signed before allowing an update, which afaik requires an Apple Dev account and that costs $99 (???) 5. Squirrel isn't even supported on Linux
You probably could go around all that and write all of the updating manually, but that's a major security risk. Technically you could get it working for x64 Windows really easily (it's a single line that's broken and calls a broken API path), but unless you completely want to shaft the other platforms you'd still write snowflake code for them to at least check the Github API for a new release. And at that point, why not just make it work the exact same on every platform?
I would still appreciate the really easy fix for x64 Windows, at least!
I would still appreciate the really easy fix for x64 Windows, at least!
I'm up for it, though it'd require a slightly different workflow for the repo owner when new releases are prepped (requires the RELEASES file that Squirrel poops out to be added as a release artifact).
I've already prepped a PR for automatic update checks that's platform independent (see #399), but if @hearmeneigh agrees then I'll add the old updater code back in, fix the broken API call for the version check and then just have it check for the platform to see if it should automatically update or just redirect people to the download link instead.
Even if we're not willing to go through all the effort of making the update happen automatically, at least give the user a notification that an update is available?
I keep missing out on new features and fixes because I so rarely go to update everything.