Magic number : 2
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
cfg_check
if [ "$POL_LANG" == "fr" ]; then
LNG_WAIT_CP="Patientez pendant la préparation de l'installation..."
LNG_WAIT_END="Appuyez sur \"Suivant\" UNIQUEMENT quand l'installation du jeu sera terminée\nsous peine de devoir recommencer l'installation."
else
LNG_WAIT_CP="Wait while the installation is prepared..."
LNG_WAIT_END="Click on \"Next\" ONLY when the game installation is finished\nor you will have to redo the installation."
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/maxpayne2/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "Max Payne 2 : The Fall of Max Payne" "Take 2 Interactive" "http://www.rockstargames.com/maxpayne2" "GNU_Raziel" "MaxPayne2"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
TEMP="$HOME/.PlayOnLinux/tmp/MaxPayne2"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir -p $TEMP
select_prefixe "$REPERTOIRE/wineprefix/MaxPayne2/"
POL_SetupWindow_prefixcreate
cd $WINEPREFIX/drive_c/windows/
mkdir temp
cd $WINEPREFIX/dosdevices
rm ./*
ln -s ../drive_c c:
ln -s / z:
ln -s $TEMP d:
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "Max Payne 2 : The Fall of Max Payne"
cp -r $CDROM/* $TEMP
chmod 777 $TEMP -R
mv $TEMP/autorun.inf $TEMP/autorun1.inf
## CD-ROM 2
POL_SetupWindow_cdrom
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "Max Payne 2 : The Fall of Max Payne"
cp -r $CDROM/* $TEMP
chmod 777 $TEMP -R
## CD-ROM 3
POL_SetupWindow_cdrom
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "Max Payne 2 : The Fall of Max Payne"
cp -r $CDROM/* $TEMP
chmod 777 $TEMP -R
Set_OS "winxp"
wine d:\\Setup.exe
POL_SetupWindow_message "$LNG_WAIT_END" "Max Payne 2 : The Fall of Max Payne"
Set_Managed "On"
Set_DXGrab "On"
POL_SetupWindow_reboot
chmod 777 $TEMP -R
rm $TEMP -R
cd $WINEPREFIX/dosdevices
rm ./d:
ln -s $CDROM ./d:
POL_SetupWindow_make_shortcut "MaxPayne2" "Program Files/Rockstar Games/Max Payne 2" "MaxPayne2.exe" "MaxPayne2.xpm" "Max Payne 2 : The Fall of Max Payne"
POL_SetupWindow_Close
exit