From 50af6b4efca869409a5528593732a3ebe5ef69b1 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Mon, 17 Jun 2024 02:26:10 +0100 Subject: [PATCH 1/2] Custom Command: Add logging for native custom commands Will be stored under STLSHMDIR as 'launchCustomProg.log' --- steamtinkerlaunch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index 3a937242..d0f6895c 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240617-1" +PROGVERS="v14.0.20240618-1 (improve-customcmd-logging)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -12928,20 +12928,20 @@ function launchCustomProg { writelog "INFO" "${FUNCNAME[0]} - FORK_CUSTOMCMD is set to 1 - forking the custom program in background and continue" if [ -n "${RUNEXTPROGRAMARGS[0]}" ]; then writelog "INFO" "${FUNCNAME[0]} - \"${RUNEXTPROGRAMARGS[*]}\" \"${LACO}\" \"${RUNCUSTOMCMD_ARGS[*]}\"" - (sleep "$FWAIT"; notiShow "$( strFix "$NOTY_CUSTPROG_FORKED_NATIVE" "$NATIVEPROGNAME" )"; "${RUNEXTPROGRAMARGS[@]}" "$LACO" "${RUNCUSTOMCMD_ARGS[@]}") & + (sleep "$FWAIT"; notiShow "$( strFix "$NOTY_CUSTPROG_FORKED_NATIVE" "$NATIVEPROGNAME" )"; "${RUNEXTPROGRAMARGS[@]}" "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" 2>&1 | tee "$STLSHM/${FUNCNAME[0]}.log") & else writelog "INFO" "${FUNCNAME[0]} - \"${LACO}\" \"${RUNCUSTOMCMD_ARGS[*]}\"" - (sleep "$FWAIT"; notiShow "$( strFix "$NOTY_CUSTPROG_FORKED_NATIVE" "$NATIVEPROGNAME" )"; "$LACO" "${RUNCUSTOMCMD_ARGS[@]}") & + (sleep "$FWAIT"; notiShow "$( strFix "$NOTY_CUSTPROG_FORKED_NATIVE" "$NATIVEPROGNAME" )"; "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" 2>&1 | tee "$STLSHM/${FUNCNAME[0]}.log") & fi else # Regular native executable writelog "INFO" "${FUNCNAME[0]} - Starting native custom command regularly" notiShow "$( strFix "$NOTY_CUSTPROG_REG_NATIVE" "$NATIVEPROGNAME" )" if [ -n "${RUNEXTPROGRAMARGS[0]}" ]; then writelog "INFO" "${FUNCNAME[0]} - \"${RUNEXTPROGRAMARGS[*]}\" \"${LACO}\" \"${RUNCUSTOMCMD_ARGS[*]}\"" - "${RUNEXTPROGRAMARGS[@]}" "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" + "${RUNEXTPROGRAMARGS[@]}" "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" 2>&1 | tee "$STLSHM/${FUNCNAME[0]}.log" else writelog "INFO" "${FUNCNAME[0]} - \"${LACO}\" \"${RUNCUSTOMCMD_ARGS[*]}\"" - "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" + "$LACO" "${RUNCUSTOMCMD_ARGS[@]}" 2>&1 | tee "$STLSHM/${FUNCNAME[0]}.log" fi fi fi From e3787cfc2a2fbb1d59aef0a2ccb712d5dd16b785 Mon Sep 17 00:00:00 2001 From: Eamonn Rea Date: Tue, 18 Jun 2024 23:53:01 +0100 Subject: [PATCH 2/2] version bump and TODO --- steamtinkerlaunch | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/steamtinkerlaunch b/steamtinkerlaunch index d0f6895c..813f50d4 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240618-1 (improve-customcmd-logging)" +PROGVERS="v14.0.20240619-1" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -7183,6 +7183,11 @@ function extProtonRun { # TODO pass "$EXTPROGRAMARGS" to programs running with Wine as well(?) # TODO refactor a bit to be a little cleaner if possible + # TODO it should be possible to pass PROTON_LOG to these Proton commands, however this also requries SteamGameId to be set -- This is not defined outside of Steam AND inside of Steam it would conflict with an actual Game ID if used + # if we want to use PROTON_LOG we need the ability to pass in PROTON_LOG=? and a custom SteamGameId that is only set for these program runs + # i.e. a default SteamGameId could be `extProtonRun`, but launchCustomProg could pass `customcommand`. + # + # This would be tricky to add, but would be nice to have! CUSTPROGNAME="$( basename "$PROGRAM" )" if [ "$MODE" == "F" ]; then # Forked Proton/Wine 'normal' custom program if [ -n "${RUNPROGARGS[0]}" ]; then