-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_linux64
executable file
·37 lines (31 loc) · 1.21 KB
/
build_linux64
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
#!/bin/bash
TARGET="linux64"
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
WORKSPACE=${WORKSPACE:-$SCRIPT_DIR}
BUILD_DIR="$WORKSPACE/build/build/$TARGET"
DIST_DIR="$WORKSPACE/build/dist/$TARGET"
ARTIFACTS_DIR="$WORKSPACE/build/artifacts/$TARGET"
TIMESTAMP=`date +%Y%m%d`
BUILD_ID=${BUILD_ID:-$TIMESTAMP}
CCACHE_DIR="$WORKSPACE/build/cache/$TARGET/ccache"
die() {
echo "Error:" $@
echo "Make sure your sources are compilable and run this script only in qt5-build-environment-linux64 container."
exit -1
}
cd "$WORKSPACE"
rm -rf "$BUILD_DIR"
rm -rf "$DIST_DIR"
rm -rf "$ARTIFACTS_DIR"
mkdir -p "$CCACHE_DIR"
mkdir -p "$BUILD_DIR"
mkdir -p "$ARTIFACTS_DIR"
cd "$BUILD_DIR"
cmake -DCMAKE_INSTALL_PREFIX="$DIST_DIR" "$WORKSPACE" || die "Unable to configure the program"
make -j `nproc` || die "Unable to build the program"
make install
PATH=/appimagetools/bin:$PATH linuxdeployqt $DIST_DIR/*.desktop \
-appimage \
-exclude-libs="libqsqlibase,libqsqlodbc,libqsqlpsql,libqsqltds,libqsqlmysql" \
-qmldir="$WORKSPACE/src/qml" || die "Unable to build AppImage"
mv *.AppImage "$ARTIFACTS_DIR"/