-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·80 lines (75 loc) · 2.42 KB
/
install.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
#!/bin/sh
C_PATH=$PWD
if [ -e "$C_PATH/glib/sfml" ]
then
echo "\033[32;1mSFML : [Already Done !]\033[0m"
else
echo "\033[33;1m[SFML: Downloading]"
git clone https://github.com/SFML/SFML/ glib/sfml
echo "\033[33m[SFML: install]\c"
cd glib/sfml
cmake -DFREETYPE_INCLUDE_DIR_ft2build:PATH=$C_PATH/glib/sfml/extlibs/headers .
make
cp -r $C_PATH/glib/sfml/extlibs/libs-osx/Frameworks/ ~/Library/.
echo "\r\033[32;1m[SFML: install Complete]"
cd $C_PATH
echo "\033[32;1m[SFML: Done]\033[0m"
fi
if [ -e "$C_PATH/glib/sdl" ]
then
echo "\033[32;1mSDL : [Already Done !]\033[0m"
else
echo "\033[33;1m[SDL: Downloading]"
curl -o SDL.tar.gz https://www.libsdl.org/release/SDL2-2.0.5.tar.gz
tar -zxvf SDL.tar.gz
rm SDL.tar.gz
mv SDL2-2.0.5 glib/sdl
cd glib/sdl
echo "\033[33m[SDL: install]\c\n"
./configure --prefix=$C_PATH/glib/sdl
make
make install-lib
make install-hdrs
echo "\r\033[32;1m[SDL: install Complete]"
cd $C_PATH
echo "\033[32;1m[SDL: Done]\033[0m"
fi
if [ -e "$C_PATH/glib/sdl_ttf" ]
then
echo "\033[32;1mSDL_TTF : [Already Done !]\033[0m"
else
echo "\033[33;1m[SDL_TTF: Downloading]"
curl -o SDL_TTF.tar.gz https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.14.tar.gz
tar -zxvf SDL_TTF.tar.gz
rm SDL_TTF.tar.gz
mv SDL2_ttf-2.0.14 glib/sdl_ttf
cd glib/sdl_ttf
echo "\033[33m[SDL_TTF: install]\c\n"
export SDL2_CONFIG=$C_PATH/glib/sdl/sdl2-config
./configure --with-sdl-prefix=$C_PATH/glib/sdl --exec-prefix=$C_PATH/glib/sdl_ttf --prefix=$C_PATH/glib/sdl_ttf
make
make install
echo "\r\033[32;1m[SDL_TTF: install Complete]"
cd $C_PATH
echo "\033[32;1m[SDL_TTF: Done]\033[0m"
fi
if [ -e "$C_PATH/glib/glfw" ]
then
echo "\033[32;1mGLFW : [Already Done !]\033[0m"
else
echo "\033[33;1m[GLFW: Downloading]"
git clone https://github.com/glfw/glfw.git glib/glfw
echo "\033[33m[GLFW: install]\c\n"
cd glib/glfw
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$PWD .
make
make install
echo "\r\033[32;1m[GLFW: install Complete]"
cd $C_PATH
echo "\033[32;1m[GLFW: Done]\033[0m"
fi
make
echo "\033[33;1mType:\033[0m export LD_LIBRARY_PATH=\"$C_PATH/glib/sfml/lib:$C_PATH/glib/sdl/lib:$C_PATH/glib/glfw/lib\""
echo "\033[33;1mType:\033[0m export DYLD_LIBRARY_PATH=\"$C_PATH/glib/sfml/lib:$C_PATH/glib/sdl/lib:$C_PATH/glib/glfw/lib\""
export LD_LIBRARY_PATH="$C_PATH/glib/sfml/lib:$C_PATH/glib/sdl/lib:$C_PATH/glib/glfw/lib"
export DYLD_LIBRARY_PATH="$C_PATH/glib/sfml/lib:$C_PATH/glib/sdl/lib:$C_PATH/glib/glfw/lib"