Skip to content

Commit

Permalink
Add Non-Steam Game: Allow 'files' directory when checking Valve Proton
Browse files Browse the repository at this point in the history
Previously Valve Proton versions only had a 'dist' directory.
This was one way to tell if a Proton version was a Valve version
or a community flavour.

As of Proton 9.0 (including Experimental, Beta, and Hotfix), Valve
Proton versions use the 'files' folder instead of 'dist', so we can
no longer assume that 'files' indicates a community Proton version.

This commit changes our check to accept 'files' and 'dist' folders.
We technically don't need these checks, but they are in place as
a sanity check to confirm our Proton folder is somewhat correct.
If the Proton version was missing a folder with this name it would
be invalid, so it's an extra safety check.

The main way we will differentiate a Valve Proton version now is
based on whether it has a `compatibilitytool.vdf` file in its
directory, as only community Proton flavours have this. Valve
Proton versions store this in an internal Steam file called
`appinfo.vdf`.
  • Loading branch information
sonic2kk committed Jun 7, 2024
1 parent bddc3b3 commit c2f4ec8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240606-1"
PROGVERS="v14.0.20240608-1"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -2764,7 +2764,14 @@ function getProtonInternalName {
VPP="$1" # Valve Proton Path

writelog "INFO" "${FUNCNAME[0]} - Checking if Proton version at '$VPP' is a Valve Proton version"
if [ -d "$VPP/dist" ] && [ ! -f "$VPP/$CTVDF" ]; then
# We used to check only for 'dist', but Proton 9.0 onwards (including Experimental & Hotfix) use 'files' instead of 'dist'
# The only assumption we can make for a Valve Proton version now is if it's missing the compatibilitytools.vdf file, since
# They Valve Proton can have either 'files' or 'dist'
#
# The main thing we *need* to check for is "$VPP/$CTVDF" (compatibilitytools.vdf in the compat tool folder), as all
# third-party compat tools should have this and Valve Proton versions do not (their info is stored in appinfo.vdf internal to Steam)
# The checks for 'files' and 'dist' are just for sanity to make sure this is a valid Proton version altogether
if [[ ! -f "$VPP/$CTVDF" && ( -d "$VPP/dist" || -d "$VPP/files" ) ]]; then
writelog "INFO" "${FUNCNAME[0]} - Looks like we have a Valve Proton release here"
return 0
else
Expand Down

0 comments on commit c2f4ec8

Please sign in to comment.