Skip to content

Open-Wine-Components/umu-launcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

umu

Unified Linux Wine Game Launcher

What is this?

This is a unified launcher for windows games on linux. It is essentially a copy of the Steam Linux Runtime/Steam Runtime Tools (https://gitlab.steamos.cloud/steamrt/steam-runtime-tools) that Valve uses for proton, with some modifications made so that it can be used outside of Steam.

What does it do?

When steam launches a proton game, it launches it like this:

/home/tcrider/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=348550 -- /home/tcrider/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- /home/tcrider/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point --verb=waitforexitandrun -- /home/tcrider/.local/share/Steam/compatibilitytools.d/GE-Proton8-27/proton waitforexitandrun /home/tcrider/.local/share/Steam/steamapps/common/Guilty Gear XX Accent Core Plus R/GGXXACPR_Win.exe

We can ignore this /home/tcrider/.local/share/Steam/ubuntu12_32/steam-launch-wrapper, it's just a process runner with no real value other than forwarding environment variables (more on that later).

I managed to pull the envvars it uses by making steam run printenv for the games command line. We needed these envvars because proton expects them in order to function. With them we can essentially make proton run without needing steam at all.

Next this part /home/tcrider/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/_v2-entry-point

The first part /home/tcrider/.local/share/Steam/steamapps/common/SteamLinuxRuntime_sniper/ is steam-runtime-tools compiled https://gitlab.steamos.cloud/steamrt/steam-runtime-tools and is used alongside the sniper runtime container used during proton builds.

The second part _v2-entry-point is just a bash script which loads proton into the container and runs the game.

So, umu is basically a copy paste of SteamLinuxRuntime_sniper, which is a compiled version of steam-runtime-tools. We've renamed _v2-entry-point to umu and added umu-run to replace steam-launch-wrapper.

When you use umu-run to run a game, it uses the specified WINEPREFIX, proton version, executable, and arguements passed to it to run the game in proton, inside steam's runtime container JUST like if you were running the game through Steam, except now you're no longer limited to Steam's game library or forced to add the game to Steam's library, in fact, you don't even have to have steam installed.

How do I use it?

Usage:

WINEPREFIX=<wine-prefix-path> GAMEID=<umu-id> PROTONPATH=<proton-version-path> ./umu-run <executable-path> <arguements>

Ex:

WINEPREFIX=$HOME/Games/epic-games-store GAMEID=umu-dauntless PROTONPATH="$HOME/.steam/steam/compatibilitytools.d/GE-Proton8-28" ./umu-run "$HOME/Games/epic-games-store/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe" "-opengl -SkipBuildPatchPrereq"

Optional (used mainly for protonfixes): STORE

WINEPREFIX=$HOME/Games/epic-games-store GAMEID=umu-dauntless STORE=egs PROTONPATH="$HOME/.steam/steam/compatibilitytools.d/GE-Proton8-28" ./umu-run "$HOME/Games/epic-games-store/drive_c/Program Files (x86)/Epic Games/Launcher/Portal/Binaries/Win32/EpicGamesLauncher.exe" "-opengl -SkipBuildPatchPrereq"

What does this mean for other launchers (lutris/bottles/heroic/legendary,etc):

  • everyone can use + contribute to the same protonfixes, no more managing individual install scripts per launcher
  • everyone can run their games through proton just like a native steam game
  • no steam or steam binaries required
  • a unified online database of game fixes (protonfixes)

right now protonfixes packages a folder of 'gamefixes' however it could likely be recoded to pull from online quite easily

The idea is to get all of these tools using this same umu-run and just feeding their envvars into it. That way any changes that need to happen can happen in proton-ge and/or protonfixes, or a 'unified proton' build based off GE, or whatever they want.

What is the basic plan of putting this into action?

  1. We build a database containing various game titles, their IDs from different stores, and their correlating umu ID.
  2. Various launchers then search the database to pull the umu ID, and feed it as the game ID to umu-run alongside the store type, proton version, wine prefix, game executable, and launch arguements.
  3. When the game gets launched from umu-run, protonfixes picks up the store type and umu ID and finds the appropriate fix script for it, then applies it before running the game.
  4. protonfixes has folders separated for each store type. The umu ID for a game remains the exact same across multiple stores, the only difference being it can have store specific scripts OR it can just symlink to another existing script that already has the fixes it needs.

Example:

Borderlands 3 from EGS store.

  1. Generally a launcher is going to know which store it is using already, so that is easy enough to determine and feed the STORE variable to the launcher.
  2. To determine the game title, EGS has various codenames such as 'Catnip'. The launcher would see "ok store is egs and codename is Catnip, let's search the umu database for those"
  3. In our umu unified database, we create a 'title' column, 'store' column, 'codename' column, 'umu-ID' column. We add a line for Borderlands 3 and fill in the details for each column.
  4. Now the launcher can search 'Catnip' and 'egs' as the codename and store in the database and correlate it with Borderlands 3 and umu-12345. It can then feed umu-12345 to the umu-run script.

Building and packaging:

Building umu currently requires bash, make, meson and scdoc

To build umu, after downloading and extracting the source code from this repository, change into the newly extracted directory

cd umu-launcher

To configure the installation PREFIX (this is not related to wine's WINEPREFIX) use the configure.sh script

./configure.sh --prefix=/usr

Change the --prefix as fit for your distribution, for example /usr/local, or /app for packaging through flatpak

Then run make to build. After a successful build the resulting files should be available in the ./builddir directory

Installing

To install umu run the following command after completing the steps described above

make install

or if you are packaging umu

make DESTDIR=<packaging_directory> install

Installing as user

If you want to install umu just for your user, or for quickly testing, you can configure umu with the following command

./configure.sh --user-install

followed by

make install

This will install umu under ~/.local/share/umu and place the executable in ~/.local/bin You will need to add $HOME/.local/bin in your $PATH to be able to run umu this way by exporting the path in your shell's configuration, for example ~/.bash_profile

export PATH="$HOME/.local/bin:$PATH"

Packages:

NixOS

if you want to add umu-launcher as a flake add this to your inputs in flake.nix

  inputs = {
    umu= {
      url = "git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging\/nix&submodules=1";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  }

and in your configuration.nix

{inputs, pkgs, ... }:
{
  environment.systemPackages = [  inputs.umu.packages.${pkgs.system}.umu  ];
}

if there is any problem with the flake feel free to open a bug report and tag any of the maintainers

maintainers: @beh-10257

Usage notes:

When /usr/bin/umu-run is first run, it will copy the /usr/share/umu folder to ~/.local/share/umu. From that point on the ~/.local/share/umu folder will be used for running umu. It will also perform a version check to make sure that if the contents of /usr/share/umu are updated, that the local version also gets updated.

When /usr/bin/umu-run is first run, it also copies /usr/share/umu/umu-Runner to ~/.local/share/steam/compatibilitytools.d/ so that it can be used as a compatibility tool in steam for non-steam games the same way Proton is.

When /usr/bin/umu-run is run, if a PROTONPATH is not specified, it will automatically download and use umu-Proton and place it at ~/.local/share/steam/compatibilitytools.d/

When /usr/bin/umu-run is run, if a WINEPREFIX is not specified, it will automatically create one using the umu-id at ~/Games/umu/

README notes from Valve's steam-runtime-tools:

Steam Linux Runtime 3.0 (sniper)

This container-based release of the Steam Runtime is used for native Linux games, and for Proton 8.0+.

For general information please see https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/container-runtime.md and https://gitlab.steamos.cloud/steamrt/steamrt/-/blob/steamrt/sniper/README.md

Release notes

Please see https://gitlab.steamos.cloud/steamrt/steamrt/-/wikis/Sniper-release-notes

Known issues

Please see https://github.com/ValveSoftware/steam-runtime/blob/master/doc/steamlinuxruntime-known-issues.md

Reporting bugs

Please see https://github.com/ValveSoftware/steam-runtime/blob/master/doc/reporting-steamlinuxruntime-bugs.md

Development and debugging

The runtime's behaviour can be changed by running the Steam client with environment variables set.

STEAM_LINUX_RUNTIME_LOG=1 will enable logging. Log files appear in SteamLinuxRuntime_sniper/var/slr-*.log, with filenames containing the app ID. slr-latest.log is a symbolic link to whichever one was created most recently.

STEAM_LINUX_RUNTIME_VERBOSE=1 produces more detailed log output, either to a log file (if STEAM_LINUX_RUNTIME_LOG=1 is also used) or to the same place as steam output (otherwise).

PRESSURE_VESSEL_SHELL=instead runs an interactive shell in the container instead of running the game.

Please see https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/distro-assumptions.md for details of assumptions made about the host operating system, and some advice on debugging the container runtime on new Linux distributions.

Game developers who are interested in targeting this environment should check the SDK documentation https://gitlab.steamos.cloud/steamrt/sniper/sdk and general information for game developers https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/blob/main/docs/slr-for-game-developers.md.

Licensing and copyright

The Steam Runtime contains many third-party software packages under various open-source licenses.

For full source code, please see the version-numbered subdirectory of https://repo.steampowered.com/steamrt-images-sniper/snapshots/ corresponding to the version numbers listed in VERSIONS.txt.