Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proton: Add PROTON_CMD #2605

Open
wants to merge 1 commit into
base: proton_4.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,6 @@ the Wine prefix. Removing the option will revert to the previous behavior.
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
| <tt>forcelgadd</tt> | <tt>PROTON_FORCE_LARGE_ADDRESS_AWARE</tt> | Force Wine to enable the LARGE_ADDRESS_AWARE flag for all executables. |
| <tt>oldglstr</tt> | <tt>PROTON_OLD_GL_STRING</tt> | Set some driver overrides to limit the length of the GL extension string, for old games that crash on very long extension strings. |
| | <tt>PROTON_CMD</tt> | Pass following string as parameter to `cmd /c` instead of running `%command%`. For example: `PROTON_CMD=regedit %command%` will run regedit in game's prefix. |

<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
8 changes: 6 additions & 2 deletions proton
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ if "SteamGameId" in env:
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")
command = env.get("PROTON_CMD") or ''.join(sys.argv[2:])
lfile.write("Command: " + command + "\n")
lfile.write("======================\n")
lfile.flush()
else:
Expand Down Expand Up @@ -594,7 +595,10 @@ def run():
dump_dbg_scripts()
except OSError:
log("Unable to write debug scripts! " + str(sys.exc_info()[1]))
run_wine([wine_path, "steam"] + sys.argv[2:])
if "PROTON_CMD" in env:
run_wine([wine_path, "steam", "cmd", "/c", env["PROTON_CMD"]])
else:
run_wine([wine_path, "steam"] + sys.argv[2:])

if sys.version_info[0] == 2:
binary_stdout = sys.stdout
Expand Down