The forum

[script] Grim Fandango

Author Replies
NSLW Monday 21 September 2009 at 15:08
NSLW

Hello,
I wrote script which installs Grim Fandango.
Wine version : 1.1.29
Distribution : Fedora
Distribution Version : 11 (32 bit)
Graphics card : Nvidia, GeForce 9xxx
Drivers of the graphics card : 190.32

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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#!/bin/bash
# Date : (2009-09-18 18-00)
# Last revision : (2009-09-18 18-00)
# Wine version used : 1.1.29
# Distribution used to test : Fedora 11
# Author : NSLW
# Licence : Retail
# Depend : ImageMagick
 
[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"
 
#fetching PROGRAMFILES environmental variable
PROGRAMFILES=`wine cmd /c echo "%ProgramFiles%"`
PROGRAMFILES=${PROGRAMFILES:3}
 
TYTUL="Grim Fandango"
PREFIX="GrimFandango"
GRIMLAUNCHER="0"
 
Get_Latest_Wine_Version()
{
wget http://mulx.playonlinux.com/wine/linux-i386/LIST --output-document="$REPERTOIRE/tmp/LIST"
xyz=`cat "$REPERTOIRE/tmp/LIST" | sed -e 's/\\.//g' | cut -d';' -f2 | sort -n | tail -n1`
echo "$(echo $xyz | cut -c1-1).$(echo $xyz | cut -c2-2).$(echo $xyz | cut -c3-4)"
}
 
wget http://upload.wikimedia.org/wikipedia/en/7/76/Grim_Fandango_artwork.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" "LucasArts Entertainment Company LLC" "N/A" "NSLW" "$PREFIX"
 
select_prefix "$REPERTOIRE/wineprefix/$PREFIX"
 
if [ -e "$REPERTOIRE/configurations/installed/$TYTUL" ]; then
    #game asked me ...
    cd "$WINEPREFIX/dosdevices"
    POL_SetupWindow_menu "Game asked me for ..." "$TYTUL" "First CD~Second CD~Nothing" "~"
 
    if [ "$APP_ANSWER" == "First CD" && ! -e "2d:" ]; then
    mv d: 2d:
    mv 1d: d:
    elif [ "$APP_ANSWER" == "Second CD" && ! -e "1d:" ]; then
    mv d: 1d:
    mv 2d: d:
    fi
POL_SetupWindow_Close
exit
fi
 
 
POL_SetupWindow_message "Please insert first $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "grim.exe"
CDROM2=${CDROM//"A"/"B"} #GRIM_DISK_B
 
#taking icon from the game
convert "$CDROM/gf.ico" -geometry 32X32 "$REPERTOIRE/icones/32/$TYTUL"
convert "$CDROM/gf.ico" -geometry 32X32 "$REPERTOIRE/icones/32/$TYTUL Launcher"
 
#LATESTVERSION=$(Get_Latest_Wine_Version)
CHOSENWINEVERSION="$LATESTVERSION"
POL_SetupWindow_install_wine "$CHOSENWINEVERSION"
POL_SetupWindow_prefixcreate
Use_WineVersion "$CHOSENWINEVERSION"
 
#adding CD-ROM as drive d: to winecfg
cd "$WINEPREFIX/dosdevices"
ln -s "$CDROM" d:
ln -s "$CDROM2" e:
 
cd "$WINEPREFIX/drive_c/windows/temp/"
echo "[HKEY_LOCAL_MACHINE\\\\Software\\\\Wine\\\\Drives]" > cdrom.reg
echo "\\"d:\\"=\\"cdrom\\"" >> cdrom.reg
echo "\\"e:\\"=\\"cdrom\\"" >> cdrom.reg
regedit cdrom.reg
sleep 5
 
#starting installation
cd "$CDROM"
wine "setup.exe"
POL_SetupWindow_message "Click \\"Next\\" when installation will finish." "$TYTUL"
 
#asking for Grim Fandago Launcher
POL_SetupWindow_question "Do you want to install Grim Fandango Launcher?" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
    cd "$REPERTOIRE/ressources"
    # checking if GrimLauncher1.5.zip is in winetricks cache if not then download
    if [ ! -e "GrimLauncher1.5.zip" ]
    then
    POL_SetupWindow_download "PlayOnLinux is downloading Grim Fandango Launcher" "$TYTUL" "http://quick.mixnmojo.com/files/GrimLauncher1.5.zip"
    fi
cd "$WINEPREFIX/drive_c/$PROGRAMFILES/LucasArts/Grim"
unzip "$REPERTOIRE/ressources/GrimLauncher1.5.zip"
fi
 
cd "$REPERTOIRE/ressources"
if [ ! -e "Gfupd101.exe" ]
then
 
POL_SetupWindow_wait_next_signal "PlayOnLinux is downloading Gfupd101.exe (ca. 2 MB)" "$TYTUL"
POL_SetupWindow_detect_exit
 
fi
 
#installing patch
POL_SetupWindow_wait_next_signal "PlayOnLinux is installing Grim Fandango 1.0.1 patch." "$TYTUL"
wine start /unix Gfupd101.exe
POL_SetupWindow_detect_exit
 
#asking for playing from HDD
POL_SetupWindow_question "Do you want to play Grim Fandango entirely from your HDD?" "$TYTUL"
if [ "$APP_ANSWER" == "TRUE" ] ;then
GRIMLAUNCHER="1"
POL_SetupWindow_wait_next_signal "PlayOnLinux is copying first CD" "$TYTUL"
cd "$CDROM/grimdata"
cp *.lab "$WINEPREFIX/drive_c/$PROGRAMFILES/LucasArts/Grim"
POL_SetupWindow_detect_exit
 
POL_SetupWindow_message "Please insert second $TYTUL media into your disk drive."
POL_SetupWindow_cdrom
POL_SetupWindow_check_cdrom "autostub.exe"
POL_SetupWindow_wait_next_signal "PlayOnLinux is copying second CD" "$TYTUL"
cd "$CDROM/grimdata"
cp * "$WINEPREFIX/drive_c/$PROGRAMFILES/LucasArts/Grim"
POL_SetupWindow_detect_exit
 
else
POL_SetupWindow_message_image "Run this installation script again\\nif game will ask for second CD" "$TYTUL" "/usr/share/playonlinux/themes/tango/info.png"
fi
 
#making shortcut
if [ "$GRIMLAUNCHER" == "1" ] ;then
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/LucasArts/Grim" "Grim Fandango Launcher.exe" "" "$TYTUL Launcher" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL Launcher"
fi
 
POL_SetupWindow_make_shortcut "$PREFIX" "$PROGRAMFILES/LucasArts/Grim" "grimfandango.exe" "" "$TYTUL" "" ""
Set_WineVersion_Assign "$CHOSENWINEVERSION" "$TYTUL"
POL_SetupWindow_message "$TYTUL has been installed successfully" "$TYTUL"
 
POL_SetupWindow_Close
exit

Edited by NSLW

sjkwizard Friday 12 November 2010 at 14:12
sjkwizardAnonymous

Hi,
I've tried to install Grim Fandango from a mounted ISO but after selecting the cdrom drive the script freeze. Is there a way to get a log to understand what is the problem?
sbk Friday 13 May 2011 at 20:42
sbkAnonymous

this line

#LATESTVERSION=$(Get_Latest_Wine_Version)

should be

LATESTVERSION=$(Get_Latest_Wine_Version)

Quentin PÂRIS Sunday 15 May 2011 at 17:57
Quentin PÂRISAnonymous

Nope, this script should no longer be used
Levan Sunday 24 July 2011 at 3:02
Levan

Is there a way to bypass the cd selection screen
no matter what i try it does not work ,,put the cd in drive or rip it and mount it "


I am a total noob in linux

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