HearthStats/HearthStats.net-Uploader — pull request #460 by gtch (2014-07-06 11:13:52+00:00)
Title: New implementation of the automatic updater

Here is the first version of my new updater for #424. It works, but it's not yet complete so don't accept this pull request yet.

I looked at using *getdown* as I mentioned in #424 but it didn't fit in well with how we're distributing on GitHub, and would have required us to host all the patch files ourselves. I'd prefer to use GitHub for distribution because it's pretty fast and reliable (and free!) so I've written a new updater that makes requests directly into the GitHub API. It queries GitHub's Releases API to identify the latest version, instead of checking version files that we have to manually update. This will make it easier to provide updates, because as soon as we click 'Publish' in GitHub then users will start getting the update. It also means that we can test the updater *before* releasing to the public, because the updater can check draft releases that only we can see.

It's also implemented as a separate module, allowing it to be run while the HearthStats Uploader is closed and thus avoid problems where the uploader isn't updated properly because it's in use.

Note that I haven't yet implemented most of the necessary error handling, so it will currently throw exceptions if there are no new releases published (which is the case right now). I haven't done the Windows implementation yet... though that should be pretty simple (only needs a dozen lines of code). I'd also like to give it a nice UI with proper progress bars, etc. I'll do all those things before pulling the changes into master.