-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoInstallerDooM.sh
executable file
·221 lines (211 loc) · 10.2 KB
/
AutoInstallerDooM.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
#!/bin/bash
# This script installs the latest development versions of GZDoom, Zandronum and Doomseeker.
# Do not execute it with root permissions (sudo). At the approprate points it will ask for your sudo password.
# Make the script executable with "chmod +x AutoInstallerDoom.sh" or "sudo chmod +x AutoInstallerDoom.sh" and execute with "./AutoInstallerDoom.sh".
# To update to newer versions, run the script again.
# To uninstall GZDoom run "sudo rm -rfv /usr/games/gzdoom && sudo rm -fv /usr/bin/gzdoom".
# To uninstall Zandronum run "sudo rm -rfv /usr/games/zandronum && sudo rm -fv /usr/bin/zandronum && sudo rm -fv /usr/bin/zandronum-server".
# To uninstall Doomseeker run "sudo rm -rfv /usr/games/doomseeker && sudo rm -fv /usr/bin/doomseeker".
# All of the commands shown above are to be run without the quotation marks ("").
# After instalation has finished you can remove the three *_build ddirectories made in your /home/username folder.
# You still need to provide the appropriate .wad files (doom.wad, doom2.wad, plutonia.wad, tnt.wad) and configure the clients and source ports yourself.
# Authors: Emil Yavorov Zahariev & Samuil Plamenov.
echo "Select the Linux distribution, or child derivative, you are running: "
PS3="-> "
# set distro list
select distro in Debian Arch RedHatOrFedora Gentoo Mageia OpenSUSE PCLinuxOS Solus
do
case $distro in
Debian)
sudo apt install build-essential zlib1g-dev libsdl1.2-dev libsdl2-dev libjpeg-dev nasm tar libbz2-dev libgtk-3-dev cmake \
libgme-dev libopenal-dev libmpg123-dev libsndfile1-dev timidity libwildmidi-dev libgl1-mesa-dev libglew-dev \
g++ make qttools5-dev qttools5-dev-tools qtmultimedia5-dev libqt4-dev git libfluidsynth-dev libgtk2.0-dev mercurial libssl-dev
;;
Arch)
sudo pacman -S --needed gcc cmake mercurial make zlib bzip2 qt5-tools qt5-base qt5-multimedia qt4 gtk2 \
sdl sdl2 libjpeg-turbo nasm tar bzip2 gtk3 git \
fluidsynth libgme openal mpg123 libsndfile timidity++ wildmidi mesa glu glew openssl
;;
RedHatOrFedora)
sudo dnf install gcc-c++ make zlib-devel SDL-devel SDL2-devel libjpeg-turbo-devel \
nasm tar bzip2-devel gtk3-devel cmake git fluidsynth-devel game-music-emu-devel \
openal-soft-devel libmpg123-devel libsndfile-devel timidity++ wildmidi-devel \
mesa-libGL-devel glew-devel gtk2-devel mercurial openssl-devel \
qt5-qttools-devel qt5-qtmultimedia-devel qt-devel
;;
Gentoo)
sudo sys-devel/gcc sys-devel/make sys-libs/zlib media-libs/libsdl media-libs/libsdl2 media-libs/libjpeg-turbo \
dev-lang/nasm app-arch/tar app-arch/bzip2 x11-libs/gtk+ dev-util/cmake dev-vcs/git media-sound/fluidsynth \
media-libs/game-music-emu media-libs/openal media-sound/mpg123 media-libs/libsndfile media-sound/timidity++ media-sound/wildmidi \
media-libs/mesa media-libs/glu media-libs/glewdev-libs/openssl dev-qt/linguist dev-qt/linguist-tools dev-qt/qtmultimedia dev-qt/qtcore
;;
Mageia)
sudo a='' && [ "$(uname -m)" = x86_64 ] && a=64
urpmi gcc-c++ make lib"$a"zlib-devel lib"$a"SDL-devel lib"$a"sdl2.0-devel \
lib"$a"jpeg-devel nasm tar lib"$a"bzip2-devel lib"$a"gtk+3.0-devel cmake git \
lib"$a"fluidsynth-devel lib"$a"gme-devel lib"$a"openal-devel \
lib"$a"mpg123-devel lib"$a"sndfile-devel TiMidity++ lib"$a"wildmidi-devel \
lib"$a"mesagl1-devel lib"$a"glew-devel lib"$a"cairo-devel \
lib"$a"qt5base5-devel qttools5 lib"$a"qt5help-devel lib"$a"qt5multimedia-devel \
lib"$a"qt4-devel lib"$a"qtcore4lib"$a"gtk+2.0-devel mercurial lib"$a"openssl-devel
;;
OpenSUSE)
sudo zypper install gcc-c++ make zlib-devel libSDL-devel libSDL2-devel libjpeg-devel \
nasm tar libbz2-devel gtk3-devel cmake git fluidsynth-devel libgme-devel \
openal-soft-devel mpg123-devel libsndfile-devel timidity \
Mesa-libGL-devel glew-devel mercurial libqt5-qttools-devel \
libqt5-qtmultimedia-devel libqt4-devel gtk2-devel libopenssl-devel
;;
PCLinuxOS)
sudo a='' && [ "$(uname -m)" = x86_64 ] && a=64
urpmi gcc-c++ make lib"$a"zlib-devel lib"$a"SDL-devel lib"$a"sdl2.0-devel \
lib"$a"jpeg-devel nasm tar lib"$a"bzip2-devel lib"$a"gtk+3.0-devel cmake git \
lib"$a"fluidsynth-devel lib"$a"gme-devel lib"$a"openal-devel \
lib"$a"mpg123-devel lib"$a"sndfile-devel TiMidity++ lib"$a"wildmidi-devel \
lib"$a"mesagl1-devel lib"$a"glew-devel lib"$a"cairo-devel \
lib"$a"qt5base5-devel qttools5 lib"$a"qt5help-devel lib"$a"qt5multimedia-devel \
lib"$a"qt4-devel lib"$a"qtcore4lib"$a"gtk+2.0-devel mercurial lib"$a"openssl-devel
;;
Solus)
sudo a='' && [ "$(uname -m)" = x86_64 ] && a=64
urpmi gcc-c++ make lib"$a"zlib-devel lib"$a"SDL-devel lib"$a"sdl2.0-devel \
lib"$a"jpeg-devel nasm tar lib"$a"bzip2-devel lib"$a"gtk+3.0-devel cmake git \
lib"$a"fluidsynth-devel lib"$a"gme-devel lib"$a"openal-devel \
lib"$a"mpg123-devel lib"$a"sndfile-devel TiMidity++ lib"$a"wildmidi-devel \
lib"$a"mesagl1-devel lib"$a"glew-devel lib"$a"cairo-devel \
lib"$a"qt5base5-devel qttools5 lib"$a"qt5help-devel lib"$a"qt5multimedia-devel \
lib"$a"qt4-devel lib"$a"qtcore4lib"$a"gtk+2.0-devel mercurial lib"$a"openssl-devel
;;
*)
echo "Error: Please try again (select 1...8)!"
;;
esac
# GZDoom Building
# making build dir
mkdir -pv "$HOME"/gzdoom_build
# getting source
cd "$HOME"/gzdoom_build && \
git clone git://github.com/coelckers/gzdoom.git && \
mkdir -pv gzdoom/build
# double check latest source
cd gzdoom
git config --local --add remote.origin.fetch +refs/tags/*:refs/tags/*
git pull
# downloading and install fmod
cd "$HOME"/gzdoom_build && \
wget -nc http://zdoom.org/files/fmod/fmodapi44464linux.tar.gz && \
tar -xvzf fmodapi44464linux.tar.gz -C gzdoom
# compiling development version
cd "$HOME"/gzdoom_build/gzdoom/build && \
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
make clean ; \
cmake -DCMAKE_BUILD_TYPE=Release \
-DFMOD_LIBRARY="$HOME"/gzdoom_build/gzdoom/fmodapi44464linux/api/lib/libfmodex"$a"-4.44.64.so \
-DFMOD_INCLUDE_DIR="$HOME"/gzdoom_build/gzdoom/fmodapi44464linux/api/inc .. && \
make
# making dir in /usr/games on system
sudo mkdir -pv /usr/games/gzdoom
# copy to dir
cd "$HOME"/gzdoom_build/gzdoom && \
t="$(git describe --exact-match --tags 2>/dev/null)" ; \
d='' && [ -z "$t" ] ; \
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
sudo cp -v {build/{gzdoom,gzdoom.pk3,lights.pk3,\
brightmaps.pk3,output_sdl/liboutput_sdl.so},\
fmodapi44464linux/api/lib/libfmodex"$a"-4.44.64.so} \
/usr/games/gzdoom
# add exec permission to scripts and move to /usr/bin
cd "$HOME"/gzdoom_build/gzdoom && \
t="$(git describe --exact-match --tags 2>/dev/null)" ; \
d='' && [ -z "$t" ] ; \
cd /tmp && \
echo '#!/bin/sh' > gzdoom && \
echo >> gzdoom && \
echo "export LD_LIBRARY_PATH=/usr/games/gzdoom" >> gzdoom && \
echo "exec /usr/games/gzdoom"$d"/gzdoom \"\$@\"" >> gzdoom && \
chmod 755 gzdoom && \
sudo mv -v gzdoom /usr/bin
# Zandronum Building
# making build dir
mkdir -pv "$HOME"/zandronum_build
# getting source
cd "$HOME"/zandronum_build && \
hg clone https://bitbucket.org/Torr_Samaho/zandronum && \
mkdir -pv zandronum/{buildclient,buildserver}
# double check latest source and downloading and install fmod
cd "$HOME"/zandronum_build && \
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
wget -nc http://zandronum.com/essentials/fmod/fmodapi42416linux"$a".tar.gz && \
tar -xvzf fmodapi42416linux"$a".tar.gz -C zandronum
# compiling client
cd "$HOME"/zandronum_build/zandronum/buildclient && \
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
make clean ; \
cmake -DCMAKE_BUILD_TYPE=Release \
-DFMOD_LIBRARY="$HOME"/zandronum_build/zandronum/fmodapi42416linux"$a"/api/lib/libfmodex"$a"-4.24.16.so \
-DFMOD_INCLUDE_DIR="$HOME"/zandronum_build/zandronum/fmodapi42416linux"$a"/api/inc .. && \
make
# compiling server
cd "$HOME"/zandronum_build/zandronum/buildserver && \
make clean ; \
cmake -DCMAKE_BUILD_TYPE=Release -DSERVERONLY=ON .. && \
make
# making dir in /usr/games on system
sudo mkdir -pv /usr/games/zandronum
# copy to dir
cd "$HOME"/zandronum_build/zandronum && \
t="$(hg id -t)" && \
d='' && [ "$t" = tip ] || [ -z "$t" ] ; \
a='' && [ "$(uname -m)" = x86_64 ] && a=64 ; \
sudo cp -v {buildclient/{zandronum,zandronum.pk3,\
skulltag_actors.pk3,output_sdl/liboutput_sdl.so},\
buildserver/zandronum-server,fmodapi42416linux"$a"/api/lib/libfmodex"$a"-4.24.16.so} \
/usr/games/zandronum
# add exec permissions for client
cd "$HOME"/zandronum_build/zandronum && \
t="$(hg id -t)" && \
d='' && [ "$t" = tip ] || [ -z "$t" ] ; \
cd /tmp && \
echo '#!/bin/sh' > zandronum && \
echo >> zandronum && \
echo "export LD_LIBRARY_PATH=/usr/games/zandronum" >> zandronum && \
echo "exec /usr/games/zandronum/zandronum \"\$@\"" >> zandronum && \
chmod 755 zandronum && \
sudo mv -v zandronum /usr/bin
# add exec permissions for server
cd "$HOME"/zandronum_build/zandronum && \
t="$(hg id -t)" && \
d='' && [ "$t" = tip ] || [ -z "$t" ] ; \
cd /tmp && \
echo '#!/bin/sh' > zandronum-server && \
echo >> zandronum-server && \
echo "exec /usr/games/zandronum/zandronum-server \"\$@\"" >> zandronum-server && \
chmod 755 zandronum-server && \
sudo mv -v zandronum-server /usr/bin
# Doomseeker Build
# make build dir
mkdir -pv "$HOME"/doomseeker_build
# get source
cd "$HOME"/doomseeker_build && \
hg clone https://bitbucket.org/Doomseeker/doomseeker && \
mkdir -pv doomseeker/build
# compile source
cd "$HOME"/doomseeker_build/doomseeker/build && \
make clean ; rm -f engines/*.so ; \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make
# make /usr/games dir
sudo mkdir -pv /usr/games/doomseeker
# copy to dir
sudo cp -rv /home/"$USER"/doomseeker_build/doomseeker/build/{doomseeker,\
libwadseeker.so,engines} /usr/games/doomseeker
# add exec permissions
cd /tmp && \
echo '#!/bin/sh' > doomseeker && \
echo >> doomseeker && \
echo 'export LD_LIBRARY_PATH=/usr/games/doomseeker' >> doomseeker && \
echo 'exec /usr/games/doomseeker/doomseeker "$@"' >> doomseeker && \
chmod 755 doomseeker && \
sudo mv -v doomseeker /usr/bin
echo "The install has finished. You are now free to exit this script either by pressing Ctrl+c or by closing the terminal."
done