Scripts

Script para Zoo Tycoon 2

#!/bin/bash
#Vérifier que PlayOnLinux est bien exécuté avant
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
#Charger les librairies
source "$PLAYONLINUX/lib/sources"

#Verifier les dépendences
cfg_check

#Presentation
presentation "Zoo Tycoon 2" "Microsoft Games" "http://www.microsoft.com/games/pc/zootycoon2.aspx" "Chriswill" "ZT2" 1 7

if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_ZT2_WELCOME="le script va maintenant télécharger un fichier dll afin que le jeu fonctionne correctement."
LNG_MFC42_DL="Téléchargement de MFC42.dll...."
LNG_ZT2_BECAREFUL=" Veuillez attendre la fin de la procédure de PlayOnLinux avant de lancer le jeu."
LNG_ZT2_END=" Fin de l'installation de Zoo Tycoon 2 par PlayOnLInux - Vous n'avez besoin d'aucun executable nocd avec ce jeu "
else
LNG_ZT2_WELCOME="This script will now download a dll file for this game."
LNG_GDI_DL="Downloading MFC42.dll...."
LNG_ZT2_BECAREFUL=" You have to wait after the end of PlayOnLinux's procedure before to start the game."
LNG_ZT2_END=" End of Zoo Tycoon 2 installation by PlayOnLinux - You don't need any nocd executable with this game "
fi

#Préparation de Wine
mkdir -p $REPERTOIRE/wineprefix/ZT2
select_prefixe "$REPERTOIRE/wineprefix/ZT2"
creer_prefixe 2 7

message "$LNG_ZT2_WELCOME" "" 3 7

cd $REPERTOIRE/tmp/
if [ ! -e $REPERTOIRE/tmp/mfc42.dll.zip ]; then
telecharger "$LNG_MFC42_DL" http://www.dllbank.com/zip/m/mfc42.dll.zip "" 4 7
fi

cd $REPERTOIRE/tmp/
unzip mfc42.dll.zip -d $REPERTOIRE/wineprefix/ZT2/drive_c/windows/system32/


#Détection du cd-rom
Ask_For_cdrom 5 7
Check_cdrom "install.exe"

#Avertissement
message "$LNG_ZT2_BECAREFUL" "" 6 7

#Lancement de l'installeur
wine $CDROM/install.exe

#Configuration de Wine
Set_OS winXP
Set_SoundDriver alsa

# la fonction simuler_reboot n'est pas nécessaire

#Création du lanceur
creer_lanceur "ZT2" "/Program Files/Microsoft Games/Zoo Tycoon 2" "zt.exe" "" "Zoo Tycoon 2"

#Fin
message "$LNG_ZT2_END" "" 7 7


exit