Race Driver : GRID

Informations

Creator Message
NSLW

Information

This installer has been approved by the team.

Informations

Platforms:
Downloads: 11611
Wine: System

Feedbacks

Description

-game won't run with original GRID.exe
-disable shadows as they do not work properly
-set OSS sound driver in case of sound problems

Source code

#!/bin/bash
# Date : (2009-05-29 18-00)
# Last revision : (2010-01-03 22-00)
# Wine version used : 1.1.35
# Distribution used to test : Fedora 12
# Author : NSLW
# Licence : Retail

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

TYTUL="Race Driver : GRID"
PREFIX="GRID"
WORKINGWINEVERSION="1.1.37"

#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_make_icon_for_shortcut()
{
convert "$HOME/.local/share/icons/$2" -geometry 32X32 "$REPERTOIRE/icones/32/$1"
}

POL_SetupWindow_Init
POL_SetupWindow_presentation "$TYTUL" "Codemasters" "www.racedrivergrid.com" "NSLW" "$PREFIX" 

select_prefix "$REPERTOIRE/wineprefix/$PREFIX"

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

if [ "$APP_ANSWER" == "Patch game" ]; then
        patch_grid
fi

POL_SetupWindow_Close
exit
fi

POL_SetupWindow_message "Please insert $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "setup.exe"

POL_SetupWindow_install_wine "$WORKINGWINEVERSION"
Use_WineVersion "$WORKINGWINEVERSION"
POL_SetupWindow_prefixcreate

#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%" |tr -d '\015' | tr -d '\010'`
PROGRAMFILES=${PROGRAMFILES:3}

#adding CD-ROM as drive d: 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 "\"d:\"=\"cdrom\"" >> cdrom.reg
regedit cdrom.reg

sleep 5

mkdir "$HOME/.winetrickscache"
cd "$HOME/.winetrickscache"
# checking if gecko is in wine tricks cache if not then download
if [ ! -e "wine_gecko-1.0.0-x86.cab" ]
then
POL_SetupWindow_download "PlayOnLinux is downloading Gecko HTML Engine" "Gecko HTML Engine" "http://downloads.sourceforge.net/wine/wine_gecko-1.0.0-x86.cab"
fi

#downloading .NET Framework 2.0
if [ ! -e "$HOME/.winetrickscache/dotnet20/dotnetfx.exe" ]
then
mkdir "$HOME/.winetrickscache/dotnet20"
cd "$HOME/.winetrickscache/dotnet20"
POL_SetupWindow_download "PlayOnLinux is downloading .NET Framework" ".NET Framework 2.0" "http://download.microsoft.com/download/5/6/7/567758a3-759e-473e-bf8f-52154438565a/dotnetfx.exe"
POL_SetupWindow_download "PlayOnLinux is downloading .NET Framework" ".NET Framework 2.0" "http://kegel.com/wine/l_intl.nls"
fi

cd "$REPERTOIRE/ressources/"
#downloading winetricks
if [ "`sha1sum < winetricks | sed 's/ .*//'`" != "56122055e5c3ce25bc708caa175a7ca3acf0577a" ]; then
wget http://winezeug.googlecode.com/svn/trunk/winetricks --output-document=winetricks
fi

#installing .NET Framework 2.0
POL_SetupWindow_wait_next_signal "Installing .NET Framework 2.0..." "$TYTUL"
bash winetricks -q dotnet20
POL_SetupWindow_detect_exit

#starting installation
cd "$CDROM"
wine "setup.exe"
POL_SetupWindow_message "Click \"Next\" when installation will finish." "$TYTUL"
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"

cd "$WINEPREFIX/drive_c/windows/temp"
#setting multisample to enabled
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > multisampling.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-890-1024-2048" "-" "256"
VMS="$APP_ANSWER"
 
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > vms.reg
echo "\"VideoMemorySize\"=\"$VMS\"" >> vms.reg
regedit vms.reg

#making shortcut
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/Codemasters/GRID" "GRID.exe" "" "$TYTUL" "" ""
Set_WineVersion_Assign "$WORKINGWINEVERSION" "$TYTUL"
POL_SetupWindow_make_icon_for_shortcut "$TYTUL" "*_grid.0.png"

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

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

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_Close
exit

Contributions

Filters:

Contribute
Member Message
ramaxa Friday 5 December 2014 at 17:31
ramaxa Anonymous

Message

Please add 2 options, to choose setup.exe path manualy, and to skip CD-Rom check. Thx

Replies

Friday 5 December 2014 at 19:27
That script may not have been updated in 5 years, so it should be rewritten almost from scratch