Skip to content

Instantly share code, notes, and snippets.

@loathingKernel
Created May 18, 2021 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loathingKernel/a4eb26394fa14a88fc17ebdc612ce75a to your computer and use it in GitHub Desktop.
Save loathingKernel/a4eb26394fa14a88fc17ebdc612ce75a to your computer and use it in GitHub Desktop.
diff --git a/default_pfx.py b/default_pfx.py
index 084ee79..7e9f87c 100755
--- a/default_pfx.py
+++ b/default_pfx.py
@@ -57,12 +57,14 @@ def setup_dll_symlinks(default_pfx_dir, dist_dir):
bitness = dll_bitness(filename)
if bitness == 32:
libdir = os.path.join(dist_dir, 'lib/wine')
+ dlldir = "i386-windows"
elif bitness == 64:
libdir = os.path.join(dist_dir, 'lib64/wine')
+ dlldir = "x86_64-windows"
else:
continue
- if os.path.exists(os.path.join(libdir, file_)):
- target = os.path.join(libdir, file_)
+ if os.path.exists(os.path.join(libdir, dlldir, file_)):
+ target = os.path.join(libdir, dlldir, file_)
elif os.path.exists(os.path.join(libdir, 'fakedlls', file_)):
target = os.path.join(libdir, 'fakedlls', file_)
else:
diff --git a/proton b/proton
index 9965fa2..88995e1 100755
--- a/proton
+++ b/proton
@@ -47,7 +47,7 @@ def log(msg):
def file_is_wine_builtin_dll(path):
if os.path.islink(path):
contents = os.readlink(path)
- if os.path.dirname(contents).endswith(('/lib/wine', '/lib/wine/fakedlls', '/lib64/wine', '/lib64/wine/fakedlls')):
+ if os.path.dirname(contents).endswith(('/lib/wine/i386-windows', '/lib/wine/fakedlls', '/lib64/wine/x86_64-windows', '/lib64/wine/fakedlls')):
# This may be a broken link to a dll in a removed Proton install
return True
if not os.path.exists(path):
@@ -330,7 +299,7 @@ class CompatData:
def pfx_copy(self, src, dst, dll_copy=False):
if os.path.islink(src):
contents = os.readlink(src)
- if os.path.dirname(contents).endswith(('/lib/wine', '/lib/wine/fakedlls', '/lib64/wine', '/lib64/wine/fakedlls')):
+ if os.path.dirname(contents).endswith(('/lib/wine/i386-windows', '/lib/wine/fakedlls', '/lib64/wine/x86_64-windows', '/lib64/wine/fakedlls')):
# wine builtin dll
# make the destination an absolute symlink
contents = os.path.normpath(os.path.join(os.path.dirname(src), contents))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment