mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 10:24:10 +01:00
[utils] Remove winetricks verb and old setup script
This commit is contained in:
parent
174dbcafa6
commit
455f60e00a
@ -75,7 +75,3 @@ enable_tests = get_option('enable_tests')
|
||||
if enable_tests
|
||||
subdir('tests')
|
||||
endif
|
||||
|
||||
if dxvk_compiler.get_id() != 'msvc'
|
||||
subdir('utils')
|
||||
endif
|
||||
|
@ -1,11 +0,0 @@
|
||||
conf = configuration_data()
|
||||
conf.set('bindir', get_option('bindir'))
|
||||
conf.set('libdir', get_option('libdir'))
|
||||
conf.set('arch', target_machine.cpu_family())
|
||||
conf.set('winelib', dxvk_winelib)
|
||||
configure_file(
|
||||
configuration : conf,
|
||||
input : 'setup_dxvk.sh.in',
|
||||
output : 'setup_dxvk.sh',
|
||||
install_dir : get_option('bindir')
|
||||
)
|
@ -1,159 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
export WINEDEBUG=-all
|
||||
|
||||
dlls_dir=`dirname "$(readlink -f $0)"`
|
||||
build_arch='@arch@'
|
||||
winelib='@winelib@'
|
||||
|
||||
if [ $winelib == 'True' ]; then
|
||||
dll_ext='dll.so'
|
||||
# strip off the trailing bindir to get to the prefix, then append libdir
|
||||
dlls_dir="${dlls_dir%/@bindir@}/@libdir@"
|
||||
else
|
||||
dll_ext='dll'
|
||||
fi
|
||||
|
||||
if [ ! -f "$dlls_dir/d3d11.$dll_ext" ] || [ ! -f "$dlls_dir/dxgi.$dll_ext" ]; then
|
||||
echo "d3d11.$dll_ext or dxgi.$dll_ext not found in $dlls_dir" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$wine" ]; then
|
||||
if [ $build_arch == "x86_64" ]; then
|
||||
wine="wine64"
|
||||
else
|
||||
wine="wine"
|
||||
fi
|
||||
fi
|
||||
|
||||
winever=`$wine --version | grep wine`
|
||||
if [ -z "$winever" ]; then
|
||||
echo "$wine:"' Not a wine executable. Check your $wine.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
quiet=false
|
||||
assume=
|
||||
|
||||
function ask {
|
||||
echo "$1"
|
||||
if [ -z "$assume" ]; then
|
||||
read continue
|
||||
else
|
||||
continue=$assume
|
||||
echo "$continue"
|
||||
fi
|
||||
}
|
||||
|
||||
POSITIONAL=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
|
||||
case $1 in
|
||||
-y)
|
||||
assume='y'
|
||||
shift
|
||||
;;
|
||||
-n)
|
||||
assume='n'
|
||||
shift
|
||||
;;
|
||||
-q|--quiet)
|
||||
quiet=true
|
||||
assume=${assume:-'y'}
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
POSITIONAL+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
set -- "${POSITIONAL[@]}"
|
||||
|
||||
if [ "$quiet" = true ]; then
|
||||
exec >/dev/null
|
||||
fi
|
||||
|
||||
if [ -z "$WINEPREFIX" ]; then
|
||||
ask "WINEPREFIX is not set, continue? (y/N)"
|
||||
if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if ! [ -f "$WINEPREFIX/system.reg" ]; then
|
||||
ask "WINEPREFIX does not point to an existing wine installation. Proceeding will create a new one, continue? (y/N)"
|
||||
if [ "$continue" != "y" ] && [ "$continue" != "Y" ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
unix_sys_path="$($wine winepath -u 'C:\windows\system32')"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ret=0
|
||||
|
||||
function removeOverride {
|
||||
echo " [1/2] Removing override... "
|
||||
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f > /dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed"
|
||||
exit 1
|
||||
fi
|
||||
local dll="$unix_sys_path/$1.dll"
|
||||
echo " [2/2] Removing link... "
|
||||
if [ -h "$dll" ]; then
|
||||
out=$(rm "$dll" 2>&1)
|
||||
if [ $? -ne 0 ]; then
|
||||
ret=2
|
||||
echo -e "$out"
|
||||
fi
|
||||
else
|
||||
echo -e "'$dll' is not a link or doesn't exist."
|
||||
ret=2
|
||||
fi
|
||||
}
|
||||
|
||||
function createOverride {
|
||||
echo " [1/2] Creating override... "
|
||||
$wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "Failed"
|
||||
exit 1
|
||||
fi
|
||||
echo " [2/2] Creating link to $1.$dll_ext... "
|
||||
ln -sf "$dlls_dir/$1.$dll_ext" "$unix_sys_path/$1.dll"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "Failed"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
uninstall)
|
||||
fun=removeOverride
|
||||
;;
|
||||
install)
|
||||
fun=createOverride
|
||||
;;
|
||||
*)
|
||||
echo "Unrecognized option: $1"
|
||||
echo "Usage: $0 [install|uninstall] [-q|--quiet] [-y|-n]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo '[1/5] dxgi:'
|
||||
$fun dxgi
|
||||
echo '[2/5] d3d10:'
|
||||
$fun d3d10
|
||||
echo '[3/5] d3d10_1:'
|
||||
$fun d3d10_1
|
||||
echo '[4/5] d3d10core:'
|
||||
$fun d3d10core
|
||||
echo '[5/5] d3d11:'
|
||||
$fun d3d11
|
||||
exit $ret
|
@ -1,44 +0,0 @@
|
||||
w_metadata setup_dxvk dlls \
|
||||
title="DXVK" \
|
||||
publisher="Philip Rebohle" \
|
||||
year="2018" \
|
||||
media="manual_download" \
|
||||
file1="dxgi.dll" \
|
||||
file2="d3d11.dll" \
|
||||
file3="d3d10.dll" \
|
||||
file4="d3d10_1.dll" \
|
||||
file5="d3d10core.dll" \
|
||||
installed_file1="$W_SYSTEM32_DLLS_WIN/dxgi.dll" \
|
||||
installed_file2="$W_SYSTEM32_DLLS_WIN/d3d11.dll" \
|
||||
installed_file3="$W_SYSTEM32_DLLS_WIN/d3d10.dll" \
|
||||
installed_file4="$W_SYSTEM32_DLLS_WIN/d3d10_1.dll" \
|
||||
installed_file5="$W_SYSTEM32_DLLS_WIN/d3d10core.dll" \
|
||||
homepage="https://github.com/doitsujin/dxvk"
|
||||
|
||||
DXVK_ROOT_DIR=`dirname "$(readlink -f $1)"`
|
||||
|
||||
load_setup_dxvk()
|
||||
{
|
||||
if [ ! -e "$DXVK_ROOT_DIR/x64" ] || [ ! -e "$DXVK_ROOT_DIR/x32" ]; then
|
||||
(>&2 echo "$DXVK_ROOT_DIR/x32 or $DXVK_ROOT_DIR/x64 directory not found.")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for f in "$file1" "$file2" "$file3" "$file4" "$file5"; do
|
||||
w_try cp "$DXVK_ROOT_DIR/x32/$f" "$W_SYSTEM32_DLLS/$f"
|
||||
done
|
||||
|
||||
if [ "$W_ARCH" = "win64" ]; then
|
||||
dxvk64_dir="/usr/lib64/wine/dxvk"
|
||||
for f in "$file1" "$file2" "$file3" "$file4" "$file5"; do
|
||||
w_try cp "$DXVK_ROOT_DIR/x64/$f" "$W_SYSTEM64_DLLS/$f"
|
||||
done
|
||||
fi
|
||||
|
||||
w_override_dlls native \
|
||||
dxgi \
|
||||
d3d11 \
|
||||
d3d10 \
|
||||
d3d10_1 \
|
||||
d3d10core
|
||||
}
|
Loading…
Reference in New Issue
Block a user