@@ -1,130 +1,59 @@
#!/bin/bash
-# Date : (2010-18-03 21-00)
-# Last revision : (2011-08-19 21:00)
-# Wine version used : 1.3.15, 1.3.23, 1.3.27
-# Distribution used to test : Debian Testing x64
-# Author : GNU_Raziel
-# Licence : Retail
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
-TITLE="Dead Space 2"
-PREFIX="deadspace2"
-WORKING_WINE_VERSION="1.3.27"
-GAME_VMS="256"
-
-# Starting the script
-rm "$POL_USER_ROOT/tmp/*.jpg"
-POL_SetupWindow_Init
+TITLE="Dead Space II"
+PREFIX="DEAD_SPACE_II"
+EDITOR="Electronic Arts"
+AUTHOR="WARHEAD"
+GAME_VMS="512"
+EXECUTABLE="easetup.exe"
-# Starting debugging API
+POL_GetSetupImages "" "" "$TITLE"
+POL_SetupWindow_Init
POL_Debug_Init
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
-
-# Setting prefix path
+WORKING_WINE_VERSION="1.8.2"
POL_Wine_SelectPrefix "$PREFIX"
-
-# Downloading wine if necessary and creating prefix
-POL_System_SetArch "auto"
+POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+Set_SoundDriver "alsa"
+Set_SoundEmulDriver "Y"
+Set_OS "winxp"
-# Choose between DVD and Digital Download version
-POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
-
-# Installing mandatory dependencies
-if [ "$INSTALL_METHOD" == "STEAM" ]; then
- POL_Call POL_Install_steam
-fi
-POL_Call POL_Install_vcrun2008
-POL_Call POL_Install_dxfullsetup
-
-# Mandatory pre-install fix for steam
-POL_Call POL_Install_steam_flags "47780"
-
-# Begin game installation
+POL_SetupWindow_InstallMethod "DVD"
if [ "$INSTALL_METHOD" == "DVD" ]; then
- # Copy content of DVDs to HDD
- TEMP="$POL_USER_ROOT/tmp/$PREFIX"
- chmod -R 777 "$TEMP"
- rm -R "$TEMP"
- mkdir -p "$TEMP"
- cd "$WINEPREFIX/dosdevices"
- ln -s "$TEMP" d:
- # Asking for DVD-ROM and checking if it's correct one
- # DVD-ROM 1
- POL_SetupWindow_message "$(eval_gettext 'Please insert media 1 into your disk drive\nif not already done.')" "$TITLE"
- POL_SetupWindow_cdrom
- POL_SetupWindow_check_cdrom "DS2DAT0.DAT"
- POL_SetupWindow_wait_next_signal "$(eval_gettext 'Wait while the installation is prepared...')" "$TITLE"
- cp -r "$CDROM/*" "$TEMP"
- chmod -R 777 "$TEMP"
- # DVD-ROM 2
- POL_SetupWindow_message "$(eval_gettext 'Please insert media 2 into your disk drive\nif not already done.')" "$TITLE"
- POL_SetupWindow_cdrom
- POL_SetupWindow_check_cdrom "DS2DAT4.DAT"
- POL_SetupWindow_wait_next_signal "$(eval_gettext 'Wait while the installation is prepared...')" "$TITLE"
- cp -r "$CDROM/*" "$TEMP"
- chmod -R 777 "$TEMP"
- POL_Wine "d:\\Setup.exe"
- POL_Wine_WaitExit "$TITLE"
- # Relinking d: to $CDROM
- cd "$WINEPREFIX/dosdevices"
- rm ./d:
- ln -s "$CDROM" ./d:
-elif [ "$INSTALL_METHOD" == "STEAM" ]; then
- cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
- POL_Wine_WaitExit "$TITLE"
-else
- # Asking then installing DDV of the game
- cd "$HOME"
- POL_SetupWindow_browse "$(eval_gettext 'Please select the setup file to run:')" "$TITLE"
- SETUP_EXE="$APP_ANSWER"
- POL_Wine start /unix "$SETUP_EXE"
- POL_Wine_WaitExit "$TITLE"
+ POL_System_TmpCreate "$PREFIX"
+ cd "$POL_System_TmpDir"
+ chmod -R 777 "$POL_System_TmpDir"
+ rm -R "$POL_System_TmpDir"
+ mkdir -p "$POL_System_TmpDir"
+ POL_SetupWindow_message "$(eval_gettext 'Please insert media 1 into your disk drive\nif not already done.')" "$TITLE"
+ POL_SetupWindow_cdrom
+ POL_SetupWindow_check_cdrom "ds2dat0.dat"
+ POL_SetupWindow_wait_next_signal "$(eval_gettext 'Wait while the installation is prepared...')" "$TITLE"
+ cp -r "$CDROM"/* "$POL_System_TmpDir"
+ chmod -R 777 "$POL_System_TmpDir"
+ POL_Wine_WaitBefore "$TITLE"
+ # DVD-ROM 2
+ POL_SetupWindow_message "$(eval_gettext 'Please insert media 2 into your disk drive\nif not already done.')" "$TITLE"
+ POL_SetupWindow_cdrom
+ POL_SetupWindow_check_cdrom "ds2dat4.dat"
+ POL_SetupWindow_wait_next_signal "$(eval_gettext 'Wait while the installation is prepared...')" "$TITLE"
+ cp -r "$CDROM"/* "$POL_System_TmpDir"
+ chmod -R 777 "$POL_System_TmpDir"
+ POL_Wine_WaitBefore "$TITLE"
+ POL_Wine start /unix "$POL_System_TmpDir/$EXECUTABLE"
+ POL_Wine_WaitExit "$TITLE"
+ POL_System_TmpDelete
fi
-# Asking about memory size of graphic card
POL_SetupWindow_VMS $GAME_VMS
-
-## Fix for this game
-GAME_PATH=`find $WINEPREFIX -name "deadspace2.exe" | sed s/deadspace2.exe//g`
-touch "$GAME_PATH/joypad.txt"
-
-# Set Graphic Card information keys for wine
POL_Wine_SetVideoDriver
-
-# Sound problem fix - pulseaudio related
-[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
-[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
-## End Fix
-
-## PlayOnMac Section
-[ "$POL_OS" = "Mac" ] && Set_Managed "Off"
-## End Section
-
-# Cleaning temp
-if [ -e "$WINEPREFIX/drive_c/windows/temp/" ]; then
- rm -rf "$WINEPREFIX/drive_c/windows/temp/*"
- chmod -R 777 "$POL_USER_ROOT/tmp/"
- rm -rf "$POL_USER_ROOT/tmp/*"
-fi
-
-# Making shortcut
-if [ "$INSTALL_METHOD" == "STEAM" ]; then
-else
- POL_Shortcut "deadspace2.exe" "$TITLE" "$TITLE.png" ""
-fi
-
-# Game protection warning
-if [ "$INSTALL_METHOD" == "DVD" ]; then
- POL_SetupWindow_message "$(eval_gettext 'You must disable anti-piracy protections of this game\nif you want to play it with wine.')" "$TITLE"
-fi
+POL_Wine_reboot
+POL_Shortcut "deadspace2.exe" "Dead Space II"
POL_SetupWindow_Close
exit 0
\ No newline at end of file