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

feature request: experimental wow64 prefix support #24

Open
gel-crabs opened this issue Jul 9, 2023 · 15 comments
Open

feature request: experimental wow64 prefix support #24

gel-crabs opened this issue Jul 9, 2023 · 15 comments

Comments

@gel-crabs
Copy link

Okay, so I was having troubles with the new wow64-only mode in Wine, and I eventually found out that the problem was not with Wine, but with DXVK, as it installs both the 64-bit and 32-bit libraries into the wineprefix.

I found a quick solution, which is copying the DXVK dlls from the syswow64 directory to the system32 directory in the wineprefix.

Could there be a wow64 option in updxvk.cfg to install the 64-bit libraries into both folders? Thank you

@TheComputerGuy96
Copy link

@gel-crabs What troubles were you having exactly?

@gel-crabs
Copy link
Author

gel-crabs commented Jul 9, 2023

It would crash immediately after starting any application, I'll reproduce it now

@gel-crabs
Copy link
Author

image

Crashes like this

@IroAlexis
Copy link

IroAlexis commented Jul 10, 2023

With wow64 experimental mode, the Windows folder for storing 32-bit dlls still exists. So if you build dxvk only in 64bits, you can't launch 32bits game... Normally, dxvk 32-bit dlls are to be copied into the C:\windows\syswow64 folder and 64-bit dlls are to be copied into the C:\windows\system32 folder.

Perhaps you've stumbled across a regression of this new mode. What game are you trying to launch?

@TheComputerGuy96
Copy link

@IroAlexis I installed DXVK the normal way (64-bit DLLs in System32 and 32-bit DLLs in SysWOW64) and the Direct3D games I tried so far don't have crashing issues in WoW64 mode

@gel-crabs
Copy link
Author

I tried that way with 64-bit DLLs in System32 and 32-bit DLLs in SysWOW64 and it worked! The game I am running is 64-bit and in the Unity engine.

I reran the updxvk script with "wine=wine updxvk (prefix)" as updxvk tries to use wine64, and I found that updxvk creates links in the system32 directory to the x32 DLLs, and does not create DLLs in the syswow64 directory at all.

@IroAlexis
Copy link

IroAlexis commented Jul 11, 2023

Indeed, there isn't wine64 when we compile wine for use new wow64 mode.

I think you can close the issue. But, the script would have to be modified to support this new mode.

@TheComputerGuy96
Copy link

@IroAlexis Symlinking the wine binary to wine64 for WoW64 builds would be nice (but I discovered you don't even need to recompile Wine for WoW64 support)

@gel-crabs
Copy link
Author

@IroAlexis Symlinking the wine binary to wine64 for WoW64 builds would be nice (but I discovered you don't even need to recompile Wine for WoW64 support)

FYI I tried that as well, however it has the same results as running the script with wine=wine.

@gel-crabs gel-crabs changed the title feature request: 64-bit only build with wow64 feature request: experimental wow64 prefix support Jul 12, 2023
@gel-crabs
Copy link
Author

gel-crabs commented Jul 12, 2023

A quick and dirty fix: go to DXVKBUILD and edit setup_dxvk32.sh. Find the line that says:

unix_sys_path="$($wine winepath -u 'C:\windows\system32')"

Change it to:

unix_sys_path="$($wine winepath -u 'C:\windows\syswow64')"

Note that you will have to rebuild DXVK, and either export wine=wine or symlink wine to wine64.

@IroAlexis
Copy link

@IroAlexis Symlinking the wine binary to wine64 for WoW64 builds would be nice (but I discovered you don't even need to recompile Wine for WoW64 support)

As far as I understand, we don't need wine64 because the wine binary is already 64bits.

New wow64 mode

$ file /opt/wine-tkg-clean-mainline-git/bin/wine
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0e9684a898600bfbd53520b2b3e895a9c086c1e2, for GNU/Linux 4.4.0, not stripped

"Old" wow64 mode

$ file /usr/bin/wine
ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=4533cb08e860624ab1c81c51ee4b4943250002c0, for GNU/Linux 4.4.0, stripped
$ file /usr/bin/wine64
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2e9c2f55ac3747ffbb8a864aa5ce9609f4497a55, for GNU/Linux 4.4.0, stripped

@gel-crabs
Copy link
Author

@IroAlexis Symlinking the wine binary to wine64 for WoW64 builds would be nice (but I discovered you don't even need to recompile Wine for WoW64 support)

As far as I understand, we don't need wine64 because the wine binary is already 64bits.

New wow64 mode

$ file /opt/wine-tkg-clean-mainline-git/bin/wine
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0e9684a898600bfbd53520b2b3e895a9c086c1e2, for GNU/Linux 4.4.0, not stripped

"Old" wow64 mode

$ file /usr/bin/wine
ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=4533cb08e860624ab1c81c51ee4b4943250002c0, for GNU/Linux 4.4.0, stripped
$ file /usr/bin/wine64
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2e9c2f55ac3747ffbb8a864aa5ce9609f4497a55, for GNU/Linux 4.4.0, stripped

Yes, however the script uses wine64 for 64-bit prefixes by default; without it, it will not update the 64-bit dlls.

@IroAlexis
Copy link

IroAlexis commented Jul 12, 2023

A quick and dirty fix: go to DXVKBUILD and edit setup_dxvk32.sh. Find the line that says:

unix_sys_path="$($wine winepath -u 'C:\windows\system32')"

Change it to:

unix_sys_path="$($wine winepath -u 'C:\windows\syswow64')"

Note that you will have to rebuild DXVK, and either export wine=wine or symlink wine to wine64.

Indeed, it is a potential fix but even syswow64 directory don't exist, winepath return the path... (I'll check again later as my tests are a bit dated Confirmed)

@gel-crabs
Copy link
Author

A quick and dirty fix: go to DXVKBUILD and edit setup_dxvk32.sh. Find the line that says:

unix_sys_path="$($wine winepath -u 'C:\windows\system32')"

Change it to:

unix_sys_path="$($wine winepath -u 'C:\windows\syswow64')"

Note that you will have to rebuild DXVK, and either export wine=wine or symlink wine to wine64.

Indeed, it is a potential fix but even syswow64 directory don't exist, winepath return the path... (I'll check again later as my tests are a bit dated)

Yes, editing it in this way will make it only work for wow64 prefixes, it isn't a permanent fix by any means

@IroAlexis
Copy link

@IroAlexis Symlinking the wine binary to wine64 for WoW64 builds would be nice (but I discovered you don't even need to recompile Wine for WoW64 support)

As far as I understand, we don't need wine64 because the wine binary is already 64bits.
New wow64 mode

$ file /opt/wine-tkg-clean-mainline-git/bin/wine
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=0e9684a898600bfbd53520b2b3e895a9c086c1e2, for GNU/Linux 4.4.0, not stripped

"Old" wow64 mode

$ file /usr/bin/wine
ELF 32-bit LSB pie executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, BuildID[sha1]=4533cb08e860624ab1c81c51ee4b4943250002c0, for GNU/Linux 4.4.0, stripped
$ file /usr/bin/wine64
ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=2e9c2f55ac3747ffbb8a864aa5ce9609f4497a55, for GNU/Linux 4.4.0, stripped

Yes, however the script uses wine64 for 64-bit prefixes by default; without it, it will not update the 64-bit dlls.

Yes script use wine64 but in new wow64 mode, there is only wine and and therefore the command $($wine winepath -u 'C:\windows\system32') return /home/user/myprefix/dosdevices/c:/windows/system32. It's more the 32-bit dlls that aren't updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants