-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
base: proton_4.2
Are you sure you want to change the base?
proton: Add PROTON_CMD #2605
Conversation
This environment variable can be used to override executable passed by the Steam client, run .bat files or easily start wine commands such as winecfg or regedit.
This is very complicated, and will hopefully only get less useful as we go forward. Are you familiar with the debug commands switch? After generating the debug scripts, you can copy the |
Yes, I am familiar with On the other hand, I implemented it only because I wanted to explain to a non-technical user how to run Shenmue (right now, solution for this game is to cross-compile fake launcher executable). Once implemented, I found it easier for me to do certain one-off tasks (like running winecfg to enable virtual desktop).
Mono project does not plan to implement WPF, so it might take a while… |
Mono doesn't, but wine-mono does plan to implement WPF :-) We're waiting on the .NET Core team to finish their open sourcing efforts https://github.com/dotnet/wpf/blob/master/roadmap.md I'll ask some other folks internally, but I still think this is too complicated and fragile to officially support. If you're going this far out of your way to run an unsupported game, I dunno, I think you're kind of on your own anyway. |
There is internal ... "thing" in Steam client, if game have more than one executable, then additional entries added into the launch menu. Like "Configure", or "Launch 64bit version" ... (e.g. https://steamdb.info/app/236150/config/). IMHO the most "Click To Play" solution could be to just add exactly one additional entry for all Proton games. BTW Cheers. |
@pchome Proton can't control this GUI created by Steam client, can't show GUI popups, etc. Technically, I think this GUI is created by |
@dreamer Technically, I don't think it's hard to add one additional record after parsing game's configuration data, it can be literally single string in Steam client's code. Proton's responsibility is to provide I don't going to judge your solution, I'm using custom scripts by myself, but something "simple" and "official" would be great. P.S. Configuration data stored in Example
so should be something like
("dot" is either |
@aeikum Any update on merging this PR? People who try to run Shenmue still have problems cross-compiling launchers. It is such a silly problem with a trivial solution... |
@dreamer Also, |
@pchome I tested it at least on Fallout, Fallout 2 and Syberia (46500), but it was some time ago. I don't remember if I tested it during installation of any game (is it even possible to set commandline options before installing a game?). But you are right - I will double check if patch does not prevent
That's a bit complicated ;) When working on steam-dos I looked into it in detail - sometimes game is started with
That means that if PROTON_CMD interferes with that, it could prevent games from starting after game's pfx was manually removed. I definitely need to double-check if that's not a problem. |
Yeah there's a lot to think about with this kind of option, and as you can probably tell by our release schedule, we've been pretty busy lately. It's been a long while since I last worked with the installscript stuff. I think the intended launch sequence is to use |
@dreamer To prevent game from launching, in case user command do this, an additional environment variable could be used. |
For those interested, we have the similar thing in protonfixes now. No need to create separate "gamefix" configuration file for some single-time commands. It's possible to use
The implementation as simple as pf_alias_list = list(filter(lambda item: '-pf_' in item, sys.argv))
for pf_alias in pf_alias_list:
sys.argv.remove(pf_alias)
if pf_alias == '-pf_winecfg':
util.winecfg() so, it should be easy to also do the same thing in Proton. Let's say, short aliases for |
@pchome nice :) I haven't had time to update this PR yet (so this is a note for future me ;)), but it's possible cleanly distinguish when the Another thing that's worth considering: Steam client does NOT set environment variables defined via launch options for iscriptevaluator, so existing patch works ok already, as long as the new variable is defined in launch options only (and not in user_settings.py - which would be pointless anyway). |
Such a feature would be very useful, for launching a script extender or mod manager for bethesda games. without having to rename files, and try to trick steam. |
edit: launch custom program (native or exe through proton in the same pfx) before or instead chosen game with own args |
Definitely a useful feature. Specific use case: Editing launch commands in Origin and UbiConnect launchers. Recently had to add some stuff to Dragon Age: Inquisition to force 60fps cutscenes. |
I've talked to and heard from people who straight up think you can't mod games on Linux simply due to not knowing how to run a separate modloader .exe or .bat patch within a prefix, this process could definitely be simplified a bit to be more user friendly, not everyone knows about the wonderful thing that is SteamTinkerLaunch (Thank you very much btw frostworx). Sure, there ARE ways to do this, but if Steam Deck is all about simplifying gaming on linux for the layman, this should be treated as an important problem to give some additional QoL to. |
This environment variable can be used to override executable passed by the Steam client, run .bat files or easily start wine commands such as winecfg or regedit.
It's not intended for whitelisting, but rather as a convenient option for users, who want to bypass game launchers, import some keys into the registry, etc.
Example usage:
Simple replacing of a game launcher
At the moment user needs to manually rename files (which might fail after the game update or verifying file integrity in Steam client). For example in Fallout:
Not-so-simple replacing of a game launcher
Some launchers do additional tasks before launching game's executable. For example instead of writing and cross-compiling custom launcher for Shenmue (758330) (#1981 (comment)) user could pass:
Or instead of juggling files, links and directories around for Divinity Original Sin 2 (435150) (#413), something like this should work:
When launcher does additional tasks, it is possible to implement them in a batch script:
Modifying game prefix
These are much easier and less error-prone than finding and defining proper environment variables manually or even using external tools such as
protontricks
just to switch Windows version.Implementation detail
All parameters passed by a user or Steam client after
%command%
are disregarded and would need to be placed in PROTON_CMD.PROTON_CMD=foo %command% -bar
would need to be rewritten as:PROTON_CMD="foo -bar" %command%
.This is by design, to avoid game failing on unrecognized parameters when Steam client forces them into
%command%
- example of such title is e.g. STAR WARS Galactic Battlegrounds Saga (356500).