forked from opencog/TinyCog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
InstallDeps.sh
executable file
·140 lines (107 loc) · 3.5 KB
/
InstallDeps.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
#!/bin/bash
set -e
opencv_deps="
build-essential cmake libgtkglext1-dev libvtk6-dev zlib1g-dev libjpeg-dev libwebp-dev libpng-dev libtiff5-dev libjasper-dev libopenexr-dev libgdal-dev libgphoto2-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev yasm libopencore-amrnb-dev libopencore-amrwb-dev libv4l-dev libxine2-dev v4l-utils libtbb-dev libeigen3-dev python-dev python-tk python-numpy python3-dev python3-tk python3-numpy"
install_festival="
festival festival-dev"
pocketsphinx_deps="
automake autoconf libtool bison swig python-dev libpulse-dev"
#set(BUILD_SHARED_LIBS true)
export dlib_version="19.15"
export guile_version="2.2"
export raspicam_version="0.1.6"
export opencv_version="3.2.0"
export opencv_contrib_version="3.2.0"
GUILE_DEB="guile-2.2.3-1_armhf.deb" # http://144.76.153.5/opencog/guile-2.2.3-1_armhf.deb
# Opencv
echo "Installing OpenCV"
sudo apt-get install -y $opencv_deps
wget https://github.com/opencv/opencv/archive/$opencv_version.zip -O opencv_$opencv_version.zip
unzip opencv_$opencv_version.zip
rm opencv_$opencv_version.zip
mv opencv-$opencv_version OpenCV
cd OpenCV
#OpenCV_contrib library
wget https://github.com/opencv/opencv_contrib/archive/$opencv_contrib_version.zip -O opencv_contrib_$opencv_contrib_version.zip
unzip opencv_contrib_$opencv_contrib_version.zip
rm opencv_contrib_$opencv_contrib_version.zip
mv opencv_contrib-$opencv_contrib_version OpenCV_contrib
mkdir build
cd build
cmake -DOPENCV_EXTRA_MODULES_PATH=../OpenCV_contrib/modules -DWITH_QT=OFF -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DINSTALL_C_EXAMPLES=OFF -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=OFF -DENABLE_PRECOMPILED_HEADERS=OFF ..
make -j $(($(nproc) + 1))
sudo make install
cd ../..
sudo rm -r OpenCV
#dlib
echo "Installing dlib version $dlib_version"
wget https://github.com/davisking/dlib/archive/v$dlib_version.tar.gz
tar -xf v$dlib_version.tar.gz
rm v$dlib_version.tar.gz
cd dlib-$dlib_version
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON ..
sudo make install
cd ../..
sudo rm -r dlib-$dlib_version
#guile
echo "Installing guile version $guile_version"
wget http://144.76.153.5/opencog/$GUILE_DEB
sudo dpkg -i $GUILE_DEB
sudo apt-get -f install
rm $GUILE_DEB
#festival
echo "Installing festival"
sudo apt-get install -y $install_festival
#pocketSphinx
echo "Installing pocketsphinx"
sudo apt-get install -y $install_pocketsphinx_deps
mkdir sphinx
cd sphinx/
wget https://github.com/cmusphinx/sphinxbase/archive/master.zip -O sphinxbase.zip
unzip sphinxbase.zip
cd sphinxbase-master
./autogen.sh
make
sudo make install
sudo sed -i "$ a /usr/local/lib" /etc/ld.so.conf
sudo ldconfig
cd ..
sudo rm sphinxbase.zip
wget https://github.com/cmusphinx/pocketsphinx/archive/master.zip -O pocketsphinx.zip
unzip pocketsphinx.zip
cd pocketsphinx-master
./autogen.sh
make
sudo make install
cd ../..
sudo rm -r sphinx
if [ $(uname -m) == "armv7l" ]
then
#raspicam
echo "Installing raspicam version $raspicam_version"
wget https://sourceforge.net/projects/raspicam/files/raspicam-$raspicam_version.zip/download -O raspicam.zip
unzip raspicam.zip
rm raspicam.zip
cd raspicam-$raspicam_version
mkdir build
cd build
cmake ..
make
sudo make install
cd ../..
sudo rm -r raspicam-$raspicam_version
#wiringpi
echo "Installing wiringpi"
wget https://github.com/WiringPi/WiringPi/archive/master.zip -O wiringpi.zip
unzip wiringpi.zip
rm wiringpi.zip
cd WiringPi-master
./build
cd ..
sudo rm -r WiringPi-master
else
echo "Not an arm machine!!"
exit 1
fi