Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 32-bit prefixes #919

Open
wants to merge 2 commits into
base: proton_3.16
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 32 additions & 11 deletions proton
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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",
Expand All @@ -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
Expand Down Expand Up @@ -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"

Expand Down