#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
Title=
"Borderlands"
Prefix=
"Borderlands"
if
[
"$POL_LANG"
==
"fr"
];
then
LNG_MEM=
"La taille de votre mémoire graphique?"
LNG_WAIT_END=
"Appuyez sur \\"
Suivant\\
" UNIQUEMENT quand l'installation du jeu sera\\nterminée sous peine de devoir recommencer l'installation."
LNG_DVD=
"Le DVD est necessaire pour jouer à Borderlands"
else
LNG_MEM=
"How much memory do your graphic card have got?"
LNG_WAIT_END=
"Click on \\"
Next\\" ONLY when the game installation
is finished or you will have to redo the installation."
LNG_DVD=
"The DVD is necessary to play at this game"
fi
cd
"$REPERTOIRE/tmp"
rm
*.jpg
wget http:
//upload
.wikimedia.org
/wikipedia/en/0/01/Borderlandscover
.jpg --output-document=
"$REPERTOIRE/tmp/$Prefix.jpg"
convert
"$REPERTOIRE/tmp/$Prefix.jpg"
-scale 150x356\\!
"$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_Init
""
"$REPERTOIRE/tmp/left.jpg"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"Setup.exe"
POL_SetupWindow_install_wine
"1.1.32"
select_prefix
"$REPERTOIRE/wineprefix/$Prefix"
POL_SetupWindow_prefixcreate
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
POL_SetupWindow_message_image
"$LNG_ACT"
"$Title Offline activation"
"$PLAYONLINUX/themes/tango/warning.png"
POL_SetupWindow_browse
"Select file activation : BordelandsOfflineInstaller.exe"
"$Title"
""
wine
"$APP_ANSWER"
cd
"$REPERTOIRE/ressources"
if
[
"`sha1sum < winetricks | sed 's/ .*//'`"
!=
"e71457524b2f9a0c81369745ea9018d9278565b2"
];
then
wget http:
//winezeug
.googlecode.com
/svn/trunk/winetricks
--output-document=winetricks
fi
cd
"$REPERTOIRE/ressources"
POL_SetupWindow_wait_next_signal
"Installing DirectX libraries..."
"$Title"
bash
winetricks d3dx9
POL_SetupWindow_detect_exit
POL_SetupWindow_menu
"$LNG_MEM"
"$Title"
"32-64-128-256-384-512-768-896-1024-2048"
"-"
"128"
VMS=
"$APP_ANSWER"
if
[
"$VMS"
-lt
"128"
];
then
POL_SetupWindow_message_image
"$LNG_VMS_ERROR"
"$Title"
"$PLAYONLINUX/themes/tango/warning.png"
fi
cd
"$WINEPREFIX/drive_c/windows/temp"
echo
"[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]"
> OGL.reg
echo
"\\"
VideoMemorySize\\
"=\\"
$VMS\\
""
>> OGL.reg
regedit OGL.reg
Set_OS winxp
wine
"$CDROM/Setup.exe"
POL_SetupWindow_message
"$LNG_WAIT_END"
"$Title"
convert
"$CDROM/Borderlands.ico"
-geometry 32x32
"$REPERTOIRE/icones/32/$Title"
POL_SetupWindow_make_shortcut
"$Prefix"
"$PROGRAMFILES/2K Games/Gearbox Software/Borderlands/Binaries"
"Borderlands.exe"
""
"$Title"
Set_WineVersion_Assign
"1.1.32"
"$Title"
POL_SetupWindow_message
"$LNG_DVD"
"$Title"
POL_SetupWindow_Close
exit