-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathinstall-dependencies-gui.sh
executable file
·122 lines (101 loc) · 3.26 KB
/
install-dependencies-gui.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
#!/bin/bash
# Installing dependencies needed to build ThermoFunGUI on (k)ubuntu linux 16.04 or 18.04
#Needs gcc v.5 or higher and ArangoDB server locally installed
# installing dependencies of thermofun library
chmod u+x install-dependencies.sh
./install-dependencies.sh
sudo apt-get install -y lua5.3-dev libboost-all-dev libcurl4-openssl-dev libboost-test-dev automake flex bison libssl-dev libgl-dev
# Uncomment what is necessary to reinstall by force
#sudo rm -f /usr/local/lib/pugixml.so
#sudo rm -f /usr/local/lib/libyaml-cpp.so
#sudo rm -f /usr/local/lib/libthrift.a
#sudo rm -f /usr/local/lib/libjsonimpex.a
sudo rm -f /usr/local/lib/libjsonui.a
threads=3
QT_PATH=$1
echo $QT_PATH
BRANCH_JSON=master
workfolder=${PWD}
# pugixml
test -f /usr/local/lib/libpugixml.so || {
# Building yaml-cpp library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/zeux/pugixml.git && \
cd pugixml && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DCMAKE_PREFIX_PATH=$QT_PATH && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# YAMLCPP
test -f /usr/local/lib/libyaml-cpp.so || {
# Building yaml-cpp library
mkdir -p ~/code && \
cd ~/code && \
git clone https://github.com/jbeder/yaml-cpp.git && \
cd yaml-cpp && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DYAML_CPP_BUILD_TOOLS=OFF -DYAML_CPP_BUILD_CONTRIB=OFF -DCMAKE_PREFIX_PATH=$QT_PATH && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# Thrift
# if no Thrift installed in /usr/local/lib/libthrift.a (/usr/local/include/thrift)
test -f /usr/local/lib/libthrift.a || {
# Building thrift library
mkdir -p ~/code && \
cd ~/code && \
git clone http://github.com/apache/thrift && \
cd thrift && \
./bootstrap.sh && \
./configure --without-lua --without-qt5 && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
## JSONIMPEX (added for building ThermoMatch code)
## if no JSONIMPEX installed in /usr/local/lib/libjsonimpex.a (/usr/local/include/jsonimpex)
test -f /usr/local/lib/libjsonimpex.a || {
# Building jsonimpex library
mkdir -p ~/code && \
cd ~/code && \
git clone https://bitbucket.org/gems4/jsonimpex.git -b $BRANCH_JSON && \
cd jsonimpex && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
# JSONUI database client (added for building ThermoMatch code)
# if no JSONUI installed in /usr/local/lib/libjsonui.a (/usr/local/include/jsonui)
test -f /usr/local/lib/libjsonui.a || {
# Building jsonui library
mkdir -p ~/code && \
cd ~/code && \
git clone https://bitbucket.org/gems4/jsonui.git && \
cd jsonui && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_CXX_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=Release -DJSONUI_NO_IMPEX=ON -DCMAKE_PREFIX_PATH=$QT_PATH && \
make -j $threads && \
sudo make install
# Removing generated build files
cd ~ && \
rm -rf ~/code
}
sudo ldconfig