#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
if [ "$POL_LANG" == "fr" ]; then
LNG_PREY_UPDATE_WELCOME="Bienvenue dans le script d'installation du patch 1.04 pour Prey"
LNG_PREY_UPDATE_INFO1="Je vais télécharger le patch sur le site officiel.\nCette opération peut nécessiter du temps.\nCliquez sur valider pour commencer."
LNG_PREY_UPDATE_DL="Patientez pendant le téléchargement du patch...\nCette opération peut prendre quelques minutes selon la vitesse de votre connexion."
LNG_PREY_UPDATE_INSTALL="Téléchargement terminé. Installation du patch."
LNG_PREY_UPDATE_FINISHED="Le patch à été correctement installé."
else
LNG_PREY_UPDATE_WELCOME="Welcome in the patch 1.04 Installation script for Prey"
LNG_PREY_UPDATE_INFO1="I will download the path on the official website.\nThis opération may take time.\nClick to begin."
LNG_PREY_UPDATE_DL="Wait while the patch is downloading...\nThis operation can take time, depending of you connexion."
LNG_PREY_UPDATE_INSTALL="Donwload finished. Patch installation will begin."
LNG_PREY_UPDATE_FINISHED="Patch installed successfully."
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/prey/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_message "$LNG_PREY_UPDATE_WELCOME" "Prey"
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 "Prey"
select_prefixe "$REPERTOIRE/wineprefix/Prey/"
POL_SetupWindow_message "$LNG_PREY_UPDATE_INFO1" "Prey"
cd $REPERTOIRE/tmp
POL_SetupWindow_download "$LNG_PREY_UPDATE_DL" "Prey" "http://downloads.2kgames.com/prey/SetupPreyPt14.zip"
unzip SetupPreyPt14.zip
wine SetupPreyPt1.4.exe
rm SetupPreyPt1*.*
POL_SetupWindow_message "$LNG_PREY_UPDATE_FINISHED" "Prey"
POL_SetupWindow_Close
exit