2
0
mirror of https://github.com/ValveSoftware/Proton synced 2025-08-31 06:35:23 +00:00

Don't install amd_ags_x64 into prefix

The DLL ships with the games and having the built-in version in
system32/syswow64 has unexpected consequences.

If the game is launched from a subdirectory, but the DLL is in current
working directory, the built-in takes precedence as CWD has lower search
priority than system directories (with the default SafeDllSearchMode).

By not installing amd_ags_x64.dll in system32/syswow64 the built-in is
still picked up correctly from lib/ when necessary.

There's an accompanying patch for wine that makes sure wineboot won't
install the dll, but since we construct our default_pfx in a special way
we also need to make sure that files won't get copied/linked there.

To make prefix updates smooth this change also removes any stale
amd_ags_x64.dlls that may have been installed by previous version of
Proton.

CW-Bug-Id: 18804
This commit is contained in:
Arkadiusz Hiler
2021-04-22 12:43:54 +03:00
committed by Andrew Eikum
parent afc9bf84c7
commit 575d9bc1f9
2 changed files with 11 additions and 1 deletions

View File

@@ -50,9 +50,12 @@ def make_relative_symlink(target, linkname):
os.symlink(rel, linkname)
def setup_dll_symlinks(default_pfx_dir, dist_dir):
skip_dlls = [ 'amd_ags_x64.dll' ]
for walk_dir, dirs, files in os.walk(default_pfx_dir):
for file_ in files:
filename = os.path.join(walk_dir, file_)
if file_ in skip_dlls:
continue
if os.path.isfile(filename) and file_is_wine_builtin_dll(filename):
bitness = dll_bitness(filename)
if bitness == 32: