From c2f4ec8c3d710bcafba57517796903f53d5d5c0a Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Fri, 7 Jun 2024 18:07:58 +0100 Subject: [PATCH] Add Non-Steam Game: Allow 'files' directory when checking Valve Proton 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`. --- steamtinkerlaunch | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 4a0bbb41..adaac4aa 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -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" @@ -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