Open c0bnut opened 2 years ago
I always found it funny how the launcher could update CDDA/CBN but not self-update.
Honestly, I don't even know how to approach self-updating. Catapult is one self-contained executable, how would it replace itself and then restart itself?
How would you approach this?
My first thought would be to spawn an updater child process to a temporary directory. From there you would terminate the parent process, download the zip, extract and overwrite in the existing directory. Run the catapult launcher again and terminate the child process.
Before fetching releases for Cataclysm DDA, the launcher could check the Catapult Github page for any new updates and automatically update after asking the user. There could also be a switch in Settings to enable/disable this feature.