#!/bin/bash
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
TITLE="Batman Arkham City"
PREFIX="BatmanAC"
WORKING_WINE_VERSION="1.5.3-xliveless2-rawinput3"
EDITOR="Rocksteady"
AUTHOR="GNU_Raziel"
GAME_VMS="256"
POL_SetupWindow_Init
POL_Debug_Init
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
POL_Wine_SelectPrefix "$PREFIX"
POL_System_SetArch "x86"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
POL_SetupWindow_InstallMethod "DVD,STEAM,LOCAL"
if [ "$INSTALL_METHOD" == "STEAM" ]; then
POL_Call POL_Install_steam
STEAM_ID="57400"
fi
POL_Call POL_Install_vcrun2005
POL_Call POL_Install_dxfullsetup
POL_Call POL_Install_physx
POL_Call POL_Install_dotnet35
POL_SetupWindow_VMS $GAME_VMS
POL_Wine_SetVideoDriver
[ "$POL_OS" = "Linux" ] && Set_SoundDriver "alsa"
[ "$POL_OS" = "Linux" ] && Set_SoundEmulDriver "Y"
cd "$WINEPREFIX/drive_c/windows/system32/"
cp xlive.dll xlive2.dll
if [ "$INSTALL_METHOD" == "DVD" ]; then
POL_SetupWindow_message "$(eval_gettext 'Please select the setup file to run')" "$TITLE"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "autorun.exe"
POL_Wine start /unix "$CDROM/autorun.exe"
POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" == "STEAM" ]; then
POL_Call POL_Install_steam_flags "$STEAM_ID"
POL_Shortcut "steam.exe" "Steam ($TITLE)" "" ""
POL_SetupWindow_message "$(eval_gettext 'When $TITLE download by Steam is finished,\nDo NOT click on Play.\n\nClose COMPLETELY the Steam interface, \nso that the installation script can continue')" "$TITLE"
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
POL_Wine start /unix "steam.exe" steam://install/$STEAM_ID
POL_Wine_WaitExit "$TITLE"
else
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"
fi
POL_Call POL_Remove_gfwl
cd "$WINEPREFIX/drive_c/windows/system32/"
cp xlive2.dll xlive.dll
if [ "$INSTALL_METHOD" != "STEAM" ]; then
POL_Shortcut "BmLauncher.exe" "$TITLE" "" ""
fi
POL_SetupWindow_message "$(eval_gettext 'You must disable anti-piracy protections of this game\nif you want to play it with wine')" "$TITLE"
POL_SetupWindow_Close
exit 0