diff --git a/proton b/proton index bdfa8d7c02..cb3c729dac 100755 --- a/proton +++ b/proton @@ -255,6 +255,11 @@ with prefix_lock: with open(os.environ["STEAM_COMPAT_DATA_PATH"] + "/tracked_files", "w") as tfiles: mergedirs(basedir + "/dist/share/default_pfx", prefix, tfiles) + if os.path.exists(prefix + "/drive_c/windows/syswow64"): + pfx_arch = "win64" + else: + pfx_arch = "win32" + with open(version_file, "w") as f: f.write(CURRENT_PREFIX_VERSION + "\n") @@ -268,7 +273,12 @@ with prefix_lock: else: #linux-only fallback, really shouldn't get here steamdir = os.environ["HOME"] + ".steam/root/" - dst = prefix + "/drive_c/Program Files (x86)/" + + if pfx_arch == "win64": + dst = prefix + "/drive_c/Program Files (x86)/" + else: + dst = prefix + "/drive_c/Program Files/" + makedirs(dst + "Steam") filestocopy = ["steamclient.dll", "steamclient64.dll", @@ -286,8 +296,11 @@ with prefix_lock: shutil.copy(basedir + "/dist/lib/wine/fakedlls/vrclient.dll", dst) shutil.copy(basedir + "/dist/lib64/wine/fakedlls/vrclient_x64.dll", dst) - shutil.copy(basedir + "/dist/lib/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/syswow64/") - shutil.copy(basedir + "/dist/lib64/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/system32/") + if pfx_arch == "win64": + shutil.copy(basedir + "/dist/lib/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/syswow64/") + shutil.copy(basedir + "/dist/lib64/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/system32/") + else: + shutil.copy(basedir + "/dist/lib/wine/dxvk/openvr_api_dxvk.dll", prefix + "/drive_c/windows/system32/") #parse linux openvr config and present it in win32 format to the app. #logic from openvr's CVRPathRegistry_Public::GetPaths @@ -371,16 +384,24 @@ with prefix_lock: 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") + if pfx_arch == "win64": + 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") + else: + make_dxvk_links(basedir + "/dist/lib/wine/fakedlls/", + prefix + "drive_c/windows/system32") 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") + if pfx_arch == "win64": + 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") + else: + make_dxvk_links(basedir + "/dist/lib/wine/dxvk/", + prefix + "drive_c/windows/system32") for f in dxvkfiles: dlloverrides[f] = "n"