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
ONLYPROTMAJORREDIRECT doesn't properly handle latest Proton 9.0 Beta #1094
Comments
Thanks for the report. We could possibly fix this by replacing the parameter expansion with Thanks for investigating the problem as well, that'll be a good hint in investigating further. Your assessment makes total sense too, which is why I think |
You're welcome. I was kind of curious if I could figure out a fix myself. I'm not familiar with scripts this complex, but I've been searching for an answer anyway. I was trying to find the shortest way to crop both endings. Turns out For bash, I thought about specifically cropping any I'm not sure if there are any other places that need a fix for their convoluted version numbers. Valve should really switch to semantic versioning. |
Awesome, thank you very much! I think you were pretty much on the right track.
Yeah, Bash is funny like that, or rather zsh is just great heh.
This was a pretty great idea, although doing it with parameter expansion might result in a more naive check. This is a major edge-case but bear with me. If a Proton version contained the substring A solution I came up with, which still isn't perfect, was to use This basically says, match anything starting with In the case of So we'd probably end up with something along these lines: VERSPROTMAJOR="$( echo "${USEPROTON}" | sed "s/-\(rc\|beta\)[0-9]\+$//g" )" # Turns Proton name from "proton-8.0-3c-rc1" (or "-beta1") into "proton-8.0-3c"
VERSPROTMAJOR="${VERSPROTMAJOR%-*}" # Turns Proton name from "proton-8.0-3c" to "proton-8.0" Let me know what you think :-) I came up with this based on your idea to match those two strings, and in future if there are others we need to match, we can just extend this pattern (maybe make a variable for that part of the pattern, and then insert that into the pattern if this gets longer in future. Also, that sed pattern is untested outside of a Bash session, so feel free to paste it in and tinker around to see if it solves the use-case. It may not work or there may be some edge-cases. # Should give "proton-9.0"
VERSPROTMAJOR="$( echo "proton-9.0-1-rc2" | sed "s/-\(rc\|beta\)[0-9]\+$//g" )"
echo "${VERSPROTMAJOR%-*}"
# Should give "proton-8.0"
VERSPROTMAJOR="$( echo "proton-8.0-4-beta16" | sed "s/-\(rc\|beta\)[0-9]\+$//g" )"
echo "${VERSPROTMAJOR%-*}"
Agreed about Valve's versioning. As for other checks, I think we're good. I thought maybe the Proton version mismatch might need a check like this but it was already able to resolve it without any additional work. Thanks for thinking that far ahead though! Feel free to play around with this fix or if you come up with a different one, let me know here or in a PR. I'd be glad to review any PR on this and help out/give feedback. |
Since zsh worked with nested expansions, I briefly though maybe there was some way to do it all in the same expansion in bash without running additional commands. I've been busy and didn't spend much more time on it. It took me so long to reply that Proton 9.0 is out of beta and release candidate phase. It now simply has
Having dealt with sed and some regex occasionally, I agree. I combined the 2 separate operations into a sed command with multiple scripts. I've been getting the same results with it so far. It should make adding and revising replacements faster. Also, ShellCheck hasn't had any complaints with this.
or a longer, but slightly more compatible
I can make a PR for either one if you'd don't see any problems with it. On a related note, semantic versioning follows the major.minor.patch format. For example, shouldn't VERSPROTMAJOR be trimmed from |
No worries at all :-)
Personally I think either-or is fine. I would normally have a slight preference to using Also, good catch with the extra
I never thought about this before, although this has only happened three times for Valve Proton; once for Proton 3 (3.7 to 3.7.16) and then with Proton 4 (4.0 to 4.11), and then again with Proton 5 (5.0 to 5.13). So I think it is fine to leave this as-is. I realise this doesn't match what GE-Proton does, where we only have one symlink per "major" version of GE-Proton. However, GE-Proton is based on the current Valve Proton major version, so if there was another Proton "point release", it would become GE-Proton9.X-Y (assuming the historical naming scheme applies). Also, since Valve Proton releases are much less frequent, it makes more sense in my head to have separate compat data redirects. This is different than GE-Proton, which updates much more frequently, often with hotfixes, so it makes more sense in my head for that to have a single compat data redirect. Valve Proton is usually quite "fixed", whereas GE-Proton is much more "rolling". You wouldn't necessarily want symlinks for So in the above example, I think it makes more sense to have I hope I've explained why I think that well enough. However, I am not a frequent user of this feature. You may have used it more than me, and if you think I'm being silly, please let me know! I am not shutting this approach down, only explaining why I don't think it's necessary. If you think it is, we can discuss it further :-) For the moment, feel free to open a PR with the slightly more compatible example whenever you have time. We can continue to discuss here or on the PR about whether we should trim down to |
With #1101 merged, we can close this issue if you think it's resolved, or we can continue discussing if we want to change how we strip the version, such as making the directory |
So do I, mainly because there's less typing involved.
That seems to be the case with bash from what I can tell. There was some uncertainty online with which UTF-8 characters are covered by
You didn't actually forget anything. Your examples all used I just realized my PR didn't include
The possibility of minor breaking changes between point releases (e.g., 5.0 to 5.13) is a good reason for keeping the current functionality. I was mainly thinking about keeping the concept of "major" versions consistent with the name of the feature. However Valve's non-standard versioning seems to either treat the first two numbers as a major version or treats the second number as an afterthought. So it's a mess either way.
I've been (slowly) converting all my Steam games to use symlinked compatdata and steamuser folders. It's saving me a ton of storage. It makes moving a game to a new Proton version easier too. Having a few centralized Windows registry files, it's a lot easier to transfer game settings when there aren't 100+ sets of registries to search through.
It's resolved the original issue. The continued version stripping would likely need a new setting and could possibly introduce problems if there are game-breaking changes between minor versions. So I don't really see much of a need for it, unless Valve implements semantic versioning with more frequent minor changes in the future. Unrelated, but I'm really not a fan of how git documents all my typos, skipped words, and indecisiveness. Also unrelated, but I didn't want to open an issue for what may be a dumb question. I've been using
Games usually access the global folder directly, but I think the "fix symlinks" option creates a steamuser folder inside steamuser/global. If the second directory is correct, I'm not sure why my current settings for games use the first one. |
If it ever comes up, we can patch it, but I think that's fine :-)
Yeah, I think part of it comes from trying to match Wine's versioning and then putting in their own revision number on top (as Proton versions changes are supposed to be rebased on top of a given Wine version, although the Valve Wine fork likely already includes backported patches 😄)
Yeah I was also considering it would need to be an additional setting to handle cleanly. A neat but potentially overkill solution would be to make the pattern customizable but that would probably be more effort than it would be worth, but it would allow handling this case and Proton versions with complex names (like Proton-tkg Wine Master builds).
This should be It's my understanding that AppData, Documents, etc will go into the user folder. I think there can be a higher level AppData folder outside of the user folder. So in a regular prefix, There is not a whole lot of consistency for where games write their data, kind of like on the Linux Desktop heh. It can be tricky to cover all cases but if you need more help please ask or open a separate issue if you think it's worth it! Glad the main issue here is resolved at least. Thanks for your work on this! |
I was aware of the standard Windows/WINE/Proton folder structure. The problem seems to have been with the symlink itself. For some reason the symlinks in the prefixes, e.g. The "Fix symlinks" option creates I manually updated the
You're welcome. |
System Information
Issue Description
The latest Proton 9.0 Beta is using proton-9.0-1-rc2 in the Proton 9.0 (Beta)/version file.
When using ONLYPROTMAJORREDIRECT="1" in settings, STL creates a compatdata-proton-9.0-1 folder instead of the expected compatdata-proton-9.0 folder.
Source of Bug
I tracked it down to line 13341 in the steamtinkerlaunch script.
VERSPROTMAJOR="${USEPROTON%-*} only removes the final -rc2 from the version.
It needs an additional step to remove potential -rc* before removing -* from the proton-9.0-1-rc2 version number.
The text was updated successfully, but these errors were encountered: