#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"RollerCoaster Tycoon 3"
PREFIX=
"RCT3"
WORKING_WINE_VERSION=
"1.2.3"
LNG_GAME_VMS=
"How much memory does your graphics board have?"
LNG_SUCCES=
"$TITLE has been installed successfully."
rm
"$POL_USER_ROOT/tmp/*.jpg"
POL_SetupWindow_InitWithoutImages
POL_Wine_SelectPrefix
"$PREFIX"
POL_System_SetArch
"auto"
POL_Wine_PrefixCreate
"$WORKING_WINE_VERSION"
POL_SetupWindow_InstallMethod
"DVD"
POL_Call
POL_Install_d3dx10
POL_Call
POL_Install_d3dx11
POL_Call
POL_Install_d3dx9
POL_Call
POL_Install_devenum
POL_Call
POL_Install_dinput
POL_Call
POL_Install_dinput8
POL_Call
POL_Install_directmusic
POL_Call
POL_Install_directplay
POL_Call
POL_Install_directx9
POL_Call
POL_Install_dotnet20
POL_Call
POL_Install_dsound
POL_Call
POL_Install_dxfullsetup
POL_Call
POL_Install_quartz
POL_Call
POL_Install_wmpcodecs
if
[
"$INSTALL_METHOD"
==
"DVD"
];
then
POL_SetupWindow_message
"$(eval_gettext 'Please insert game media into your disk drive\\nif not already done.')"
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"BlackOps.ico"
POL_Wine
start
/unix
"$CDROM/Setup.exe"
POL_SetupWindow_message
"$(eval_gettext 'Click on "
Forward
" ONLY when the game installation is finished\\nor you will have to redo the installation.')"
"$TITLE"
fi
POL_SetupWindow_menu_list
"$LNG_GAME_VMS"
"$TITLE"
"64-128-256-320-384-512-640-768-896-1024-1536-1792-2048-3072-4096"
"-"
"256"
VMS=
"$APP_ANSWER"
cd
"$WINEPREFIX/drive_c/windows/temp/"
cat
<< EOF > vms.reg
[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]
"VideoMemorySize"
=
"$VMS"
EOF
regedit vms.reg
if
[
"$VMS"
-lt
"256"
];
then
POL_SetupWindow_message
"$LNG_VMS_ERROR"
"$TITLE"
fi
if
[
"$PLAYONMAC"
==
""
];
then
VGA_ID1=`lspci |
grep
VGA |
awk
'{ print $1 }'
|
head
-n 1`
VGA_ID2=`lspci -n |
grep
$VGA_ID1 |
awk
'{ print $3 }'
`
VendorID=`
echo
$VGA_ID2 |
awk
-F:
'{ print $1 }'
`
DeviceID=`
echo
$VGA_ID2 |
awk
-F:
'{ print $2 }'
`
cd
"$WINEPREFIX/drive_c/windows/temp/"
if
[
"$VendorID"
==
"10de"
];
then
drvID=
"nv4_disp.dll"
elif
[
"$VendorID"
==
"1002"
];
then
drvID=
"ati2dvag.dll"
elif
[
"$VendorID"
==
"8086"
];
then
drvID=
"ig4icd32.dll"
else
drvID=
"vga.dll"
fi
cat
<< EOF >
"$POL_USER_ROOT/tmp/VGA_ID_fix.reg"
[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]
"VideoPCIVendorID"
=
"dword:0000$VendorID"
"VideoPCIDeviceID"
=
"dword:0000$DeviceID"
"VideoDriver"
=
"$drvID"
EOF
regedit
"$POL_USER_ROOT/tmp/VGA_ID_fix.reg"
fi
POL_Call
POL_Function_OverrideDLL
""
"mmdevapi"
[
"$PLAYONMAC"
==
""
] && Set_SoundDriver
"alsa"
[
"$PLAYONMAC"
==
""
] && Set_SoundEmulDriver
"Y"
[
"$PLAYONMAC"
==
""
] || Set_Managed
"Off"
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/*"
fi
POL_SetupWindow_auto_shortcut
"$PREFIX"
"RCT3.exe"
"$TITLE"
""
Set_WineVersion_Assign
"$WORKING_WINE_VERSION"
"$TITLE"
POL_SetupWindow_message
"$LNG_SUCCES"
"$TITLE"
POL_SetupWindow_Close
exit