Improve the build instructions for Android. Provide a complete script
for building in a re-usable container.
Also changed the Android packaging README to markdown.
Signed-off-by: Michael Keller <github@ike.ch>
As of today, GitHub no longer allows the 'git://' protocol, so we need to
switch the submodule and our other references to cloning git repos to
'https://' instead.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Android and iOS use qmake, so add the code to the .pro file.
This also removes all remnants of QCharts includes and uses and all the
references to QCharts in our various build systems.
That was a brief but extremely useful detour.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This appears to be needed only for Android with Qt 5.15. Which means
that this commit creates odd breakage in case someone were to try to
build for Android with an older Qt version - but given that the current
build process only works with Qt 5.14 or 5.15, I think this is an
acceptable flaw.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This has now been verified to work on a fresh clean Ubuntu 20.04 install, both
using the docker image route as well as the full local build system.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
That's what happens if you develop a script like this sequentially.
We need to have the ABIs picked in order to build googlemaps, otherwise
this fails with the build container as that only includes the ARM
libraries and tools.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the OS has an older one installed, that is found first and the
build fails. This way we know that ours is used.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Doing it this way using the cmake build system at least gets us to the point
where everything links and appears to fit together. It still doesn't work at
all, but hey, progress.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adjusts the docker setup to create a container with the correct
NDK, SDK, tools, Qt version, etc, and updates the helper scripts that
are needed in order to do that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We want to build the googlemaps plugin once we know with architectures we are
building for. So let's do that right before we build Subsurface-mobile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Several features that are needed to create Android bundles with the
current NDK and QT 5.15 aren't easily available when using cmake. Given
that we already do a qmake based build for iOS, I decided to simply
switch Android to that as well.
An added complication is that some of the magic that qmake uses to do
the right things fails if the .pro file isn't in the root directory of
your project. So this is right now somewhat inconsistent with the way we
build for iOS. Something that should get cleaned up in the near future
as it makes no sense to maintain two separate .pro files.
This commits also adds a new build shell script to drive the assembly of
all the dependencies. Once again this is a new file with the old one
left in place for now (but to be removed fairly soon).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This installs the required versions for most components, switches us to
Qt 5.15, current SDK, NDK, and the current OpenSSL version.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This file is copied from the QBS project. It's under LGPL and therefore
compatible with our licensing. While it would be possible to retrieve
this file at build time from the original project, for now it seemed
easier to include it in our repo.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is no longer created using GitHub actions (but all the necessary
information is still included in this repo). We need to be able to
shrink this container so our GitHub Action runs don't run out of disk
space.
Adjust the path where the resulting binaries are found with this build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We no longer use libusb to access USB devices on Android, therefore
there's no point including libusb in our build. Also, we have never even
attempted to run the tests on Android, so let's not even pretend to
support building them.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we install our support libraries into the NDK we later run into
include path order issues that result in strange errors around the
inclusion of math.h (because we find the C version of that include
file that ships with the NDK before we find the libstdc++ version
of math.h (because the include path for our support libraries is
listed before the libstdc++ include search path). By having a distinct
install-root for our libraries we can avoid this problem.
Remove the previous hack that tried to work around the symptoms of
this issue.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
Qt 5.13.2 fixes a few bugs.
We are NOT switching to Qt 5.14 as that breaks a ton of things with
Android support. At this point even with qmake it near impossible to get
working Android binaries, no one appears to have a solution for cmake.
With qt-android-cmake current master fixes the problem that held us back
at the earlier commit, so let's go back to using master.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The Qt documentation has specific suggestions how to build our own
version of OpenSSL in order to work on Android 5.x:
https://doc.qt.io/qt-5/android-openssl-support.html
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This hacks the libzip build to not try to find zlib, because it fails
doing so on modern NDK. We just tell it that its there, and be done with
it.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Not everybody have their build dir in the same place, but we can always
find the files relative each other.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
So even setups relying on the wrapper script can do faster rebuilds.
This also cleans up a bug that made passing through the release
parameter fail in the past, and removes overly verbose debugging output.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is working around a Qt Bug https://bugreports.qt.io/browse/QTBUG-69494
which prevents correct rendering of the OnePlus fonts.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Simply move that export to the top of the file with the others.
Suggested-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With all upgrading, the build apks now show up in a slightly different
location. Correct this in the scripting. Notice that this is debug
building only. Release building is outside the repo.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is squashed commit consisting of a number of subjects, all intended
to get our app to build, link and run on device, but as the steps are
small (but non-trivial), I document them in this one commit.
1) Do not use OpenSSLs install targets, but simply copy the wanted build
artifacts manually. The main reason for this, is that the install
targets want to install a lot more than we build, so it also builds
parts of the OpenSSL suite that we will never use.
2) As Android does not like shared libraries with embedded versioning
(and the used androiddeployqt actively prevents adding versioned
libraries to the build), strip all this data from the generated shared
libraries. This trick was already there, but its adapted to all possible
conflicts.
3) The OpenSSL config script seems rather broken, resulted in failed
builds, and calling the underlying Configure is simpler.
4) Finally, parts of the OpenSSL code uses stdio things like stdout,
stderr, etc. These showed up as undeclared external on build time. Well,
luckily, there was an easy way out using 2 -D(efines). This feels hacky,
but does the job (and we are not interested in the output of OpenSSL in
our app).
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The main reason for upgrading of the Qt version is the hunt for a broken
BT/BLE stack, preventing downloads from BT/BLE enabled DCs, in relation
to arm64 architecture builds. (And the absolute need for an arm64 build
in relation to the publication of the Android app in Googles Play
store).
In addition, Qt 5.12.4 starts supporting OpenSSL 1.1.1c, and trying to
use our current OpenSSL 1.0 series is highly discouraged by Qt (and
OpenSSL itself).
So, upgrade both in unison. But ... be careful bisecting issues on this
commit, as it does break our build. That will be fixed in the next
commit.
This fixes the BT/BLE download for arm64!
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This should fix the current Travis build failures for Android.
It is odd how we have ANDROID_PLATFORM and ANDROID_PLATFORMS,
buf for now all I care about is that the Travis build completes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>