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

Another way to load dlls in wine #12

Closed
Raffarti opened this issue Jan 19, 2018 · 5 comments
Closed

Another way to load dlls in wine #12

Raffarti opened this issue Jan 19, 2018 · 5 comments

Comments

@Raffarti
Copy link
Contributor

Hi, I was testing this out (just got black screens so far except for the triangle test).
I've found another way to have dlls load in wine, it's a little elaborate but guarantees dlls to load w/o copying them in the exec folder.

  1. set d3d11 and dxgi as native in winecfg
  2. create string entry in HKEY_CURRENT_USER\Software\Wine\DllRedirects\ labelled d3d11 with value d3d11_vk.dll. Likewise for dxgi.
  3. create symlink from d3d11.dll to d3d11_vk.dll. Likewise for dxgi.
  4. add dlls (windows) path to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH. You can add both 64 and 32 bit paths.
@Raffarti Raffarti changed the title Another way to lodlls in wine Another way to load dlls in wine Jan 19, 2018
@XenonPK
Copy link

XenonPK commented Jan 20, 2018

I guess something like this would make life much easier for people:

#!/bin/bash
printf "Please configure the intended environment variables to point to the right prefix!\n\t export WINEARCH=win32|win64 WINEPREFIX=\"/your prefix\"\n"

#Set dll redirection
wine reg add HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects /v dxd11 /d dxd11_vk.dll /f
wine reg add HKEY_CURRENT_USER\\Software\\Wine\\DllRedirects /v dxgi /d dxgi_vk.dll /f

#Add dxvk library path to the prefix path
wine reg add HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session\ Manager\\Environment /f /v PATH /d $(wine reg QUERY HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session\ Manager\\Environment /v PATH | sed -n 's|^ *PATH *REG_EXPAND_SZ *C|z:\\usr\\lib\\dxvk\\lib;z:\\usr\\lib\\dxvk\\lib64;C|p')

OFC, there are checks that should be done before messing with the prefix registry, but if the environment is defined properly, this does the job, also replace the library path with yours in the sed pattern.

@doitsujin
Copy link
Owner

Sounds interesting. I'd recommend using a separate Wine prefix for this kind of stuff anyway so messing around with the registry should be okay. It's something I need to make clear in the README though.

If any of you want to build some sort of "setup" script I'd gladly accept it as a pull request.

@Raffarti
Copy link
Contributor Author

I'm working on the script.

@Raffarti
Copy link
Contributor Author

See #19

@doitsujin
Copy link
Owner

Setup script should work out of the box with 650170b.

K0bin pushed a commit to K0bin/dxvk that referenced this issue Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants