Compare commits

..

2 commits

Author SHA1 Message Date
5132e0930a
Merge branch 'main' of itsblue.dev:plugins/qt-android
Some checks reported errors
continuous-integration/drone/push Build was killed
2022-07-28 23:29:34 +02:00
d9ccda0aad
Feat: buildscript 2022-07-28 23:29:11 +02:00
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