Skip to content

Commit

Permalink
Custom Command: Launch .lnk files using Proton automatiically
Browse files Browse the repository at this point in the history
  • Loading branch information
sonic2kk committed May 15, 2024
1 parent 0b3661e commit 681fad3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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.20240512-2"
PROGVERS="v14.0.20240516-1 (customcmd-lnk-files)"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 681fad3

Please sign in to comment.