diff --git a/README.md b/README.md index 82b3ec1c..fcd6ab42 100644 --- a/README.md +++ b/README.md @@ -284,8 +284,6 @@ the Wine prefix. Removing the option will revert to the previous behavior. | :-------------------- | :--------------------------------- | :----------- | | | `PROTON_LOG` | Convenience method for dumping a useful debug log to `$PROTON_LOG_DIR/steam-$APPID.log`. Set to `1` to enable default logging, or set to a string to be appended to the default `WINEDEBUG` channels. | | | `PROTON_LOG_DIR` | Output log files into the directory specified. Defaults to your home directory. | -| | `PROTON_DUMP_DEBUG_COMMANDS` | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. | -| | `PROTON_DEBUG_DIR` | Root directory for the Proton debug scripts, `/tmp` by default. | | | `PROTON_WAIT_ATTACH` | Wait for a debugger to attach to steam.exe before launching the game process. To attach to the game process at startup, debuggers should be set to follow child processes. | | | `PROTON_CRASH_REPORT_DIR` | Write crash logs into this directory. Does not clean up old logs, so may eat all your disk space eventually. | | `wined3d` | `PROTON_USE_WINED3D` | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11, d3d10, and d3d9. | diff --git a/proton b/proton index f435b3ab..f16bb415 100755 --- a/proton +++ b/proton @@ -1439,120 +1439,6 @@ class Session: s = dll + "=" + setting append_to_env_str(self.env, "WINEDLLOVERRIDES", s, ";") - def dump_dbg_env(self, f): - f.write("PATH=\"" + self.env["PATH"] + "\" \\\n") - f.write("\tTERM=\"xterm\" \\\n") #XXX - f.write("\tWINEDEBUG=\"-all\" \\\n") - f.write("\tWINEDLLPATH=\"" + self.env["WINEDLLPATH"] + "\" \\\n") - f.write("\t" + ld_path_var + "=\"" + self.env[ld_path_var] + "\" \\\n") - f.write("\tWINEPREFIX=\"" + self.env["WINEPREFIX"] + "\" \\\n") - if "WINEESYNC" in self.env: - f.write("\tWINEESYNC=\"" + self.env["WINEESYNC"] + "\" \\\n") - if "WINEFSYNC" in self.env: - f.write("\tWINEFSYNC=\"" + self.env["WINEFSYNC"] + "\" \\\n") - if "SteamGameId" in self.env: - f.write("\tSteamGameId=\"" + self.env["SteamGameId"] + "\" \\\n") - if "SteamAppId" in self.env: - f.write("\tSteamAppId=\"" + self.env["SteamAppId"] + "\" \\\n") - if "WINEDLLOVERRIDES" in self.env: - f.write("\tWINEDLLOVERRIDES=\"" + self.env["WINEDLLOVERRIDES"] + "\" \\\n") - if "STEAM_COMPAT_CLIENT_INSTALL_PATH" in self.env: - f.write("\tSTEAM_COMPAT_CLIENT_INSTALL_PATH=\"" + self.env["STEAM_COMPAT_CLIENT_INSTALL_PATH"] + "\" \\\n") - if "WINE_LARGE_ADDRESS_AWARE" in self.env: - f.write("\tWINE_LARGE_ADDRESS_AWARE=\"" + self.env["WINE_LARGE_ADDRESS_AWARE"] + "\" \\\n") - if "GST_PLUGIN_SYSTEM_PATH_1_0" in self.env: - f.write("\tGST_PLUGIN_SYSTEM_PATH_1_0=\"" + self.env["GST_PLUGIN_SYSTEM_PATH_1_0"] + "\" \\\n") - if "WINE_GST_REGISTRY_DIR" in self.env: - f.write("\tWINE_GST_REGISTRY_DIR=\"" + self.env["WINE_GST_REGISTRY_DIR"] + "\" \\\n") - if "MEDIACONV_AUDIO_DUMP_FILE" in self.env: - f.write("\tMEDIACONV_AUDIO_DUMP_FILE=\"" + self.env["MEDIACONV_AUDIO_DUMP_FILE"] + "\" \\\n") - if "MEDIACONV_AUDIO_TRANSCODED_FILE" in self.env: - f.write("\tMEDIACONV_AUDIO_TRANSCODED_FILE=\"" + self.env["MEDIACONV_AUDIO_TRANSCODED_FILE"] + "\" \\\n") - if "MEDIACONV_VIDEO_DUMP_FILE" in self.env: - f.write("\tMEDIACONV_VIDEO_DUMP_FILE=\"" + self.env["MEDIACONV_VIDEO_DUMP_FILE"] + "\" \\\n") - if "MEDIACONV_VIDEO_TRANSCODED_FILE" in self.env: - f.write("\tMEDIACONV_VIDEO_TRANSCODED_FILE=\"" + self.env["MEDIACONV_VIDEO_TRANSCODED_FILE"] + "\" \\\n") - - def dump_dbg_scripts(self): - exe_name = os.path.basename(sys.argv[2]) - - tmpdir = self.env.get("PROTON_DEBUG_DIR", "/tmp") + "/proton_" + os.environ["USER"] + "/" - makedirs(tmpdir) - - with open(tmpdir + "winedbg", "w") as f: - f.write("#!/bin/bash\n") - f.write("#Run winedbg with args\n\n") - f.write("cd \"" + os.getcwd() + "\"\n") - self.dump_dbg_env(f) - f.write("\t\"" + g_proton.wine_bin + "\" winedbg \"$@\"\n") - os.chmod(tmpdir + "winedbg", 0o755) - - with open(tmpdir + "winedbg_run", "w") as f: - f.write("#!/bin/bash\n") - f.write("#Run winedbg and prepare to run game or given program\n\n") - f.write("cd \"" + os.getcwd() + "\"\n") - f.write("DEF_CMD=(") - first = True - for arg in sys.argv[2:]: - if first: - f.write("\"" + arg + "\"") - first = False - else: - f.write(" \"" + arg + "\"") - f.write(")\n") - self.dump_dbg_env(f) - f.write("\t\"" + g_proton.wine_bin + "\" winedbg \"${@:-${DEF_CMD[@]}}\"\n") - os.chmod(tmpdir + "winedbg_run", 0o755) - - with open(tmpdir + "gdb_attach", "w") as f: - f.write("#!/bin/bash\n") - f.write("#Run winedbg in gdb mode and auto-attach to already-running program\n\n") - f.write("cd \"" + os.getcwd() + "\"\n") - f.write("EXE_NAME=${1:-\"" + exe_name + "\"}\n") - f.write("WPID_HEX=$(\"" + tmpdir + "winedbg\" --command 'info process' | grep -i \"$EXE_NAME\" | cut -f2 -d' ' | sed -e 's/^0*//')\n") - f.write("if [ -z \"$WPID_HEX\" ]; then \n") - f.write(" echo \"Program does not appear to be running: \\\"$EXE_NAME\\\"\"\n") - f.write(" exit 1\n") - f.write("fi\n") - f.write("WPID_DEC=$(printf %d 0x$WPID_HEX)\n") - self.dump_dbg_env(f) - f.write("\t\"" + g_proton.wine_bin + "\" winedbg --gdb $WPID_DEC\n") - os.chmod(tmpdir + "gdb_attach", 0o755) - - with open(tmpdir + "gdb_run", "w") as f: - f.write("#!/bin/bash\n") - f.write("#Run winedbg in gdb mode and prepare to run game or given program\n\n") - f.write("cd \"" + os.getcwd() + "\"\n") - f.write("DEF_CMD=(") - first = True - for arg in sys.argv[2:]: - if first: - f.write("\"" + arg + "\"") - first = False - else: - f.write(" \"" + arg + "\"") - f.write(")\n") - self.dump_dbg_env(f) - f.write("\t\"" + g_proton.wine_bin + "\" winedbg --gdb \"${@:-${DEF_CMD[@]}}\"\n") - os.chmod(tmpdir + "gdb_run", 0o755) - - with open(tmpdir + "run", "w") as f: - f.write("#!/bin/bash\n") - f.write("#Run game or given command in environment\n\n") - f.write("cd \"" + os.getcwd() + "\"\n") - f.write("DEF_CMD=(") - first = True - for arg in sys.argv[2:]: - if first: - f.write("\"" + arg + "\"") - first = False - else: - f.write(" \"" + arg + "\"") - f.write(")\n") - self.dump_dbg_env(f) - f.write("\t\"" + g_proton.wine64_bin + "\" c:\\\\windows\\\\system32\\\\steam.exe \"${@:-${DEF_CMD[@]}}\"\n") - os.chmod(tmpdir + "run", 0o755) - def run_proc(self, args, local_env=None): if local_env is None: local_env = self.env @@ -1564,12 +1450,6 @@ class Session: else: adverb = [] - if "PROTON_DUMP_DEBUG_COMMANDS" in self.env and nonzero(self.env["PROTON_DUMP_DEBUG_COMMANDS"]): - try: - self.dump_dbg_scripts() - except OSError: - log("Unable to write debug scripts! " + str(sys.exc_info()[1])) - if self.remote_debug_cmd: remote_debug_cmd = self.remote_debug_cmd if not os.path.isabs(remote_debug_cmd[0]):