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

40
proton
View File

@ -471,32 +471,28 @@ 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":
dxvkfiles = ["d3d11", "d3d10", "d3d10core", "d3d10_1", "dxgi"]
wined3dfiles = []
if "d9vk" in config_opts:
dlloverrides[f] = "n"
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: