Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Merge pull request #62 from opengisch/5_14
Browse files Browse the repository at this point in the history
5 14
  • Loading branch information
m-kuhn authored Jun 11, 2020
2 parents f20cc8a + 05845d2 commit 4d57352
Show file tree
Hide file tree
Showing 14 changed files with 585 additions and 29 deletions.
7 changes: 6 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
- run:
name: Build Docker image
command: |
docker build --build-arg QT_VERSION=$(cat qt_version.txt) -t qt-ndk .docker/qt-ndk
case $CIRCLE_NODE_INDEX in
0)
export ARCH='armeabi-v7a'
Expand Down Expand Up @@ -47,6 +49,10 @@
at: /tmp/workspace
- checkout
- setup_remote_docker
- run:
name: Recreate qt base image
command: |
docker build --build-arg QT_VERSION=$(cat qt_version.txt) -t qt-ndk .docker/qt-ndk
- run:
name: Recreate docker image
command: |
Expand All @@ -68,7 +74,6 @@
name: Publish SDK to Github Releases
command: |
rm /tmp/workspace/Dockerfile
echo "Built with https://github.com/opengisch/docker-qt-ndk/releases/tag/"$(awk -F ":" '/FROM/{print $2}' Dockerfile) >> /tmp/workspace/qt-ndk.txt
tar -zcf /tmp/osgeo4a.tar.gz -C /tmp/workspace osgeo4a
./scripts/upload_release_asset.py /tmp/osgeo4a.tar.gz $CIRCLE_TAG
workflows:
Expand Down
7 changes: 5 additions & 2 deletions .docker/assemble/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM opengisch/qt-ndk:5.13.1-1
FROM qt-ndk
MAINTAINER Matthias Kuhn <[email protected]>

ENV DEBIAN_FRONTEND noninteractive

USER root

RUN apt update && apt install -y file zip
COPY osgeo4a /home/osgeo4a
ADD osgeo4a-armeabi-v7a.tar.gz /home/osgeo4a
ADD osgeo4a-arm64-v8a.tar.gz /home/osgeo4a
ADD osgeo4a-x86.tar.gz /home/osgeo4a
ADD osgeo4a-x86_64.tar.gz /home/osgeo4a
106 changes: 106 additions & 0 deletions .docker/qt-ndk/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
FROM ubuntu:20.04
MAINTAINER Matthias Kuhn <[email protected]>
ARG QT_VERSION
ARG NDK_VERSION=r21
ARG SDK_PLATFORM=android-21
ARG SDK_BUILD_TOOLS=28.0.3
ARG SDK_PACKAGES="tools platform-tools"

ENV DEBIAN_FRONTEND noninteractive
ENV QT_PATH /opt/Qt
ENV QT_ANDROID_BASE ${QT_PATH}/${QT_VERSION}
ENV ANDROID_HOME /opt/android-sdk
ENV ANDROID_SDK_ROOT ${ANDROID_HOME}
ENV ANDROID_NDK_ROOT /opt/android-ndk
ENV ANDROID_NDK_HOST linux-x86_64
ENV ANDROID_NDK_PLATFORM android-21
ENV QMAKESPEC android-clang
ENV PATH ${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}

# Install updates & requirements:
# * git, openssh-client, ca-certificates - clone & build
# * locales, sudo - useful to set utf-8 locale & sudo usage
# * curl - to download Qt bundle
# * make, default-jdk, ant - basic build requirements
# * libsm6, libice6, libxext6, libxrender1, libfontconfig1, libdbus-1-3 - dependencies of Qt bundle run-file
# * libc6:i386, libncurses5:i386, libstdc++6:i386, libz1:i386 - dependencides of android sdk binaries
RUN dpkg --add-architecture i386 && apt-get -qq update && apt-get -qq dist-upgrade && apt-get install -qq -y --no-install-recommends \
git \
openssh-client \
ca-certificates \
locales \
sudo \
curl \
make \
openjdk-8-jdk \
ant \
libarchive-tools \
p7zip-full \
libsm6 \
libice6 \
libxext6 \
libxrender1 \
libfontconfig1 \
libdbus-1-3 \
xz-utils \
libc6:i386 \
libncurses5:i386 \
libstdc++6:i386 \
libz1:i386 \
libxkbcommon-x11-0 \
&& apt-get -qq clean

RUN apt-get install -qq -y --no-install-recommends \
bzip2 \
unzip \
gcc \
g++ \
cmake \
patch \
python3 \
rsync \
flex \
bison \
file \
python3-six \
zip \
pkg-config \
protobuf-compiler

COPY install-qt.sh /tmp/qt/

RUN /tmp/qt/install-qt.sh --version ${QT_VERSION} --target android --directory "${QT_PATH}" --toolchain any \
qtbase \
qtsensors \
qtquickcontrols2 \
qtquickcontrols \
qtmultimedia \
qtlocation \
qtimageformats \
qtgraphicaleffects \
qtdeclarative \
qtandroidextras \
qttools \
qtimageformats \
qtsvg

# Download & unpack android SDK
# ENV JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee"
RUN apt-get remove -qq -y openjdk-11-jre-headless
RUN curl -Lo /tmp/sdk-tools.zip 'https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip' \
&& mkdir -p ${ANDROID_HOME} \
&& unzip /tmp/sdk-tools.zip -d ${ANDROID_HOME} \
&& rm -f /tmp/sdk-tools.zip \
&& yes | sdkmanager --licenses && sdkmanager --verbose "platforms;${SDK_PLATFORM}" "build-tools;${SDK_BUILD_TOOLS}" ${SDK_PACKAGES}

# Download & unpack android NDK & remove any platform which is not used
RUN mkdir /tmp/android \
&& curl -Lo /tmp/android/ndk.zip "https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-x86_64.zip" \
&& unzip /tmp/android/ndk.zip -d /tmp \
&& mv /tmp/android-ndk-${NDK_VERSION} ${ANDROID_NDK_ROOT} \
&& cd / \
&& rm -rf /tmp/android \
&& find ${ANDROID_NDK_ROOT}/platforms/* -maxdepth 0 ! -name "$ANDROID_NDK_PLATFORM" -type d -exec rm -r {} +

# Reconfigure locale
RUN locale-gen en_US.UTF-8 && dpkg-reconfigure locales
Loading

0 comments on commit 4d57352

Please sign in to comment.