#!/bin/bash
# Date: (2009-10-03 18-45)
# Distribution used to test: Frugalware Current
# Wine version used: 1.1.30
# Author: Berillions
# Graphic Card : GeForce GTX275
# Drivers : 185.18.36
#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
Title="Heroes of Might & Magic 5"
Prefix="HOMM5"
if [ "$POL_LANG" == "fr" ]; then
LNG_MEM="La taille de votre mémoire graphique?"
LNG_WAIT_END="Appuyez sur "Suivant" UNIQUEMENT quand l'installation du jeu sera
terminée sous peine de devoir recommencer l'installation."
else
LNG_MEM="How much memory do your graphic card have got?."
LNG_WAIT_END="Click on "Next" ONLY when the game installation
is finished or you will have to redo the installation."
fi
wget
http://upload.wikimedia.org/wikipedia/en/9/95/H5boxshot.jpg --output-document="$REPERTOIRE/tmp/H5boxshot.jpg"
convert "$REPERTOIRE/tmp/H5boxshot.jpg" -scale 150x356! "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
#Presentation
POL_SetupWindow_presentation "$Title" "Nival Interactive" "
http://www.mightandmagic.com/HeroesV/" "Berillions" "$Prefix"
#Installation de Wine
POL_SetupWindow_install_wine "1.1.30"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"
#Préparation de Wine
select_prefix "$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
#Configuration de Wine
Set_OS winxp
#Taille de la mémoire graphique
POL_SetupWindow_textbox "$LNG_MEM" "$Title"
VMS="$APP_ANSWER"
#Réglage Direct3D
cd "$WINEPREFIX/drive_c/windows/temp"
echo "[HKEY_CURRENT_USERSoftwareWineDirect3D]" > OGL.reg
echo ""VideoMemorySize"="$VMS"" >> OGL.reg
regedit OGL.reg
convert "$CDROM/AutoRun.ico" -geometry 32X32 "$REPERTOIRE/icones/32/$Title"
wine "$CDROM/Setup.exe"
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
#Création Launcher
POL_SetupWindow_make_shortcut "$Prefix" "$PROGRAMFILES/Ubisoft/Heroes of Might and Magic V/bin/" "H5_Game.exe" "" "$Title"
Set_WineVersion_Assign "1.1.30" "$Title"
POL_SetupWindow_message_image "Please note that this game has a copy protection system
and sadly, it prevents Wine from running the game.
PlayOnLinux will not provide any help concerning any illegal
stuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_Close
exit