sv ru es en fr

Applications

Choose a category

Guild Wars

Informations

This script is signed by PlayOnLinux.
	Guild Wars is an episodic series of multiplayer online role-playing games created by ArenaNet, a Seattle game development studio and a subsidiary of the South Korean game publisher NCsoft.	

Source code

#!/bin/bash
# Author : Tinou/MulX
# 
# Changelog
# ---------------
# Edit by MulX - syntax error - date 2010-08-17 11-00


if [ "$PLAYONLINUX" = "" ]
then
        exit 0
fi
source "$PLAYONLINUX/lib/sources"
 
 
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 #French messages
        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 #German messages
        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 #English messages
        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"
# Use current wine
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
#Install minimal files
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
#Ask for DVD
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        #Ask for CDs
        POL_SetupWindow_question "$LNG_CD" "$TITRE"
        if [ "$APP_ANSWER" == "TRUE" ] ; then
                mkdir "$REPERTOIRE/tmp/GuildWars/cd1"
                mkdir "$REPERTOIRE/tmp/GuildWars/cd2"
                # Copy files from CD1
                POL_SetupWindow_message "$CD1" "$TITRE"
                POL_SetupWindow_cdrom
                # tests to do POL_SetupWindow_check_cdrom "/Data/Gw/Gw.dat" but with case insensitivity
                cd $CDROM
                CHECK=$(find . -iwholename ./Data/Gw/Gw.dat)
                if [ "$CHECK" == "" ] ; then
                        POL_SetupWindow_check_cdrom "POL_fail" # makes an error and retries POL_SetupWindow_cdrom
                else
                        POL_SetupWindow_check_cdrom "$CHECK"
                fi
                POL_SetupWindow_wait_next_signal "$COPY" "$TITRE"
                cp -ra $CDROM/*  $REPERTOIRE/tmp/GuildWars/cd1
                cd .. # move one folder up to make umount of CD possible, since we are moving to the CD 9 lines up
                wine eject # eject CD1 to ensure correct removal
                # Copy files from CD2
                POL_SetupWindow_message "$CD2" "$TITRE"
                POL_SetupWindow_cdrom
                # tests to do POL_SetupWindow_check_cdrom "/Data/Gw/Gw2.dat" but with case insensitivity
                cd $CDROM
                CHECK2=$(find . -iwholename ./Data/Gw/Gw2.dat)
                if [ "$CHECK2" == "" ] ; then
                        POL_SetupWindow_check_cdrom "POL_fail" # to make an error and retry POL_SetupWindow_cdrom
                else
                        POL_SetupWindow_check_cdrom "$CHECK2"
                fi
                POL_SetupWindow_wait_next_signal "$COPY" "$TITRE"
                cp -ar $CDROM/*  $REPERTOIRE/tmp/GuildWars/cd2
                cd .. # same as CD1
                wine eject
                chmod +rwx $REPERTOIRE/tmp/GuildWars/ -R
                mv $REPERTOIRE/tmp/GuildWars/cd1 $REPERTOIRE/tmp/GuildWars/current 
                # Start Setup.exe using wine
                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
#fix a bug of the next command when answer is no.
touch "$REPERTOIRE/wineprefix/GuildWars/drive_c/GW/Gw.dat"
#fix a bug when file created is not rw 
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

Signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEABECAAYFAk5Sj0cACgkQ5TH6yaoTykfwowCeKGUDHjgSaAYwsKJQ5zKmsIGE
sx0An0hStW39bwI7LocRDj+2Ung7Rnis
=QBXq
-----END PGP SIGNATURE-----
	Date : 22 August 2011 19:17:59
Signed by : PlayOnLinux
E-Mail : gpg@playonlinux.com
Comment : PlayOnLinux and PlayOnMac scripting keys
Fingerprint : 45B56114D9EA1640D68135CCE531FAC9AA13CA47

Known install files

Il n'y a rien à voir ici