The forum

[script] Race Driver : GRID

Author Replies
NSLW Friday 8 May 2009 at 11:11
NSLW

Hello,
i would like to write script for this game but the game needs two files openal32.dll (106.5 KB) and wrap_oal.dll (435.5 KB) to start. I found only one place where i can download these files and it can't be downloaded by POL_SetupWindow_download, so it would not be nice for user to manually download these files.

I would like to ask if the files could be uploaded here?
It's all i need to write nice working installing script.

PS. the latest openal32.dll from here won't work

Edited by NSLW

Quentin PÂRIS Friday 8 May 2009 at 11:27
Quentin PÂRISAnonymous

Please send me these file by mail, i will upload them to repository.playonlinux.com
NSLW Sunday 10 May 2009 at 11:50
NSLW

Here is the game icon



Below is the script. It doesn't fully working right now because there are no openal files. But as soon as Tinou upload them you can automatically install GRID.

Wine version : 1.1.21
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 GRID.exe
-set multisampling in game to avoid graphical glitches
-disable shadows as they do not work properly


#!/bin/bash
# Date : (2009-05-29 18-00)
# Last revision : (2009-05-29 18-00)
# Wine version used : 1.1.22
# Distribution used to test : Fedora 10
# Author : NSLW
# Licence : Retail

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

VERSIONWINE=$(wine --version)
TYTUL="Race Driver : GRID"
PREFIX="GRID"

#procedure for patching GRID
patch_grid()
{
POL_SetupWindow_browse "Select patch file downloaded from www.codemasters.com" "$TYTUL" ""
wine "$APP_ANSWER"
POL_SetupWindow_message "Patch for $TYTUL has been installed successfully" "$TYTUL"
}

POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Codemasters" "N/A" "NSLW" "$PREFIX" 

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

#asking about patching
POL_SetupWindow_menu "What do you want to do?" "Actions" "install-game patch-game" " "
if [ "$APP_ANSWER" == "patch-game" ]; then
	if [ -e "$REPERTOIRE/wineprefix/$PREFIX" ]; then
	patch_grid
	fi
POL_SetupWindow_Close
fi

POL_SetupWindow_prefixcreate

POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

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

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

POL_SetupWindow_message "Wait 5 seconds then click next" "$TYTUL"

#downloading OpenAL32.dll (size 106.5KB) and wrap_oal.dll (size 434.5KB)
#downloading OpenAL32.dll (size 108.0KB) and wrap_oal.dll (size 404.0KB) thanks to bacatta
cd "$REPERTOIRE/ressources"
if [ ! -e $REPERTOIRE/ressources/openal32.zip ]; then
POL_SetupWindow_download "PlayOnLinux is downloading sound libraries" "$TYTUL" "http://www.hostmen.pl/upload/openal32.zip"
fi

#downloading d3dx9_36.dll
if [ ! -e $REPERTOIRE/ressources/D3DX9_XX_dll_\\(32Bit_All\\).zip ]; then
POL_SetupWindow_download "Downloading DirectX 9.0c libraries" "$TYTUL" "http://mulx.playonlinux.com/file_pol/D3DX9_XX_dll_(32Bit_All).zip"
fi

#downloading xinput1_3.dll
if [ ! -e $REPERTOIRE/ressources/X_XX_dll_\\(32Bit_All\\).zip ]; then
POL_SetupWindow_download "PlayOnLinux is downloading Xinput libraries" "$TYTUL" "http://mulx.playonlinux.com/file_pol/X_XX_dll_(32Bit_All).zip"
fi

#unpacking what has been downloaded
cd "$WINEPREFIX/drive_c/windows/temp"
unzip $REPERTOIRE/ressources/D3DX9_XX_dll_\\(32Bit_All\\).zip
cabextract D3DX9_XX_dll_\\(32Bit_All\\)/Install/Nov2007_d3dx9_36_x86.cab
unzip $REPERTOIRE/ressources/X_XX_dll_\\(32Bit_All\\).zip
cabextract X_XX_dll_\\(32Bit_All\\)/Install/APR2007_xinput_x86.cab
unzip $REPERTOIRE/ressources/openal32.zip

#coping what has been downloaded
mkdir "$WINEPREFIX/drive_c/Program Files/Codemasters"
mkdir "$WINEPREFIX/drive_c/Program Files/Codemasters/GRID"
cd "$WINEPREFIX/drive_c/Program Files/Codemasters/GRID"
cp "$WINEPREFIX/drive_c/windows/temp/d3dx9_36.dll" d3dx9_36.dll
cp "$WINEPREFIX/drive_c/windows/temp/xinput1_3.dll" xinput1_3.dll
cp "$WINEPREFIX/drive_c/windows/temp/OpenAL32.dll" OpenAL32.dll
cp "$WINEPREFIX/drive_c/windows/temp/wrap_oal.dll" wrap_oal.dll

cd "$WINEPREFIX/drive_c/windows/temp/"
#overriding d3dx9_36.dll and xinput1_3.dll
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\DllOverrides]" > override.reg
echo "\\"d3dx9_36.dll\\"=\\"native\\"" >> override.reg
echo "\\"xinput1_3.dll\\"=\\"native\\"" >> override.reg
regedit override.reg

#setting multisample to enabled and OffscreenRenderingMode to fbo
echo "[HKEY_CURRENT_USER\\\\Software\\\\Wine\\\\Direct3D]" > multisampling.reg
echo "\\"OffscreenRenderingMode\\"=\\"fbo\\"" >> fbo.reg
echo "\\"Multisampling\\"=\\"enabled\\"" >> multisampling.reg
regedit multisampling.reg

#asking about memory size
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]" > vms.reg
echo "\\"VideoMemorySize\\"=\\"$VMS\\"" >> vms.reg
regedit vms.reg

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

#making shortcut just before starting installation because installer may not close clean
POL_SetupWindow_make_shortcut "$PREFIX" "Program Files/Codemasters/GRID" "GRID.exe" "" "$TYTUL" "" ""

#starting installation
POL_SetupWindow_wait_next_signal "Installation in progress..." "$TYTUL"
cd $CDROM
wine "setup.exe"

POL_SetupWindow_detect_exit

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

#asking about patching
POL_SetupWindow_question "Do you want to patch your game?" "$TYTUL" 
if [ "$APP_ANSWER" == "TRUE" ] ;then
patch_grid
fi

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" "/usr/share/playonlinux/themes/tango/warning.png"

POL_SetupWindow_Close
exit

Edited by NSLW

GNU_Raziel Wednesday 20 May 2009 at 14:55
GNU_Raziel

Script added to repository, thx for your work :)
bacatta Monday 25 May 2009 at 21:52
bacattaAnonymous

There is an error at line 2:

if [ "$PLAYONLINUX" = "" ]then

should be:

if [ "$PLAYONLINUX" = "" ]; then

Distribution : Fedora x64
Version de la distribution : 15
Carte graphique : Nvidia Geforce GTX460
Pilote de la carte graphique : 280.??
Ghostofkendo Monday 25 May 2009 at 22:03
Ghostofkendo

It's fixed now.

Thank you very much bacatta for reporting this little mistake ;-)
NSLW Monday 25 May 2009 at 22:38
NSLW

Indeed thank you for pointing this. I checked the script one more time and found another bug.
bacatta Tuesday 26 May 2009 at 22:32
bacattaAnonymous

thx goes to you my friend ;)

I hope the other bug was the link name like "Racedriver: GRID.xpm" or you got another one :)

btw, I'm on x64 and i think i got this bug: http://bugs.winehq.org/show_bug.cgi?id=17897
openal installer not working properly. Got this message:
"Trying to load PE image for unsupported architecture (AMD-64)"
I'll investigate on this... unless someone with x64 doesn't have this message !

Distribution : Fedora x64
Version de la distribution : 15
Carte graphique : Nvidia Geforce GTX460
Pilote de la carte graphique : 280.??
NSLW Tuesday 26 May 2009 at 23:00
NSLW


btw, I'm on x64 and i think i got this bug: http://bugs.winehq.org/show_bug.cgi?id=17897
openal installer not working properly. Got this message:
"Trying to load PE image for unsupported architecture (AMD-64)"

Quote from bacatta


I've got 32 bit OS and it showed this message too, but that's why i override openal libraries.

The link with openal32.zip was inactive. I uploaded once more time and now it's good.
bacatta Wednesday 27 May 2009 at 21:30
bacattaAnonymous

I'm sorry but the one at http://www.hostmen.pl/upload/openal32.zip is the same from 2 days ago:
$ md5sum openal32/*
24a492f34f6609f197073398239166a9 openal32/OpenAL32.dll
4dad0d004ab5018b000741b3f1f9e462 openal32/README
ed95982514a08290d33f1bd4b3db2d02 openal32/wrap_oal.dll

And it doesn't work on my system.

If i install from official creative i get this:
5c1765b680946c80b670e023ac55437c openal32_creative/OpenAL32.dll
cf35457af69ab659f75ff9089d452188 openal32_creative/wrap_oal.dll

Same message.

And if i install from creative official on a winXP, i got this:
ce0cdc5459eaa1d574af781ddb8f2685 OpenAL32.dll
9c24ed831ddfa8319382b2bfd9691aa9 wrap_oal.dll

And that's working !

I put extracted files on my website: http://www.bacatta.name/openal32.zip

Distribution : Fedora x64
Version de la distribution : 15
Carte graphique : Nvidia Geforce GTX460
Pilote de la carte graphique : 280.??
NSLW Wednesday 27 May 2009 at 21:45
NSLW

Thank you very much for the files. I actually never run GRID on Windows XP. I found those files on the internet and they were only one that worked. Your files are working for me too. I'll upload them so the other s could download your version of files.

BTW. Could you check if the game runs for you with ORM=fbo on Wine 1.1.22?

Edited by NSLW

bacatta Friday 29 May 2009 at 17:26
bacattaAnonymous

With ORM=fbo and wine 1.1.22, game is still too slow to be playable with my 9600GT (OK in winXP). I think i got less artifacts on textures but it's hard to say with just a few tries.

Distribution : Fedora x64
Version de la distribution : 15
Carte graphique : Nvidia Geforce GTX460
Pilote de la carte graphique : 280.??
NSLW Friday 29 May 2009 at 23:02
NSLW

Thanks for checking. Now i know for sure the bug with fbo in GRID is fixed and i can preconfigure Wine in installing script. I don't know if there is any performance gain but as you say there is less artifacts and finally smoke and lights are working properly.

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-notice@playonlinux.com