From f44287aeb8514bb4949934350ff4ce933373a92c Mon Sep 17 00:00:00 2001 From: Andrew Eikum Date: Tue, 9 Jul 2019 11:48:20 -0500 Subject: [PATCH] proton: Copy d3d files instead of symlinking them --- proton | 46 +++++++++++++++++++++------------------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/proton b/proton index fd7195e2..543b09cb 100755 --- a/proton +++ b/proton @@ -471,33 +471,29 @@ with prefix_lock: except (ValueError, OSError): 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: - #use gl-based wined3d for d3d11 and d3d10 - make_dxvk_links(basedir + "/dist/lib64/wine/fakedlls/", - prefix + "drive_c/windows/system32") - make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/", - prefix + "drive_c/windows/syswow64") + dxvkfiles = [] + wined3dfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi", "d3d9"] else: - #use vulkan-based dxvk for d3d11 and d3d10 - make_dxvk_links(basedir + "/dist/lib64/wine/dxvk/", - prefix + "drive_c/windows/system32") - make_dxvk_links(basedir + "/dist/lib/wine/dxvk/", - prefix + "drive_c/windows/syswow64") - for f in dxvkfiles: - if f == "d3d9": - if "d9vk" in config_opts: - dlloverrides[f] = "n" - else: - dlloverrides[f] = "n" + dxvkfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi"] + wined3dfiles = [] + if "d9vk" in config_opts: + dxvkfiles.append("d3d9") + else: + wined3dfiles.append("d3d9") + + for f in wined3dfiles: + try_copy(basedir + "/dist/share/default_pfx/drive_c/windows/system32/" + f + ".dll", + prefix + "drive_c/windows/system32/" + f + ".dll") + 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: dlloverrides["d3d11"] = ""