Scripts

Script para Pharaon

#!/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


if [ "$POL_LANG" == "fr_FR.UTF-8" ]
then

#Presentation
presentation "Pharaon" "Sierra" "http://pharaoh.heavengames.com/" "Toumeno" "Pharaon" 1 4

else

#Presentation English
presentation "Pharaoh" "Sierra" "http://pharaoh.heavengames.com/" "Toumeno" "Pharaoh" 1 4

fi

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

#Détection du cd-rom
Ask_For_cdrom 3 4
Check_cdrom "setup.exe"

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


#Fin du code du jeu

if [ "$POL_LANG" == "fr_FR.UTF-8" ]
then

#Création du lanceur

creer_lanceur "Pharaoh" "SIERRA/Pharaon/" "Pharaoh.exe" "pharaoniconerp5.png" "Pharaon"

else

#Création du lanceur English

creer_lanceur "Pharaoh" "SIERRA/Pharaoh/" "Pharaoh.exe" "pharaoniconerp5.png" "Pharaoh"


fi

#Configuration de Wine
Set_OS win98
Set_SoundDriver alsa
echo "[HKEY_CURRENT_USER\Software\Wine\X11 Driver]" > $REPERTOIRE/tmp/DesktopRoot.reg
echo "\"Desktop\"=\"1024x768\"" >> $REPERTOIRE/tmp/DesktopRoot.reg
regedit $REPERTOIRE/tmp/DesktopRoot.reg
rm -f $REPERTOIRE/tmp/DesktopRoot.reg
simuler_reboot 4 4

attention "Au cours d'une partie, n'oubliez pas de cliquer sur Options=>Affichage, et de régler la résolution à 1024x768 (maximum).
\n\n\nDuring a game, don't forget to click on Options=>Display, and set the resolution on 1024x768 (maximum)."

exit