-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Upgrade Running Applications #3947
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
Comments
Technically the new version should be installed the only problem it gives it that it cannot update the current junction and shims while the app is in use. So scoop update Edit: I just checked. Yeah it doesn't do that. Never mind. Still at least the file is downloaded so you wont have to re download it again. |
The problem is that for things like Terminus, it's my terminal application. So i have to exit it, window+r "cmd", and then scoop update. I wish it would actually install the new Terminus so I can just restart it. |
You can create some hack for this. Just add force close logic to a specific id with name and then restart that app when the installation is finished. Give that logic a special tag like --f so you know when that logic will work. eg: |
That works for things like Firefox and KeepassXC, though it's kind of rude to just kill the application. The problem is that this will exit terminus, my running terminal emulator, which will kill scoop. |
Then how about this: Extract the files, check if the application is still running, show the user a prompt where user can decide if he wants to kill the application process and restart the process after the update is done. If the user selects yes, kill the process, update the app and restart the process. Granted this will not keep the active session after restart but this is just for some case where the user does not want to keep the sessions in the first place. However i think there may be some way to export current session data to a temp location and simply load it when the process is restarted. Chrome can reload web pages if the application closes due to an error. If the user selects no, leave the new version as extracted only and show the user a prompt to use: |
As an intermediate, that'd work. One thing that would be a very nice get would be to: 1- Extract the files to the new location, then fork a new process to perform the linking, and tail its logs. |
using a forked process would allow the linking to happen in a process separate from the terminal emulator running the process, such that updating the terminal within the terminal wouldn't actually break all the other updates running. |
Generally shim targets the application under current junction, so both the shim and the current junction cannot be updated while the application is running. Targeting a specific version of the app instead of junction in a shim file may solve this issue. app.shim file: and on update simply update the shim file without updating the exe file. It will all make the task seamless without user intervention and all it will require is to update the actual shim.exe to conatin another attribute named version. Or maybe just include the version in path when creating the file. |
A good idea, but you are doomed - some apps are badly tested and it's not possible to upgrade them because something is wrong in their manifests or maintenance. For example Chrome is notorious after each update:
|
I think that's an issue for the particular app in the scoop-extras repository. I've not run into very many programs for which the manifest autoupdates are not broken. Apps in the scoop-extras repo don't necessarily have "maintainers" like in a linux package manager; they're all community maintained. They'll also likely need more information, in particular, the output of the This is about the upgrade of any app for which the existing version may be running when the user wishes to run the update. This issue is about gracefully handling that case. |
I did some test. Launch pwsh from shim dir. Remove the current junction, created a new current junction, pwsh works fine. Same case with google chrome. When i manually extract chrome files, place them in chrome folder, create new junction, the current instance of chrome keeps running while at the same time if i launch another instance, the new version of chrome launches. |
Hey, I'd like to throw in my two cents. When making an installer with Inno Setup, the installer makes use of the Windows Restart Manager. This simply finds out which files are used by which process and tries shutting these processes down. I assume we could use this, maybe as an optional feature that can either be activated by default or manually with a parameter, meaning it could also be done via an alias. This would imo generally solve the problem of updating running software, no matte whether you are technically required to shut it down or not. |
I'd love it if I could install the new version of Terminus from within Terminus, then simply close and reopen Terminus and have it now be the updated version. Additionally, for apps like KeepassXC and Firefox, which I have running most of the time, I'd like it to be able to install while the old version is running, and then the next time I exit and relaunch it will simply be the updated version.
Would this require Scoop to instead create additional shims that perform a headless launch of
[app]/[current version]/[executable]
rather than a simple symlinkedcurrent
directory?The text was updated successfully, but these errors were encountered: