flathub / com.valvesoftware.Steam.CompatibilityTool.Proton

https://flathub.org/apps/details/com.valvesoftware.Steam.CompatibilityTool.Proton
35 stars 6 forks source link

default_pfx's contents are not symlink #65

Open catsout opened 2 years ago

catsout commented 2 years ago

proton will create game's wine prefix through symlink to save space.
But this flatpak build always copys the wine dlls, which wil increase the prefix from 170M to 320M.
The code is at https://github.com/ValveSoftware/Proton/blob/proton_6.3/proton#L503

This can be avoided by building the default_pfx with symlink.
There is a helper script to do it, https://github.com/ValveSoftware/Proton/blob/proton_6.3/default_pfx.py.

gasinvein commented 2 years ago

I'm a bit concerned about the side effects of the symlinks not being resolvable outside the sandbox (they'll point to somewhere in /app, which doesn't exist on host). Will it conflict with sharing the same prefix with official Proton? Or something else maybe?

catsout commented 2 years ago

(they'll point to somewhere in /app, which doesn't exist on host) Will it conflict with sharing the same prefix with official Proton?

The final wine prefix will create absolute symlinks, and that will conflict with official Proton.
But there are also different versions of official Proton, link 6.3-8,5.13-6...
There also relay on absolute symlinks, even when user switches between them
So as long as we can trigger the version switching, the proton should handle this by updating the symlinks, like switching between official Protons

catsout commented 2 years ago

The code is at https://github.com/ValveSoftware/Proton/blob/proton_6.3/proton#L714
old_ver is got through steamapps/compatdata/<id>/version
CURRENT_PREFIX_VERSION is defined in proton executable file
So we can change the CURRENT_PREFIX_VERSION="6.3-3" to something like CURRENT_PREFIX_VERSION="6.3-3_flatpak" to avoid the conflict