image-map icon indicating copy to clipboard operation
image-map copied to clipboard

Auto update

Open tryashtar opened this issue 5 years ago • 0 comments

Also build and bundle an "update" executable. When the regular program starts, it runs in the background and looks for new releases here on GitHub. If it finds any, it prompts the user to install (run with "find" argument to look, and "download" + URL to download, replacing all other nearby files and itself).

When run by hand (i.e. no arguments), it finds and then downloads what it finds automatically.

Things I don't want to do:

  • Update a version field somewhere when building a new release
  • Track a list of files that should/shouldn't be downloaded/replaced/deleted
  • Have an installer

Challenges:

  • Store current version to compare against (probably the updater saves the version string of the release it downloaded to the app properties folder -- also when fetching versions, if the EXE hash matches the one on github, silently update the local version number)
  • Only replace necessary files (basically just extract the zip and replace everything that already exists, don't delete anything else)
  • Replace itself (idea: extract new update EXE as "update-new" and make Image Map check for a file with that name on startup, and if there is one, delete the old update and rename the new one)
  • Don't annoy the user (when a new version is detected and declined, save a property for the declined version number. Then the app will suppress notifications about that version or lower, but they can always update by running the EXE, and a new release should notify them again)

tryashtar avatar Jun 18 '20 07:06 tryashtar