sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.03k stars 69 forks source link

[Feature Request] Add dropdown to select Steam Linux Runtime version for Native Games #1087

Open sonic2kk opened 2 months ago

sonic2kk commented 2 months ago

System Information

Feature Description

(See also: #1084)

Valve now have two Steam Linux Runtime versions that can be used for native games: "Steam Linux Runtime 1.0 (Scout)" and "Steam Linux Runtime 3.0 (Sniper)". If no Steam Linux Runtime is specified in the start command for a native title (i.e. when a native game is not started with SLR 1.0 or 3.0 selected as a compatibility tool), and if the Steam Linux Runtime is enabled (it is by default), then SteamTinkerLaunch will always attempt to use Steam Linux Runtime 1.0 with native games.

However, native games can also use Steam Linux Runtime 3.0. We should default to SLR 1.0 (as it is currently the most widely used and reliable for native titles), but add a dropdown to the Game Menu to allow the user to select whether a title should use SLR 1.0 or 3.0. We should make a new config variable for the per-game config file that tracks this, and default to SLRAID. We should then update setSLRReap to use this value instead of the hardcoded SLRAID.

We would need some way to map the value on the dropdown with the AppID for SLR 1.0 and 3.0 (we can probably hardcode these, and maybe update SLRAID to specifically say SLRAIDSCOUT, and then create SLRAIDSNIPER. Implementation on this part specifically will be the most complex.

This will only impact native games, for Proton games we will always check the required SLR in toolmanifest.vdf!

If the selected SLR is not installed, setSLRReap will handle logging and notifier usage, so no extra work should be needed here.

NOTE: We need to check if the syntax for SLR 1.0 and 3.0 are the same. If they are, we should be in the clear, but otherwise we will need specific logic to build a different launch command if SLR 3.0 is selected.

sonic2kk commented 2 months ago

The syntax between SLR 1.0 and SLR 3.0 is different. Sniper uses SteamLinuxRuntime_sniper/_v2-entry-point (very similar to what Proton does) whereas Scout uses SteamLinuxRuntime_soldier/_v2-entry-point --verb=waitforexitandrun -- SteamLinuxRuntime/scout-on-soldier-entry-point-v2 -- it appends an extra SteamLinuxRuntime/scout-on-soldier-entry-point-v2

So we will need some consideration on how to handle the different SLRs. Maybe the best way would be to check for SLR 1.0 and only append the scout-on-soldier-entry-point-v2 if we're using SLR 1.0, since going forward, 2.0 and 3.0 should use the same syntax, and this extra scout-on-soldier-entry-point-v2 should be specific to SLR 1.0.