22set -ex
33
44export MAKEFLAGS=-j$( nproc)
5- # export MAKEFLAGS=-j1
65export QPMX_CACHE_DIR=/tmp/qpmx-cache
76
87DS_NAME=qdsappd
98QT_VERSION_TAG=v5.12.0
10- CRYPTOPP_VERSION_MAJOR=7
11- CRYPTOPP_VERSION_MINOR=0
12- CRYPTOPP_VERSION_PATCH=0
13- CRYPTOPP_VERSION=${CRYPTOPP_VERSION_MAJOR} _${CRYPTOPP_VERSION_MINOR} _${CRYPTOPP_VERSION_PATCH}
149MAIN_DEP=" libssl1.1 zlib1g libdbus-1-3 libc6 libglib2.0-0 libudev1 libpcre2-16-0 libpq5 libdouble-conversion1 libicu57 libinput10 ca-certificates"
1510DEV_DEP=" openssl libssl-dev zlib1g-dev dbus libdbus-1-dev libc6-dev libglib2.0-dev libudev-dev libdouble-conversion-dev libicu-dev libpcre2-dev libpq-dev libinput-dev make gcc g++ curl python3 git perl gawk"
1611
12+ if [ ! -d " /tmp/src/.git" ]; then
13+ echo " Failed to find .git directory - not supported!"
14+ exit 1
15+ fi
16+
1717apt-get -qq update
1818apt-get -qq install --no-install-recommends $MAIN_DEP $DEV_DEP
1919
@@ -24,9 +24,10 @@ install -m 755 ./qpm /usr/local/bin/
2424mkdir /tmp/sysbuild
2525cd /tmp/sysbuild
2626
27- # build qtbase
28- git clone --depth 1 https://code.qt.io/qt/qtbase.git ./qtbase --branch $QT_VERSION_TAG
29- cd qtbase
27+ # build qt
28+ git clone --depth 1 https://code.qt.io/qt/qt5.git ./qt5 --branch $QT_VERSION_TAG
29+ cd qt5
30+ ./init-repository --module-subset=" qtbase,qtwebsockets,qttools"
3031_qt5_prefix=/usr/lib/qt5
3132_qt5_datadir=/usr/share/qt5
3233./configure -confirm-license -opensource \
@@ -54,16 +55,6 @@ make > /dev/null
5455make install
5556cd ..
5657
57- # build qt modules
58- for repo in qtwebsockets qttools; do
59- git clone --depth 1 https://code.qt.io/qt/$repo .git ./$repo --branch $QT_VERSION_TAG
60- cd $repo
61- qmake
62- make > /dev/null
63- make install
64- cd ..
65- done
66-
6758# build json serializer, qpmx, qtservice
6859for repo in QtJsonSerializer qpmx QtService; do
6960 git clone https://github.com/Skycoder42/$repo .git ./$repo
@@ -92,6 +83,8 @@ cd /tmp/src
9283git submodule init
9384git submodule update
9485echo " SUBDIRS = 3rdparty messages" >> src/src.pro
86+ echo " SUBDIRS = " >> examples/examples.pro
87+ echo " SUBDIRS = " >> tests/tests.pro
9588
9689qmake
9790make qmake_all
@@ -101,7 +94,7 @@ make install
10194# create special symlinks, dirs and move the env script
10295mkdir -p /etc/$DS_NAME
10396ln -s $( qmake -query QT_INSTALL_BINS) /$DS_NAME /usr/bin/$DS_NAME || true # allow to fail if already exists
104- mv dockerbuild/env_start.sh /usr/bin/
97+ mv /tmp/src/tools/appserver/ dockerbuild/env_start.sh /usr/bin/
10598
10699# test if working
107100/usr/bin/$DS_NAME --version
0 commit comments