DavidoTek / ProtonUp-Qt

Install and manage GE-Proton, Luxtorpeda & more for Steam and Wine-GE & more for Lutris with this graphical user interface.
https://davidotek.github.io/protonup-qt
GNU General Public License v3.0
1.16k stars 39 forks source link

[Feature Request:] A separate "Latest" option in GE-Proton versions that automatically updates/replaces files on start-up #405

Closed Daasin closed 1 month ago

Daasin commented 1 month ago

Is your feature request related to a problem? Please describe. It's difficult having to switch to desktop, launch the app, and then get the new version that i then have to switch my apps to focus on

Describe the solution you'd like A separate selection called "GE-Latest" that has its files replaced for every new release but all apps/games are still locked on to the "GE-Latest" version (Basically a duplicate of the current 9.5, that can automatically replace old files with 9.6 when launched)

Would be useful if it launches on startup to check for new versions of ProtonGE that it could drop in to the "Latest" folder

Describe alternatives you've considered Have made a similar issue before for editing the UI to be more suitable for steamdecks 'big picture in game mode' since it is a bit hard to use and small centred window instead of full-screen. It wouldn't be as easy as the automated file swap for the end-user though.

Additional context Surely this could be as easy as renaming a folder or copying and pasting the internals of the 9.5 folder into a new one called "Latest"? Same version looked for by steams selector but just modified by ProtonUp when powering on machine.

Daasin commented 1 month ago

home/.steam/installation/compatibilitytools.d/GE-Proton-Latest

Would be the proposed folder location as opposed to "/compatibilitytools.d/GE-Proton-9.5"

Daasin commented 1 month ago

a bit like an experimental/hotfix option

DavidoTek commented 1 month ago

Thanks for the suggestion.

home/.steam/installation/compatibilitytools.d/GE-Proton-Latest Would be the proposed folder location as opposed to "/compatibilitytools.d/GE-Proton-9.5" Surely this could be as easy as renaming a folder or copying and pasting the internals of the 9.5 folder into a new one called "Latest"? Same version looked for by steams selector but just modified by ProtonUp when powering on machine.

That is one possible way that does not require changing the Proton version set in Steam. Symlinking is another possibility. You may want to have a look at the following issues:

Would be useful if it launches on startup to check for new versions of ProtonGE that it could drop in to the "Latest" folder Have made a similar issue before for editing the UI to be more suitable for steamdecks 'big picture in game mode' since it is a bit hard to use and small centred window instead of full-screen. It wouldn't be as easy as the automated file swap for the end-user though.

That is an interesting point. Updating can only take place when ProtonUp-Qt is started. The question is whether the "latest" version would be updated automatically or if the user is asked, which requires further interaction in the "small" ui.


I will close this issue as there are already existing issues where the discussion can be continued.

sonic2kk commented 1 month ago

For OP's information, anyone looking at this issue in future, and if we/I ever look back at this and wonder how the issues were connected, I'll add some extra information to what OP has mentioned here :-)

It's difficult having to switch to desktop, launch the app, and then get the new version that i then have to switch my apps to focus on

This problem is Steam Deck-specific for the most part, and ProtonUp-Qt also works on the Linux Desktop. While you can launch ProtonUp-Qt from Steam Deck Game Mode, the Steam Client still must be restarted in order to pick up new tools in ~/.local/share/Steam/compatibilitytools.d (or equivalent on other distributions and Steam installation types).

In the latter part, if you're talking about switching games to use a newer Proton version, you can use the Batch Update option from the CtInfo dialog ("Show Info" button or double-click on the tool in the list on the Main Menu) to switch all games from using one compatibility tool to another, making sure the Steam Client is closed beforehand - meaning this has to be done from Desktop Mode. This is because this option modifies Steam's config.vdf file, which is how the Steam Client tracks various things including what compatibility tools are being used (this is under CompatToolMapping in this file). Any edits to this file that are not performed by the Steam Client are overwritten when the Steam Client closes, and likewise manual edits not performed by the Steam Client are ignored. This means regardless of whether ProtonUp-Qt modifies this file or if you do it by hand, when you close the Steam Client all of these changes will be overwritten by the state the Steam Client itself is in. Even if you do not make any changes, when you close the Steam Client you will see that many files including config.vdf get updated (the "Modified" column in your file manager will show "Just now" or something to this effect).

So in any case, the current behaviour will always require a Steam Client restart.

This behaviour is not specific to config.vdf either fwiw, it applies to many of Steam's configuration files. That is why many programs that interact with Steam or have functionality to do so will tell you to close the Steam Client beforehand (EmuDeck's Steam-ROM-Manager integration will do it, Lutris tells you that Steam must be closed before it can add Steam Shortcuts, etc -- These two programs update shortcuts.vdf for instance).

And if you were unaware, Steam Deck Game Mode is the Steam Client, just running in a GameScopehttps://github.com/ValveSoftware/gamescope instance with some launch options and a bit of extra magic.

Would be useful if it launches on startup to check for new versions of ProtonGE that it could drop in to the "Latest" folder

As DavidoTek pointed out, ProtonUp-Qt would have to be launched to do this. However using some kind of symlink (such as what #162 points out)

Surely this could be as easy as renaming a folder or copying and pasting the internals of the 9.5 folder into a new one called "Latest"? Same version looked for by steams selector but just modified by ProtonUp when powering on machine.

Steam takes the name to display for each compatibility tool from that tool's compatibilitytool.vdf's file, under the display_name block. This can be changed, but will only refresh once again when the Steam Client restarts. This means we would be limited on how to name this, we couldn't name it "GE-Proton Latest (GE-Proton9-5)" for example, to note what the latest version is.

You should, however, be able to replace all the files in a given GE-Proton directory with the files from the new one. I tested by replacing the files in GE-Proton8-32 with the ones for GE-Proton9-5, and used a Proton log (PROTON_LOG=1 %command%) to verify that Steam was using the new files (I didn't expect any kind of caching of the old files but I wanted to be sure). And as noted above, the Steam Client did display it as GE-Proton8-32, and upon restarting, displayed the tool as GE-Proton9-5.

So from that perspective, it is possible to replace the internal files. It would also be trivial to update the display_name in compatibiilitytools.vdf, since we can read it the same way we read any other text-based VDF file, so that part isn't an issue either.

For clarity to the user, I would propose putting a blank text file with something along the lines of generated-by-protonup-qt, in case they look in this directory and wonder where it came from.

We need to be cautious here though, because the internal name of the tool will still be GE-Proton9-5 for example. Maybe we also want to update the internal name for the tool? I don't know if this has any implications for prefix versioning or anything. We also have to consider this for ProtonUp-Qt functionality, for example

We should also be careful of possible name clashes down the road with GE-Proton-Latest. I don't think this will be a problem, but you never know. We're using "GE-Proton" in the name for a renamed version of the tool, so we should be careful for that fact alone :-)

We could possibly add some kind of conditional checking to skip this but again if there is a naming clash this could get messy. If we go the route of changing the internal name we may be best adding pupgui2 as a distinguishing prefix/suffix.

Would be the proposed folder location as opposed to "/compatibilitytools.d/GE-Proton-9.5"

The folder name is worth noting because ProtonUp-Qt will take the folder name and use that to display the tool in the tool list. Even with the internal tool name and display name changed, ProtonUp-Qt will still display "GE-Proton8-32" until the folder is renamed.


From a technical perspective I could see implementing this being possible but tricky and needing some consideration for how to best go about it (it's probably not something I'll pick up :-))

Daasin commented 1 month ago

I have had issues with batch updates before, but that may be specific to my setup or the steamdeck itself Very grateful for your consideration and in-depth response though, so thank you :)

and on the point of whether it'd ask before swapping versions, i would assume that adding a "GE-Latest" option via symlink or whatever would imply that they want the latest without prompt. Not sure how hard it'd be to launch GE-Proton in the background upon every boot of the device though... Maybe a script that automatically closes after checking/updating?

Is auto-batch update an option? Although I suppose it'd need to download latest one for that and then switch every game to it... Which seems harder for everyone involved for something that people might not always want

sonic2kk commented 1 month ago

Not sure how hard it'd be to launch GE-Proton in the background upon every boot of the device though... Maybe a script that automatically closes after checking/updating?

I think you mean ProtonUp-Qt here. And this wouldn't really solve the problem. It's possible to set programs to auto-start in Desktop Mode but not in Game Mode. Even if we set some kind of "silent" mode for ProtonUp-Qt there's no safe way to run a program like this in Game Mode.

Is auto-batch update an option?

I'm not sure what you mean here, like a Batch Update that downloads the latest GE-Proton? That could be possible but I'm not sure how it would work for other tools (ProtonUp-Qt does more than download GE-Proton).

Daasin commented 1 month ago

Is auto-batch update an option?

I'm not sure what you mean here, like a Batch Update that downloads the latest GE-Proton? That could be possible but I'm not sure how it would work for other tools (ProtonUp-Qt does more than download GE-Proton).

Could make that something for all the tools it supports, but yeah a batch update for all games to move to the newest proton (or other compat tool) it can find, and yes sorry I meant ProtonUp in first point. I should stop adding comments now that this is already something discussed elsewhere

sonic2kk commented 1 month ago

No worries :-)

I'm not sure if anyone is actively working on it, I did some messing around quite a long time ago now (probably close to a year ago) but don't have any plans to pick any work back up again. But keep an eye on the issue tracker in case someone picks it up! 🙂