#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Baldur's Gate II : Throne of Bhaal"
PREFIX=
"BaldursGate2"
EDITOR=
"BioWare"
AUTHOR=
"GNU_Raziel"
GAME_VMS=
"128"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation
"$TITLE"
"$EDITOR"
"$GAME_URL"
"$AUTHOR"
"$PREFIX"
POL_SetupWindow_checkexist()
{
if
[ ! -e
"$POL_USER_ROOT/wineprefix/$1"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Game is not installed.')"
"$TITLE"
POL_SetupWindow_Close
exit
0
fi
}
POL_SetupWindow_checkexist
"$PREFIX"
POL_Wine_SelectPrefix
"$PREFIX"
POL_SetupWindow_InstallMethod
"CD,LOCAL"
if
[
"$INSTALL_METHOD"
==
"CD"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Please insert game media into your disk drive')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"TOBicon.ico"
POL_Wine
start
/unix
"$CDROM/Setup.exe"
POL_Wine_WaitExit
"$TITLE"
else
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run')"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
POL_Wine
start
/unix
"$SETUP_EXE"
POL_Wine_WaitExit
"$TITLE"
fi
if
[ -e
"$WINEPREFIX/drive_c/windows/temp/"
];
then
rm
-rf
"$WINEPREFIX/drive_c/windows/temp/"
*
chmod
-R 777
"$POL_USER_ROOT/tmp/"
rm
-rf
"$POL_USER_ROOT/tmp/"
*
fi
POL_SetupWindow_message
"$(eval_gettext 'This addon automatically install patch 2.5.26461')"
"$TITLE"
POL_SetupWindow_Close
exit
0