Compare commits

...

1 commit

Author SHA1 Message Date
Andrew Eikum
11c4a14c75 proton: Add PROTON_LOG_ALL_PROCESSES for logging all processes 2019-06-06 13:29:08 -05:00
2 changed files with 11 additions and 6 deletions

View file

@ -254,6 +254,7 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| Compat config string | Environment Variable | Description |
| :-------------------- | :----------------------------- | :----------- |
| | <tt>PROTON_LOG</tt> | Convenience method for dumping a useful debug log to `$HOME/steam-$APPID.log`. For more thorough logging, use `user_settings.py`. |
| | <tt>PROTON_LOG_ALL_PROCESSES</tt> | Instead of clearing the log for each invocation and only logging the game process, append logging for all process to `$HOME/steam-proton.log` without ever clearing the log. Use with care so you don't run out of hard disk space. |
| | <tt>PROTON_DUMP_DEBUG_COMMANDS</tt> | When running a game, Proton will write some useful debug scripts for that game into `$PROTON_DEBUG_DIR/proton_$USER/`. |
| | <tt>PROTON_DEBUG_DIR</tt> | Root directory for the Proton debug scripts, `/tmp` by default. |
| <tt>wined3d</tt> | <tt>PROTON_USE_WINED3D</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11 and d3d10. This used to be called `PROTON_USE_WINED3D11`, which is now an alias for this same option. |

16
proton
View file

@ -285,17 +285,21 @@ if "forcelgadd" in config_opts:
env["WINE_LARGE_ADDRESS_AWARE"] = "1"
lfile = None
if "SteamGameId" in env:
if "SteamGameId" in env or "PROTON_LOG_ALL_PROCESSES" in env:
if env["WINEDEBUG"] != "-all":
lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
if os.path.exists(lfile_path):
os.remove(lfile_path)
if "PROTON_LOG_ALL_PROCESSES" in env:
lfile_path = os.environ["HOME"] + "/steam-proton.log"
else:
lfile_path = os.environ["HOME"] + "/steam-" + os.environ["SteamGameId"] + ".log"
if os.path.exists(lfile_path):
os.remove(lfile_path)
lfile = open(lfile_path, "w+")
lfile.write("======================\n")
with open(basedir + "/version", "r") as f:
lfile.write("Proton: " + f.readline().strip() + "\n")
lfile.write("SteamGameId: " + env["SteamGameId"] + "\n")
lfile.write("Command: " + str(sys.argv[2:]) + "\n")
if "SteamGameId" in env:
lfile.write("SteamGameId: " + env["SteamGameId"] + "\n")
lfile.write("Command: " + str(sys.argv[1:]) + "\n")
lfile.write("======================\n")
lfile.flush()
else: