-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·82 lines (61 loc) · 1.31 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·82 lines (61 loc) · 1.31 KB
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
#!/bin/bash
# Uncomment to use the Qt version I installed manually
# QMAKE_PATH=/opt/Qt5.12.2/5.12.2/gcc_64/bin/
QMAKE_PATH=
if [ -d build ];
then
echo "Cleaning the build directory"
rm -rf build/*
else
echo "Creating a build directory"
mkdir build
fi
if [ $? -ne 0 ];
then
echo "Error creating or cleaning the build directory"
exit 1
fi
# Go into the build directory and build the main application
cd build
${QMAKE_PATH}qmake ../src/pahsda.pro
if [ $? -ne 0 ];
then
echo "qmake failed for the main project"
exit 1
fi
make -j8
if [ $? -ne 0 ];
then
echo "make failed on the main project"
exit 1
fi
echo "Main project built successfully!"
mkdir plugins
cd plugins
for pluginDirName in ../../src/plugins/*; do
pluginName=$(basename $pluginDirName)
if [[ $pluginName =~ build-.* ]]; then
echo -e "\nIgnoring build directory $pluginName in plugins directory"
continue
fi
echo -e "\nBuilding plugin $pluginName"
mkdir $pluginName
cd $pluginName
echo "Now in $(pwd)"
qmake ../../../src/plugins/${pluginName}/*.pro
if [ $? -ne 0 ];
then
echo "qmake failed for the plugin $pluginName"
exit 1
fi
make -j8
if [ $? -ne 0 ];
then
echo "Compilation failed for the plugin $pluginName"
exit 1
fi
mv *.so ../
cd ..
echo "*** Plugin $pluginName build success!"
done
echo "Build completed"