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

Add files required for compatibility with Steam #25

Merged
merged 6 commits into from
Feb 20, 2024

Conversation

loathingKernel
Copy link
Contributor

@loathingKernel loathingKernel commented Feb 13, 2024

This is a basic implementation of Steam compatibility for ULWGL, discussed in #24.

This is partly motivated by my own laziness, as it would allow my existing code to easily discover ULWGL in the same way it looks for other tools provided by or compatible with Steam. My code parses the vdf files to discover and configure thr execution of these tools.

There are two files describing the compatibility tool:

  • compatibilitytool.vdf, which is useful if ULWGL is installed under .local/share/Steam/compatibilitytools.d
  • ulwgl.vdf, which can be installed in .local/share/Steam/compatibilitytools.d and allows Steam to use ULWGL from the .local/share/ULWGL path. I used the relative path as I don't know if Steam expands environment variables such as $HOME. If it is possible, it might be a better option to use an absolute path. I doesn't seem to be possible.

Some unknowns:

  • I used "compatmanager_layer_name" "container-runtime" because this is in fact a container runtime. Other possible values here. I don't know if these values have some other special meaning to Steam. It also works with this option commented out. It might be entirely possible to set it to some static arbitrary value to aid discoverability too.
  • "use_tool_subprocess_reaper" "1" I do not know if this is related to reaper and how the inclusion of reaper in ULWGL might affect it.

Examples:
I tested two games with it, a steam game and an epic game, both had GAMEID=0 because they do not have a protonfix.

  • Steam launch arguments example
WINEPREFIX="~/Wine/ULWGLTest" GAMEID=0 PROTONPATH="~/.local/share/Steam/compatibilitytools.d/GE-Proton8-32" %command%
  • resulting steam command
WINEPREFIX="~/Wine/ULWGLTest" GAMEID=0 PROTONPATH="~/.local/share/Steam/compatibilitytools.d/GE-Proton8-32"  /home/loathingkernel/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=2428955200 -- /home/loathingkernel/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/home/loathingkernel/Projects/external/ULWGL-launcher'/ulwgl-run waitforexitandrun  "/media/store_ntfs/games/epic/MinutesTillDawnxgosd/MinutesTillDawn.exe"

@R1kaB3rN This uncovered in bug in ulwgl-run.py, which is handled in 29827d0. ulwgl-run might be called from anywhere outside the project directory, so Path.cwd() didn't work. Even if this PR doesn't make it through, this should be fixed.

Also, please take a look at 68bcb6a. It uses the way other steam tools pass the verb as the first argument. I hastily solved it by checking the arguments and assigning PROTON_VERB if it wasn't already assigned. If you would like to see a different way to handle it, just tell me. It could also be merged like this and be improved later.

@loathingKernel loathingKernel changed the title Make ULWGL usable through Steam Add files required for compatibility with Steam Feb 13, 2024
To retain Steam's calling convention, check if the first argument is a
known verb. If it is and `PROTON_VERB` is unset, assign it to `PROTON_VERB`
and remove it from the arguments list.

This is a bit hacky but works as PoC
There are two files describing the compatibility tool,

* `compatibilitytool.vdf`, useful if ULWGL is installed under
`.local/share/Steam/compatibilitytools.d`

* `ulwgl.vdf`, can be installed in `.local/share/Steam/compatibilitytools.d`
and allows Steam to use ULWGL from the `.local/share/ULWGL` path
@GloriousEggroll GloriousEggroll merged commit 65a9d88 into Open-Wine-Components:main Feb 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants