Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Toolbox from within the GUI #2347

Open
soininen opened this issue Oct 10, 2023 · 5 comments
Open

Updating Toolbox from within the GUI #2347

soininen opened this issue Oct 10, 2023 · 5 comments
Labels
Feature Possible new feature

Comments

@soininen
Copy link
Contributor

soininen commented Oct 10, 2023

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 and python -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.

@soininen soininen added the Feature Possible new feature label Oct 10, 2023
@PekkaSavolainen
Copy link
Member

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.

@soininen
Copy link
Contributor Author

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.

@PekkaSavolainen
Copy link
Member

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.

@soininen
Copy link
Contributor Author

soininen commented Oct 12, 2023

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.

@soininen
Copy link
Contributor Author

soininen commented Nov 29, 2023

Some application updater frameworks readily exist for Python, for example tufup. PyUpdater, on the other hand, seems to have become unmaintained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Possible new feature
Projects
None yet
Development

No branches or pull requests

2 participants