tf2classic / TF2CDownloader

Cross-platform utility for automatically downloading and installing TF2 Classic
GNU General Public License v3.0
48 stars 13 forks source link

Inform user if an update for TF2CDownloader is available #26

Closed chloecormier closed 1 year ago

chloecormier commented 1 year ago

Separate from the functionality that checks and applies updates for the game, this tells the user if they need to redownload TF2CDownloader.

For this, we hash the running binary and compare it against https://wiki.tf2classic.com/downloader/tf2cd_sha512sum_windows or https://wiki.tf2classic.com/downloader/tf2cd_sha512sum_linux for a match. If it doesn't match, we ask the user to redownload. We skip this when running as a script, since it only makes sense for compiled release binaries.

The TF2C-Meta repo was evaluated as a host for the hashes, however aggressive caching makes it untenable, as the hashes take a long time to update after we change them. We simply continue the installation if our own server is down and it can't get the hashes for whatever reason.

A release has been built off this branch for testing: https://github.com/tf2classic/TF2CDownloader/releases/tag/2022-09-18-SUTest2