Skip to content

Updater Logic

Mike edited this page Oct 20, 2017 · 4 revisions

A few people may find the updater process used here interesting. It's pretty simple, so here's a run-through:

The updater queries Github's API for this repository, and gets the most recent release version. If the newest version doesn't match the internal version of the program, it then makes a second query to look up the aggregate file differences between versions.

  • Query the difference between release version and current_version, and run through the logic below for each file in 'files'

  • Each file object has a 'status' field, to determine what overall has changed since the supplied earlier version.

    • The direct download URLs for each file are located in 'raw_url' of each file object.

File Status:

  • renamed: change existing file 'previous_filename' into 'filename'
  • modified: redownload
  • added: download
  • removed: delete 'filename'
Clone this wiki locally