Forum

[script] NFS Underground 2

Författare Svar
NSLW Monday 10 May 2010 at 16:18
NSLW

Hello,
I wrote script which installs NFS Underground 2 and patches it. It also creates script for configuring graphic options because the game crashes at it.
Wine version : 1.1.44
Distribution : Fedora
Distribution Version : 12 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 195.36.24



Icon for the game:


#!/bin/bash
# Date : (2010-05-09 21-00)
# Last revision : (2010-05-09 21-00)
# Wine version used : 1.1.44
# Distribution used to test : Fedora 12
# Author : NSLW
# Licence : Retail

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

TYTUL="Need For Speed: Underground 2"
PREFIX="NFSUnderground2"
WORKINGWINEVERSION="1.1.44"

download_wined3d()
{
cd "$REPERTOIRE/ressources/"
if [ ! -e $REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip ]; then
POL_SetupWindow_download "Downloading NFS patch" "$TYTUL" "http://s2.sigmirror.com/files/73553_xks4c/$WORKINGWINEVERSION-mod.zip"
fi
cd "$WINEPREFIX/drive_c/windows/temp/"
unzip "$REPERTOIRE/ressources/$WORKINGWINEVERSION-mod.zip"
./$WORKINGWINEVERSION-mod -y
cp nfs/* ./
}

Create_Patched_Wine_Version()
{
POL_SetupWindow_install_wine "$1"
cd "$REPERTOIRE/WineVersions"
POL_SetupWindow_wait_next_signal "Removing old patched Wine" "$TYTUL"
rm -fr "$1-$2"
POL_SetupWindow_detect_exit
 
POL_SetupWindow_wait_next_signal "Copying Wine $1" "$TYTUL"
cp -r "$1" "$1-$2"
POL_SetupWindow_detect_exit

POL_SetupWindow_wait_next_signal "Patching Wine $1 with $2" "$TYTUL"
rm -fr "$REPERTOIRE/WineVersions/$1-$2/usr/lib/wine/wined3d.dll.so"
cp "$WINEPREFIX/drive_c/windows/temp/wined3d.dll.so" "$REPERTOIRE/WineVersions/$1-$2/usr/lib/wine/wined3d.dll.so"
POL_SetupWindow_detect_exit
}

#starting the script
wget http://upload.wikimedia.org/wikipedia/en/1/10/Nfsu2-win-cover.jpg --output-document="$REPERTOIRE/tmp/leftnotscaled.jpeg"
convert "$REPERTOIRE/tmp/leftnotscaled.jpeg" -scale 150x356\\! "$REPERTOIRE/tmp/left.jpeg"
POL_SetupWindow_Init "" "$REPERTOIRE/tmp/left.jpeg"

POL_SetupWindow_presentation "$TYTUL" "EA Games" "N/A" "NSLW" "$PREFIX" 

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#asking about patching
if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
    POL_SetupWindow_menu "What do you want to do?" "Actions" "Update Wine version to $WORKINGWINEVERSION" "~"

    if [ "$APP_ANSWER" == "Update Wine version to $WORKINGWINEVERSION" ]; then
    #creating patched Wine version
    download_wined3d
    Create_Patched_Wine_Version "$WORKINGWINEVERSION" "NFS"
    CHOSENWINEVERSION="$WORKINGWINEVERSION-NFS"
    Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
    fi
POL_SetupWindow_Close
exit
fi
#asking for CDROM and checking if it's correct one
POL_SetupWindow_message "Please insert $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "AutoRun.exe"

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

#creating application's own prefix
POL_SetupWindow_prefixcreate

#creating patched Wine version
download_wined3d
Create_Patched_Wine_Version "$WORKINGWINEVERSION" "NFS"
CHOSENWINEVERSION="$WORKINGWINEVERSION-NFS"

#fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

#adding CD-ROM as drive e: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" e:

cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"e:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg

sleep 5

#starting installation
cp "$CDROM/NFSU_icon.ico" "$REPERTOIRE/icones/32/$TYTUL"

POL_SetupWindow_menu "How many installation media do you've got?" "Media" "2xCD~1xDVD" "~"

wine start /unix "$CDROM/AutoRun.exe"
if [ "$APP_ANSWER" == "2xCD" ]; then
POL_SetupWindow_message "When the installer will ask you for 2nd CD, click NEXT." "$TYTUL"
wine eject
fi

POL_SetupWindow_message "Click NEXT when the installation will finish" "$TYTUL"
wine eject

#overriding dinput8.dll (size 204.0 KB) to get keyboard working
cd "$REPERTOIRE/ressources"
if [ ! -e "dinput8.zip" ]; then
POL_SetupWindow_download "PlayOnLinux is downloading dinput8.dll" "$TYTUL" "http://www.useyourbrain.co.uk/dlldownloads-files/dinput8.zip"
fi

#mv "$WINEPREFIX/drive_c/windows/system32/dinput8.dll" "$WINEPREFIX/drive_c/windows/system32/dinput8.dll.bak"
cd "$WINEPREFIX/drive_c/windows/temp/"
unzip "$REPERTOIRE/ressources/dinput8.zip"
mv DINPUT8.DLL "$WINEPREFIX/drive_c/windows/system32/dinput8.dll"

echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]" > override.reg
echo "\\"dinput8\\"=\\"native\\"" >> override.reg
regedit override.reg

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"

echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
regedit vms.reg

#cleaning temp
cd "$WINEPREFIX/drive_c/windows/temp/"
rm -rf *

POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/EA GAMES/Need for Speed Underground 2" "speed2.exe" "" "$TYTUL" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"

POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"

POL_SetupWindow_message_image "Please note that this game has a copy protection system\\nand sadly, it prevents Wine from running the game.\\n\\nPlayOnLinux will not provide any help concerning any illegal\\nstuff." "Note about copy protection" "$PLAYONLINUX/themes/tango/warning.png"

POL_SetupWindow_message_image "To change game's graphic configuration\\nplease select the game in PlayOnLinux\\nthen press button \\"Configure this application\\"\\nthen choose the last option." "Note about copy protection" "$PLAYONLINUX/themes/tango/info.png"

rm -f "$REPERTOIRE/configurations/configurators/$TYTUL"
#Adding configurator for changing graphic options
cat << EOF > "$REPERTOIRE/configurations/configurators/$TYTUL"
#!/bin/bash
[ "\\$PLAYONLINUX" = "" ] && exit 0
source "\\$PLAYONLINUX/lib/sources"

TYTUL="Need For Speed: Underground 2"
PREFIX="NFSUnderground2"
WORKINGWINEVERSION="1.1.44"

POL_SetupWindow_Init
POL_SetupWindow_free_presentation "\\$TYTUL" "This Wizard will help you to configure NFS Underground 2 graphic options."

select_prefix "\\$REPERTOIRE/wineprefix/\\$PREFIX"

#downloading specific Wine
POL_SetupWindow_install_wine "\\$WORKINGWINEVERSION"
Use_WineVersion "\\$WORKINGWINEVERSION"

#fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

CONF_NAME[0]="Animated Texture"
CONF_REGISTRY_NAME[0]="g_AnimatedTextureEnable"
CONF_VALUE_ALLOWED[0]="On~Off"
CONF_VALUE_MODE[0]="switch"

CONF_NAME[1]="Enhanced Contrast"
CONF_REGISTRY_NAME[1]="g_BleachByPassEnable"
CONF_VALUE_ALLOWED[1]="On~Off"
CONF_VALUE_MODE[1]="switch"

CONF_NAME[2]="Car Damage"
CONF_REGISTRY_NAME[2]="g_CarDamageEnable"
CONF_VALUE_ALLOWED[2]="On~Off"
CONF_VALUE_MODE[2]="switch"

CONF_NAME[3]="Car Reflection Update Rate"
CONF_REGISTRY_NAME[3]="g_CarEnvironmentMapEnable"
CONF_VALUE_ALLOWED[3]="0~1~2~3"
CONF_VALUE_MODE[3]="level"

CONF_NAME[4]="Car Reflection Detail"
CONF_REGISTRY_NAME[4]="g_CarEnvironmentMapUpdateData"
CONF_VALUE_ALLOWED[4]="Low~High"
CONF_VALUE_MODE[4]="hl"

CONF_NAME[5]="Car Headlight"
CONF_REGISTRY_NAME[5]="g_CarHeadlightEnable"
CONF_VALUE_ALLOWED[5]="On~Off"
CONF_VALUE_MODE[5]="switch"

CONF_NAME[6]="Car Lightning"
CONF_REGISTRY_NAME[6]="g_CarLightingEnable"
CONF_VALUE_ALLOWED[6]="On~Off"
CONF_VALUE_MODE[6]="switch"

CONF_NAME[7]="Car Geometry Detail"
CONF_REGISTRY_NAME[7]="g_CarLodLevel"
CONF_VALUE_ALLOWED[7]="Low~High"
CONF_VALUE_MODE[7]="hl"

CONF_NAME[8]="Car Shadow/Neon"
CONF_REGISTRY_NAME[8]="g_CarShadowEnable"
CONF_VALUE_ALLOWED[8]="0~1~2"
CONF_VALUE_MODE[8]="level"

CONF_NAME[9]="Crowds"
CONF_REGISTRY_NAME[9]="g_CrowdEnable"
CONF_VALUE_ALLOWED[9]="On~Off"
CONF_VALUE_MODE[9]="switch"

CONF_NAME[10]="Depth Of Field"
CONF_REGISTRY_NAME[10]="g_DepthOfFieldEnable"
CONF_VALUE_ALLOWED[10]="On~Off"
CONF_VALUE_MODE[10]="switch"

CONF_NAME[11]="Fog"
CONF_REGISTRY_NAME[11]="g_FogEnable"
CONF_VALUE_ALLOWED[11]="On~Off"
CONF_VALUE_MODE[11]="switch"

CONF_NAME[12]="g_FSAALevel"
CONF_REGISTRY_NAME[12]="g_FSAALevel"
CONF_VALUE_ALLOWED[12]="0~1"
CONF_VALUE_MODE[12]="level"

CONF_NAME[13]="Horizon Fog"
CONF_REGISTRY_NAME[13]="g_HorizonFogEnable"
CONF_VALUE_ALLOWED[13]="On~Off"
CONF_VALUE_MODE[13]="switch"

CONF_NAME[14]="Light Glow"
CONF_REGISTRY_NAME[14]="g_LightGlowEnable"
CONF_VALUE_ALLOWED[14]="On~Off"
CONF_VALUE_MODE[14]="switch"

CONF_NAME[15]="Light Trails"
CONF_REGISTRY_NAME[15]="g_LightStreaksEnable"
CONF_VALUE_ALLOWED[15]="On~Off"
CONF_VALUE_MODE[15]="switch"

CONF_NAME[16]="Motion Blur"
CONF_REGISTRY_NAME[16]="g_MotionBlurEnable"
CONF_VALUE_ALLOWED[16]="On~Off"
CONF_VALUE_MODE[16]="switch"

CONF_NAME[17]="Over Bright"
CONF_REGISTRY_NAME[17]="g_OverBrightEnable"
CONF_VALUE_ALLOWED[17]="On~Off"
CONF_VALUE_MODE[17]="switch"

CONF_NAME[18]="Particle System"
CONF_REGISTRY_NAME[18]="g_ParticleSystemEnable"
CONF_VALUE_ALLOWED[18]="On~Off"
CONF_VALUE_MODE[18]="switch"

CONF_NAME[19]="Performance Level"
CONF_REGISTRY_NAME[19]="g_PerformanceLevel"
CONF_VALUE_ALLOWED[19]="0~1~2~3~4~5"
CONF_VALUE_MODE[19]="level"

CONF_NAME[20]="Resolution"
CONF_REGISTRY_NAME[20]="g_RacingResolution"
CONF_VALUE_ALLOWED[20]="640x480~800x600~1024x768~1280x1024"
CONF_VALUE_MODE[20]="resolution"

CONF_NAME[21]="Rain Splatter"
CONF_REGISTRY_NAME[21]="g_RainEnable"
CONF_VALUE_ALLOWED[21]="On~Off"
CONF_VALUE_MODE[21]="switch"

CONF_NAME[22]="Road Reflection Detail"
CONF_REGISTRY_NAME[22]="g_RoadReflectionEnable"
CONF_VALUE_ALLOWED[22]="0~1~2~3"
CONF_VALUE_MODE[22]="level"

CONF_NAME[23]="Texture Filtering"
CONF_REGISTRY_NAME[23]="g_TextureFiltering"
CONF_VALUE_ALLOWED[23]="0~1~2"
CONF_VALUE_MODE[23]="level"

CONF_NAME[24]="Tinting"
CONF_REGISTRY_NAME[24]="g_TintingEnable"
CONF_VALUE_ALLOWED[24]="On~Off"
CONF_VALUE_MODE[24]="switch"

CONF_NAME[25]="Vsync"
CONF_REGISTRY_NAME[25]="g_VSyncOn"
CONF_VALUE_ALLOWED[25]="On~Off"
CONF_VALUE_MODE[25]="switch"

CONF_NAME[26]="World Detail"
CONF_REGISTRY_NAME[26]="g_WorldLodLevel"
CONF_VALUE_ALLOWED[26]="0~1~2~3"
CONF_VALUE_MODE[26]="level"

cd "\\$WINEPREFIX/drive_c/windows/temp/"
regedit /e nfs4.reg "HKEY_LOCAL_MACHINE\\Software\\EA GAMES\\Need for Speed Underground 2"

for i in \\`seq 0 26\\`; do
CONF_VALUE[\\$i]=\\`cat nfs4.reg | grep "\\${CONF_REGISTRY_NAME[\\$i]}" | cut -d'0' -f8 |tr -d '\\015' | tr -d '\\010'\\`

if [ "\\${CONF_VALUE[\\$i]}" == "" ]; then
CONF_VALUE[\\$i]=0
fi

echo "CONF_VALUE[\\$i]=\\${CONF_VALUE[\\$i]}"
if [ "\\${CONF_VALUE_MODE[\\$i]}" == "switch" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "0" ]; then
     CONF_VALUE[\\$i]="Off"
     elif [ "\\${CONF_VALUE[\\$i]}" == "1" ]; then
     CONF_VALUE[\\$i]="On"
     fi

elif [ "\\${CONF_VALUE_MODE[\\$i]}" == "hl" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "0" ]; then
     CONF_VALUE[\\$i]="Low"
     elif [ "\\${CONF_VALUE[\\$i]}" == "1" ]; then
     CONF_VALUE[\\$i]="High"
     fi

elif [ "\\${CONF_VALUE_MODE[\\$i]}" == "resolution" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "0" ]; then
     CONF_VALUE[\\$i]="640x480"
     elif [ "\\${CONF_VALUE[\\$i]}" == "1" ]; then
     CONF_VALUE[\\$i]="800x600"
     elif [ "\\${CONF_VALUE[\\$i]}" == "2" ]; then
     CONF_VALUE[\\$i]="1024x768"
     elif [ "\\${CONF_VALUE[\\$i]}" == "3" ]; then
     CONF_VALUE[\\$i]="1280x1024"
     fi
fi

done

MENU="OK"
while [ "\\$MENU" != "Save" ]; do
POL_SetupWindow_menu "What do you want to change?" "Options" "Save~0. \\${CONF_NAME[0]} = \\${CONF_VALUE[0]}~1. \\${CONF_NAME[1]} = \\${CONF_VALUE[1]}~2. \\${CONF_NAME[2]} = \\${CONF_VALUE[2]}~3. \\${CONF_NAME[3]} = \\${CONF_VALUE[3]}~4. \\${CONF_NAME[4]} = \\${CONF_VALUE[4]}~5. \\${CONF_NAME[5]} = \\${CONF_VALUE[5]}~6. \\${CONF_NAME[6]} = \\${CONF_VALUE[6]}~7. \\${CONF_NAME[7]} = \\${CONF_VALUE[7]}~8. \\${CONF_NAME[8]} = \\${CONF_VALUE[8]}~9. \\${CONF_NAME[9]} = \\${CONF_VALUE[9]}~10. \\${CONF_NAME[10]} = \\${CONF_VALUE[10]}~11. \\${CONF_NAME[11]} = \\${CONF_VALUE[11]}~13. \\${CONF_NAME[13]} = \\${CONF_VALUE[13]}~14. \\${CONF_NAME[14]} = \\${CONF_VALUE[14]}~15. \\${CONF_NAME[15]} = \\${CONF_VALUE[15]}~16. \\${CONF_NAME[16]} = \\${CONF_VALUE[16]}~17. \\${CONF_NAME[17]} = \\${CONF_VALUE[17]}~18. \\${CONF_NAME[18]} = \\${CONF_VALUE[18]}~19. \\${CONF_NAME[19]} = \\${CONF_VALUE[19]}~20. \\${CONF_NAME[20]} = \\${CONF_VALUE[20]}~21. \\${CONF_NAME[21]} = \\${CONF_VALUE[21]}~22. \\${CONF_NAME[22]} = \\${CONF_VALUE[22]}~23. \\${CONF_NAME[23]} = \\${CONF_VALUE[23]}~24. \\${CONF_NAME[24]} = \\${CONF_VALUE[24]}~25. \\${CONF_NAME[25]} = \\${CONF_VALUE[25]}~26. \\${CONF_NAME[26]} = \\${CONF_VALUE[26]}" "~"
MENU="\\$APP_ANSWER"
i=\\`echo "\\$APP_ANSWER" | cut -d'.' -f1\\`
echo \\$i
if [ "\\$MENU" == "Save" ]; then
break
fi

POL_SetupWindow_menu "Set to" "Options" "\\${CONF_VALUE_ALLOWED[\\$i]}" "~"
CONF_VALUE[\\$i]="\\$APP_ANSWER"
done

for i in \\`seq 0 26\\`; do

if [ "\\${CONF_VALUE_MODE[\\$i]}" == "switch" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "Off" ]; then
     CONF_VALUE[\\$i]="0"
     elif [ "\\${CONF_VALUE[\\$i]}" == "On" ]; then
     CONF_VALUE[\\$i]="1"
     fi

elif [ "\\${CONF_VALUE_MODE[\\$i]}" == "hl" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "Low" ]; then
     CONF_VALUE[\\$i]="0"
     elif [ "\\${CONF_VALUE[\\$i]}" == "High" ]; then
     CONF_VALUE[\\$i]="1"
     fi
     
elif [ "\\${CONF_VALUE_MODE[\\$i]}" == "resolution" ]; then

     if [ "\\${CONF_VALUE[\\$i]}" == "640x480" ]; then
     CONF_VALUE[\\$i]="0"
     elif [ "\\${CONF_VALUE[\\$i]}" == "800x600" ]; then
     CONF_VALUE[\\$i]="1"
     elif [ "\\${CONF_VALUE[\\$i]}" == "1024x768" ]; then
     CONF_VALUE[\\$i]="2"
     elif [ "\\${CONF_VALUE[\\$i]}" == "1280x1024" ]; then
     CONF_VALUE[\\$i]="3"
     fi
fi

done

cd "\\$WINEPREFIX/drive_c/windows/temp/"
cat << EOF2 > nfs4.reg
REGEDIT4



[HKEY_LOCAL_MACHINE\\Software\\EA GAMES\\Need for Speed Underground 2]EOF2

for i in \\`seq 0 26\\`; do
echo \\""\\${CONF_REGISTRY_NAME[\\$i]}"\\"="dword:0000000\\${CONF_VALUE[\\$i]}" >> nfs4.reg
done

regedit nfs4.reg

POL_SetupWindow_Close
exit
EOF

POL_SetupWindow_Close
exit



Script for patching

#!/bin/bash
# Date : (2010-05-09 21-00)
# Last revision : (2010-05-09 21-00)
# Wine version used : 1.1.44
# Distribution used to test : Fedora 12
# Author : NSLW
# Licence : Retail

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

TYTUL="Need For Speed: Underground 2"
PREFIX="NFSUnderground2"
WORKINGWINEVERSION="1.1.44"

LNG_DOWNLOADING="PlayOnLinux is downloading"
LNG_LANGUAGE="What is your language version?"
LNG_INSTALLATIONINPROGRESS="Installation in progress..."
LNG_INTRODUCE="This wizard will help you to install patch for $TYTUL."
LNG_INSTALL_GAME_FIRST="Install $TYTUL first."
LNG_PATCHSUCCES="Patch for $TYTUL has been installed successfully."
LNG_CHOOSEACTION="What do you want to do?"
LNG_PATCHM="Let me choose patch manually"
LNG_PATCHA="Download patch automatically"
LNG_PATCHLOCATION="Where is your patch located?"

start_patching()
{

POL_SetupWindow_menu "$LNG_CHOOSEACTION" "Actions" "$LNG_PATCHM~$LNG_PATCHA" "~"
if [ "$APP_ANSWER" == "$LNG_PATCHM" ]; then
POL_SetupWindow_browse "$LNG_PATCHLOCATION" "$TYTUL" ""
PATCHFILE=$APP_ANSWER
elif [ "$APP_ANSWER" == "$LNG_PATCHA" ]; then

POL_SetupWindow_menu "$LNG_LANGUAGE" "Languages" "English US~English UK~German~French~Italian~Spanish~Korean~CH" "~"
PATCHNAME="$APP_ANSWER"
if [ "$PATCHNAME" == "English US" ]; then
PATCHDIR="US"
elif [ "$PATCHNAME" == "English UK" ]; then
PATCHDIR="UK"
elif [ "$PATCHNAME" == "German" ]; then
PATCHDIR="GE"
elif [ "$PATCHNAME" == "French" ]; then
PATCHDIR="FR"
elif [ "$PATCHNAME" == "Italian" ]; then
PATCHDIR="IT"
elif [ "$PATCHNAME" == "Spanish" ]; then
PATCHDIR="SP"
elif [ "$PATCHNAME" == "Korean" ]; then
PATCHDIR="KR"
elif [ "$PATCHNAME" == "CH" ]; then
PATCHDIR="CH"
fi

cd "$REPERTOIRE/ressources"
if [ ! -e "NFSUG2V1-2${PATCHDIR}.EXE" ]; then
POL_SetupWindow_download "$LNG_DOWNLOADING NFSUG2V1-2${PATCHDIR}.EXE" "$TYTUL" "ftp://ftp.ea.com/pub/ea/patches/nfsu2/${PATCHDIR}/NFSUG2V1-2${PATCHDIR}.EXE"
fi
PATCHFILE="$REPERTOIRE/ressources/NFSUG2V1-2${PATCHDIR}.EXE"

fi

POL_SetupWindow_wait_next_signal "$LNG_INSTALLATIONINPROGRESS" "$TYTUL"
wine "$PATCHFILE"
POL_SetupWindow_detect_exit
POL_SetupWindow_message "$LNG_PATCHSUCCES" "$TYTUL"
}

POL_SetupWindow_Init
POL_SetupWindow_free_presentation "$TYTUL" "$LNG_INTRODUCE"

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#checking if the game is installed
if [ ! -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
POL_SetupWindow_message "$LNG_INSTALL_GAME_FIRST" "$TYTUL"
POL_SetupWindow_Close
exit
fi

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

#fetching PROGRAMFILES environmental variable
PROGRAMFILES="Program Files" 
POL_LoadVar_PROGRAMFILES

#start patching
start_patching

#capitalize executable's name
cd "$REPERTOIRE/configurations/installed"
sed -i "s/speed2.exe/SPEED2.EXE/g" "$TYTUL"

POL_SetupWindow_Close
exit

Ändrat av NSLW

hugoluiz Tuesday 1 June 2010 at 7:13
hugoluizAnonymous

Hi, I try to use this script but I had no success. Everything goes right until the installation ask for the second disk, after that nothing work and I only can abort an installation. I think the problem is because I running Ubuntu and Ubuntu don't mount a CDRom in the same place. I try a manual mounting in /media/cdrom but not work too. Anyone have any idea what I can do to solve it ?.
Tks
NSLW Tuesday 1 June 2010 at 14:29
NSLW

Try to copy both cd's into one directory and start installation from there.
Clinri Wednesday 1 September 2010 at 13:29
Clinri

Hello, I installed this game, but when I run at any resolution by selecting "Use PlayOnLinux's configurator for Need for Speed: Undegraund 2" set scan rate 85 hertz, which is unacceptable for an LCD monitor.
Please tell my where to put the frequency of 60 hertz

Upd: problem was partly solved configure xorg.conf
$ sudo gedit /etc/X11/xorg.confused these manuals: 1 and 2

There was also a problem with isskin.dll which is solved by installation of a prefix with the aid of winetricks vcrun6 and mfc42.
I used the following script and ran separately:
#!/bin/bash
PATH="/home/craig/.PlayOnLinux/WineVersions/1.1.44/usr/bin/:$PATH"
export WINEPREFIX="/home/craig/.PlayOnLinux/wineprefix/NFSUnderground2"
export WINEDEBUG="-all"
cd "/home/craig/Рабочий стол"
winetricks

Best regards
sorry for my english

Ändrat av Clinri


Ubuntu 11.10 (Level of knowledge of English: "I use machine translators")
nitai4andra Monday 4 November 2013 at 14:30
nitai4andraAnonymous

Hi!

I tried this version of script:
http://www.playonlinux.com/en/app-623-Need_For_Speed_Underground_2.html

and it didn't work for my 64-bit Fedora 19, as it created virtualdrive using 64bit system wine, and therefore couldn't run the subj. I solved it by manually creation of virtualdrive via 32bit wine, and manually set up the subj following the NSLW's script.
petch Monday 4 November 2013 at 20:23
petch
Developer

Hi,

This script style seems very old (POL 3.x, I suppose), there's a lot more to fix...