#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
source
"$PLAYONLINUX/lib/sources"
POL_SetupWindow_Init
POL_SetupWindow_presentation
"Temple of Elemental Evil"
"Dolanor"
"http://launchpad.net/~dolanor"
"Dolanor"
"toee"
export
TOEEPREFIX=
"$HOME/.PlayOnLinux/wineprefix/toee/"
select_prefix
"$TOEEPREFIX"
POL_SetupWindow_prefixcreate
POL_SetupWindow_message
"Please Insert CD1"
"Insert CD1"
POL_SetupWindow_cdrom
echo
"CDROM=\\"
$CDROM\\
""
POL_SetupWindow_check_cdrom
"TOEE.DAT"
POL_SetupWindow_wait_next_signal
"Please wait while the setup program copies CD1 data"
"Waiting..."
echo
"Copying the files of CD1"
export
TMP_COPY_CD1_DIR=
"$HOME/.PlayOnLinux/tmp/toee/CD1/"
mkdir
-p $TMP_COPY_CD1_DIR
OLDIFS=
"$IFS"
IFS="
"
for
i
in
$(
ls
"$CDROM/"
)
do
echo
"Copying "
$i
" ..."
cp
-fr
"$CDROM/$i"
"$TMP_COPY_CD1_DIR"
done
IFS=
"$OLDIFS"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"Please Insert CD2"
"Insert CD2"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"data3.cab"
echo
"CDROM=\\"
$CDROM\\
""
POL_SetupWindow_wait_next_signal
"Please wait while the setup program copies CD2 data"
"Waiting..."
echo
"Copying the files of CD2"
export
TMP_COPY_CD2_DIR=
"$HOME/.PlayOnLinux/tmp/toee/CD2/"
mkdir
-p $TMP_COPY_CD2_DIR
IFS="
"
ls
"$CDROM/"
for
i
in
$(
ls
"$CDROM/"
)
do
echo
"Copying "
$i
" ..."
cp
-fr
"$CDROM/$i"
"$TMP_COPY_CD2_DIR"
done
IFS=
"$OLDIFS"
POL_SetupWindow_detect_exit
POL_SetupWindow_wait_next_signal
"Please wait while the game installs. INSTALL IN THE DEFAULT DIRECTORY"
"Waiting..."
wine
"$TMP_COPY_CD1_DIR/setup.exe"
echo
"Switching audio to OSS"
Set_SoundDriver oss
cd
"$TOEEPREFIX/drive_c/Program Files/Atari/Temple of Elemental Evil/"
echo
"Moving movies that cannot play to avoid bug at launching game"
mv
"data/movies"
"data/buggymovies"
POL_SetupWindow_detect_exit
echo
"Suppressing temp files"
chmod
-R +w $(
dirname
$TMP_COPY_CD1_DIR)
rm
-rf $(
dirname
$TMP_COPY_CD1_DIR)
POL_SetupWindow_Close
exit
0