mirror of
https://github.com/ValveSoftware/Proton.git
synced 2024-12-27 07:05:46 +03: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:
parent
afc9bf84c7
commit
575d9bc1f9
@ -50,9 +50,12 @@ def make_relative_symlink(target, linkname):
|
|||||||
os.symlink(rel, linkname)
|
os.symlink(rel, linkname)
|
||||||
|
|
||||||
def setup_dll_symlinks(default_pfx_dir, dist_dir):
|
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 walk_dir, dirs, files in os.walk(default_pfx_dir):
|
||||||
for file_ in files:
|
for file_ in files:
|
||||||
filename = os.path.join(walk_dir, file_)
|
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):
|
if os.path.isfile(filename) and file_is_wine_builtin_dll(filename):
|
||||||
bitness = dll_bitness(filename)
|
bitness = dll_bitness(filename)
|
||||||
if bitness == 32:
|
if bitness == 32:
|
||||||
|
9
proton
9
proton
@ -20,7 +20,7 @@ from filelock import FileLock
|
|||||||
#To enable debug logging, copy "user_settings.sample.py" to "user_settings.py"
|
#To enable debug logging, copy "user_settings.sample.py" to "user_settings.py"
|
||||||
#and edit it if needed.
|
#and edit it if needed.
|
||||||
|
|
||||||
CURRENT_PREFIX_VERSION="6.3-1"
|
CURRENT_PREFIX_VERSION="6.3-2"
|
||||||
|
|
||||||
PFX="Proton: "
|
PFX="Proton: "
|
||||||
ld_path_var = "LD_LIBRARY_PATH"
|
ld_path_var = "LD_LIBRARY_PATH"
|
||||||
@ -308,6 +308,13 @@ class CompatData:
|
|||||||
log("Unable to write new registry file to " + self.prefix_dir + "system.reg")
|
log("Unable to write new registry file to " + self.prefix_dir + "system.reg")
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
stale_builtins = [self.prefix_dir + "/drive_c/windows/system32/amd_ags_x64.dll",
|
||||||
|
self.prefix_dir + "/drive_c/windows/syswow64/amd_ags_x64.dll" ]
|
||||||
|
for builtin in stale_builtins:
|
||||||
|
if os.path.lexists(builtin) and file_is_wine_builtin_dll(builtin):
|
||||||
|
log("Removing stale builtin " + builtin)
|
||||||
|
os.remove(builtin)
|
||||||
|
|
||||||
except ValueError:
|
except ValueError:
|
||||||
log("Prefix has an invalid version?! You may want to back up user files and delete this prefix.")
|
log("Prefix has an invalid version?! You may want to back up user files and delete this prefix.")
|
||||||
#Just let the Wine upgrade happen and hope it works...
|
#Just let the Wine upgrade happen and hope it works...
|
||||||
|
Loading…
Reference in New Issue
Block a user