proton: Add ability to dump debug command line

This commit is contained in:
Andrew Eikum 2018-02-13 15:06:41 -06:00
parent 0b6599c0bc
commit dccc1f1fe8

16
proton
View file

@ -209,6 +209,22 @@ else:
#determine mode #determine mode
if sys.argv[1] == "run": if sys.argv[1] == "run":
#start target app #start target app
if "PROTON_DUMP_DEBUG_COMMAND" in env:
f = open("/tmp/proton_dbg_cmd", "w")
f.write("#!/bin/bash\n\n")
f.write("cd " + os.getcwd() + "\n")
f.write("SteamGameId=\"" + env["SteamGameId"] + "\" \\\n")
f.write("\tSteamAppId=\"" + env["SteamAppId"] + "\" \\\n")
f.write("\tPATH=\"" + env["PATH"] + "\" \\\n")
f.write("\tWINEDLLPATH=\"" + env["WINEDLLPATH"] + "\" \\\n")
f.write("\tLD_LIBRARY_PATH=\"" + env["LD_LIBRARY_PATH"] + "\" \\\n")
f.write("\tWINEPREFIX=\"" + env["WINEPREFIX"] + "\" \\\n")
f.write("\t" + wine_path + " winedbg")
for arg in sys.argv[2:]:
f.write(" \"" + arg + "\"")
f.write("\n")
f.close()
else:
run_wine([wine_path] + sys.argv[2:]) run_wine([wine_path] + sys.argv[2:])
elif sys.argv[1] == "translatepath": elif sys.argv[1] == "translatepath":
#get windows path equivalent #get windows path equivalent