Skip to content

Commit

Permalink
Custom Command: Skeleton for use SLR with Custom Command
Browse files Browse the repository at this point in the history
Does not do anything yet
  • Loading branch information
sonic2kk committed Jun 16, 2024
1 parent 27a8fba commit 48e7659
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7143,6 +7143,18 @@ function extProtonRun {
mapfile -d " " -t -O "${#RUNEXTPROGRAMARGS[@]}" RUNEXTPROGRAMARGS < <(printf '%s' "$EXTPROGRAMARGS")
fi

# __DEBUG_EXTPROTRUN_SLR=1
# if [ "$__DEBUG_EXTPROTRUN_SLR" -eq 1 ]; Then
# writelog "INFO" "${FUNCNAME[0]} - Running custom command with Proton SLR"
# setSLRReap

# if [ -n "${SLRCMD[0]}" ]; then
# writelog "INFO" "${FUNCNAME[0]} - Appending SLR to "
# else
# writelog "WARN" "${FUNCNAME[0]} - Could not find SLR! extProtonRun will NOT use "
# fi
# fi

# TODO pass "$EXTPROGRAMARGS" to programs running with Wine as well(?)
# TODO refactor a bit to be a little cleaner if possible
CUSTPROGNAME="$( basename "$PROGRAM" )"
Expand Down Expand Up @@ -12665,6 +12677,19 @@ function launchCustomProg {
CUSTOMCMD="$WICO"
fi

__DEBUG_CUSTCMD_SLR=1

# if [ "$__DEBUG_EXTPROTRUN_SLR" -eq 1 ]; Then
# writelog "INFO" "${FUNCNAME[0]} - Running custom command with Proton SLR"
# setSLRReap

# if [ -n "${SLRCMD[0]}" ]; then
# writelog "INFO" "${FUNCNAME[0]} - Appending SLR to "
# else
# writelog "WARN" "${FUNCNAME[0]} - Could not find SLR! extProtonRun will NOT use "
# fi
# fi

if [ -z "$CUSTOMCMD" ] || [[ "$CUSTOMCMD" =~ ${DUMMYBIN}$ ]]; then
writelog "INFO" "${FUNCNAME[0]} - CUSTOMCMD variable is empty - opening file requester"
fixShowGnAid
Expand Down Expand Up @@ -12794,6 +12819,8 @@ function launchCustomProg {
writelog "INFO" "${FUNCNAME[0]} - '$CUSTCOM' seems to be a MS Windows program - starting through proton"
fi

# TODO set Proton SLR here and add to CUSTOMCMD_ARGS if defined

if [ "$USEWICO" -eq 1 ] && [ "$(file "$CUSTCOM" | grep -c "(console)")" -eq 1 ]; then # Command line Wine/Proton custom program
writelog "INFO" "${FUNCNAME[0]} - '$CUSTCOM' seems to be a MS console program - starting using '$WICO'"
if [ "$FORK_CUSTOMCMD" -eq 1 ]; then
Expand Down Expand Up @@ -12840,6 +12867,9 @@ function launchCustomProg {

FWAIT=2

# TODO set native Linux SLR here and append to RUNEXTPROGRAMARGS
# TODO should respect selected SLR once #1087 is implemented

# Launch native custom command
NATIVEPROGNAME="$( basename "$LACO" )"
if [ -n "$1" ]; then
Expand Down Expand Up @@ -21676,6 +21706,8 @@ function launchSteamGame {

writelog "INFO" "${FUNCNAME[0]} - Initial game command is '${INGCMD[*]}'"

# Refetch SLR, in case we set it for custom command as well
# i.e. custom command could use native SLR, but we might want to use Proton SLR for the game, or vice versa
unset "${SLRCMD[@]}"
setSLRReap

Expand Down

0 comments on commit 48e7659

Please sign in to comment.