#!/bin/bash
[
"$PLAYONLINUX"
=
""
] &&
exit
0
source
"$PLAYONLINUX/lib/sources"
TITLE=
"Need For Speed Carbon"
PREFIX=
"NFSCarbon"
WORKING_WINE_VERSION=
"1.3.12"
POL_SetupWindow_Init
POL_SetupWindow_presentation
"$TITLE"
"EA Games"
""
"N/A"
"$PREFIX"
select_prefix
"$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_install_wine
"$WORKING_WINE_VERSION"
Use_WineVersion
"$WORKING_WINE_VERSION"
POL_LoadVar_PROGRAMFILES
Choose between DVD and Digital Download version
POL_SetupWindow_menu
"What version do you have?"
"Actions"
"DVD~Digital Download"
"~"
if
[
"$APP_ANSWER"
==
"DVD"
];
then
GAME_MEDIAVERSION=
"DVD"
else
GAME_MEDIAVERSION=
"DD"
fi
POL_Call
POL_Install_vcrun2005
POL_Call
POL_Install_vcrun2008
POL_Call
POL_Install_dotnet20
POL_Call
POL_Install_d3dx9
if
[
"$GAME_MEDIAVERSION"
==
"DVD"
];
then
POL_SetupWindow_message
"Please insert $TITLE media into your DVD drive\\nif not already done."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom
"AutoRun.exe"
wine start
/unix
"$CDROM/AutoRun.exe"
POL_SetupWindow_message
"Click on \\"
Next\\
" ONLY when the game installation is finished\\nor you will have to redo the installation."
"$TITLE"
else
cd
$HOME
POL_SetupWindow_browse
"Please select your $TITLE Digital Download executable"
"$TITLE"
SETUP_EXE=
"$APP_ANSWER"
wine start
/unix
"$SETUP_EXE"
POL_SetupWindow_message
"Click on \\"
Next\\
" ONLY when the game installation is finished\\nor you will have to redo the installation."
"$TITLE"
fi
POL_SetupWindow_menu_list
"How much memory does your graphics board have?\\n(minimum for this game : 128)"
"$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
"128"
];
then
POL_SetupWindow_message
"This game will work correctly only with a graphic card with more than 128Mb of memory."
"$TITLE"
fi
POL_SetupWindow_question
"Do you want to play with widescreen resoution?\\nIf yes Universal Widescreen Patcher will be downloaded\\n\\n\\nWidescreen How-To:\\n * unzip is required\\n * Select $TITLE location\\n * Enter desidered resolution\\n * In game select 640x480 resolution - it will be your desidered resolution"
"Widescreen"
if
[ $APP_ANSWER ==
"TRUE"
];
then
POL_SetupWindow_message
"Please wait while Universal Widescreen Patcher is being downloaded (~300kb)."
"$TITLE"
mkdir
-p $WINEPREFIX
/drive_c/windows/temp
cd
$WINEPREFIX
/drive_c/windows/temp
wget http:
//www
.widescreengamingforum.com
/downloads/uniws
.zip
unzip uniws.zip
echo
-e
"THE INI IS BELOW \\n[Apps] \\nversion=1.03 \\n\\na0=Need For Speed Carbon\\n\\n\\n[Need For Speed Carbon] \\ndetails=Select the 640x480 resolution in game to use your custom resolution. \\ncheckfile=nfsc.exe \\nmodfile=nfsc.exe \\nsig=80020000C701E0010000 \\nsigwild=0000110000 \\nxoffset=0 \\nyoffset=6 \\noccur=1\\n"
> patches.ini
wine start
/unix
uniws.exe
POL_SetupWindow_message
"Widescreen How-To:\\n * unzip is required\\n * Select $TITLE location (DO NOT CHOOSE: FIND IT FOR ME\\n it might detect the nfsc.exe that is located on your DVD)\\n * Enter desidered resolution\\n * In game select 640x480 resolution - it will be your desidered resolution"
"Widescreen"
fi
rm
-rf $WINEPREFIX
/drive_c/windows/temp/
*
POL_SetupWindow_auto_shortcut
"$PREFIX"
"nfsc.exe"
"$TITLE"
""
""
Set_WineVersion_Assign
"$WORKING_WINE_VERSION"
"$TITLE"
POL_SetupWindow_message
"$TITLE has been installed successfully.\\nHope it works...\\nGood luck with the game ;)\\n\\nIf the game does not work, try applying NO-CD patch"
"$TITLE"
POL_SetupWindow_Close
exit