-
Notifications
You must be signed in to change notification settings - Fork 72
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
Custom Command: Allow Using Steam Linux Runtime with Custom Commands #1124
Conversation
Tested and this works with native games now without breaking Proton games! The log is also correct, it will log when it has a native game and when it's building a log for a Proton game. I confirmed the Steam Linux Runtime is used by checking for additional Now we have to implement this option on the UI. |
Replaced the hardcoded debug var This PR is untested with this change. |
Tested with SA-Mod-Manager as a Custom Command for Sonic Adventure 2, the SLR is enabled/disabled as expected. |
Wine custom commands cannot be ran for native Linux titles as there is no compat data folder for them to run inside of, forgot about that... So testing Proton custom commands with Native titles doesn't work, but that is to be expected. |
Verified that this worked with To the Moon where a custom command was set as the game start script and a different native Linux game in a different directory. The Steam Linux Runtime was enabled and disabled as expected. |
Does not do anything yet
Very hacky logic atm and untested, not sure if unsetting logic will remove SLR where it is needed. This needs a LOT of testing!
don't feel like dealing with this now, and not relevant to this PR, but I want to put them somewhere \:P
for config file
4d85433
to
d5c94e8
Compare
I think testing for this PR is dev complete now, the functionality seems to work. It is in very good shape from my testing. The main things left are:
|
In future we should look into integrating the Crash Guesser, or some kind of Crash Guesser, with custom commands IF We should also look into integrating |
Did some more testing to make sure this played nicely with regular custom command usage (Custom Command, then game after Custom Command exits), Fork Custom Command, and Inject Custom Command. I realised most of my testing last night was for Only Custom Command. I tested this with a retouch of the The last thing I want to test a bit more is native custom programs with Proton games; the inverse doesn't work - you can't run Proton custom commands with native games because native games don't have a prefix; we could theoretically generate one but that's probably unnecessary. I don't see a case either where you'd need to run a Windows binary to do something with a native title. But the case of running a native custom command with a Proton game does exist. I think it works fine, and logically it should work because |
Also improve logging for launching native custom programs
Running custom programs with Proton will not use the native SLR but the Proton one. Seems we will have to force this in some way.
|
We could actually just refactor for force Proton var in Going to test such a refactor locally and see if it works. |
Seems like I got it working locally.
Will push the latest changes in a bit. |
Allows using native custom commands with SLR when launched via a Proton game
Functionality has been tested pretty extensively and it seems to work without introducing regressions, implementation is all good as well from another scan. ShellCheck is green, langfiles are updated, version is bumped, this is good to merge! |
Could probably merge this somehow in future.
Adds the ability to use the Steam Linux Runtime with Custom Commands. This should help with compatibility, as Proton is not intended to be used to run games without the Steam Linux Runtime.
This functionality should improve compatibility with custom commands, especially Proton custom commands. This should also mean that, effectively, using a custom command, with
ONLY_CUSTOMCMD
enabled, and with the Steam Linux Runtime option from this PR enabled, allows the custom command to act as a full replacement for the default Steam executable. There are some caveats and limitations (no integration with Steamworks as usual, mod managers won't respect this, etc) but in my testing it acts as a smooth drop-in replacement strategy now even in edge-cases where this didn't work before.This currently works, but there is no option for this on the UI, it is hardcoded with
__DEBUG_CUSTCMD_SLR
in the code.Note: The implementation here may serve as a basis for using the SLR with Winetricks, see #860.
TODO:
EDIT: The checkbox has been added, and the option for this (
CUSTOMCMD_USESLR
) will be enabled by default. This is because it is supposed to improve compatibility. Proton also requires the SLR; many things work without it on some systems but it's still meant to be used. With Native Linux commands, it is unnecessary, but can still be very useful except for things like scripts.So for broad compatibility, this is enabled by default, but can be disabled in cases where it causes issues. For example it may get in the way of inter-process communication, and it would prevent scripts from accessing things on PATH (as it would be isolated to the container).
The tooltip notes the compatibility benefit and briefly illustrates some limitations.