simons-public / protonfixes

A module for applying fixes at runtime to unsupported games with Steam Proton without changing game installation files
https://simons-public.github.io/protonfixes/
Other
232 stars 117 forks source link

Make protonfixes compatible with Soldier Runtime #141

Closed mrjackv closed 3 years ago

mrjackv commented 3 years ago

This PR is a working fix for the problem outlined in issue #140 . Just to recap, Valve has introduced a new runtime, called soldier, that "containerizes" games, allowing them to run with a consistent set of libraries. This complicates things for protonfixes because now proton runs in a confined environment with a separate PYTHONPATH. In order to fix the situation, install_protonfixes will now run soldier_protonfixify if it detects a steam soldier installation. The protonfixify script installs the needed python dependencies (this and Kivy) and also installs winetricks & co since we can't use the system-provided ones. Every addition is downloaded directly from Debian repositories and manually extracted, since the soldier runtime does not include apt nor dpkg. The only exception is a specially built libwebkit2gtk library, needed for zenity to run without the need for installing all the webkit dependencies (which would bloat the soldier runtime considerably). The instructions to recreate the .so are also provided in the libwebkit2gtk.md file, together with a detailed description of why this hack is needed.

soredake commented 3 years ago

pip3 install -U git+https://github.com/mrjackv/protonfixes.git@fix_soldier

❯ install_protonfixes
Protonfixes already installed in /home/danet/.steam/debian-installation/steamapps/common/Proton 5.0, skipping
Installing protonfixes in /home/danet/.steam/debian-installation/steamapps/common/Proton 5.13
Soldier runtime detected, patching it
[PROTONFIXIFY] Installing Python Dependencies
cp: cannot stat '/tmp/tmp.ML2S97VCqo/lib/python3.7/site-packages/*': No such file or directory
[PROTONFIXIFY] Installing Winetricks
[PROTONFIXIFY] Installing Zenity
soredake commented 3 years ago

No error on 2nd run:

❯ install_protonfixes
Protonfixes already installed in /home/danet/.steam/debian-installation/steamapps/common/Proton 5.0, skipping
Protonfixes already installed in /home/danet/.steam/debian-installation/steamapps/common/Proton 5.13, skipping
Soldier runtime detected, patching it
[PROTONFIXIFY] Installing Python Dependencies
[PROTONFIXIFY] Installing Winetricks
[PROTONFIXIFY] Installing Zenity
mrjackv commented 3 years ago

This happened to me a couple of times while testing, I chucked it to my dodgy internet, but it seems that the pip servers actually returns error sometimes. I will add some retries to the curl command to compensate

soredake commented 3 years ago

Protonfixes not working, after launching game protonfixes does not appear.

mrjackv commented 3 years ago

Protonfixes not working, after launching game protonfixes does not appear.

Might be related to the soldier folder being in inconsistent state due to the error, try and delete the soldier_0.20201022.1 and soldier folders from SteamLinuxRuntime_soldier in common

soredake commented 3 years ago

Same problems after redownloading soldier and curl commit.

mrjackv commented 3 years ago

@soredake A friend helped me figure out that the script wouldn't work without /etc/resolv.conf, but it did on my machine. Very strange indeed. You should try the latest commit, it should work flawlessly now.

soredake commented 3 years ago

Thanks! Works now.