protonscr

Script for en masse updating DXVK files.

dxvkclosed windows
doitsujin/dxvk#4131 · opened 2024-07-10 by LadyMikea · updated 2024-10-15 · 2 comments · github
1 matching comments, n / p to jump
LLadyMikea 2024-07-10 github

For those who don't remember exactly which games uses DXVK, I wrote a very simple script (for Windows) which updates automatically all DXVK libraries used in games. As script cannot detect version of DXVK (32/64 bit) it uses a two dummy file to designate correct architecture (dxvk32.conf for 32 bit libraries and dxvk64.conf for 64 bit). Those two dummy files should be put along correct DXVK dll's for each of games directories. Btw, one can adopt very easily this script for similar DgVoodo application (for older glide and dx6/7/8 games) just by replacing dummy dxvk32.conf files for "dgVoodoo.conf" and correcting base DgVoodo libraries.

setlocal EnableDelayedExpansion
echo off

Rem Where are DXVK libraries are stored:

set d1=f:\Utils\dxvk\x32\d3d9.dll
set d2=f:\Utils\dxvk\x32\dxgi.dll
set d3=f:\\Utils\dxvk\x32\d3d11.dll
set d4=f:\\Utils\dxvk\x32\d3d10core.dll
set d5=f:\Utils\dxvk\dxvk.conf

set d6=f:\\Utils\dxvk\x64\d3d9.dll
set d7=f:\Utils\dxvk\x64\dxgi.dll
set d8=f:\Utils\dxvk\x64\d3d11.dll
set d9=f:\Utils\dxvk\x64\d3d10core.dll
set d10=f:\Utils\dxvk\dxvk.conf

echo.
echo 32 bit
echo.

Rem base Game directory - d:\Games\ - which script go through recursively.  

FOR /r d:\Games\ %%d IN (dxvk32.conf*) DO (

set pa=%%~dpd
set "folder=!pa!"
echo copy to: !folder!

call :doMyLoop32 pa

)
echo.
echo 64 bit
echo.

Rem base Game directory - d:\Games\ - which script go through recursively.  

FOR /r d:\Games\ %%d IN (dxvk64.conf*) DO (

set pa=%%~dpd
set "folder=!pa!"
echo copy to: !folder!

call :doMyLoop64 pa

)

echo.
echo *the end*
echo.
pause
exit

:doMyLoop32
set "folder=!%1!"

FOR /R "%folder%" %%F IN (*.dll) DO (

if exist !folder!d3d9.dll (
copy !d1! "%%~dpd" /y >NUL

) else (
)

if exist !folder!dxgi.dll (
copy !d2! "%%~dpd" /y >NUL

) else (
)

if exist !folder!d3d11.dll (
copy !d3! "%%~dpd" /y >NUL

) else (
)

if exist !folder!d3d10core.dll (
copy !d4! "%%~dpd" /y >NUL

) else (
)

Rem If you also want overwrite dxvk.conf for each game. 

if exist !folder!dxvk.conf (
copy !d5! "%%~dpd" /y >NUL

) else (
)
)

exit /b

:doMyLoop64
set "folder=!%1!"

FOR /R "%folder%" %%F IN (*.dll) DO (

if exist !folder!d3d9.dll (
copy !d6! "%%~dpd" /y >NUL

) else (
)

if exist !folder!dxgi.dll (
copy !d7! "%%~dpd" /y >NUL

) else (
)

if exist !folder!d3d11.dll (
copy !d8! "%%~dpd" /y >NUL

) else (
)
if exist !folder!d3d10core.dll (
copy !d9! "%%~dpd" /y >NUL

) else (
)

Rem If you also want overwrite dxvk.conf for each game. 

if exist !folder!dxvk.conf (
copy !d10! "%%~dpd" /y >NUL

) else (
)
)

exit /b
Xxv0t 2024-07-11 github

using symlinks can make life easier for any file update shenanigans.

LLadyMikea 2024-07-11 github

Yup, simlinks are great tool. This is more "old fashion" way if you dont want use simlinks (for whatever reason), also... script list all games uses DXVK.

DLLs