#!/bin/bash
if
[
"$PLAYONLINUX"
=
""
]
then
exit
0
fi
source
"$PLAYONLINUX/lib/sources"
cfg_check
POL_SetupWindow_Init
POL_SetupWindow_presentation
"Guild Wars"
"NCsoft"
"http://www.guildwars.com"
"Tinou, modified by MulX and Henne"
"GuildWars"
if
[
"$POL_LANG"
==
"fr"
] ;
then
LNG_CD=
"Disposez vous du CD ?"
COPY=
"Copie des fichiers ..."
DOWNLOAD=
"Patientez pendant le téléchargement des fichiers minimal pour le jeu"
EXTRACT=
"Patientez pendant l'extraction des fichiers minimal de Guild Wars"
CD2=
"Inserer le CD2"
CD1=
"Inserer le CD1"
SWITCHCD=
"Cliquez sur Suivant ou OK quand le jeu demande le CD2"
ENDCD=
"Quand l'installation a fini, fermer le jeu, puis cliquez sur OK"
DVD=
"Disposez vous du DVD ?"
elif
[
"$POL_LANG"
==
"de"
] ;
then
LNG_CD=
"Sind Sie im Besitz der CDs ?"
COPY=
"Kopiere Dateien ..."
DOWNLOAD=
"Bitte warten Sie, bis die für das Spiel benötigten Dateien heruntergeladen wurden"
EXTRACT=
"Bitte warten Sie, bis die soeben heruntergeladenen Dateien entpackt wurden"
CD2=
"Bitte legen Sie CD2 ein"
CD1=
"Bitte legen Sie CD1 ein"
SWITCHCD=
"Klicken Sie auf WEITER, wenn das Spiel nach CD2 fragt"
ENDCD=
"Wenn die Installation abgeschlossen ist, beenden Sie das Spiel und klicken Sie auf WEITER"
DVD=
"Sind Sie im Besitz der DVD ?"
else
LNG_CD=
"Do you have CD ?"
COPY=
"Copying files ..."
DOWNLOAD=
"Please wait during downloading minimal file for game"
EXTRACT=
"Please wait during unziping minimal file for game"
CD2=
"Please, insert CD2"
CD1=
"Please, insert CD1"
SWITCHCD=
"Press next or OK, when game ask for cd2"
ENDCD=
"When setup is finished, close game, and press ok or next"
DVD=
"Do you have the DVD ?"
fi
TITRE=
"Guild Wars"
POL_SetupWindow_install_wine
"1.2"
Set_WineVersion_Session
"1.2"
rm
$REPERTOIRE
/tmp/GuildWars/
-R
mkdir
-p $REPERTOIRE
/tmp/GuildWars
cd
$REPERTOIRE
/tmp/GuildWars
POL_SetupWindow_download
"$DOWNLOAD"
"$TITRE"
"$SITE/divers/Gw.zip"
select_prefixe
"$HOME/.PlayOnLinux/wineprefix/GuildWars/"
POL_SetupWindow_prefixcreate
POL_SetupWindow_wait_next_signal
"$EXTRACT"
"$TITRE"
unzip Gw.zip
mkdir
-p $REPERTOIRE
/wineprefix/GuildWars/drive_c/GW
cp
.
/Gw
.exe $REPERTOIRE
/wineprefix/GuildWars/drive_c/GW/
.
regedit .
/Gw
.reg
POL_SetupWindow_detect_exit
POL_SetupWindow_question
"$DVD"
"$TITRE"
if
[
"$APP_ANSWER"
==
"TRUE"
] ;
then
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"/Data/Gw/Gw.dat"
POL_SetupWindow_wait_next_signal
"$COPY"
"$TITRE"
cp
$CDROM
/Data/Gw/Gw
.dat $REPERTOIRE
/wineprefix/GuildWars/drive_c/GW/Gw
.dat
POL_SetupWindow_detect_exit
else
POL_SetupWindow_question
"$LNG_CD"
"$TITRE"
if
[
"$APP_ANSWER"
==
"TRUE"
] ;
then
mkdir
"$REPERTOIRE/tmp/GuildWars/cd1"
mkdir
"$REPERTOIRE/tmp/GuildWars/cd2"
POL_SetupWindow_message
"$CD1"
"$TITRE"
POL_SetupWindow_cdrom
cd
$CDROM
CHECK=$(
find
. -iwholename .
/Data/Gw/Gw
.dat)
if
[
"$CHECK"
==
""
] ;
then
POL_SetupWindow_check_cdrom
"POL_fail"
else
POL_SetupWindow_check_cdrom
"$CHECK"
fi
POL_SetupWindow_wait_next_signal
"$COPY"
"$TITRE"
cp
-ra $CDROM/* $REPERTOIRE
/tmp/GuildWars/cd1
cd
..
wine
eject
POL_SetupWindow_message
"$CD2"
"$TITRE"
POL_SetupWindow_cdrom
cd
$CDROM
CHECK2=$(
find
. -iwholename .
/Data/Gw/Gw2
.dat)
if
[
"$CHECK2"
==
""
] ;
then
POL_SetupWindow_check_cdrom
"POL_fail"
else
POL_SetupWindow_check_cdrom
"$CHECK2"
fi
POL_SetupWindow_wait_next_signal
"$COPY"
"$TITRE"
cp
-ar $CDROM/* $REPERTOIRE
/tmp/GuildWars/cd2
cd
..
wine
eject
chmod
+rwx $REPERTOIRE
/tmp/GuildWars/
-R
mv
$REPERTOIRE
/tmp/GuildWars/cd1
$REPERTOIRE
/tmp/GuildWars/current
wine
"$REPERTOIRE/tmp/GuildWars/current/Setup.exe"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"$SWITCHCD"
"$TITRE"
mv
$REPERTOIRE
/tmp/GuildWars/current
$REPERTOIRE
/tmp/GuildWars/cd1
mv
$REPERTOIRE
/tmp/GuildWars/cd2
$REPERTOIRE
/tmp/GuildWars/current
POL_SetupWindow_message
"$ENDCD"
"$TITRE"
fi
fi
touch
"$REPERTOIRE/wineprefix/GuildWars/drive_c/GW/Gw.dat"
chmod
+rw
"$REPERTOIRE/wineprefix/GuildWars/drive_c/GW/Gw.dat"
POL_SetupWindow_make_shortcut
"GuildWars"
"GW/"
"Gw.exe"
"GuildWars.xpm"
"Guild Wars"
""
""
POL_SetupWindow_make_shortcut
"GuildWars"
"GW/"
"Gw.exe"
"GuildWars.xpm"
"Update Guild Wars"
""
"-image"
Set_WineVersion_Assign
"1.2"
"Guild Wars"
Set_WineVersion_Assign
"1.2"
"Update Guild Wars"
rm
$REPERTOIRE
/tmp/GuildWars/
-R
POL_SetupWindow_Close
exit