#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Age of Empires II : The Conquerors"
TITLE_REQUIRED=
"Age of Empires II : The Age of Kings"
PREFIX=
"AOE2_conq"
WORKING_WINE_VERSION=
"1.6"
POL_SetupWindow_Init
POL_Debug_Init
POL_RequiredVersion 4.1.6 || POL_Debug_Fatal
"This program requires $APPLICATION_TITLE 4.1.6"
if
[
"$(POL_Wine_PrefixExists "
AOE2_king
")"
=
"False"
];
then
POL_SetupWindow_message
"$(eval_gettext 'This is an installer for an update or an addon;\nPlease install $TITLE_REQUIRED first')"
"$TITLE"
POL_SetupWindow_Close
exit
fi
POL_System_TmpCreate
"$PREFIX"
POL_Wine_SelectPrefix
"$PREFIX"
POL_System_CopyDirectory
"$POL_USER_ROOT/wineprefix/AOE2_king"
"$WINEPREFIX"
POL_SetupWindow_InstallMethod
"CD,LOCAL"
SETUP_OPTIONS=
""
if
[
"$INSTALL_METHOD"
=
"CD"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Please insert the game media into your disk drive.')"
"$TITLE"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"aocsetup.exe"
POL_Wine
start
/unix
"$CDROM/aocsetup.exe"
"$SETUP_OPTIONS"
else
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run')"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
POL_Wine_WaitBefore
"$TITLE"
POL_Wine
start
/unix
"$SETUP_EXE"
"$SETUP_OPTIONS"
fi
POL_Wine_WaitExit
"$TITLE"
POL_Wine_reboot
POL_Shortcut
"age2_x1.exe"
"$TITLE"
""
"-nostartup"
"Game;StrategyGame;"
POL_SetupWindow_question
"$(eval_gettext 'Do you want to install the 1.0c Patch?')"
"$TITLE"
if
[
"$APP_ANSWER"
=
"TRUE"
];
then
POL_SetupWindow_InstallMethod
"DOWNLOAD,LOCAL"
SETUP_OPTIONS=
""
if
[
"$INSTALL_METHOD"
=
"LOCAL"
];
then
cd
"$HOME"
POL_SetupWindow_browse
"$(eval_gettext 'Please select the setup file to run')"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
else
cd
"$POL_System_TmpDir"
SETUP_EXE=
"Age2XPatch.exe"
fi
POL_Wine_WaitBefore
"$TITLE"
POL_Wine
start
/unix
"$SETUP_EXE"
"$SETUP_OPTIONS"
POL_Wine_WaitExit
"$TITLE"
POL_Wine_reboot
fi
POL_System_TmpDelete
POL_SetupWindow_Close
exit