One option could be something like:
elif sys.argv[1] == "rundirect":
run_wine(sys.argv[2:])
Which would allow:
$ proton rundirect wine winecfg
$ proton rundirect wine reg query HKEY_LOCAL_MACHINE
$ proton rundirect winetricks dotnet40
Except proton's main goal is to provide a compatibility layer for windows games on linux through Steam, providing a fully-functioning CLI is probably very low in their lists of priorities (?).
I'm not sure if I understand your proposal entirely, but how would proton know which of all the prefixes to run without specifying its absolute path?
Proton already refuses to run without STEAM_COMPAT_DATA_PATH set, which controls prefix selection. You’re right, I’m sure it’s not a priority, but I’d still expect it to be useful for debugging, or for power users experimenting with games not officially supported by proton.
Yes exactly, so to run it from the terminal you must define STEAM_COMPAT_DATA_PATH to point to your prefix, akin to defining WINEPREFIX if you were using vanilla wine.
I guess my question is, how is
STEAM_COMPAT_DATA_PATH=/path/to/prefix proton rundirect winetricks dotnet40
better than
WINEPREFIX=/path/to/prefix winetricks dotnet40
?
That’s what I’m doing now, but Proton does define a number of variables, including wine dlloverrides, the dll library search path, esync, etc. In the trivial case it won’t matter, but in others it may well change the behavior. It also does a certain amount of setup of the initial prefix, so ideally one has to run proton once to do that anyway.
@kergoth You probably want to be using the proton_run debug script. In the stable branch (3.7-3), it is dumped in /tmp/proton_run. In the beta branch (3.7-5) you need to enable PROTON_DUMP_DEBUG_COMMANDS=1 and then it will be dumped to /tmp/proton_$USER/proton_run. That's also described at the bottom of the README. Does that give you what you need?
Ah right, totally forgot about that, also I think for the beta branch it's just run
PROTON_DUMP_DEBUG_COMMANDS=1x1 2018-09STEAM_COMPAT_DATA_PATHx2 2018-09STEAM_COMPAT_DATA_PATH=/path/to/prefixx1 2018-09WINEPREFIXx1 2018-09WINEPREFIX=/path/to/prefixx1 2018-09
Currently, executables in /path/to/wine_prefix/drive_c/windows/system32/ and others can't be easily run due to the game_arch==ARCH_UNKNOWN fallback to start /unix. For example, proton can't run reg, regedit, winecfg, etc easily without a full absolute path.
It'd be nice to make the use of start more explicit (i.e. for *.{bat,cmd,msi}), be smarter about locating the specified command when it's not absolute, or add a new proton subcommand to run such tools in proton's context. On a related note, it'd be nice to be able to run winetricks easily in that context, but that's likely as easy as adding a new subcommand to just run dump_dbg_env(sys.stdout) to get to proton's environment to run it under that.