Feat: buildscript

This commit is contained in:
Dorian Zedler 2022-07-28 23:29:11 +02:00
parent 097809541f
commit d9ccda0aad
Signed by: dorian
GPG key ID: 989DE36109AFA354
2 changed files with 26 additions and 1 deletions

View file

@ -59,4 +59,6 @@ RUN echo "**** setup environment ****" && \
ENV PATH="${PATH}:/usr/lib/qt/bin:/usr/lib/jvm/java-8-openjdk-amd64/bin"
WORKDIR /src
entrypoint ["bash"]
COPY "qt-build" "/usr/local/bin/qt-build"
entrypoint ["/usr/local/bin/qt-build"]

23
qt-build Normal file
View file

@ -0,0 +1,23 @@
#!/bin/bash
set -e
[[ -z "${PLUGIN_QMAKE_ARGUMENTS}" ]] && QMAKE_ARGUMENTS=$1 || QMAKE_ARGUMENTS="${PLUGIN_QMAKE_ARGUMENTS}"
[[ -z "${PLUGIN_ANDROIDDEPLOYQT_ARGUMENTS}" ]] && ANDROIDDEPLOYQT_ARGUMENTS=$2 || ANDROIDDEPLOYQT_ARGUMENTS="${PLUGIN_ANDROIDDEPLOYQT_ARGUMENTS}"
echo "**** prepare ****"
rm -rf /build
mkdir -p /build
cd /build
echo "**** qmake ****"
qmake $QMAKE_ARGUMENTS /src
echo "**** build native code ****"
make -j8
make INSTALL_ROOT=/build/android-build install
echo "**** android build ****"
androiddeployqt --input $(ls -1 /build/android-*-deployment-settings.json) --output /build/android-build --gradle $ANDROIDDEPLOYQT_ARGUMENTS
echo "**** finish up ****"
mv /build/android-build//build/outputs /src/outputs