@@ -1,10 +1,12 @@
#!/bin/bash
# Date : (2009-03-28 12-00)
-# Last revision : (2011-08-12 15:26)
-# Wine version used : 1.2.2-MousePatch, 1.3.26
-# Distribution used to test : Debian Testing x64
-# Author : Berillions & GNU_Raziel
-# Licence : Retail
+# Last revision : (2017-05-27 10-28)
+# Wine version used : 2.0.1
+# Distribution used to test : Manjaro Linux x64
+# Author : Berillions & GNU_Raziel, Pavello
+# Script licence :
+# Program Licence : Retail
+# Depend :
[ "$PLAYONLINUX" = "" ] && exit 0
@@ -12,17 +14,20 @@
TITLE="Borderlands"
PREFIX="Borderlands"
-WORKING_WINE_VERSION="1.3.26"
+EDITOR="Gearbox Software"
+AUTHOR="Berillions, GNU_Raziel, Pavello"
+WORKING_WINE_VERSION="2.0.1"
GAME_VMS="256"
# Starting the script
-rm "$POL_USER_ROOT/tmp/*.jpg"
POL_SetupWindow_Init
# Starting debugging API
POL_Debug_Init
+POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"
# Setting prefix path
POL_Wine_SelectPrefix "$PREFIX"
@@ -31,94 +36,78 @@
POL_System_SetArch "auto"
POL_Wine_PrefixCreate "$WORKING_WINE_VERSION"
+# Asking about memory size of graphic card
+POL_SetupWindow_VMS $GAME_VMS
+
+# Set Graphic Card information keys for wine
+POL_Wine_SetVideoDriver
+
# 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
+Set_OS "win7"
POL_Call POL_Install_vcrun2008
POL_Call POL_Install_dxfullsetup
+POL_Call POL_Install_physx
+
+if [ "$INSTALL_METHOD" == "STEAM" ]; then
+ POL_Call POL_Install_steam
+ STEAM_ID="8980"
+fi
# Begin game installation
if [ "$INSTALL_METHOD" == "DVD" ]; then
- # Asking for CDROM and checking if it's correct one
- POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\nif not already done.')"
- POL_SetupWindow_cdrom
- POL_SetupWindow_check_cdrom "Setup.exe"
- # Mandatory activation for this game
- POL_SetupWindow_browse "$(eval_gettest 'Select file activation : Borderland-ManualReleaseDateCheck.exe')" "$TITLE" ""
- POL_Wine start /unix "$APP_ANSWER"
- PPOL_Wine_WaitExit "Manual Activation"
- # Resume Installation from DVD
- POL_Wine start /unix "$CDROM/Setup.exe"
- POL_Wine_WaitExit "$TITLE"
+ # Asking for CDROM and checking if it's correct one
+ POL_SetupWindow_message "$(eval_gettext 'Please insert game media into your disk drive\nif not already done.')"
+ POL_SetupWindow_cdrom
+ POL_SetupWindow_check_cdrom "Setup.exe"
+ # Mandatory activation for this game
+ POL_SetupWindow_browse "$(eval_gettest 'Select file activation : Borderland-ManualReleaseDateCheck.exe')" "$TITLE" ""
+ POL_Wine start /unix "$APP_ANSWER"
+ PPOL_Wine_WaitExit "Manual Activation"
+ # Resume Installation from DVD
+ POL_Wine start /unix "$CDROM/Setup.exe"
+ POL_Wine_WaitExit "$TITLE"
elif [ "$INSTALL_METHOD" == "STEAM" ]; then
- cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
- POL_SetupWindow_menu "$(eval_gettext 'Which version do you have?')" "$TITLE" "$(eval_gettext 'Normal version')~$(eval_gettext 'Game Of The Year version')" "~"
- if [ "$APP_ANSWER" == "$(eval_gettext 'Normal version')" ]; then
- # Mandatory pre-install fix for steam
- POL_Call POL_Install_steam_flags "8980"
-
- POL_Wine_WaitExit "$TITLE"
- STEAM_VERSION="1"
- else
- # Mandatory pre-install fix for steam
- POL_Call POL_Install_steam_flags "901566"
-
- POL_Wine_WaitExit "$TITLE"
- STEAM_VERSION="2"
- fi
+ # Mandatory pre-install fix for Steam
+ POL_Call POL_Install_steam_flags "$STEAM_ID"
+ # Steam install
+ 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_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"
+ # 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"
fi
-
-# Asking about memory size of graphic card
-POL_SetupWindow_VMS $GAME_VMS
-
-## Fix for this game
-# Set Graphic Card informations 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
-
+
## Begin Common 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/*"
+ 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
- if [ "$STEAM_VERSION" == "1" ]; then
- else
- fi
else
- POL_Shortcut "Borderlands.exe" "$TITLE" "" ""
+ POL_Shortcut "Borderlands.exe" "$TITLE" "" ""
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"
+ 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_SetupWindow_Close
exit 0
\ No newline at end of file