#!/bin/bash
if [ "$PLAYONLINUX" = "" ]then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
patch()
{
cd $HOME
POL_SetupWindow_browse "Please select the patch file" "Patch selection" ""
wine "$APP_ANSWER"
}
cfg_check
POL_SetupWindow_Init
select_prefixe "$REPERTOIRE/wineprefix/DeltaForce"
POL_SetupWindow_prefixcreate
POL_SetupWindow_install_wine "1.1.6"
Set_GLSL "On"
Set_OS "win98"
Set_DXGrab "On"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "dfsetup/setup.exe"
POL_SetupWindow_wait_next_signal "Installation in progress..." "Delta Force"
wine $CDROM/dfsetup/setup.exe
sleep 10
POL_SetupWindow_detect_exit
POL_SetupWindow_make_shortcut "DeltaForce" "Program Files/NovaLogic/Delta Force" "Df.exe" "" "Delta Force"
Set_WineVersion_Assign "1.1.6" "Delta Force"
POL_SetupWindow_menu "How do you want to run the game?" "Windowed or Full Screen" "Full Screen/Windowed (Recommended to avoid display resolution problems)" "/"
if [ "$APP_ANSWER" = "Windowed (Recommended to avoid display resolution problems)"]; then
Set_Desktop "On" "800" "600"
elif [ "$APP_ANSWER" = "Full Screen"]; then
Set_Desktop "Off"
fi
POL_SetupWindow_question "Do you have a post-installation patch you'd like to install?" "Post-installation patch"
if [ "$APP_ANSWER" = "TRUE" ]; then
patch
fi
POL_SetupWindow_reboot
POL_SetupWindow_Close
exit