Diff of /codesys-ide/install.sh [382f71] .. [fc9da4]  Maximize  Restore

Switch to side-by-side view

--- a/codesys-ide/install.sh
+++ b/codesys-ide/install.sh
@@ -23,6 +23,7 @@
 #
 ################################################################################
 
+WINE=wine-development
 CDS_LINK="https://store.codesys.com/ftp_download/3S/CODESYS/300000/3.5.15.0/CODESYS%203.5.15.0.exe"
 TRICKS_LINK="https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
 ADDITIONAL_PACKAGES=https://forge.codesys.com/svn/tol,cforge,code/trunk/cforge.package
@@ -121,8 +122,8 @@
 
 function prereq
 {
-    echo -n "Checking prerequisite 'wine-development'"
-    if which wine-development; then
+    echo -n "Checking prerequisite '${WINE}'"
+    if which ${WINE}; then
 	echo "=> OK"
     else
 	echo "ERROR: Please install wine32-development and wine64-development"
@@ -133,7 +134,7 @@
 function switch_to_win7
 {
     # call wine to create new WINEPREFIX
-    wine-development dir
+    ${WINE} dir
     sleep 5
     # patch win version
     cp system.reg ${WINEPREFIX}
@@ -149,13 +150,13 @@
 
 function install
 {
-    wine-development setup.exe /v/qn /s /v'INSTALLDIR=C:\\CODESYS' /v"ADDLOCAL=Basic,CODESYS,cforge Tool" /v"CDS_INSTALL_SERVICES=0"
+    ${WINE} setup.exe /v/qn /s /v'INSTALLDIR=C:\\CODESYS' /v"ADDLOCAL=Basic,CODESYS,cforge Tool" /v"CDS_INSTALL_SERVICES=0"
     wineserver-development -w
 }
 
 function post_install
 {
-    wine-development reg add "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-0-0-0-1000"
+    ${WINE} reg add "HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\ProfileList\\S-1-5-21-0-0-0-1000"
     wineserver-development -w
 }