forked from WohlSoft/Moondust-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·59 lines (49 loc) · 1.11 KB
/
build.sh
File metadata and controls
executable file
·59 lines (49 loc) · 1.11 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
#/bin/bash
bak=~+
cd $PWD
#=======================================================================
errorofbuid()
{
printf "\n\n=========ERROR!!===========\n\n"
cd $bak
exit 1
}
checkState()
{
if [ $? -eq 0 ]
then
echo "[good]"
else
errorofbuid
fi
}
if [ -f "$PWD/_paths.sh" ]
then
source "$PWD/_paths.sh"
else
echo ""
echo "_paths.sh is not exist! Run \"generate_paths.sh\" first!"
errorofbuid
fi
#=======================================================================
# build translations of the editor
cd Editor
$LRelease *.pro
checkState
cd ..
#=======================================================================
# build all components
$QMake CONFIG+=release CONFIG-=debug
checkState
#=======================================================================
make
checkState
#=======================================================================
# copy data and configs into the build directory
make install
checkState
#=======================================================================
printf "\n\n=========BUILT!!===========\n\n"
cd $bak
if [[ $1 != "no-pause" ]]; then read -n 1; fi
exit 0