proton: Allow relative paths in PROTON_REMOTE_DEBUG_CMD.

Patch by Timothee Besset.
This commit is contained in:
Jacek Caban 2021-11-19 21:23:45 +01:00 committed by Arkadiusz Hiler
parent 1c8cf58d2a
commit 726c2fe87d

6
proton
View File

@ -14,6 +14,7 @@ import stat
import subprocess import subprocess
import sys import sys
import tarfile import tarfile
import shlex
from ctypes import CDLL from ctypes import CDLL
from ctypes import POINTER from ctypes import POINTER
@ -1106,7 +1107,7 @@ class Session:
self.env["WINEDEBUG"] = "-all" self.env["WINEDEBUG"] = "-all"
if "PROTON_REMOTE_DEBUG_CMD" in self.env: if "PROTON_REMOTE_DEBUG_CMD" in self.env:
self.remote_debug_cmd = self.env.get("PROTON_REMOTE_DEBUG_CMD").split(" ") self.remote_debug_cmd = shlex.split(self.env.get("PROTON_REMOTE_DEBUG_CMD"))
else: else:
self.remote_debug_cmd = None self.remote_debug_cmd = None
@ -1262,6 +1263,9 @@ class Session:
log("Unable to write debug scripts! " + str(sys.exc_info()[1])) log("Unable to write debug scripts! " + str(sys.exc_info()[1]))
if self.remote_debug_cmd: if self.remote_debug_cmd:
remote_debug_cmd = self.remote_debug_cmd
if not os.path.isabs(remote_debug_cmd[0]):
remote_debug_cmd[0] = g_proton.path(remote_debug_cmd[0])
remote_debug_proc = subprocess.Popen([g_proton.wine_bin] + self.remote_debug_cmd, remote_debug_proc = subprocess.Popen([g_proton.wine_bin] + self.remote_debug_cmd,
env=self.env, stderr=self.log_file, stdout=self.log_file) env=self.env, stderr=self.log_file, stdout=self.log_file)
else: else: