#!/bin/bash
GAMENAME=
"Black And White 2"
PREFIX=
"blackwhite2"
NEEDEDWINEVERSION=
"1.2"
GAME_SETUP=
"setup.exe"
PROGRAMFILES=`wine cmd
/c
echo
"%ProgramFiles%"
`
PROGRAMFILES=${PROGRAMFILES:3}
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
POL_SetupWindow_Init
select_prefix
"$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"$GAME_SETUP"
cd
"$WINEPREFIX/dosdevices"
ln
-s
"$CDROM"
d:
cd
"$WINEPREFIX/drive_c/windows/temp/"
cat
<< EOF > cdrom.reg
[HKEY_LOCAL_MACHINE\\Software\\Wine\\Drives]
"d:"
=
"cdrom"
EOF
regedit cdrom.reg
cd
"$CDROM"
wine
"$GAME_SETUP"
PATCHING=
"TRUE"
while
[
"$PATCHING"
==
"TRUE"
] ;
do
POL_SetupWindow_question
"Please wait until installation complet !\n\nIt's recommended to patch the game to the version 1.2.\nDo you want to apply a patch?"
"$GAMENAME"
PATCHING=$APP_ANSWER
if
[
"$APP_ANSWER"
==
"TRUE"
] ;
then
POL_SetupWindow_browse
"Select the patch file to install"
"Patching $GAMENAME"
""
if
[
"$APP_ANSWER"
!=
""
] ;
then
POL_SetupWindow_wait_next_signal
"Patching $GAMENAME..."
wine
"$APP_ANSWER"
POL_SetupWindow_detect_exit
POL_SetupWindow_message
"$GAMENAME patched successfully"
"$GAMENAME"
fi
fi
done
POL_SetupWindow_menu_list
"How much memory do your graphic card have got?"
"$TYTUL"
"32-64-128-256-384-512-768-890-1024-2048"
"-"
"256"
VMS=
"$APP_ANSWER"
cd
"$WINEPREFIX/drive_c/windows/temp/"
cat
<< EOF > direct3d.reg
[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]
"VideoMemorySize"
=
"$VMS"
"Multisampling"
=
"enabled"
"OffscreenRenderingMode"
=
"backbuffer"
EOF
regedit direct3d.reg
POL_SetupWindow_install_wine
"$NEEDEDWINEVERSION"
Set_WineVersion_Assign
"$NEEDEDWINEVERSION"
"$GAMENAME"
POL_SetupWindow_make_shortcut
"$PREFIX"
"$PROGRAMFILES/Lionhead Studios/Black & White 2/"
"white.exe"
""
"$GAMENAME"
""
POL_SetupWindow_message
"$GAMENAME has been installed successfully"
"$GAMENAME"
POL_SetupWindow_Close
exit