Forums

Updated Bordlerlands script

probably done before

Auteur Réponses
PhoenixCMXIV Dimanche 20 Mars 2011 à 9:06
PhoenixCMXIVAnonymous

The List of games in the POL program has Borderlands. Freaking out, (never gotten it to work with wine before) I instantly tried to click it.

It would not install, because it required a wine version 1.2.2-Mousepatch.
The correct spelling has a capital P, as follows: 1.2.2-MousePatch

All i did was take the script from the website and change the required version.

Actually, I also fixed English grammar and some minor text issues. (not creating new line, text runs off the side.)

I also removed the signed key at the bottom.

This is my first post, and the actual script is credit to the original author. I do not accept full credit.



[code language=play on linux]#!/bin/bash
# Date : (2009-03-28 12-00)
# Last revision : (2011-03-07 21-00)
# Wine version used : 1.2.2-MousePatch
# Distribution used to test : Debian Testing (Linux Mint 10)
# Author : Berillions & GNU_Raziel (Edited by PhoenixCMXIV)
# Licence : Retail

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

TITLE="Borderlands"
PREFIX="Borderlands"
WORKING_WINE_VERSION="1.2.2-MousePatch"

if [ "$POL_LANG" == "fr" ]; then
LNG_CHOOSE_MEDIA="Quelle version possédez-vous?"
LNG_DVD="Version DVD"
LNG_STEAM="Version Steam Store"
LNG_DDV="Version Digital Download"
LNG_CHOOSE_DDV="Veuillez selectionner votre executable Digital Download de $TITLE"
LNG_INSERT_MEDIA="Veuillez insérer le disque $TITLE dans votre lecteur\\nsi ce n'est pas déja fait."
LNG_ACT="Veuillez suivre les instructions sur cette page :\\n\\nhttp://www.2kgames.com/borderlands/activation/\\n\\nCeci est necessaire pour installer correctement le jeu."
LNG_KILL_PROCESS="L'installation va se bloquer sur \\"Mise à jour de DirectX\\"/nPour continuer, veuillez cliquer sur \\"Suivant\\" UNIQUEMENT\\nà ce moment la sinon l'installation ne sera pas complète."
LNG_WAIT_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation du\\njeu sera terminée sous peine de devoir recommencer l'installation."
LNG_CHOOSE_VERSION="Quelle version possédez-vous ?"
LNG_NORMAL="Version normale"
LNG_GOTY="Version Game Of The Year"
LNG_WAIT_STEAM_END="Appuyez sur \\"Suivant\\" UNIQUEMENT quand l'installation de Steam et du jeu\\nsera terminée sous peine de devoir recommencer l'installation."
LNG_INSTALL_ON="Installation en cours..."
LNG_GAME_VMS="La taille de votre mémoire graphique?"
LNG_VMS_ERROR="Ce jeu ne fonctionnera correctement qu'avec une carte graphique ayant plus de 256Mo de mémoire."
LNG_SUCCES="$TITLE a été installé avec succès."
else
LNG_CHOOSE_MEDIA="Which version do you have?"
LNG_DVD="DVD Version"
LNG_STEAM="Steam Store Version"
LNG_DDV="Digital Download Version"
LNG_CHOOSE_DDV="Please select your $TITLE Digital Download executable"
LNG_INSERT_MEDIA="Please insert $TITLE media into your disk drive\\nif not already done."
LNG_ACT="Please follow the instruction in this page :\\n\\nhttp://www.2kgames.com/borderlands/activation/\\n\\nIt's necessary to install correctly the game."
LNG_KILL_PROCESS="Installation will hang at \\"Updating DirectX\\"\\nplease click \\"Forward\\" ONLY at this moment\\nor installation will not be complete."
LNG_WAIT_END="Click on \\"Forward\\" ONLY when the game installation is finished\\n or you will have to redo the installation."
LNG_CHOOSE_VERSION="Which version do you have ?"
LNG_NORMAL="Normal version"
LNG_GOTY="Game Of The Year version"
LNG_WAIT_STEAM_END="Click on \\"Forward\\" ONLY when Steam and the game installations have been finished,\\nor you will have to redo the installation."
LNG_INSTALL_ON="Installation in progress..."
LNG_GAME_VMS="How much memory does your Graphics Card have?"
LNG_VMS_ERROR="This game will work correctly only with a graphic card with more than 256Mb of memory."
LNG_SUCCES="$TITLE has been installed successfully."
fi

#starting the script
rm "$REPERTOIRE/tmp/*.jpg"
POL_SetupWindow_Init

POL_SetupWindow_presentation "$TITLE" "2K Games" "http://www.borderlandsthegame.com/" "Berillions & GNU_Raziel (PhoenixCMXIV)" "$PREFIX"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#downloading specific Wine
POL_SetupWindow_install_wine "$WORKING_WINE_VERSION"
Use_WineVersion "$WORKING_WINE_VERSION"

#fetching PROGRAMFILES environmental variable
POL_LoadVar_PROGRAMFILES

#Choose between DVD and Digital Download version
POL_SetupWindow_menu "$LNG_CHOOSE_MEDIA" "Actions" "$LNG_DVD~$LNG_STEAM~$LNG_DDV" "~"

if [ "$APP_ANSWER" == "$LNG_DVD" ]; then
     GAME_MEDIAVERSION="DVD"
elif [ "$APP_ANSWER" == "$LNG_STEAM" ]; then
     GAME_MEDIAVERSION="STEAM"
else
     GAME_MEDIAVERSION="DD"
fi

#Installing mandatory dependencies
if [ "$GAME_MEDIAVERSION" == "DVD" ]; then
     POL_Call POL_Install_vcrun2005
else
     POL_Call POL_Install_steam
fi
POL_Call POL_Install_vcrun2008
POL_Call POL_Install_d3dx9

if [ "$GAME_MEDIAVERSION" == "DVD" ]; then
     #asking for CDROM and checking if it's correct one
     POL_SetupWindow_message "$LNG_INSERT_MEDIA"
     POL_SetupWindow_cdrom
     POL_SetupWindow_check_cdrom "Setup.exe"
     POL_SetupWindow_message "$LNG_ACT" "$Title"
     #Mandatory activation for this game
     POL_SetupWindow_browse "Select file activation : Borderland-ManualReleaseDateCheck.exe" "$TITLE" ""
     wine start /unix "$APP_ANSWER"
     #resume Installation from DVD
     wine start /unix "$CDROM/Setup.exe"
     POL_SetupWindow_message "$LNG_KILL_PROCESS" "$TITLE"
     SETUP_PROCESS=`ps x | grep Setup.exe | grep -v grep | awk '{ print $1 }'`
     kill -9 $SETUP_PROCESS
elif [ "$GAME_MEDIAVERSION" == "STEAM" ]; then
     cd "$WINEPREFIX/drive_c/$PROGRAMFILES/Steam"
     POL_SetupWindow_menu "$LNG_CHOOSE_VERSION" "$TITLE" "$LNG_NORMAL~$LNG_GOTY" "~"
     if [ "$APP_ANSWER" == "$LNG_NORMAL" ]; then
          wine "Steam.exe" "-applaunch 8980"
     else
          wine "Steam.exe" "-applaunch 901566"
     fi
     POL_SetupWindow_message "$LNG_WAIT_STEAM_END" "$TITLE"
else
     #Asking then installing DDV of the game
     cd $HOME
     POL_SetupWindow_browse "$LNG_CHOOSE_DDV" "$TITLE"
     SETUP_EXE="$APP_ANSWER"
     POL_SetupWindow_wait_next_signal "$LNG_INSTALL_ON" "$TITLE"
     wine start /unix "$SETUP_EXE"
     INSTALL_ON="1"
     until [ "$INSTALL_ON" == "" ]; do
     sleep 5
     INSTALL_ON=`ps aux | grep "wineserver" | grep -v "grep"`
     done
     POL_SetupWindow_detect_exit
fi

#asking about memory size of graphic card
POL_SetupWindow_menu_list "$LNG_GAME_VMS" "$TITLE" "128-256-320-384-512-640-768-896-1024-1792-2048" "-" "256"
VMS="$APP_ANSWER"

cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
regedit vms.reg
if [ "$VMS" -lt "256" ]; then
     POL_SetupWindow_message "$LNG_VMS_ERROR" "$TITLE"
fi

#Fix for this game
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DirectInput]" > "$REPERTOIRE/tmp/Borderlands_Fix.reg"
echo "\\"MouseWarpOverride\\"=\\"force-box\\"" >> "$REPERTOIRE/tmp/Borderlands_Fix.reg"
echo "\\"Box-Pixels\\"=\\"5\\"" >> "$REPERTOIRE/tmp/Borderlands_Fix.reg"
regedit "$REPERTOIRE/tmp/Borderlands_Fix.reg"

## PlayOnMac Section
[ "$PLAYONMAC" == "" ] && Set_SoundDriver "alsa"
[ "$PLAYONMAC" == "" ] || 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 "$REPERTOIRE/tmp/"
     rm -rf "$REPERTOIRE/tmp/*"
fi

#making shortcut
POL_SetupWindow_auto_shortcut "$PREFIX" "Borderlands.exe" "$TITLE" "" ""
Set_WineVersion_Assign "$WORKING_WINE_VERSION" "$TITLE"

POL_SetupWindow_message "$LNG_SUCCES" "$TITLE"

POL_SetupWindow_Close
exit[/code]

Edité par PhoenixCMXIV

joeelmex Vendredi 22 Avril 2011 à 20:32
joeelmexAnonymous

I tried it today and cant get it to load. It installed correctly but when I try to run it nothing happens. Any way I can try to troubleshoot it some more?