-
Notifications
You must be signed in to change notification settings - Fork 23
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
Nine only works when installed to system32/syswow64 #151
Comments
"Dropping the DLL next to an executable does not work." Well that works, but maybe other way around might be better for you. Let say without installation of gallium-nine-standalone. No, nine does not require neither to be installed in system32 nor in syswow64. |
Sorry, I don't think you understood me.
This does not work. According to debug logs, Wine apparently tries to load the d3d9.dll I'm putting there, but it is very clear that nine is not actually in use. The only way I've gotten it to work is by putting nine's d3d9.dll in system32/syswow64 in my wine prefix.
ninewinecfg.exe erroneously sets a DLL override to native, not me. wine-nine-standalone/ninewinecfg/main.c Lines 366 to 376 in 631988f
wine-nine-standalone/common/registry.c Line 13 in 9abd0b4
To be clear, as stated in #150, d3d9-nine.dll is a fake DLL, so native is incorrect and will cause wine to skip it entirely. There is no reason to set it to builtin either because that's the default. |
Which WINE version and gallium-nine-standalone version? |
Wine 8.2 and nine 0.8 from the Arch repos. I'll try the new releases soon but there are no significant changes in 0.9, just a few warning fixes. The compatibility issues are only relevant to the prebuilt binaries provided here as far as I can tell. |
Well, what i described up there works on Debian, maybe because wine and libs are at different places on Arch or something. |
The way the dll is loading is a bit complicated. It is my understanding that setting to native a dll causes the windows full behaviour. native then wine causes the first dll to be loaded to be the native one (for example in the game dir) then the wine one. Ofc if you want the d3d9-nine.dll to be used, you need to rename it d3d9.dll. But you also need to configure the native/system behaviour right. |
The search order is described at https://wiki.winehq.org/Wine_User%27s_Guide#DLL_Overrides
This is specified in the PE metadata. See https://gitlab.winehq.org/wine/wine/-/blob/fbfa4a3aed432257931efb436b53fb891afc5fb5/dlls/ntdll/unix/loader.c?page=2#L1607-1612.
As you can see in the source code linked above, setting the override to native simply causes wine to ignore fake DLLs.
Yes of course, I am doing that. Anyway again, copying/linking wine's stock d3d9.dll next to the executable works: with nine enabled globally, this is enough to get individual programs to use wined3d instead of nine. But doing the same thing with d3d9-nine.dll (renamed appropriately to d3d9.dll) doesn't work. |
Okay, I think I've figured it out. ninewinecfg does not link the fake DLL, but the .dll.so.
So my problem was that the fake DLL is in fact supposed to be a no-op. I don't think it really needs to be built, shipped or installed in this case since we already have Wine's built-in DLL and the fake DLL only causes confusion. |
The placeholder is unnecessary and only causes confusion. Fixes iXit#151.
A WINE installation consists of files in /usr/lib/wine, which in part get copied to each WINE prefix. So that's a different way to install it. Our nine-install.sh and winetricks approach is completely different, we don't even want to touch stuff in /usr/lib/wine, we only modify one prefix at a time. So there is a reason for those fake dlls, or at least there used to be. The picture changed with the PE conversion. And the latest v0.9 release requires at least WINE v5.7. So we may indeed remove the fake dll stuff |
My point is, the fake DLL isn't serving the purpose it's meant to currently. It made sense with DLL redirects, but it doesn't in the current state of things. Shipping a real PE library would change this, but that's a different issue. |
Since WINE 8.1 set Windows 10 by default for new prefixes, seems every release have some interesting bugs. |
Where did the confusion with the fake DLLs come from? If you would use the binary releases here or used winetricks you wouldn't even have or notice anything wrt fake DLLs. |
Yeah, Arch installs them to /usr/lib/wine/x86_64-windows and /usr/lib32/wine/i386-windows, which causes Wine to copy them to the prefix. I only realized afterwards that ninewinecfg links the .dll.so instead. As far as I can tell, the binary releases in here never actually install the fake DLLs to the prefix, so it's not like they are being used for anything. Hence #152. |
Okay, that makes more sense now ;) So all that sounds like the fake DLLs still work with recent WINE versions and you're actually using them because the arch package does the integration as I described above. Which means we shouldn't merge #152? Or do I miss another piece of the puzzle? |
What happened is I was trying to copy/link the fake d3d9-nine.dll in my wine prefix to d3d9.dll in fusion 360's install directory. What I didn't realize is that the fake DLL actually forwards the lookup to the system .dll.so with the same name, rather than its internal name (if there is even such a thing, but I did see the name inside the file). So I ended up using wine's built-in d3d9 anyway. That said, I've just tested, and either the fake DLL or the .dll.so (renamed to .dll) needs to be present in system32 for ninewinecfg to find anything. Which makes #152 bogus, so I will close it. |
Alright. |
Other than #150 I don't think there's anything to be done from here, all the logic for this is in wine itself. |
For some reason I could only get nine to work properly when the DLL is installed to the windows system directories. Dropping the DLL next to an executable does not work. This means that if I want some programs to use wined3d and others to use nine, I have to enable nine globally and then link or copy wine's stock d3d9.dll in programs' directories which feels a bit backwards.
For context on why I need this: Fusion 360's AdCefWebBrowser (the data panel) only renders properly on wined3d, it's broken with both DXVK (black screen) and nine (glitchy rendering). However, the main application has rendering issues with wined3d which are fixed by DXVK (requires invasive and not completely functional child rendering patch) and nine (works great!).
(This is still broken after removing the dll override or setting it to builtin, see #150).
The text was updated successfully, but these errors were encountered: