mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 07:24:12 +01:00
1a0a924c7d
* wine install script to support overrides only. * Setup script: don't stop on error
65 lines
1.4 KiB
Bash
65 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
dlls_dir='@dlldir@'
|
|
build_arch='@arch@'
|
|
export WINEDEBUG=-all
|
|
|
|
if [ $build_arch == "x86_64" ]; then
|
|
wine=wine64
|
|
else
|
|
wine=wine
|
|
fi
|
|
|
|
if [ -z "$WINEPREFIX" ]; then
|
|
echo "WINEPREFIX is not set, continue? (y/N)"
|
|
read continue
|
|
if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then
|
|
exit 1
|
|
fi
|
|
fi
|
|
unix_sys_path="$($wine winepath -u 'C:\windows\system32')"
|
|
|
|
function removeOverride {
|
|
echo "$1:"
|
|
echo -n ' [1/2] Removing override... '
|
|
wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f
|
|
if [ ! $? ]; then
|
|
exit 1
|
|
fi
|
|
local dll="$unix_sys_path/$1.dll"
|
|
echo -n ' [2/2] Removing link... '
|
|
if [ -h "$dll" ]; then
|
|
rm "$dll"
|
|
if [ "$?" == "0" ]; then
|
|
echo "Done."
|
|
fi
|
|
else
|
|
echo "'$dll' is not a link or doesn't exist."
|
|
fi
|
|
}
|
|
|
|
function createOverride {
|
|
echo "$1:"
|
|
echo -n ' [1/2] Creating override... '
|
|
wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f
|
|
echo -n " [2/2] Creating link to $1.dll... "
|
|
ln -sf "$dlls_dir/$1.dll" "$unix_sys_path/$1.dll"
|
|
if [ $? ]; then
|
|
echo "Done."
|
|
fi
|
|
}
|
|
|
|
if [ "$1" == "reset" ]; then
|
|
echo -n '[1/2] '
|
|
removeOverride d3d11
|
|
echo -n '[2/2] '
|
|
removeOverride dxgi
|
|
exit
|
|
fi
|
|
|
|
echo -n '[1/2] '
|
|
createOverride d3d11
|
|
echo -n '[2/2] '
|
|
createOverride dxgi
|
|
exit
|