Open soininen opened 1 year ago
I'm not sure this will work as described above. Windows will probably complain about PermissionError or similar if you try and update the same files that are currently in memory.
However, I can see this working if the Help->Update Toolbox
button first closes toolbox, and then updates the Git files.
Windows will probably complain about PermissionError or similar if you try and update the same files that are currently in memory.
I think Python actually uses the .pyc
files while running so the .py
files should remain modifiable.
That being said, I believe many updaters are actually separate programs from the main one so perhaps that is what we need to implement in the end as well.
I think we had this feature a long long time ago. I don't remember if we updated the whole spine toolbox or just some part of it. I think it was dropped because it did not work reliably on Windows, so that's why I'm a bit hesitant with this one. @manuelma may remember more?
That being said, I believe many updaters are actually separate programs from the main one so perhaps that is what we need to implement in the end as well.
Good point. Maybe this approach works better than what we previously had.
The big picture here is that once we can update Toolbox from within itself (maybe using a separate updater), we could try to implement an installer that would install the latest Toolbox (Git head or latest version tag). If Toolbox was able to update itself, we would not need to release updates to the installer, at least not too often.
Somebody proposed this idea to me a while ago.
At least in my circles, most users install Toolbox from Git. Then they need to learn commands like
git pull
andpython -mpip install --upgrade -r requirements.txt
to update (and to run them in the correct directory). We could lessen the burden of users by adding a 'Update Toolbox' action e.g. to the Help menu which would run these commands automatically, then prompt the user to close and restart Toolbox. The action could be grayed out if Toolbox home directory was not a Git repository or maybe an update using Pip could be tried instead. In any case, this might improve user experience when updating Toolbox.