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

Making ULWGL usable through Steam #24

Closed
loathingKernel opened this issue Feb 11, 2024 · 5 comments
Closed

Making ULWGL usable through Steam #24

loathingKernel opened this issue Feb 11, 2024 · 5 comments

Comments

@loathingKernel
Copy link
Contributor

loathingKernel commented Feb 11, 2024

This is not an issue per se, but rather a discussion if such a use-case should be accounted for, even if it is undocumented and for testing purposes only.

Since #1 and #4 aim to provide a custom runtime, there is value to being able to test with Steam games, and it could be a way to suggest changes to Valve. This should be doable with a custom toolmanifest.vdf similar to this (Steam reads toolmanifest.vdf only, so it has to be renamed), with the following contents

"manifest"
{
  "version" "2"
  "commandline" "/ulwgl-run %verb%"
}

Some other tested examples of similar uses that do not prepend pressure-vessel, Steam-Play-None.

This is also related to #23 since the PR wants to change the CLI interface of the rewrite, so it is an opportunity to also handle compatibility with Steam's tool calling conventions. It should be easier to check if the first argument is a supported verb in python than it would be in sh, while also keeping backwards compatibility with the current ulgwl-run arguments.

@imLinguin
Copy link
Member

I believe we should just point the tool manifest to /ULWGL script directly, there is no point to forward it through ulwgl-run as everything we setup there is provided by Steam itself

@loathingKernel
Copy link
Contributor Author

loathingKernel commented Feb 13, 2024

Good point, and I am rethinking this myself now, but I don't know if there is a way to do so through Steam. Is it possible to override the runtime tool for a proton tool through Steam in the same way you can set a compatibility tool for a game?

I do not know of a way to make that possible by using Steam's facilities. Proton's toolmanifest.vdf (example) hardcodes the SLR appid it requires, and I don't know if it there is a way to specify a fallback or an alternative runtime. Masquerading as another SLR by hijacking the appid might also be a bad idea generally as far as Steam is concerned.

Edit:
After a hastily put together test, you can set a compatibility tool for a proton tool with a compatibilitytool.vdf

"compatibilitytools"
{
  "compat_tools"
  {
    "ULWGL" // Internal name of this tool
    {
      "install_path" "."
      "display_name" "ULWGL"
      "from_oslist"  "linux"
      "to_oslist"    "linux"
    }
  }
}

I set ULWGL for Proton Experimental to use it but echoing the command run by Steam for a game using it returned

/home/loathingkernel/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=343710 -- /home/loathingkernel/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- /home/loathingkernel/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point --verb=waitforexitandrun -- /home/loathingkernel/.local/share/Steam/steamapps/common/Proton - Experimental/proton waitforexitandrun /media/array_a/games/steam/steamapps/common/KHOLAT/Kholat.exe

so it doesn't seem to have any effect. This wasn't any exhaustive testing so there might be some other way to do this.

@GloriousEggroll
Copy link
Member

GloriousEggroll commented Feb 13, 2024

I believe we should just point the tool manifest to /ULWGL script directly, there is no point to forward it through ulwgl-run as everything we setup there is provided by Steam itself

not true -- for example what if someone is on steamdeck and they add a non-steam exe and set ULWGL as the compatibility tool?

In that case the ULWGL_ID and STORE required for non-steam games would not get passed or translated if you dont use the run script. Obviously the user would still have to manually set them in the launch options in steam, but at least with the run script they get properly translated.

I mean I could be mistaken and misunderstanding the use case here, if so apologies, but I would think users would try to add ULWGL to steam for usage with non-steam games via steam deck

@loathingKernel
Copy link
Contributor Author

loathingKernel commented Feb 13, 2024

I mean I could be mistaken and misunderstanding the use case here, if so apologies, but I would think users would try to add ULWGL to steam for usage with non-steam games via steam deck

Personally I wasn't thinking about SteamDeck so much, but rather my own tooling to discover Steam compatibility tools and for testing. Indeed this would be a huge plus for SteamDeck and another valid use-case for something other than my own benefit.

Since this might be generally useful, I will put together a skeleton and PR it.

@GloriousEggroll
Copy link
Member

Closing as this should be now resolved through #25

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

No branches or pull requests

3 participants