ericoporto / agstoolbox

🧰Utility Adventure Game Studio software to help manage, install, and uninstall different AGS Editor versions.

Home Page:https://www.adventuregamestudio.co.uk/forums/index.php?topic=59938.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add an auto-update feature

ericoporto opened this issue · comments

It should be possible to update AGS Toolbox from itself, at least on Windows. The mechanism to enable must be something like

  • Remove any agstoolbox-new.exe if they exist
  • Download as agstoolbox-new.exe
  • Check it's correct (how?)
  • Remove any agstoolbox-old.bkp if they exist
  • rename running agstoolbox.exe as agstoolbox-old.bkp
  • rename agstoolbox-new.exe as agstoolbox.exe

If we also want to make it automatically restart - do we want that? Should we ask?

  • close everything (shared memory, sockets, any open files, ...)
  • restart the application

We probably need to also sync atbx and agstoolbox version here, so maybe a setting for a default location to fetch atbx and then we can upgrade both together.

We also need to make this update process only a thing on Windows and only a thing when using the prebuilt binaries.

We have a detection that we are in pyinstaller in the implementation that gets resources from the data directory, so we could move that detection to somewhere and then use it together with the os check.

reminder that if we use a subprocess for restarting it needs to pay attention to #31