-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
47 lines (34 loc) · 878 Bytes
/
build.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
#!/bin/bash
if [[ $1 == "clean" ]]; then
echo "Cleaning ..."
rm -Rf build/CMakeCache.txt
rm -Rf build/CMakeFiles
rm -Rf build/Makefile
rm -Rf build/common/toolkit/CMakeCache.txt
rm -Rf build/common/toolkit/CMakeFiles
rm -Rf build/common/toolkit/Makefile
fi
if [[ $1 == "package" ]]; then
echo "Packaging ..."
rm -f build/AppDir/deusmagi.log
ls -Q build/AppDir/server | grep -v .gitignore | xargs rm -f
ARCH=x86_64 appimagetool -n build/AppDir build/DeusMagi.AppImage
exit 0
fi
if [[ $1 == "debug" ]]; then
echo "Debugging ..."
cd build
./DeusMagi.AppImage debug
cd ..
exit 0
fi
cd build
cmake \
-DPACKAGE_VERSION="0.1.0" \
-DPACKAGE_VERSION_MAJOR=0 \
-DPACKAGE_VERSION_MINOR=1 \
-DPACKAGE_VERSION_PATCH=0 \
-DCMAKE_BUILD_TYPE="Debug" \
.
make
cd ..