lutris / agora

Public discussion space for the community
11 stars 0 forks source link

Configure proton prefix for VR #20

Open Lyle-Tafoya opened 5 years ago

Lyle-Tafoya commented 5 years ago

When creating a new Wine prefix, Steam copies and symlinks in some files to enable OpenVR support. Additionally, there are some environment variables which it sets up behind the scenes. I would appreciate it if Lutris could provide a way to do this easily. Either automatically for Proton titles, or some kind of one-click VR deploy solution in the settings for a given game configured to use Proton. I just recently implemented this functionality for a command line tool called Native2Proton. The changes were simple and the relevant commit is here: https://github.com/Holston5/Native2Proton/pull/28/commits/e6c2bb598fc69fc69d3e9aafe4c446bfd5638124

I can try to assist if needed.

Lyle-Tafoya commented 5 years ago

I think this problem should be easily solved by actually leveraging the script that comes with proton to run executables. When you use that script to run executables, it handles the creation of the wine prefix automatically, including everything needed for VR support and DXVK. It also handles upgrading the wine prefix when the version of proton is incremented (ie. it keeps track of files that it has added to the wine prefix in order to help ensure clean transitions).

Here is the relevant script: https://github.com/ValveSoftware/Proton/blob/proton_3.16/proton

If you are trying to avoid usage of this script directly (ie. maybe because it sets up the environment with steam runtime), the relevant parts of the proton script could be used as an example for how to setup the wine prefix to handle VR.

strycore commented 5 years ago

I don't have a VR headset to test

Lyle-Tafoya commented 5 years ago

Forgive me for saying so, but I don't see the rationale in closing an issue just because you cannot test it. Were any commits made which may have plausibly fixed this? I did offer my assistance as well as 2 different ways you could go about solving the issue, but you never said anything until this. I do see you added the "need help" label 18 days ago, but that doesn't notify people who are watching the issue like a comment does. If the issue still exists, closing the issue does not make any logical sense.

As discussed above, there are 2 primary ways this feature request could be handled.

1) Invoke Proton. Currently, it is possible to configure Lutris to use the version of Wine which ships with Proton. However, that is not the same as invoking Proton itself. Proton itself is more of a runner which handles a variety of behavior, including invoking that particular version of Wine. It seems to me that proper Proton support would need to be added via https://github.com/lutris/lutris/tree/master/lutris/runners. Invoking proton is as simple as setting the environment variable STEAM_COMPAT_DATA_PATH and invoking the above mentioned proton script with the arguments "run" followed by the path to the executable. Having a runner which invokes Proton correctly would allow people to play VR games.

2) Add a separate option to copy/symlink the relevant files into place. Although invoking Proton is the easiest way I know of to set up a wine prefix for VR, it is not the only way to do so. By looking at the commit I linked in my original comment, you can see which files need to be copied to the wine prefix and what environment variables need to be set before launching the game.

strycore commented 5 years ago

I closed a bunch of issues to see which ones were valued by their submitters, if you can provide the feature in a PR that is properly QAd and maintained, then I'm all for merging it.