From 681fad3516b1b7102923c27648ede04bcc11c21c Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Thu, 16 May 2024 00:59:46 +0100 Subject: [PATCH] Custom Command: Launch .lnk files using Proton automatiically --- steamtinkerlaunch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 6bbbbfc2..b0708836 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240512-2" +PROGVERS="v14.0.20240516-1 (customcmd-lnk-files)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -12737,8 +12737,9 @@ function launchCustomProg { writelog "INFO" "${FUNCNAME[0]} - Generated arguments for custom command are now '${FINALOUTCMD[*]}'" fi + # Use Wine/Proton with a custom command if it is detected as a Windows executable, a batch script (.bat), a Windows shortcut (.lnk), or if the user forces Proton # Cannot always rely on `file` to return `PE32` even for Windows executables -- See #710 (seems to be when exe files are built on Linux they are not PE32) - if [ "$(file "$CUSTCOM" | grep -c "PE32")" -eq 1 ] || grep -q ".bat" <<< "$CUSTCOM" || [ "$CUSTOMCMDFORCEWIN" -eq 1 ]; then + if [ "$(file "$CUSTCOM" | grep -c "PE32")" -eq 1 ] || grep -q ".bat" <<< "$CUSTCOM" || grep -q ".lnk" <<< "$CUSTCOM" || [ "$CUSTOMCMDFORCEWIN" -eq 1 ]; then if [ "$CUSTOMCMDFORCEWIN" -eq 1 ]; then # Force custom command to use Wine/Proton, even if we do not detect it as a valid Windows binary writelog "INFO" "${FUNCNAME[0]} - CUSTOMCMDFORCEWIN is '$CUSTOMCMDFORCEWIN' - User wants to force this custom command as a Windows program"