#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
presentation "Prince Of Persia - Sands Of Time" "Ubisoft" "http://www.princeofpersiagame.com/index.php" "GNU_Raziel" "PoP-SandsOfTime" 1 10
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
LNG_DX9_DL="Téléchargement de la mise a jour DirectX9.0c pour Wine..."
LNG_XINPUT_DL="Téléchargement de la mise a jour Xinput et XACT pour Wine..."
LNG_DX9_INSTALL="L'installation de la mise a jour DirectX9.0c pour Wine va débuter."
LNG_XINPUT_INSTALL="L'installation de la mise a jour Xinput et XACT pour Wine va débutée."
LNG_WAIT_END="Appuyez sur "Suivant" UNIQUEMENT quand l'installation du jeu sera terminée sous peine de devoir recommencer l'installation."
else
LNG_DX9_DL="Downloading Wine DirectX9.0c Update..."
LNG_XINPUT_DL="Downloading Wine Xinput and XACT Update..."
LNG_DX9_INSTALL="DirectX9.0c Update installation will begin."
LNG_XINPUT_INSTALL="Xinput and XACT installation will begin."
LNG_WAIT_END="Click on "Next" ONLY when the game installation is finished or you will have to redo the installation."
fi
Ask_For_cdrom 2 10
Check_cdrom "setup.exe"
TEMP="$HOME/.PlayOnLinux/tmp/PoP-SandsOfTime"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir $TEMP
mkdir -p $REPERTOIRE/wineprefix/PoP-SandsOfTime
cd $REPERTOIRE/wineprefix/PoP-SandsOfTime
select_prefixe "$(pwd)"
creer_prefixe 3 10
cd $WINEPREFIX/drive_c/windows/
mkdir temp
cd $WINEPREFIX/dosdevices
ln -sf $TEMP ./d:
attendre "Patientez pendant la préparation de l'installation ..." "cp -r $CDROM/* $TEMP" "" 4 10
chmod 777 $TEMP -R
ask_mount_num 2
attendre "Patientez pendant la préparation de l'installation ..." "cp -r $CDROM/* $TEMP" "" 5 10
chmod 777 $TEMP -R
cd $REPERTOIRE/tmp/
if [ ! -e $REPERTOIRE/tmp/D3DX9_dll_update.zip ]; then
telecharger "$LNG_DX9_DL" http://www.threelights.de/page/projects/d3dx9_xx_dll_files/D3DX9_dll_update.zip "" 6 10
fi
if [ ! -e $REPERTOIRE/tmp/X_dll_update.zip ]; then
telecharger "$LNG_XINPUT_DL" http://www.threelights.de/page/projects/d3dx9_xx_dll_files/X_dll_update.zip "" 7 10
fi
cd $WINEPREFIX/drive_c/windows/temp/
unzip $REPERTOIRE/tmp/D3DX9_dll_update.zip
unzip $REPERTOIRE/tmp/X_dll_update.zip
message "$LNG_DX9_INSTALL" "" 8 10
Set_OS "winxp"
wine c:\\windows\\temp\\D3DX9_dll_update\\Install\\DXSETUP.exe
message "$LNG_XINPUT_INSTALL" "" 9 10
wine c:\\windows\\temp\\X_dll_update\\Install\\DXSETUP.exe
wine d:\\setup.exe
message "$LNG_WAIT_END" "" 10 10
Set_Managed "On"
Set_DXGrab "On"
Set_GLSL "On"
cd $WINEPREFIX/dosdevices
rm ./d:
ln -s $CDROM ./d:
rm -rf $TEMP
simuler_reboot
rm -rf $WINEPREFIX/drive_c/windows/temp/*
if [ "$POL_LANG" == "fr_FR.UTF-8" ]; then
creer_lanceur "PoP-SandsOfTime" "Program Files/UBISOFT/Prince of Persia Les Sables du Temps" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "Prince Of Persia - Les Sables Du Temps"
else
creer_lanceur "PoP-SandsOfTime" "Program Files/UBISOFT/Prince of Persia Sands of Time" "PrinceOfPersia.EXE" "PoP-SandsOfTime.xpm" "Prince Of Persia - Sands Of Time"
fi
end_install
exit