forked from opengazer/OpenGazer
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdependencies.sh
59 lines (43 loc) · 1.5 KB
/
dependencies.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
#!/bin/bash
exit_script () {
echo $1
popd 2>&1 > /dev/null
exit 1
}
pushd ~ 2>&1 > /dev/null
echo "Installing dependencies for OpenGazer...this may take a while..."
if [[ "$(uname)" == "Linux" ]] ; then
echo "Installing libraries for OpenCV, Boost, GSL, FANN and CMake"
sudo apt-get update
sudo apt-get install -y libopencv-dev libboost-dev libboost-system-dev libboost-filesystem-dev libgsl0-dev libfann2 libfann-dev libv4l-dev cmake wget
echo "Installing GSL from source"
wget ftp://ftp.gnu.org/gnu/gsl/gsl-1.15.tar.gz
tar zxvf gsl-1.15.tar.gz
pushd gsl-1.15 2>&1 > /dev/null
./configure
make
sudo make install
echo "Installing FFMPEG from source"
{ popd; popd; } 2>&1 > /dev/null
bash ffmpeg.sh
echo "Installing QT from Ubuntu repositories"
sudo apt-get install -y qt5-default
elif [[ "$(uname)" == "Darwin" ]] ; then
echo "OSX detected - this script hasn't yet been tested on OSX, but it should be fine. Press any key to continue or kill it now with Ctrl-C..."
read
if ! type brew 2>&1 > /dev/null ; then
exit_script "You must first install Homebrew"
fi
if ! type xcodebuild 2>&1 > /dev/null ; then
exit_script "You must first install Xcode"
fi
if [[ ! -d /Applications/Utilities/XQuartz.app ]] ; then
exit_script "You must first install XQuartz"
fi
brew tap homebrew/science
brew install gsl cmake ffmpeg opencv fann boost
brew install qt5
brew link --force qt5
fi
popd 2>&1 /dev/null
echo "\n\nCompleted installing dependencies for OpenGazer!"