-
Notifications
You must be signed in to change notification settings - Fork 1
/
Setup.sh
executable file
·63 lines (54 loc) · 2.69 KB
/
Setup.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
#!/bin/bash
set -e
set -x
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEPENDENCIES_DIR="${DIR}/dependencies"
# Installing Dependencies
if hash apt 2>/dev/null; then
if ! dpkg --get-selections | grep g++; then
sudo apt-get install -y g++
fi
if ! dpkg --get-selections | grep libxmu-dev; then
sudo apt-get install -y libxmu-dev
fi
if ! dpkg --get-selections | grep libxi-dev; then
sudo apt-get install -y libxi-dev
fi
if ! dpkg --get-selections | grep cmake; then
sudo apt-get install -y cmake
fi
if ! dpkg --get-selections | grep libgl1-mesa-dev; then
sudo apt-get install -y libgl1-mesa-dev
fi
if ! dpkg --get-selections | grep libjpeg-dev; then
sudo apt-get install -y libjpeg-dev
fi
if ! dpkg --get-selections | grep libtiff-dev; then
sudo apt-get install -y libtiff-dev
fi
if ! dpkg --get-selections | grep libwebp-dev; then
sudo apt-get install -y libwebp-dev
fi
if ! dpkg --get-selections | grep libfreetype6-dev; then
sudo apt-get install -y libfreetype6-dev
fi
fi
mkdir -p ${DEPENDENCIES_DIR}
cd /tmp
wget https://www.libsdl.org/release/SDL2-2.0.16.tar.gz -O SDL2-2.0.16.tar.gz
tar -xzvf SDL2-2.0.16.tar.gz
wget https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.4.tar.gz -O SDL2_image-2.0.4.tar.gz
tar -xzvf SDL2_image-2.0.4.tar.gz
wget https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.15.tar.gz -O SDL2_ttf-2.0.15.tar.gz
tar -xzvf SDL2_ttf-2.0.15.tar.gz
wget https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz -O SDL2_mixer-2.0.4.tar.gz
tar -xzvf SDL2_mixer-2.0.4.tar.gz
(cd SDL2-2.0.16 && ./configure --prefix="${DEPENDENCIES_DIR}/SDL2" && make clean && make -j4 && make install && cd ..)
(cd SDL2_image-2.0.4 && ./configure --prefix="${DEPENDENCIES_DIR}/SDL2" --with-sdl-prefix="${DEPENDENCIES_DIR}/SDL2" && make clean && make -j4 && make install && cd ..)
(cd SDL2_ttf-2.0.15 && ./configure --prefix="${DEPENDENCIES_DIR}/SDL2" --with-sdl-prefix="${DEPENDENCIES_DIR}/SDL2" && make clean && make -j4 && make install && cd ..)
(cd SDL2_mixer-2.0.4 && ./configure --prefix="${DEPENDENCIES_DIR}/SDL2" --with-sdl-prefix="${DEPENDENCIES_DIR}/SDL2" && make clean && make -j4 && make install && cd ..)
wget https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz -O glew-2.2.0.tgz
tar -xzvf glew-2.2.0.tgz
(cd glew-2.2.0 && make clean && make && GLEW_NO_GLU=1 GLEW_DEST="${DEPENDENCIES_DIR}/GLEW" make install && cd ..)
# WAYLAND SUPPORT: Comment line above and Uncomment line below
#(cd glew-2.2.0 && make clean && make && SYSTEM=linux-egl GLEW_NO_GLU=1 GLEW_DEST="${DEPENDENCIES_DIR}/GLEW" make install && cd ..)