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

Support compatibility tools other than Proton out-of-the-box. #293

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

loathingKernel
Copy link
Contributor

@loathingKernel loathingKernel commented Nov 29, 2024

This PR aims to allow auto-configuration of compatibility tools other than Proton by using the information in compatibilitytool.vdf and toolmanifest.vdf manifest files. Using this information umu can construct the proper command for each tool based on which runtime the tool depends on (if at all), the entry point of the runtime and the tool, and the type of the tool (important for winetricks as it works only on proton). This supersedes environment variables such UMU_NO_PROTON (PROTONPATH remains as a way to set the tool with expanded meaning) and UMU_NO_RUNTIME. These variables are retained only to force a specific configuration if required.

For example GAMEID=0 WINEPREFIX=~/Wine/umu/ UMU_LOG=debug PROTONPATH=luxtorpeda umu-run launches luxtorpeda through umu.

  • Important changes:

    • vdf library is now a vendored dependency. It is a pure-python library and thus compatible with zipapp.
    • UMU_NO_PROTON renamed to UMU_NO_TOOL to avoid confusion of its purpose. This is useful if the user wants to run a linux-native binary in the runtime without a tool.
    • UMU_NO_RUNTIME is retained as an override if the user wants to explicitly disable the runtime even if the tool requires it. Tools that don't use the runtime do not require this to be set any more.
    • umu checks if the configured tool is a proton-derived tool when using winetricks and exits if it is isn't.
    • umu-shim is always prepended to the tool's command. I have not tested this extensively but it didn't cause issues while testing with various tools and protons under X11.
  • Things that need more consideration:

    • umu renames _v2-entry-point to umu. This rename is handled here. The same name for the entry point is also used in the soldier, streamrt2 runtime. The "new" scout-in-soldier runtime uses scout-on-soldier-entry-point-v2. If umu was to stop renaming the runtime's entry point, it should make supporting more runtimes easier.
    • Related to the above considering scout-in-soldier, it is a runtime which depends on another runtime. The current implementation of SteamRuntime class doesn't handle a runtime using another runtime. Should it be implemented and remain unused for now?
    • Related to both of the above and the UMU_NO_TOOL env variable. The PROTONPATH env variable could be used to define the runtime that should be used to run a linux-native executable in the form of PROTONPATH="soldier/scout/etc". This should make UMU_NO_TOOL obsolete.
    • umu-shim is always prepended to the tool's command. I have no tested this extensively but it didn't cause issues while testing with various tools and protons.

Marked as draft for now pending the first round of reviews.

@loathingKernel loathingKernel force-pushed the tool_info branch 14 times, most recently from fc45233 to 60315a1 Compare December 4, 2024 20:41
@loathingKernel loathingKernel marked this pull request as ready for review December 6, 2024 11:32
@beh-10257
Copy link
Contributor

will this make it possible to use proton-tkg ??
sorry if this is early days

@loathingKernel
Copy link
Contributor Author

loathingKernel commented Dec 6, 2024

will this make it possible to use proton-tkg ?? sorry if this is early days

It should make possible to run any tool that works with Steam as a compatibility tool. The main constraint not addressed yet are tools that require a runtime other than sniper but I consider support for multiple runtimes a superset which is not going to be addressed by this PR alone.

@loathingKernel loathingKernel force-pushed the tool_info branch 2 times, most recently from f4d0ab0 to 32babaa Compare December 9, 2024 08:52
…ommand

Using the information in the compatibility tool's manifest, umu executes
the tool's entry point as described by the tool with the expected runtime
environment. Umu now detects when the runtime should be used and potentially
use the correct runtime to do so.

This also enables umu to run tools other than proton, such as luxtorpeda
simply by setting `PROTONPATH=luxtorpeda` or `PROTONPATH=/path/to/not/proton`
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.

2 participants