protonscr

Another way to load dlls in wine

dxvkclosed enhancement
doitsujin/dxvk#12 · opened 2018-01-19 by Raffarti · updated 2018-01-21 · 5 comments · github
1 matching comments, n / p to jump
RRaffarti 2018-01-19 github

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.
XXenonPK 2018-01-20 github

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.

Ddoitsujin maintainer 2018-01-20 github

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.

RRaffarti 2018-01-20 github

I'm working on the script.

RRaffarti 2018-01-21 github

See #19

Ddoitsujin maintainer 2018-01-21 github

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

Launch options

DLLs