Magic number : 101
#!/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..."
else
LNG_WAIT_CP="Wait while the installation is prepared..."
fi
cd $REPERTOIRE/tmp
rm *.jpg
wget $SITE/setups/etherlords2/left.jpg
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_presentation "Etherlords 2" "Dreamcatcher" "http://www.etherlords.com/" "GNU_Raziel" "Etherlords2"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"
select_prefixe "$REPERTOIRE/wineprefix/Etherlords2/"
POL_SetupWindow_prefixcreate
TEMP="$REPERTOIRE/tmp/Etherlords2"
chmod 777 $TEMP -R
rm $TEMP -R
mkdir -p $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" "Etherlords 2"
cp -r $CDROM/* $TEMP
chmod 777 $TEMP -R
## CD-ROM 2
POL_SetupWindow_cdrom
POL_SetupWindow_wait_next_signal "$LNG_WAIT_CP" "Etherlords 2"
cp -r $CDROM/* $TEMP
chmod 777 $TEMP -R
Set_OS "winxp"
wine d:\\Setup.exe
POL_SetupWindow_reboot
cd $WINEPREFIX/dosdevices
rm ./d:
ln -s $CDROM ./d:
echo "[HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides]" > $REPERTOIRE/tmp/dlloverrides.reg
echo "\"msxml3\"=\"native,builtin\"" >> $REPERTOIRE/tmp/dlloverrides.reg
regedit $REPERTOIRE/tmp/dlloverrides.reg
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/etherlords2.reg
echo "\"DirectDrawRenderer\"=\"opengl\"" >> $REPERTOIRE/tmp/etherlords2.reg
echo "\"opengl\"=\"enabled\"" >> $REPERTOIRE/tmp/etherlords2.reg
echo "\"RenderTargetLockMode\"=\"auto\"" >> $REPERTOIRE/tmp/etherlords2.reg
echo "\"UseGLSL\"=\"enabled\"" >> $REPERTOIRE/tmp/etherlords2.reg
regedit $REPERTOIRE/tmp/etherlords2.reg
rm $REPERTOIRE/tmp/dlloverrides.reg
rm -rf $TEMP
POL_SetupWindow_make_shortcut "Etherlords2" "Program Files/Strategy First/Etherlords II/" "Etherlords2.exe" "Etherlords2.xpm" "Etherlords 2"
POL_SetupWindow_Close
exit