#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
if [ "$POL_LANG" == "fr" ]; then
LNG_DX9_DL="Téléchargement de la mise a jour DirectX9.0c pour Wine..."
LNG_DX9_INSTALL="L'installation de la mise a jour DirectX9.0c pour Wine va débuter."
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera\nterminée sous peine de devoir recommencer l'installation."
else
LNG_DX9_DL="Downloading Wine DirectX9.0c Update..."
LNG_DX9_INSTALL="DirectX9.0c Update installation will begin."
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation\nis finished or you will have to redo the installation."
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/darkmessiah/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "Dark Messiah Of Might And Magic" "Arkane Studios" "http://www.mightandmagic.com/fr" "GNU_Raziel" "DarkMessiahOfMightAndMagic"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "Disk1/setup.exe"
select_prefixe "$REPERTOIRE/wineprefix/DarkMessiahOfMightAndMagic/"
POL_SetupWindow_prefixcreate
if [ ! -e $REPERTOIRE/ressources/ ]; then
mkdir -p $REPERTOIRE/ressources/
fi
if [ ! -e $REPERTOIRE/ressources/D3DX9_XX_dll_\(32Bit_All\).zip ]; then
POL_SetupWindow_download "$LNG_DX9_DL" "Dark Messiah Of Might And Magic" "http://mulx.net/file_pol/D3DX9_XX_dll_(32Bit_All).zip"
fi
cd $WINEPREFIX/drive_c/windows/temp/D3DX9_XX_dll_\(32Bit_All\).zip
unzip $REPERTOIRE/ressources/
POL_SetupWindow_message "$LNG_DX9_INSTALL" "Dark Messiah Of Might And Magic"
Set_OS "winxp"
wine c:\\windows\\temp\\D3DX9_XX_dll_\(32Bit_All\)\\Install\\DXSETUP.exe
wine d:\\Disk1\\setup.exe
POL_SetupWindow_message "$LNG_WAIT_END" "Dark Messiah Of Might And Magic"
Set_Managed "On"
Set_DXGrab "On"
POL_SetupWindow_reboot
POL_SetupWindow_make_shortcut "DarkMessiahOfMightAndMagic" "Program Files/Ubisoft/Dark Messiah of Might and Magic" "mm.exe" "DarkMessiahOfMightAndMagic.xpm" "Dark Messiah Of Might And Magic"
POL_SetupWindow_Close
exit