#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
if [ "$POL_LANG" == "fr" ]; then
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera\nterminée sous peine de devoir recommencer l'installation."
LNG_WARNING_UPDATE="Cet addon patch automatiquement le jeu à la version 1.2.0416."
else
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
LNG_WARNING_UPDATE="This addon automatically patch the game to 1.2.0416."
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/oblivion/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "The Elder Scrolls 4 - Oblivion - Shivering Isle" "2K Games" "http://www.elderscrolls.com/games/oblivion_overview.htm" "GNU_Raziel" "TheElderScrolls4_Oblivion"
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="Game is not installed."
fi
POL_SetupWindow_message_image "$LNG_PREFIX_NOT_EXIST" "Prefix Checker" "$PLAYONLINUX/themes/tango/warning.png"
exit
fi
}
POL_SetupWindow_checkexist "TheElderScrolls4_Oblivion"
select_prefixe "$REPERTOIRE/wineprefix/TheElderScrolls4_Oblivion/"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "English/setup.exe"
if [ "$POL_LANG" == "fr" ]; then
wine d:\\French\\setup.exe
elif [ "$POL_LANG" == "es" ]; then
wine d:\\Spanish\\setup.exe
else
wine d:\\English\\setup.exe
fi
POL_SetupWindow_message "$LNG_WAIT_END" "The Elder Scrolls 4 - Oblivion"
POL_SetupWindow_message_image "$LNG_WARNING_UPDATE" "The Elder Scrolls 4 - Oblivion" "$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_Close
exit