#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Anno 1602: Creation of a New World - Patch"
AUTHOR=
"Marco Gerards"
PREFIX=
"Anno1602"
PREFIXDIR=
"$REPERTOIRE/wineprefix/$PREFIX"
WORKINGWINEVERSION=
"1.1.44"
LNG_DOWNLOADING=
"PlayOnLinux is downloading"
LNG_LANGUAGE=
"What is your language version?"
LNG_INSTALLATIONINPROGRESS=
"Installation in progress..."
LNG_PATCHSUCCES=
"Patch for $TITLE has been installed successfully."
LNG_CHOOSEACTION=
"What do you want to do?"
LNG_PATCHM=
"Let me choose patch manually"
LNG_PATCHA=
"Download patch automatically"
LNG_PATCHLOCATION=
"Where is your patch located?"
POL_SetupWindow_Init
POL_SetupWindow_checkexist()
{
if
[ ! -e $REPERTOIRE
/wineprefix/
$1 ];
then
if
[
"$POL_LANG"
==
"fr"
];
then
LNG_PREFIX_NOT_EXIST=
"Le jeu n'est pas installé."
else
LNG_PREFIX_NOT_EXIST=
"The Game is not installed."
fi
POL_SetupWindow_message
"$LNG_PREFIX_NOT_EXIST"
"$TITLE"
POL_SetupWindow_Close
exit
fi
}
POL_SetupWindow_checkexist
"$PREFIX"
select_prefix
"$PREFIXDIR"
POL_SetupWindow_install_wine
"$WORKINGWINEVERSION"
Use_WineVersion
"$WORKINGWINEVERSION"
if
[ -e $WINEPREFIX
/drive_c/Anno1602/LeesDit
.rtf ] ;
then
PATCHNAME=
"Anno 1602 patch 1 dutch"
PATCHFILE=
"anno1602patch1_dut.exe"
else
POL_SetupWindow_message_image
"Downloading the patch for your version of Anno 1602 is not supported yet"
"$TITLE"
"$PLAYONLINUX/themes/tango/error.png"
POL_SetupWindow_Close
exit
fi
POL_SetupWindow_menu
"$LNG_CHOOSEACTION"
"Actions"
"$LNG_PATCHM~$LNG_PATCHA"
"~"
if
[
"$APP_ANSWER"
==
"$LNG_PATCHM"
];
then
POL_SetupWindow_browse
"$LNG_PATCHLOCATION"
"$TITLE"
""
PATCHFILE=
"$APP_ANSWER"
else
POL_SetupWindow_message
"The patch \"$PATCHNAME\" for Anno 1602 will be downloaded and installed"
cd
"$REPERTOIRE/ressources"
if
[ ! -e
"$PATCHFILE"
];
then
fi
fi
POL_SetupWindow_wait_next_signal
"$LNG_INSTALLATIONINPROGRESS"
"$TITLE"
wine
"$PATCHFILE"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"$LNG_PATCHSUCCES"
"$TITLE"
POL_SetupWindow_Close
exit