#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Alcoma ASD Client 9.1"
PREFIX=
"ASD91"
PROGDIR=
"$REPERTOIRE/wineprefix/$PREFIX/drive_c/Program Files/ASD/"
POL_SetupWindow_Init
POL_Debug_Init
POL_Wine_SelectPrefix
"$PREFIX"
POL_Wine_PrefixCreate
POL_System_TmpCreate
"$PREFIX"
cd
"$POL_System_TmpDir"
[ -f ASD9.1_virtualni_systemy.zip ] || POL_Debug_Fatal
"$(eval_gettext 'An error happened during download.')"
POL_SetupWindow_wait
"$(eval_gettext 'Unzipping downloaded files. Please wait.')"
"$TITLE"
mkdir
-p
"$PROGDIR"
cd
"$PROGDIR"
unzip
"$POL_System_TmpDir/ASD9.1_virtualni_systemy.zip"
POL_SetupWindow_browse
"$(eval_gettext 'You need a licence file to use $TITLE. Please select the file now!')"
"$TITLE"
"licence.key"
[ -f
"$APP_ANSWER"
] &&
cp
"$APP_ANSWER"
"$PROGDIR/licence.key"
POL_SetupWindow_menu
"$(eval_gettext 'Select the COM port to use for direct communication with the device:')"
\\
"$TITLE"
"none|/dev/ttyS0|/dev/ttyS1|/dev/ttyUSB0|/dev/ttyUSB1"
"|"
if
[
"$APP_ANSWER"
!=
"none"
] ;
then
COMDEVICE=
"$REPERTOIRE/wineprefix/$PREFIX/dosdevices/com1"
ln
-s
"$APP_ANSWER"
"$COMDEVICE"
[ -w
"$APP_ANSWER"
] ||
POL_SetupWindow_message
"$(eval_gettext 'Symbolic link created for COM1 in $COMDEVICE\\n\\nWARNING: it seems that COM port either does not exist or is not accessible for this user.\\nPlease correct the symlink or permissions before using $TITLE.')"
"$TITLE"
fi
cat
<< EOF >>
"$REPERTOIRE/wineprefix/$PREFIX/system.reg"
[Hardware\\\\\\\\Devicemap\\\\\\\\SerialComm]
"Serial0"
=
"COM1"
EOF
POL_SetupWindow_message
"$(eval_gettext 'Please manually copy channel table files to program directory:\\n$PROGDIR\\n\\nInstallation complete.')"
"$TITLE"
POL_Shortcut
"asdclient.exe"
"$TITLE"
POL_System_TmpDelete
POL_SetupWindow_Close
exit
0