Scripts
Script for World Of Warcraft
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/wow/left.jpg
wget $SITE/setups/wow/top.jpg
POL_SetupWindow_Init "$REPERTOIRE/tmp/top.jpg" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "World Of Warcraft" "Blizzard Entertainment" "www.blizzard.com" "Tinou and Asimov" "WorldOfWarcraft"
select_prefixe "$REPERTOIRE/wineprefix/WorldOfWarcraft"
POL_SetupWindow_prefixcreate
if [ "$POL_LANG" == "fr" ]
then
LNG_CHOOSE="Choisissez l'option correspondant à votre situation"
LNG_CHOOSE_TITLE="Quel type d'installation ?"
LNG_4CD="Installation 4 CDs"
LNG_5CD="Installation 5 CDs"
LNG_DVD="Installation par DVD"
LNG_CD_TITLE="CD d'installation requis"
LNG_DVD_TITLE="DVD d'installation requis"
LNG_MOUNT1="Veuillez monter le CD-ROM 1, puis cliquez sur suivant."
LNG_MOUNT2="Veuillez monter le CD-ROM 2, puis cliquez sur suivant."
LNG_MOUNT3="Veuillez monter le CD-ROM 3, puis cliquez sur suivant."
LNG_MOUNT4="Veuillez monter le CD-ROM 4, puis cliquez sur suivant."
LNG_MOUNT5="Veuillez monter le CD-ROM 5, puis cliquez sur suivant."
LNG_MOUNT_DVD="Veuillez monter le DVD, puis cliquez sur suivant."
LNG_WAIT_TILTE="Patientez pendant préparation de l'installation..."
LNG_WAIT="L'installation copie l'ensemble des fichiers nécessaires..."
LNG_INSTALL_GO="L'installation va démarrer. Procédez normalement en acceptant les choix par défaut.\nN'appuyez sur Suivant que si vous êtes SUR(E) que l'installation est terminée.\nSinon, vous devrez tout réinstaller."
LNG_CONFIRM="World of Warcraft a-t-il été complètement installé ?\n(mis à part les mises à jour)\nEn validant, vous déclencherez la poursuite de l'installation."
LNG_CONFIG="L'assistant configure maintenant votre installation..."
LNG_CONFIG_TILTE="Veuillez patienter"
LNG_INSTALL_FINISHED="Installation terminée !"
else
LNG_CHOOSE="Please choose the correct method of installation"
LNG_CHOOSE_TITLE="Whant kind of installation ?"
LNG_4CD="Install with 4 CDs"
LNG_5CD="Install with 5 CDs"
LNG_DVD="Install with one DVD"
LNG_CD_TITLE="Installation CD required"
LNG_DVD_TITLE="Installation DVD required"
LNG_MOUNT1="Please mount CD-ROM 1, then valid."
LNG_MOUNT2="Please mount CD-ROM 2, then valid."
LNG_MOUNT3="Please mount CD-ROM 3, then valid."
LNG_MOUNT4="Please mount CD-ROM 4, then valid."
LNG_MOUNT5="Please mount CD-ROM 5, then valid."
LNG_MOUNT_DVD="Please mount the DVD, then valid."
LNG_WAIT_TITLE="Please wait while preparing installation..."
LNG_WAIT="Copying necessary installation files"
LNG_INSTALL_GO="Do not click on OK since you are not SURE the game has been installed.\nIf you click on ok whereas the installation is not finished yet, you wille have to install this game again."
LNG_CONFIRM="Are you sure World of Warcraft has been completely installed ?\n(exept updates)\nIf you valid here, the game will be configured."
LNG_CONFIG="Configuring your installation..."
LNG_CONFIG_TILTE="Please wait"
LNG_INSTALL_FINISHED="Installation finished !"
fi
install_4 ()
{
POL_SetupWindow_cdrom
POL_SetupWindow_message "$LNG_MOUNT1" "$LNG_CD_TITLE"
#POL_SetupWindow_check_cdrom "Installer Tome.mpq"
TEMP="$HOME/.PlayOnLinux/tmp/wow"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir -p $TEMP
cd $REPERTOIRE/wineprefix/WorldOfWarcraft
select_prefixe "$(pwd)"
cd $WINEPREFIX/dosdevices
rm ./*
ln -s ../drive_c c:
ln -s / z:
ln -s $TEMP d:
cd $TEMP
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/* $TEMP
POL_SetupWindow_message "$LNG_MOUNT2" "$LNG_CD_TITLE"
POL_SetupWindow_check_cdrom "Installer Tome 2.mpq"
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/*.mpq $TEMP
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_MOUNT3" "$LNG_CD_TITLE"
POL_SetupWindow_check_cdrom "Installer Tome 3.mpq"
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/*.mpq $TEMP
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_MOUNT4" "$LNG_CD_TITLE"
POL_SetupWindow_check_cdrom "Installer Tome 4.mpq"
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/*.mpq $TEMP
POL_SetupWindow_detect_exit
if [ "$ANSWER" == "$LNG_5CD" ]
then
POL_SetupWindow_message "$LNG_MOUNT5" "$LNG_CD_TITLE"
POL_SetupWindow_check_cdrom "Installer Tome 5.mpq"
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/*.mpq $TEMP
POL_SetupWindow_detect_exit
fi
}
install_dvd ()
{
POL_SetupWindow_cdrom
POL_SetupWindow_message "$LNG_MOUNT_DVD" "$LNG_DVD_TITLE"
POL_SetupWindow_check_cdrom "Installer Tome.mpq"
TEMP="$HOME/.PlayOnLinux/tmp/wow"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir -p $TEMP
cd $REPERTOIRE/wineprefix/WorldOfWarcraft
select_prefixe "$(pwd)"
cd $WINEPREFIX/dosdevices
rm ./*
ln -s ../drive_c c:
ln -s / z:
ln -s $TEMP d:
cd $TEMP
POL_SetupWindow_wait_next_signal "$LNG_WAIT" "$LNG_WAIT_TITLE"
cp $CDROM/* $TEMP
POL_SetupWindow_detect_exit
}
POL_SetupWindow_menu "$LNG_CHOOSE" "$LNG_CHOOSE_TITLE" "$LNG_4CD~$LNG_5CD~$LNG_DVD" "~"
ANSWER="$APP_ANSWER"
if [ "$ANSWER" == "$LNG_4CD" ]
then
install_4
fi
if [ "$ANSWER" == "$LNG_5CD" ]
then
install_4
fi
if [ "$ANSWER" == "$LNG_DVD" ]
then
install_dvd
fi
POL_SetupWindow_message "$LNG_INSTALL_GO"
wine d:\Installer.exe
POL_SetupWindow_message "$LNG_CONFIRM"
POL_SetupWindow_wait_next_signal "$LNG_CONFIG" "$LNG_CONFIG_TILTE"
#CONFIGURATION : Config.wtf
cd $REPERTOIRE/tmp/
echo "SET gxApi "opengl"" > Config.wtf
echo "SET ffxDeath "0"" >> Config.wtf
echo "SET SoundOutputSystem "1"" >> Config.wtf
echo "SET SoundBufferSize "150"" >> Config.wtf
echo "SET MasterSoundEffects "0"" >> Config.wtf
cp -f Config.wtf $WINEPREFIX/drive_c/Program Files/World of Warcraft/WTF/Config.wtf
#MOD : APPLY TO FOREHEAD
cd $WINEPREFIX/drive_c/Program Files/World of Warcraft/Interface/
wget $SITE/divers/ApplyToForehead.zip
unzip ApplyToForehead.zip
rm ApplyToForehead.zip
cd $WINEPREFIX/drive_c/Program Files/World of Warcraft/
#LAUNCH SCRIPT (-> check Config.wtf file)
echo "#!/bin/bash" > start_wow.sh
echo "cd ~/.PlayOnLinux/wineprefix/WorldOfWarcraft/drive_c/Program\ Files/World\ of\ Warcraft/WTF" >> start_wow.sh
echo "if ! grep "SET gxApi "opengl"" Config.wtf" >> start_wow.sh
echo "then" >> start_wow.sh
echo "echo "SET gxApi "opengl"" >> Config.wtf" >> start_wow.sh
echo "echo "SET ffxDeath "0"" >> Config.wtf" >> start_wow.sh
echo "echo "SET SoundOutputSystem "1"" >> Config.wtf" >> start_wow.sh
echo "echo "SET SoundBufferSize "150"" >> Config.wtf" >> start_wow.sh
echo "echo "SET MasterSoundEffects "0"" >> Config.wtf " >> start_wow.sh
echo "fi" >> start_wow.sh
echo "wine ~/.PlayOnLinux/wineprefix/WorldOfWarcraft/drive_c/Program\ Files/World\ of\ Warcraft/WoW.exe" >> start_wow.sh
chmod +x start_wow.sh
Set_SoundDriver alsa
fonts_to_prefixe
chmod 777 $TEMP -R
rm $TEMP -R
cd $WINEPREFIX/dosdevices
rm ./d:
POL_SetupWindow_detect_exit
POL_SetupWindow_make_shortcut "WorldOfWarcraft" "Program Files/World of Warcraft" "start_wow.sh"
POL_SetupWindow_reboot
POL_SetupWindow_message "$LNG_INSTALL_FINISHED"
POL_SetupWindow_Close
exit