-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
58 lines (58 loc) · 1.54 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
echo Checking if Homebrew is installed
if which -s brew > /dev/null ; then
echo Homebrew already installed
echo Installing dependencies
if brew ls --versions pkg-config > /dev/null; then
echo pkg-config already installed
else
echo Installing pkg-config
brew install pkg-config
fi
if brew ls --versions sdl2 > /dev/null; then
echo SDL2 already installed
else
echo Installing SDL2
brew install sdl2
fi
if brew ls --versions sdl2_ttf > /dev/null; then
echo SDL2_TTF already installed
else
echo Installing SDL2_TTF
brew install sdl2_ttf
fi
if brew ls --versions sfml > /dev/null; then
echo SFML already installed
else
echo Installing SFML
brew install sfml
fi
echo Making libraries
echo making SFMLv2 library
cd libs/lib1-SFMLv2
cmake .
make
cd ../../
if [ -f libs/lib1-SFMLv2/libSFMLv2.so ]; then
mv libs/lib1-SFMLv2/libSFMLv2.so .
fi
echo making SDL library
cd libs/lib2-sdl
cmake .
make
cd ../../
if [ -f libs/lib2-sdl/libSDL.so ]; then
mv libs/lib2-sdl/libSDL.so .
fi
echo making SFML library
cd libs/lib3-sfml
cmake .
make
cd ../../
if [ -f libs/lib3-sfml/libSFML.so ]; then
mv libs/lib3-sfml/libSFML.so .
fi
else
echo Installing Homebrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Tolsadus/42homebrewfix/master/install.sh)"
echo Please open a new terminal and run "make" again.
fi