The forum

[script] Need For Speed: Underground

Author Replies
NSLW Wednesday 6 May 2009 at 19:35
NSLW

Hello,
I've made script which installs Need For Speed: Underground. It works on
Wine version : 1.1.20
Distribution : Fedora
Distribution Version : 10 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 185.18.08
Known Issues
-game won't run with original Speed.exe
-drag races won't work

Icon for the game:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash
if [ "$PLAYONLINUX" = "" ]
then
exit 0
fi
source "$PLAYONLINUX/lib/sources"
 
VERSIONWINE=$(wine --version)
TYTUL="Need For Speed: Underground"
PREFIX="NFSUnderground"
POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "EA Games" "N/A" "NSLW" "$PREFIX"
 
select_prefixe "$REPERTOIRE/wineprefix/$PREFIX"
POL_SetupWindow_prefixcreate
 
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "AutoRun.exe"
 
cd $WINEPREFIX/dosdevices
ln -s $CDROM d:
 
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > $REPERTOIRE/tmp/cdrom.reg
echo "\\"d:\\"=\\"cdrom\\"" >> $REPERTOIRE/tmp/cdrom.reg
regedit $REPERTOIRE/tmp/cdrom.reg
 
POL_SetupWindow_message "Wait 5 seconds then click next" "$TYTUL"
 
POL_SetupWindow_menu "What language do you prefer?" "Language" "English German Spanish Italian Swedish French Dutch Korean Chinese Finnish Danish PortBrzl Czech Hebrew Greek Japanese Russian Polish Thai Norwegian Portuguese" " "
 
if [ "$APP_ANSWER" == "English" ]; then
echo English
elif [ -e "$CDROM/Languages/$APP_ANSWER.bin" ]
then
cp -f "$CDROM/Languages/$APP_ANSWER.bin" "$WINEPREFIX/drive_c/windows/temp/English.bin"
APP_ANSWERUPPERCASE="`echo $APP_ANSWER|tr '[:lower:]' '[:upper:]'`"
cp -f "$CDROM/Languages/LANGUAGE_$APP_ANSWERUPPERCASE.bin" "$WINEPREFIX/drive_c/windows/temp/LANGUAGE_ENGLISH.bin"
else
echo "No such language"
fi
 
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
 
cp "$CDROM/NFSU_icon.ico" "$REPERTOIRE/icones/32/$TYTUL"
 
cd $CDROM
wine $CDROM/AutoRun.exe
 
POL_SetupWindow_detect_exit
 
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
 
if [ -e "$WINEPREFIX/drive_c/windows/temp/English.bin" ];
then
cp -f "$WINEPREFIX/drive_c/windows/temp/English.bin" "$WINEPREFIX/drive_c/Program Files/EA GAMES/Need For Speed Underground/Languages/English.bin"
 
cp -f "$WINEPREFIX/drive_c/Program Files/EA GAMES/Need For Speed Underground/Languages/LANGUAGE_ENGLISH.bin"
 
else
echo "English"
fi
 
 
cd $REPERTOIRE/ressources/
 
if [ ! -e $REPERTOIRE/ressources/dinput8.zip ]; then
POL_SetupWindow_download "PlayOnLinux is downloading dinput8,dll" "$TYTUL" "http://www.useyourbrain.co.uk/dlldownloads-files/dinput8.zip"
fi
 
cd $WINEPREFIX/drive_c/windows/temp/
unzip $REPERTOIRE/ressources/dinput8.zip
cp DINPUT8.DLL $WINEPREFIX/drive_c/windows/system32/
 
 
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]" > $REPERTOIRE/tmp/override.reg
echo "\\"dinput8\\"=\\"native\\"" >> $REPERTOIRE/tmp/override.reg
regedit $REPERTOIRE/tmp/override.reg
 
POL_SetupWindow_menu_list "How much memory do your graphic card have got" "$TYTUL" "32-64-128-256-384-512-768-1024-2048" "-" "256"
VMS="$APP_ANSWER"
  
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > $REPERTOIRE/tmp/vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> $REPERTOIRE/tmp/vms.reg
regedit $REPERTOIRE/tmp/vms.reg
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/d3d.reg
echo "\\"OffscreenRenderingMode\\"=\\"fbo\\"" >> $REPERTOIRE/tmp/d3d.reg
echo "\\"UseGLSL\\"=\\"enabled\\"" >> $REPERTOIRE/tmp/d3d.reg
regedit $REPERTOIRE/tmp/d3d.reg
 
cd $REPERTOIRE
rm -rf $WINEPREFIX/drive_c/windows/temp/*
 
POL_SetupWindow_make_shortcut "$PREFIX" "Program Files/EA GAMES/Need For Speed Underground" "Speed.exe" "" "$TYTUL" ""
 
POL_SetupWindow_menu "What patch would you like to apply?" "Patch" "Europe Korean Chinese English-US" " "
 
cd $WINEPREFIX/drive_c/windows/temp/
 
if [ "$APP_ANSWER" == "Korean" ]; then
if [ ! -e "$WINEPREFIX/drive_c/windows/temp/NFSU_KOREA_PATCH_4.exe" ]; then
POL_SetupWindow_download "PlayOnLinux is downloading patch for $TYTUL" "$TYTUL" "ftp://ftp.ea.com/pub/ea/patches/nfs-underground/pc/korea/NFSU_KOREA_PATCH_4.exe"
fi
wine NFSU_KOREA_PATCH_4.exe
 
elif [ "$APP_ANSWER" == "Chinese" ]
then
    if [ ! -e "$WINEPREFIX/drive_c/windows/temp/NFSU_CHINESE_PATCH_4.exe" ]; then
    POL_SetupWindow_download "PlayOnLinux is downloading patch for $TYTUL" "$TYTUL" "ftp:// ftp.ea.com/pub/ea/patches/nfs-underground/pc/taiwan/NFSU_CHINESE_PATCH_4.exe"
    fi
    wine NFSU_CHINESE_PATCH_4.exe
 
elif [ "$APP_ANSWER" == "English-US" ]
then
    if [ ! -e "$WINEPREFIX/drive_c/windows/temp/NFSU_US_PATCH_4.exe" ]; then
POL_SetupWindow_download "PlayOnLinux is downloading patch for $TYTUL" "$TYTUL" "ftp://ftp.ea.com/pub/ea/patches/nfs-underground/pc/en-us/NFSU_US_PATCH_4.exe"
    fi
wine NFSU_US_PATCH_4.exe
 
elif [ "$APP_ANSWER" == "Europe" ]
then
    if [ ! -e "$WINEPREFIX/drive_c/windows/temp/NFSU_EUROPE_PATCH_4.exe" ]; then
POL_SetupWindow_download "PlayOnLinux is downloading patch for $TYTUL" "$TYTUL" "ftp://ftp.ea.com/pub/ea/patches/nfs-underground/pc/en-uk/NFSU_EUROPE_PATCH_4.exe"
    fi
wine NFSU_EUROPE_PATCH_4.exe
fi
 
POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
 
POL_SetupWindow_Close
exit
GNU_Raziel Wednesday 20 May 2009 at 14:55
GNU_Raziel

Script added to repository, thx for your work :)

This site allows content generated by members, and we promptly remove any content that infringes copyright according to our Terms of Service. To report copyright infringement, please send a notice to dmca@playonlinux.com