mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 23:25:50 +03:00
proton: Consistently read from os.environ, not our local copy
This commit is contained in:
parent
38efd9aeed
commit
3c120fa953
15
proton
15
proton
@ -78,7 +78,7 @@ env["WINEDEBUG"] = "-all"
|
|||||||
lfile_path = None
|
lfile_path = None
|
||||||
|
|
||||||
#env["WINEDEBUG"] = "+timestamp,+tid,+seh"
|
#env["WINEDEBUG"] = "+timestamp,+tid,+seh"
|
||||||
#lfile_path = env["HOME"] + "/steam-" + env["SteamGameId"] + ".log"
|
#lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
|
||||||
|
|
||||||
if lfile_path is None:
|
if lfile_path is None:
|
||||||
lfile = open("/dev/null", "w")
|
lfile = open("/dev/null", "w")
|
||||||
@ -88,14 +88,14 @@ else:
|
|||||||
lfile = open(lfile_path, "w")
|
lfile = open(lfile_path, "w")
|
||||||
|
|
||||||
if ld_path_var in os.environ:
|
if ld_path_var in os.environ:
|
||||||
env[ld_path_var] = lib64dir + ":" + libdir + ":" + env[ld_path_var]
|
env[ld_path_var] = lib64dir + ":" + libdir + ":" + os.environ[ld_path_var]
|
||||||
else:
|
else:
|
||||||
env[ld_path_var] = lib64dir + ":" + libdir
|
env[ld_path_var] = lib64dir + ":" + libdir
|
||||||
|
|
||||||
env["WINEDLLPATH"] = lib64dir + "/wine:" + libdir + "/wine"
|
env["WINEDLLPATH"] = lib64dir + "/wine:" + libdir + "/wine"
|
||||||
|
|
||||||
if "PATH" in os.environ:
|
if "PATH" in os.environ:
|
||||||
env["PATH"] = bindir + ":" + env["PATH"]
|
env["PATH"] = bindir + ":" + os.environ["PATH"]
|
||||||
else:
|
else:
|
||||||
env["PATH"] = bindir
|
env["PATH"] = bindir
|
||||||
|
|
||||||
@ -174,10 +174,11 @@ if vr_runtime is None or \
|
|||||||
vr_config is None or \
|
vr_config is None or \
|
||||||
vr_log is None:
|
vr_log is None:
|
||||||
try:
|
try:
|
||||||
if "XDG_CONFIG_HOME" in env:
|
#TODO: support mac
|
||||||
path = env["XDG_CONFIG_HOME"]
|
if "XDG_CONFIG_HOME" in os.environ:
|
||||||
|
path = os.environ["XDG_CONFIG_HOME"]
|
||||||
else:
|
else:
|
||||||
path = env["HOME"] + "/.config"
|
path = os.environ["HOME"] + "/.config"
|
||||||
path = path + "/openvr/openvrpaths.vrpath"
|
path = path + "/openvr/openvrpaths.vrpath"
|
||||||
|
|
||||||
j = json.load(open(path, "r"))
|
j = json.load(open(path, "r"))
|
||||||
@ -300,7 +301,7 @@ def dump_dbg_script(path, cmd, descr):
|
|||||||
#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:
|
if "PROTON_DUMP_DEBUG_COMMAND" in os.environ:
|
||||||
dump_dbg_script("/tmp/proton_dbg", ["winedbg", "$@"], "Run winedbg (with args)")
|
dump_dbg_script("/tmp/proton_dbg", ["winedbg", "$@"], "Run winedbg (with args)")
|
||||||
dump_dbg_script("/tmp/proton_dbg_run", ["winedbg"] + sys.argv[2:], "Run winedbg with the game loaded")
|
dump_dbg_script("/tmp/proton_dbg_run", ["winedbg"] + sys.argv[2:], "Run winedbg with the game loaded")
|
||||||
dump_dbg_script("/tmp/proton_run", ["$@"], "Run an arbitrary command")
|
dump_dbg_script("/tmp/proton_run", ["$@"], "Run an arbitrary command")
|
||||||
|
Loading…
Reference in New Issue
Block a user