sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.03k stars 69 forks source link

trim Proton beta and rc versioning (fixes #1094) #1101

Closed VoodooHillbilly closed 2 months ago

VoodooHillbilly commented 2 months ago

When ONLYPROTMAJORREDIRECT is enabled, beta and release candidate versioning will not be included in new Proton compatdata names.

sonic2kk commented 2 months ago

Did a quick test with this patch applied locally, works as expected based on discussion in #1094.

Tested with "Halo: The Master Chief Collection" and a global compatdata redirect with ONLYPROTMAJORREDIRECT=1, and it created compatdata-proton-9.0 at ~/.config/steamtinkerlaunch/proton/compatdata/ as expected.

As you mentioned in https://github.com/sonic2kk/steamtinkerlaunch/issues/1094#issuecomment-2091667665, there is indeed no longer a Proton Beta or Release Candidate to test with here. However, I tested this in a Bash prompt with the following, and it returned the correct trimming results.

function trimProtBetaRC {
    printf '%s' "${1}" | sed -e 's/-\(rc\|beta\)[0-9]\+$//' -e 's/-[0-9A-Za-z_]\+$//'
}

# proton-8.0
trimProtBetaRC "proton-8.0-3c"

# proton-9.0
trimProtBetaRC "proton-9.0-1"

# proton-9.0
trimProtBetaRC "proton-9.0-1-rc2"

# This was a sneaky one ;-)
# proton-10.0
trimProtBetaRC "proton-10.0-beta16"

# GE-Proton9
trimProtBetaRC "GE-Proton9-4"

This looks good to merge to me. Thanks!

sonic2kk commented 2 months ago

Changelog has been updated to give credit for this change, under "Fixes": https://github.com/sonic2kk/steamtinkerlaunch/wiki/Changelog

Thanks again!

VoodooHillbilly commented 2 months ago

And... I forgot to edit my commit message to match the edited PR message. Oh well, at least I finally managed to make the PR. Maybe it'll help next time there's a beta/rc version.

sonic2kk commented 2 months ago

It's all good :-)