Skip to content

Commit

Permalink
One-Time Run: Use notifier for invalid executable, Proton, and run di…
Browse files Browse the repository at this point in the history
…rectory (#834)
  • Loading branch information
sonic2kk authored Jun 11, 2023
1 parent 88308c8 commit 925bc31
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 3 deletions.
4 changes: 4 additions & 0 deletions lang/chinese.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/dutch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/english.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1183,3 +1183,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/englishUK.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/french.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/german.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1184,3 +1184,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/italian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/polish.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
4 changes: 4 additions & 0 deletions lang/russian.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1182,3 +1182,7 @@ TT_ADDNSGA="Open menu to add a Non-Steam Game"
TT_SHADERREPOS="Configure ReShade Shader Repositories"
TT_UPSHADER="Update downloaded ReShade Shaders"
NOTY_SLRMISSING="Could not find requested Steam Linux Runtime - May not be installed!"
NOTY_OTRPROTINVALID="One-Time Proton 'XXX' does not appear to be valid"
NOTY_OTRRUNDIRINVALID="One-Time Run Directory does not appear to be valid"
NOTY_OTREXEINVALID="One-Time Executable 'XXX' does not appear to be valid"
NOTY_OTREXEBLANK="One-Time Run Executable was not specified"
18 changes: 15 additions & 3 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20230612-1"
PROGVERS="v14.0.20230612-2"
PROGCMD="${0##*/}"
SHOSTL="stl"
GHURL="https://github.com"
Expand Down Expand Up @@ -10707,7 +10707,7 @@ function commandlineOneTimeRun {
fi

# Ensure EXE is given and that directory to run the exe in is valid, and also ensure we have a valid Proton version to run the exe with
if [ -n "$OTEXE" ]; then # Valid executable required (Windows executable or Linux executable/file/etc, not really an EXE for Linux but oh well - Naming is hard!)
if [ -n "$OTEXE" ] && [ -f "$OTEXE" ]; then # Valid executable required (Windows executable or Linux executable/file/etc, not really an EXE for Linux but oh well - Naming is hard!)
if [ "$USEEXEDIR" -eq 1 ]; then # Use EXE dir as working dir
OTRUNDIR="$( dirname "$OTEXE" )"
writelog "INFO" "${FUNCNAME[0]} - Using executable directory '$OTRUNDIR' as working directory"
Expand Down Expand Up @@ -10836,12 +10836,24 @@ function commandlineOneTimeRun {
fi
else
writelog "ERROR" "${FUNCNAME[0]} - Could not find valid Proton to launch custom executable with"
notiShow "$( strFix "$NOTY_OTRPROTINVALID" "$OTPROTON" )"
echo "Could not find valid Proton to launch custom executable with ('$OTPROTON') -- Is it definitely installed?"
fi
else
writelog "WARN" "${FUNCNAME[0]} - Working directory '$OTRUNDIR' is no valid directory -- Cannot continue"
notiShow "$( strFix "$NOTY_OTRRUNDIRINVALID" "$OTRUNDIR" )"
echo "Working directory '$OTRUNDIR' doesn't appear to be valid -- Does it definitely exist and have correct permissions?"

fi
else
writelog "ERROR" "${FUNCNAME[0]} - One-Time Run command is not defined -- Cannot continue"
writelog "ERROR" "${FUNCNAME[0]} - One-Time Run command '$OTEXE' is not valid -- Cannot continue"
if [ -z "$OTEXE" ]; then
notiShow "$NOTY_OTREXEBLANK" "X"
echo "Selected One-Time Run executable appears to be blank: '$OTEXE'"
else
notiShow "$( strFix "$NOTY_OTREXEINVALID" "$OTEXE" )"
echo "Selected One-Time Run executable '$OTEXE' doesn't appear to be valid."
fi
fi
}

Expand Down

0 comments on commit 925bc31

Please sign in to comment.