-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_q3.sh
executable file
·266 lines (229 loc) · 8.45 KB
/
install_q3.sh
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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
#!/bin/bash
base=~/ioquake3
screen_width=1920
screen_height=1200
skip_ioquake3=false
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in
--skip-ioquake3)
skip_ioquake3=true
shift # past argument
;;
*) # unknown option
POSITIONAL+=("$1") # save it in an array for later
shift # past argument
;;
esac
done
set -- "${POSITIONAL[@]}" # restore positional parameters
echo "INSTALLATION DIR = ${base}"
echo "SKIP IOQUAKE3 INSTALLATION = ${skip_ioquake3}"
function unsplit_zip() {
cat $1\.* >$1
zip -FF $1 --out $1_all.zip
rm $1
unzip $1_all.zip
}
function pause(){
echo "
Press any key to continue...
"
read -p "$*"
}
pause
mkdir -p ~/q3_tmp && cd ~/q3_tmp
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing dependencies ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
sudo apt-get install wget libc6 libglade2-0 unzip libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libsdl2-2.0-0 p7zip-full
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Downloading files ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
wget -nc https://web.archive.org/web/20190427141853/http://ioquake3.org/files/1.36/installer/ioquake3-1.36-7.1.x86_64.run
wget -nc https://web.archive.org/web/20200329174145if_/https://ioquake3.org/files/1.36/data/ioquake3-q3a-1.32-9.run
wget -nc https://files.ioquake3.org/Linux.zip
wget -nc https://cdn.playmorepromode.com/files/cpma/cpma-1.52-nomaps.zip
wget -nc https://cdn.playmorepromode.com/files/cnq3/cnq3-1.51.zip
wget -nc https://files.ioquake3.org/xcsv_hires.zip
wget -nc https://cdn.playmorepromode.com/files/cpma-mappack-full.zip
wget -nc -O pak9hqq37test20181106.pk3 https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/extra-pack-resolution.pk3
wget -nc -O pakxy01Tv5.pk3 https://github.com/diegoulloao/ioquake3-mac-install/raw/master/extras/hd-weapons.pk3
#wget -nc -O q3config.cfg https://gist.githubusercontent.com/oliveratgithub/b2df8ff2a76d1ff406f033701de66628/raw/2a6a856e3da322dca0e7090bb911244e11087c52/autoexec.cfg
wget -nc https://github.com/raw/twerszko/ioquake3-linux-installer/master/config/q3config.cfg
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak0/pak0.z01
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak0/pak0.z02
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak0/pak0.z03
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak0/pak0.z04
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak0/pak0.zip
cat pak0\.* > pak0_all.zip
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak1.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak2.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak3.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak4.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak5.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak6.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak7.pk3
wget -nc https://github.com/diegoulloao/ioquake3-mac-install/raw/master/dependencies/baseq3/pak8.pk3
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z01
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z02
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z03
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z04
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z05
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z06
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z07
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.z08
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps.zip
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps1.zip
wget -nc https://github.com/twerszko/ioquake3-linux-installer/raw/master/maps/maps2.zip
unsplit_zip "maps";
chmod +x ioquake3-1.36-7.1.x86_64.run
chmod +x ioquake3-q3a-1.32-9.run
if [ "$skip_ioquake3" != true ]; then
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing ioquake3 ...
When installer starts use default settings
and press \"Begin install\",
then press \"Quit\"
++++++++++++++++++++++++++++++++++++++++++++++++++"
pause
# Use default settings and close installer afterwards
./ioquake3-1.36-7.1.x86_64.run
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing Quake 3 game data ...
When installer starts use default settings
and press \"Begin install\",
then press \"Quit\"
++++++++++++++++++++++++++++++++++++++++++++++++++"
pause
# Use default settings and close installer afterwards
./ioquake3-q3a-1.32-9.run
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing pak0.pk3 ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
unzip pak0_all.zip
cp pak0.pk3 $base/baseq3/
rm pak0_all.zip
rm pak0.pk3
fi
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing pak1.pk3 - pak8.pk3 ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
cp pak1.pk3 $base/baseq3/
rm pak1.pk3
cp pak2.pk3 $base/baseq3/
rm pak2.pk3
cp pak3.pk3 $base/baseq3/
rm pak3.pk3
cp pak4.pk3 $base/baseq3/
rm pak4.pk3
cp pak5.pk3 $base/baseq3/
rm pak5.pk3
cp pak6.pk3 $base/baseq3/
rm pak6.pk3
cp pak7.pk3 $base/baseq3/
rm pak7.pk3
cp pak8.pk3 $base/baseq3/
rm pak8.pk3
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing CPMA ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
unzip cpma-1.52-nomaps.zip
mv cpma $base/
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing CPMA client ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
mkdir -p cnq3 && cd cnq3
unzip ../cnq3-1.51.zip
cd ..
mv cnq3/* $base/
chmod +x $base/cnq3-x64
rm -rf cnq3
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing high res. textures pack ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
unzip xcsv_hires.zip
cp xcsv_bq3hi-res.pk3 $base/baseq3/
cp xcsv_bq3hi-res.pk3 $base/cpma/
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing [HQQ] mod ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
cp pak9hqq37test20181106.pk3 $base/baseq3/
cp pak9hqq37test20181106.pk3 $base/cpma/
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing HD weapons pack ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
cp pakxy01Tv5.pk3 $base/baseq3/
cp pakxy01Tv5.pk3 $base/cpma/
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing CPMA maps ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
mkdir -p maps && cd maps
unzip ../cpma-mappack-full.zip
cd ..
mv maps/* $base/cpma/
rm -rf maps
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing custom maps ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
unzip maps_all.zip -d maps
mv maps/* $base/baseq3/
rm maps_all.zip
rm -rf maps
rm -f *.txt
unzip maps1.zip -d maps1
mv maps1/* $base/baseq3/
rm -rf maps1
unzip maps2.zip -d maps2
mv maps2/* $base/baseq3/
rm -rf maps2
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Installing test build ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
unzip Linux.zip
unzip release-linux-x86_64.zip -d release-linux-x86_64
rsync -a release-linux-x86_64/ ${base}/
echo "
++++++++++++++++++++++++++++++++++++++++++++++++++
Preparing config file ...
++++++++++++++++++++++++++++++++++++++++++++++++++
"
sed -i -e 's/^seta cl_renderer.*/seta cl_renderer "opengl1"/g' q3config.cfg
sed -i -e 's/^seta r_customwidth.*/seta r_customwidth "'"$screen_width"'"/g' q3config.cfg
sed -i -e 's/^seta r_width.*/seta r_width "'"$screen_width"'"/g' q3config.cfg
sed -i -e 's/^seta r_customheight.*/seta r_customheight "'"$screen_height"'"/g' q3config.cfg
sed -i -e 's/^seta r_height.*/seta r_height "'"$screen_height"'"/g' q3config.cfg
mkdir -p ~/.q3a/cpma/
test -f ~/.q3a/cpma/q3config.cfg || \
cp q3config.cfg ~/.q3a/cpma/q3config.cfg
echo "The game will start now"
pause
cd $base && ./cnq3-x64