-
Notifications
You must be signed in to change notification settings - Fork 1
/
Build-Linux.sh
52 lines (43 loc) · 1.09 KB
/
Build-Linux.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
# check for prerequisites
if [[ -z "${PUREWEB_HOME}" ]]; then
echo "PUREWEB_HOME environment variable is not set"
exit 1
else
echo "PUREWEB_HOME=${PUREWEB_HOME}"
fi
if [[ -z "${PUREWEB_LIBS}" ]]; then
echo "PUREWEB_LIBS environment variable is not set"
exit 1
else
echo "PUREWEB_LIBS=${PUREWEB_LIBS}"
fi
echo "Checking qmake installed"
qmake-qt5 --version &> /dev/null
if [ $? != 0 ]; then
echo "qmake-qt5 is not installed, exiting build"
exit 1
fi
# Deploy the Scribble HTML5 sample to Tomcat
echo "Building Scribble Qt"
cd ScribbleAppQt
if [ ! -d "debug" ]; then
mkdir debug
fi
if [ ! -d "debug/.obj" ]; then
mkdir debug/.obj
fi
if [ ! -d "debug/.moc" ]; then
mkdir debug/.moc
fi
qmake-qt5 -makefile scribble_solo.pro
make
if [ ! -d "${PUREWEB_HOME}/apps" ]; then
mkdir "${PUREWEB_HOME}/apps"
fi
if [ ! -d "${PUREWEB_HOME}/apps/ScribbleAppQt" ]; then
mkdir "${PUREWEB_HOME}/apps/ScribbleAppQt"
fi
cp debug/scribble ${PUREWEB_HOME}/apps/ScribbleAppQt
cp ${PUREWEB_LIBS}/C++/lib/*.so ${PUREWEB_HOME}/apps/ScribbleAppQt
cd ..
echo "Samples deployed to Tomcat"