aboutsummaryrefslogtreecommitdiffstats
path: root/packaging/android/build.sh
AgeCommit message (Collapse)Author
2020-04-25build-system/android: remove libusb at QTestGravatar Dirk Hohndel
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>
2020-04-25build-system/Android: use PREFIX outside of NDKGravatar Dirk Hohndel
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>
2020-04-25build-system/Android: remove no longer supported Qt versionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16Android: remove legacy FTDI supportGravatar Dirk Hohndel
This works on almost no devices anymore and has been replaced by the USB serial support for Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-10-05Android: work around Android 5.x issues with OpenSSLGravatar Dirk Hohndel
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>
2019-10-04android-build: Add some more libzip hacksGravatar Anton Lundin
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>
2019-10-04android-build: Add support for x86_64Gravatar Anton Lundin
This adds support for building x86_64 apks. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2019-10-04android-build: Load variables file relative source dirGravatar Anton Lundin
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>
2019-07-18Android: small change to keep exports togetherGravatar Dirk Hohndel
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>
2019-07-18Android: fix review commentGravatar Jan Mulder
Fix review comment by Anton on GitHub. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2019-07-18Android: rework build of OpenSSL to get it to build link and runGravatar Jan Mulder
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>
2019-03-21CMake: use builtin method to not use BZip2Gravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05Android: factor out duplicate version string searchGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-03-05CMake: just tell CMake to not find HTTP_ParserGravatar Rolf Eike Beer
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
2019-02-01facebook: remove the featute from the code baseGravatar Lubomir I. Ivanov
Remove from: - unit tests - desktop widgets - preferences - core intergration - cmakefiles - build scripts - icons - docs Also remove the plugins and social network integration. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-12-30Android build: always use -fPICGravatar Jan Mulder
make sure that all lib code is compiled with -fPIC as things will not link due to error "requires unsupported dynamic reloc R_ARM_REL32" (for arm build). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: build openssl before libzipGravatar Jan Mulder
On very clean builds not using the wrapper script, the compile of libzip simply fails because it depend on openssl include files. Simply swap them around. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: fix openssl build, no_asmGravatar Jan Mulder
Mysteriously, openssl does not compile with clang with a sha256-armv4.S:2638:2: error: invalid instruction, did you mean: adr? The easiest way out is compiling without no_asm. This obviously lowers the bandwidth on the SSL link (as the asm code is there for performance reasons), but it has no visible performance loss in my tests. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: add arm64 target and compile with clangGravatar Jan Mulder
With a preparation done in the 4 commits before, now add the arm64 and use clang instead of gcc as compiler infrastructure. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: openssl, do not move source treeGravatar Jan Mulder
Very annoyingly, openssl is re-build and downloaded numerous times when doing partial builds. Reason for this, is that the original checked out git repo is moved away, and build in source (as openssl does ...). So, this simple change leaves the checked out repo in place, and copies the tree to build in. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: always install libzip.a in lib directoryGravatar Jan Mulder
A subtle one. When compiling for arm64, libzip is the only package we use in mobile that installs its product in lib64. There is no reason for this given the way our build process is. So, simply force the library to reside in lib, independent if we are building arm or arm64 architectures. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: do not hard code armv7Gravatar Jan Mulder
Simple cleanup. Do not hard code armv7 as we have QT_ARCH. This allows, in the future, for arm64 builds as well. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-30Android build: set newer versions and parameterize ANDROID_PLATFORMGravatar Jan Mulder
Hard coding desired ANDROID_PLATFORM on multiple places is simply bad. Fix this. Further, set the variables to a much newer state. CAVEAT: this will likely break android build, so be careful on bisecting. All fixed in next, related commits. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-12-06Android build: buildtools version is automatically detectedGravatar Jan Mulder
With commit 0d8fc7ef970e of qt-android-cmake, the buildtools version is automatically detected. So do not try to pass it any more, as this breaks the build. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-11-13Android: pick the correct C++ runtimeGravatar Dirk Hohndel
Yet another fallout of the switch to the NDK toolchain. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-11-13Android: build for android-16Gravatar Dirk Hohndel
That's the minimum platform that we have used for a while now, corresponding to Android 4.1 and newer (i.e., quite ancient). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-11-13Android: explicitly build with gccGravatar Dirk Hohndel
Our Android build currently fails with clang. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-11-13Android: qt-android-cmake no longer ships a toolchain fileGravatar Dirk Hohndel
Instead use the one that comes as part of the NDK. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-27build-system: switch back to upstream qt-android-cmakeGravatar Dirk Hohndel
And in the process use our script to do the work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: whitespace change to build.shGravatar Dirk Hohndel
This indents the code that is only executed when we aren't in 'quick' mode. git show -w will show that there is no code change in this commit. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: add -quick flag to build.shGravatar Dirk Hohndel
This allows us to skip all the checking / building of dependency libraries. This also allows us to pass extra arguments to the make command by separating them from the arguments to build.sh with '--'. This commit is easier to understand because it didn't increase the indent in the large block of code that is now only executed if we aren't in 'quick' mode. That will be fixed in the next commit that is whitespace only. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: use our fork of qt-android-cmakeGravatar Dirk Hohndel
This tells androiddeployqt to look at the qml modules to find all dependencies. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-05Android: build latest libzipGravatar Dirk Hohndel
Small hacks needed, but otherwise this seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-04Android: build libzip 1.1.3Gravatar Dirk Hohndel
Switching to GitHub as source for libzip means that we need to encode the version number differently. Newer versions of libzip don't compile cleanly on Android and this one seems new enough. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-04ShellcheckGravatar Joakim Bygdell
Code cleanup using shellcheck. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-04Update android build env.Gravatar Joakim Bygdell
Update the scripts used to build subsurface-mobile for andriod to use the variables file. Removed checks for obsolete Qt versions. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-06-22build-system: Only run autoreconf when neededGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-18build-system: added get-dep-lib to android/build.shGravatar jan Iversen
Integrated get-dep-lib in android/build.sh Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-17android-build: Remove old libgit2 special handlingGravatar Anton Lundin
And replace it with something that works on a modern cmake. The upside with using the right linker, we get the symbols resolved correctly so we don't need to regex the code. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Simplify and correctGravatar Anton Lundin
This simplifies the code and uses correct quoting for variables. This also fixes the sha1-stampfile handling so that we don't build libdivecomputer every time. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Build googlemaps plugin same way as othersGravatar Anton Lundin
This reworks the googlemaps build to be more like the other builds, with the same pattern and way of detecting what we need to do, and when we need to rebuild it. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Use sed -i instead of home rolled variantGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-05-17android-build: Use subsurface source variableGravatar Anton Lundin
We already have a variable pointing to the source dir for subsurface, so use it. This way we can build out of tree, in any directory. Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-04-27Android: fix error in build scriptGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-27Android: rebuild libdivecomputer if SHA changesGravatar Dirk Hohndel
Just like we already do for iOS. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19Android build: switch to Qt 5.10.1Gravatar Dirk Hohndel
That's what we now use for the official binaries as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19Android/iOS build: get libxml2 and libxslt from GitHubGravatar Dirk Hohndel
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an oddly named top level directory in the tar file, so lets strip that and replace it with the "usual" name. Also, for the "raw" tar files from GitHub we need to run autoreconf ourselves. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-11android/build.sh: build the googlemaps pluginGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-02-24Android build: use Qt 5.9.3Gravatar Jan Mulder
At least, now the Travis builds use the same Qt version as the production builds from Dirk that go to the AppStores. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-26Android build: make androiddeployqt less verboseGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>