diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2020-04-23 08:23:19 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-25 13:18:41 -0700 |
commit | f112be7a619e93e20341d1ed92681cd8077e2798 (patch) | |
tree | fb50aecc1f8dd5f6887ace9df60577a4bf05f629 /scripts | |
parent | c0ecd3a5979ebff83089a41270e5450b60b8a131 (diff) | |
download | subsurface-f112be7a619e93e20341d1ed92681cd8077e2798.tar.gz |
build-system/Android: use install-qt.sh to install Qt
The official installer now requires the user to log in which we can't
really do in a scripted manner. Let's see how long this way of
installing things will be available.
While doing this remove an ancient hack of some Qt settings that we no
longer need.
This also tries to prune some things that we don't need in the Docker
image to reduce image size.
The mapbox plugin is removed as it would add a dependency to QtSql which
we otherwise don't need. And since the plugin isn't used, no point in
installing it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/docker/android-build-container/Dockerfile | 47 | ||||
-rw-r--r-- | scripts/docker/android-build-container/setup-docker.sh | 2 |
2 files changed, 39 insertions, 10 deletions
diff --git a/scripts/docker/android-build-container/Dockerfile b/scripts/docker/android-build-container/Dockerfile index 62363d559..509443f85 100644 --- a/scripts/docker/android-build-container/Dockerfile +++ b/scripts/docker/android-build-container/Dockerfile @@ -16,16 +16,17 @@ RUN apt-get update && \ libx11-xcb1 \ libgl1-mesa-glx \ libglib2.0-0 \ - openjdk-8-jdk + openjdk-8-jdk \ + curl \ + p7zip-full # create our working directory and place the local copies of the Qt # install, NDK and SDK there, plus the three files from the Subsurface # sources that we need to get the prep routines to run RUN mkdir -p /android -ADD qt-opensource-linux-x64-5.13.1.run /android/ ADD android-ndk-r*-linux-x86_64.zip /android/ ADD sdk-tools-linux-*.zip /android/ -ADD android-build-wrapper.sh variables.sh qt-installer-noninteractive.qs /android/ +ADD install-qt.sh android-build-wrapper.sh variables.sh /android/ # install current cmake ADD cmake-3.13.2.tar.gz /android/ @@ -38,17 +39,45 @@ RUN cd /android && bash -x /android/android-build-wrapper.sh -prep-only # uggly hack to work around some breakage in the NDK which makes our # compiles fail -RUN sed -i '313,+13s/^using/\/\/using/' /android/android-ndk-r18b/sources/cxx-stl/llvm-libc++/include/cmath +#RUN sed -i '313,+13s/^using/\/\/using/' /android/android-ndk-r21/sources/cxx-stl/llvm-libc++/include/cmath # clean up the files that we don't need to keep the container smaller RUN cd /android && \ - rm -rf qt-opensource-linux-x64-*.run \ - Qt/[a-zA-Z]* \ - sdk-tools-linux-*.zip \ + apt-get remove -y gcc g++-7 libstdc++-7-dev && \ + rm -rf \ + Qt/5*/android_arm*/lib/*x86* \ + Qt/5*/android_arm*/doc \ + Qt/5*/android_arm*/include/QtHelp \ + Qt/5*/android_arm*/include/QtFbSupport \ + Qt/5*/android_arm*/include/QtFontDatabaseSupport \ + Qt/5*/android_arm*/include/QtNfc \ + Qt/5*/android_arm*/include/QtPrintSupport \ + Qt/5*/android_arm*/include/QtTest \ + Qt/5*/android_arm*/include/QtXml \ + Qt/5*/android_arm*/plugins/geoservices/libqtgeoservices_mapboxgl.so \ + sdk-tools-linux-*.zip \ android-ndk-r*-linux-x86_64.zip \ + $( find android-ndk*/platforms -name arch-mips -o -name arch-x86 ) \ + android-ndk-r[0-9a-z]*/toolchains/x86-* android-ndk*/toolchains/llvm/prebuilt/x86-* \ + android-ndk-r[0-9a-z]*/platforms/android-[12][2345678] \ + android-ndk-r[0-9a-z]*/platforms/android-21/arch-x86_64 \ + android-ndk-r[0-9a-z]*/prebuilt/linux-x86_64 \ + android-ndk-r[0-9a-z]*/simpleperf \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/llvm-libc++/libs/x* \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/llvm-libc++/libs/*/*static* \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/llvm-libc++/test \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/llvm-libc++/utils \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/llvmlibc++abi \ + android-ndk-r[0-9a-z]*/sources/cxx-stl/system \ + android-ndk-r[0-9a-z]*/sources/third_party \ + android-ndk-r[0-9a-z]*/sysroot/usr/lib \ + android-sdk-linux/build-tools/28.0.3/renderscript \ + android-sdk-linux/platform-tools/systrace \ + android-sdk-linux/tools/lib \ + android-sdk-linux/tools/proguard \ + android-sdk-linux/tools/support \ android-sdk-linux/emulator \ - $( find android-ndk*/platforms -name arch-mips -o -name arch-x86 ) \ - android-ndk*/toolchains/x86-* android-ndk*/toolchains/llvm/prebuilt/x86-* \ + /usr/lib/gcc \ cmake-3.13* && \ ls -l && \ du -sh * diff --git a/scripts/docker/android-build-container/setup-docker.sh b/scripts/docker/android-build-container/setup-docker.sh index 98c13ec48..f9b9b5310 100644 --- a/scripts/docker/android-build-container/setup-docker.sh +++ b/scripts/docker/android-build-container/setup-docker.sh @@ -5,7 +5,7 @@ # copy the dependency script into this folder cp ../../../packaging/android/android-build-wrapper.sh . cp ../../../packaging/android/variables.sh . -cp ../../../packaging/android/qt-installer-noninteractive.qs . +cp ../../../packaging/android/install-qt.sh . # create the container (this takes a while) sudo docker build -t android-builder --squash . |