proton: Copy d3d files instead of symlinking them

This commit is contained in:
Andrew Eikum 2019-07-09 11:48:20 -05:00
parent 988271e7c2
commit f44287aeb8

46
proton
View File

@ -471,33 +471,29 @@ with prefix_lock:
except (ValueError, OSError): except (ValueError, OSError):
log("Unable to write VR config! " + str(sys.exc_info()[1])) log("Unable to write VR config! " + str(sys.exc_info()[1]))
dxvkfiles = ("d3d11", "d3d10", "d3d10core", "d3d10_1", "d3d9", "dxgi")
def make_dxvk_links(dll_dir, link_dir):
for f in dxvkfiles:
dst = link_dir + "/" + f + ".dll"
src = dll_dir + "/" + f + ".dll"
if os.path.lexists(dst):
os.remove(dst)
os.symlink(src, dst)
if "wined3d" in config_opts: if "wined3d" in config_opts:
#use gl-based wined3d for d3d11 and d3d10 dxvkfiles = []
make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/", wined3dfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi", "d3d9"]
prefix + "drive_c/windows/system32")
make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/",
prefix + "drive_c/windows/syswow64")
else: else:
#use vulkan-based dxvk for d3d11 and d3d10 dxvkfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi"]
make_dxvk_links(basedir + "/dist/lib64/wine/dxvk/", wined3dfiles = []
prefix + "drive_c/windows/system32") if "d9vk" in config_opts:
make_dxvk_links(basedir + "/dist/lib/wine/dxvk/", dxvkfiles.append("d3d9")
prefix + "drive_c/windows/syswow64") else:
for f in dxvkfiles: wined3dfiles.append("d3d9")
if f == "d3d9":
if "d9vk" in config_opts: for f in wined3dfiles:
dlloverrides[f] = "n" try_copy(basedir + "/dist/share/default_pfx/drive_c/windows/system32/" + f + ".dll",
else: prefix + "drive_c/windows/system32/" + f + ".dll")
dlloverrides[f] = "n" try_copy(basedir + "/dist/share/default_pfx/drive_c/windows/syswow64/" + f + ".dll",
prefix + "drive_c/windows/syswow64/" + f + ".dll")
for f in dxvkfiles:
try_copy(basedir + "/dist/lib64/wine/dxvk/" + f + ".dll",
prefix + "drive_c/windows/system32/" + f + ".dll")
try_copy(basedir + "/dist/lib/wine/dxvk/" + f + ".dll",
prefix + "drive_c/windows/syswow64/" + f + ".dll")
dlloverrides[f] = "n"
if "nod3d11" in config_opts: if "nod3d11" in config_opts:
dlloverrides["d3d11"] = "" dlloverrides["d3d11"] = ""