protonscr

setup does not use $wine consistently

dxvkclosed
doitsujin/dxvk#352 · opened 2018-05-07 by sdack · updated 2018-05-07 · 1 comments · github
Ssdack 2018-05-07 github

Hello,

just a minor issue, but if the script could please use $wine consistently, then it allows users, who use "wine-development" and "wine64-development" (i.e. on Debian) to change the script with a simple change of the binary names at the top of the script.

Debian-based distributions offer two types of WINE packages, where the newer version of WINE is found in the *-development packages. These packages can be installed along with the default WINE packages and do not conflict with one another, because the binaries have *-development appended to their names. Hence the need for a manual change of the script.

Right now does one have to change it everywhere it uses $wine or "wine".

As a feature request: ideal would be if the script could actually detect the presence of the *-development binaries and use them over the standard binaries.

--- setup_dxvk.sh.old	2018-05-07 07:43:25.167064247 +0100
+++ setup_dxvk.sh.new	2018-05-07 07:43:13.484143404 +0100
@@ -16,6 +16,8 @@
     wine=wine
 fi
 
+which $wine-development >&/dev/null && wine=$wine-development
+
 quiet=false
 assume=
 
@@ -82,7 +84,7 @@
 function removeOverride {
     echo -n '    [1/2] Removing override... '
     local out
-    out=$(wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f 2>&1)
+    out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d builtin /f 2>&1)
     if [ $? -ne 0 ]; then
         echo -e "\\e[1;31m$out\\e[0m"
         exit 1
@@ -108,7 +110,7 @@
     echo -n '    [1/2] Checking override... '
     echo -en '\e[1;31m'
     local ovr
-    ovr="$(wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)"
+    ovr="$($wine reg query 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1)"
     if [ $? -ne 0 ]; then
         echo -en '\e[1;0m'
         exit 1
@@ -132,7 +134,7 @@
 function createOverride {
     echo -n '    [1/2] Creating override... '
     local out
-    out=$(wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f 2>&1)
+    out=$($wine reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v $1 /d native /f 2>&1)
     if [ $? -ne 0 ]; then
         echo -e "\\e[1;31m$out\\e[0m"
         exit 1
Ddoitsujin maintainer 2018-05-07 github

Should be fixed as of 2dae99e748441a96dd737ac81d2772a359ba63c9. Please keep in mind that you have to specify your wine64 binary for the 64-bit setup and the wine binary for the 32-bit one.

Nothing extracted yet.