#!/bin/bash
# Date: (2009-09-26 16-20)
# Distribution used to test: Frugalware Current
# Wine version used: 1.1.29
# Author: Berillions
# Graphic Card : GeForce GTX275
# Drivers : 185.18.36
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
#Vérifier que PlayOnLinux est bien exécuté avant
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
Title="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."
LNG_FILEPATCH="Selectionner le patch à installer"
LNG_INST="Patch pour $Title installé avec succès"
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."
LNG_FILEPATCH="Select patch file"
LNGINST="Patch for $Title has been installed successfully"
fi
patch_homm()
{
POL_SetupWindow_browse "$LNG_FILEPATCH" "$Title" ""
wine "$APP_ANSWER"
POL_SetupWindow_message "$LNG_INST" "$Title"
}
wget http://image.jeuxvideo.com/images/pc/h/o/hom5pc0ft.jpg --output-document="$REPERTOIRE/tmp/hom5pc0ft.jpeg"
convert "$REPERTOIRE/tmp/hom5pc0ft.jpeg" -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" "$Title"
POL_SetupWindow_menu "$LNG_INST" "Actions" "Patch game~Install Game" "~"
if [ "$APP_ANSWER" == "Patch game" ]; then
select_prefix "$REPERTOIRE/wineprefix/$Title"
patch_homm
POL_SetupWindow_Close
exit
fi
#Installation de Wine
POL_SetupWindow_install_wine "1.1.29"
#Préparation de Wine
select_prefix "$REPERTOIRE/wineprefix/$Title"
POL_SetupWindow_prefixcreate
#Configuration de Wine
Set_OS winxp
#Taille de la mémoire graphique
POL_SetupWindow_textbox "Your Memory Graphic ?" "Memory Graphic"
VMS="$APP_ANSWER"
#Réglage Direct3D
cd "$WINEPREFIX/drive_c/windows/temp"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > OGL.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> OGL.reg
regedit OGL.reg
#Lancement de l'installeur
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Setup.exe"
#Lancement de l'installeur
wine $CDROM/Setup.exe
POL_SetupWindow_message "$LNG_WAIT_END" "$Title"
#Création Launcher
POL_SetupWindow_make_shortcut "$Title" "$PROGRAMFILES/Ubisoft/Heroes of Might and Magic V/bin/" "H5_Game.exe" "" "$Title"
Set_WineVersion_Assign "1.1.29" "$Title"
POL_SetupWindow_Close
exit
Jeu fonctionnel. Aucun bug à l'horizon ;-)