#!/bin/bash
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
Title=
"H5HoF"
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."
LNG_FILEPATCH=
"Selectionner le patch à installer"
LNG_INST=
"Patch pour $Title installé avec succès"
LNG_GAME=
"Vous devez installer Horeos of Might and Magic pour installer cette extension"
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"
LNG_GAME="You must
install
Heroes of Might & Magic 5 to
install
this
extension"
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/homhpc0ft
.jpg --output-document=
"$REPERTOIRE/tmp/homhpc0ft.jpeg"
convert
"$REPERTOIRE/tmp/homhpc0ft.jpeg"
-scale 150x356\\!
"$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_Init
""
"$REPERTOIRE/tmp/left.jpg"
if
[ ! -d
"$REPERTOIRE/wineprefix/$Prefix"
];
then
POL_SetupWindow_message
"$LNG_GAME"
"$Title"
POL_SetupWindow_Close
exit
fi
POL_SetupWindow_menu
"$LNG_INST"
"Actions"
"Patch game~Install Game"
"~"
if
[
"$APP_ANSWER"
==
"Patch game"
];
then
select_prefix
"$REPERTOIRE/wineprefix/$Prefix"
patch_homm
POL_SetupWindow_Close
exit
fi
POL_SetupWindow_install_wine
"1.1.29"
select_prefix
"$REPERTOIRE/wineprefix/$Prefix"
Set_OS winxp
POL_SetupWindow_textbox
"Your Memory Graphic ?"
"Memory Graphic"
VMS=
"$APP_ANSWER"
cd
"$WINEPREFIX/drive_c/windows/temp"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> OGL.reg
echo
"\\"
VideoMemorySize\\
"=\\"
$VMS\\
""
>> OGL.reg
regedit OGL.reg
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"Setup.exe"
wine $CDROM
/Setup
.exe
POL_SetupWindow_message
"$LNG_WAIT_END"
"$Prefix"
POL_SetupWindow_make_shortcut
"$Prefix"
"$PROGRAMFILES/Ubisoft/Heroes of Might and Magic V/bina1/"
"H5_Game.exe"
""
"$Title"
Set_WineVersion_Assign
"1.1.29"
"$Title"
POL_SetupWindow_Close
exit