Commit graph

219 commits

Author SHA1 Message Date
Dirk Hohndel
4346aaa333 Android build: no point making the docs
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-26 09:24:35 -08:00
Dirk Hohndel
5eec251be8 Travis: hack around Android build failuers
For some reason accepting the licenses for the SDK appears to fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-24 13:50:59 -08:00
Dirk Hohndel
9df88f0145 Android build: reorder downloading Qt vs SDK
Since it's the SDK where things are failing, doing it this way makes the
turnaround time of my attempts to fix this faster. And in the larger
scheme of things, the order is irrelevant.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-24 13:50:59 -08:00
Dirk Hohndel
7388a8120a Android build: fix android-build-wrapper.sh
I clearly had forgotten to update the Android specific scripts when
adding the libdivecomputer submodule.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-06 20:47:20 -08:00
Dirk Hohndel
9434c36b7f Android build: build the libdivecomputer submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-12-06 19:02:58 -08:00
Anton Lundin
c92a86f898 android: Don't re-clone subsurface in android-build-wrapper.sh
Just use the source tree you where called from instead.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
65b825286c android: Correct path to Qt binaries
Back in 6451adfec1, the path to the qt
binaries was changed. The current binaries are back on the old urls, so
this reverts half of 6451adfec1.

The other half is still true.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
9dd87bac03 android: Remove unneeded extra argument parsing
This is handled by build.sh, which handles it correctly for running with
set -u.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
f3924aea29 android: Install android sdk on a different way
This way we can auto-accept all the licenses.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
3f4f160552 android: Terminate build.sh on unknown arguments
Previous code ended up in a eternal loop on unknown arguments.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
f9c85fa755 android: Ensure rm exits zero
This is to comply with set -e

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
cfa241036c android: Remove unset variable VERSION
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
e87a9e1454 android: Increase BUILDNR with zero exit status
This increases BUILDNR in a way that keeps exit status as zero, so the
script doesn't abort due to set -e.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
aa7208049f android: Allow Qt install in headless mode
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-11-16 10:23:00 -08:00
Anton Lundin
49d46255fd android: make android-build-wrapper.sh executable 2017-11-16 10:23:00 -08:00
Lubomir I. Ivanov
2b40e15713 remove Marble from packaging and build scripts
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

---
please note, that i have no way to test most of the scripts ATM.
2017-09-04 07:46:35 -07:00
Jan Mulder
3382f92843 Use same libgit2 on Android
Just to be sure. Use the same version on Android build of libgit2
as used in the scripts/build.sh script.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-29 08:30:08 -07:00
Jan Mulder
5c7ac7e7d1 Android compile fix
Forgotten slash broke my Andorid build (with Qt from source).

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-19 01:08:03 +09:00
Alex Blasche
868fb9d5a9 Enable building with standard Qt install path layout
In general this patch enables building of subsurface without being
forced to use the official Qt binary packages. This is particularly helpful
when having to debug Qt internals or having to deal with custom patches
on top of the official Qt releases.

The architecture dependent file path layout is only employed by official
Qt binary packages. They are the result of a reordering at package
generation time. If Qt was build for a single architecture, the standard
layout does not add the architecture specific top level patch for the resulting
binaries.

Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-06 12:43:11 +09:00
Alex Blasche
db8200a9c3 Remove obsolete QT5_ANDROID_BIN
Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-06 12:43:11 +09:00
Dirk Hohndel
6451adfec1 Android build: switch to Qt 5.9.1
It seems that the Qt team deviated from their previous practice to keep
the Qt/x.y directory structure the same for all minor releases - so now
it is indeed Qt/5.9.1
Oh well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-30 17:21:07 -07:00
Dirk Hohndel
05435d64aa Android build: work around odd build problem with missing rand()
I don't quite understand why this isn't correctly substituted to lrand48()
by the header file, but patching it in the source is easy enough.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 21:19:23 -07:00
Dirk Hohndel
f0c903203f Android build: match versions between wrapper and build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 21:04:04 -07:00
Anton Lundin
d97055d47c Upgrade 3pp for android and testing
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-06-21 18:43:15 -07:00
Dirk Hohndel
2a71559045 Android build script: use interactive SDK install
And then manually fix the license as that doesn't appear to work correctly
in the tool.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31 10:16:29 -07:00
Dirk Hohndel
4e16bd7dce Android build script: update for Qt 5.9
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31 10:16:29 -07:00
Dirk Hohndel
01d610b383 Update Android build scripts
- prepare for Qt 5.9
- remove references to ANT
- adjust to changed location of the resulting apk

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 17:41:28 -07:00
Jan Mulder
1df4b6c11b Android build: Add BUILDTOOLS_REVISION
The used cmake toolkit for building the Android Subsurface-mobile app
(qt-android-cmake) recently moved away from compiling with Ant in favor
of Gradle. The most recent Android SDK will not support Ant any more.

This calls for the addition of the Android SDK BUILDTOOLS_REVISION define
to the cmake of Subsurface-mobile. Without this, the build will fail.

The value has to be set to an existing directory in
.../android-sdk/build-tools/

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-27 07:09:27 -07:00
Stefan Fuchs
d82f8cbd3f Change protocoll for any git clone from Github to https
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-16 07:41:24 -07:00
Jan Mulder
ed3f5a6240 Android build: extend comment for Qt5.8
Just an update of comment. The stange issue with Qt5.7.1 is
still present in Qt5.8. Extend the comment accordingly.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-20 21:39:00 -07:00
Cristian Ionescu-Idbohrn
e8923a9bad Simplify some tests
Because `[ "$foo" != "" ] is equivalent to `[ "$foo" ]'
in all POSIX shells.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09 21:31:11 -08:00
Cristian Ionescu-Idbohrn
1c33951ce6 Remove useless quotes
Don't quote if you don't have to.  Spend those cpu cycles on doing
something more useful, instead.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09 21:31:11 -08:00
Cristian Ionescu-Idbohrn
9470278e87 Use `command' (shell builtin and POSIX) instead
The `which' command is a fork and possible not standard in various
distributions, or builtin in certain (odd)? shells, like `zsh'.

Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-09 21:31:11 -08:00
Willem Ferguson
b912880707 Fix syntax error in android/build.sh
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-07 07:42:00 -08:00
Anton Lundin
56b518d956 android: Rework build.sh
This reworks build.sh for proper argument parsing and variable quoting.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:16:10 -08:00
Anton Lundin
bed5ad31e6 android-wrapper: Auto install Qt
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:15:33 -08:00
Anton Lundin
9d235d165e android: Upgrade Qt to 5.8
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:15:08 -08:00
Anton Lundin
c345702d1b android: Move suggested/expected Qt install to just Qt
In the Qt installer, there is a MaintenanceTool which can upgrade your
install, so don't install in a "versioned" directory, just install in a
plain Qt-directory.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:14:53 -08:00
Anton Lundin
9f7c3c31f7 android-wrapper: Auto accept android sdk license
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:13:49 -08:00
Anton Lundin
b7a1b2dbf6 android-wrapper: Quiet down unzip
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:13:44 -08:00
Anton Lundin
cf5c9d371e android-wrapper: Quiet down wget
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:12:26 -08:00
Anton Lundin
2c160534eb android-wrapper: Add unzip as prerequisite
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:12:05 -08:00
Anton Lundin
2b89d9ead0 android-wrapper: Add wget as prerequisite
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:11:40 -08:00
Anton Lundin
82c972574b android-wrapper: Fail fast and at point
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:11:27 -08:00
Anton Lundin
6fd438e053 android-wrapper: Give a negative exit code on error
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-06 21:11:14 -08:00
Dirk Hohndel
911d2798cd Android build wrapper: sometimes quotes hurt you
Shellcheck wanted quotes around "$USE_X" - but that makes the script
fail if you run it without the '-x' argument.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-04 07:02:11 -08:00
Dirk Hohndel
9a754b663a Extend Android wrapper shell to be smarter
Move it to packaging/android where it belongs
Use direct URLs to download Android components
Make sure required packages are installed (only tested on Ubuntu)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 17:45:26 -08:00
Dirk Hohndel
273550b4e8 Android build.sh: fix libcrypto dependency in libssl
Using a binary patch seems harch, but it also seems to work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:28:35 -08:00
Dirk Hohndel
8adcc406c7 Android build.sh: don't try to link against host http_parser
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:28:26 -08:00
Dirk Hohndel
3fd26a80dc Small fix for Android build.sh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:27:38 -08:00
Anton Lundin
0253addb9e android: Document controlling env-vars
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Anton Lundin
450092cdb9 android: build.sh white space cleanup
Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Anton Lundin
9ec28966f0 android: Introduce propper quoting in build.sh
This where quoting issues found by shellcheck.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2017-01-12 14:15:53 -08:00
Dirk Hohndel
346f4d4f12 Android build: add comments on filesystem layout
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-02 04:46:51 -08:00
Anton Lundin
ca1349241b android: Copy android files to the expected name
android-mobile nowadays hardcoded in CMakeLists.txt, so workaround it
here.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Anton Lundin
6203433ff3 android: Upgrade suggested ndk
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-28 22:40:18 -08:00
Dirk Hohndel
79ab41dfd8 Android build: don't try to bundle libssh2, either
Since we don't link against it, no need to bundle it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28 19:20:18 -07:00
Dirk Hohndel
7a55eeeb07 Android build: don't link against libssh2
We don't use ssh-based git in Subsurface-mobile, so there's no reason to
link against it.

This should hopefully fix the current issues with the Android APK on some
devices.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-28 19:14:06 -07:00
Dirk Hohndel
a5cf8aaa21 Android build: try to create APK that works on Android 7.0
It appears that instead of statically linking against ssl/crypto/ssh2, you
instead have to dynamically link against it and then bundle the library in
the APK. The documentation is not 100% clear and I don't have an Android
Nougat device to test this with, so for now this is an attempt.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-24 13:36:32 -07:00
Dirk Hohndel
7dd8a62ced Don't build Kirigami as a library
Just link it directly into Subsurface-mobile. That's what we already do
with the qmake file for iOS, now the cmake based builds do the same. This
should remove a lot of issues.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-18 21:38:13 -07:00
Joakim Bygdell
925fd8d4c1 Android build: compile kirigami
Build kirkigami plugin out of source and make sure that we use the same QT
version for the plugin and the app.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-17 21:29:05 -07:00
Marco Martin
24718adfc3 Use kirigami built in static mode
Now kirigami needs to be built with a C++ plugin.
In cases of mobile operating systems such as iOS (and in a lesser measuse,
Android) having a proper plugin loaded at runtime may be difficult, so
statically link it together with all of its qml files compiled as a
qresource inside the static library.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-14 07:56:05 -07:00
Anton Lundin
4ed6101c5c android: Fix typo in patching of libssh2
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-07-09 12:07:09 -07:00
Anton Lundin
b8e3ad7319 android: Update all our dependencies
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:35:59 -07:00
Anton Lundin
b2b29c00ec android: Enable config via env vars
This creates the possibility to pass configuration, where the ndk and
sdk is installed, to the build.sh script via environment variables.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:35:21 -07:00
Anton Lundin
7386d0b5b4 android: Set version and build for desktop app
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:34:41 -07:00
Anton Lundin
4ef90638d4 android: Remove obsolete comment
Since c78e4f we build the mobile and desktop versions with different
package id's.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:34:15 -07:00
Anton Lundin
2aa9841213 android: Prioritize newer Qt version if found
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:34:00 -07:00
Anton Lundin
9443b0b86c android: Use a ndk toolchain matching sdk version
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:33:32 -07:00
Anton Lundin
f28dfce50f android: Update to latest NDK
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:49 -07:00
Anton Lundin
f3cde0357f android: Correct README
We don't depend on Qt5.5, we depend on Qt for android.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:24 -07:00
Anton Lundin
4f850e2aa5 Build Subsurface c++ as c++11 code
With Qt 5.7, they started to require c++11 support, and in 5.6.1 some
nullptr's showed up in QtAndroidExtras/qandroidfunctions.h, so now we
need to compile our c++ code with c++11 support in our compiler.

As Thiago pointed out, this effectively "downgrades" GCC 6 from c++14
support to c++11.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-23 16:32:10 -07:00
Dirk Hohndel
4d4faecd67 Allow building Android package against Qt 5.7
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-22 13:25:26 -07:00
Dirk Hohndel
2c60e87b09 Qt 5.7 requires C++11
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-22 13:23:10 -07:00
Dirk Hohndel
8408cbe3a4 Android build: we don't need the Qt translations
Only the Subsurface translation files as needed as the QML UI
doesn't display any Qt internal strings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04 14:02:05 -07:00
Dirk Hohndel
e47327c87a Android build: prepare and copy translations into the APK
And then load them at runtime.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03 17:20:53 -07:00
Dirk Hohndel
d7103f97f7 Android build: use static libssl / libcrypto
Android M does not allow using those as shared libraries.

See #1029

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-20 15:29:09 -07:00
Miika Turkia
95292ac560 Set default build number for apk building
Having build number as mandatory parameter seems unnecessary, thus
setting default value (used for andoird:versionCode) to 0.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14 11:02:19 -07:00
Miika Turkia
454a62c835 Fix initial build of APK
Running subsurface/packaging/android/build.sh after deleting
subsurface-mobile-build-arm directory fails for me due to missing
ssrf-version.h file. Just ignore if it doesn't exist.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-14 10:59:56 -07:00
Dirk Hohndel
557eb744a3 Make sure version is freshly generated before extracting
Oops, so Subsurface-mobile 1.0 (4.5.2.1048)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 06:35:40 -08:00
Dirk Hohndel
6be0800704 Update Subsurface-mobile version to 1.0.0
And make sure the version displayed for Android includes both that version
and the build version, which is our regular canonical 4 part version
number - so this release will be something like "1.0.0 (4.5.2.1047)"

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 06:29:26 -08:00
Dirk Hohndel
e9e453b009 Android build: pass in build nr
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05 21:23:27 -08:00
Dirk Hohndel
a64eef7f82 Android build: automate setting the right version number
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-05 17:14:33 -08:00
Dirk Hohndel
2b1812f2cb Build scripts: work with both Qt 5.5 and 5.6
This is all a bit hackish but seems to work

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03 14:34:03 -08:00
Jan Mulder
62f7a2a8f0 Build Android mobile app against latest OpenSSL
No reasons not to upgrade to the latest OpenSSL lib. The currently used
1.0.1 branch is ending end of 2016, so a switch to 1.0.2 is useful
anyway.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-02 09:28:44 -08:00
Dirk Hohndel
7c459f87cd Consolidate scripts
Since commit c496d5fa05 ("Add helper script to pull Plasma Mobile Components
and icons") we had three different spots where we retrieved the Plasma Mobile
Components. That's a wee bit of overkill. So instead have the other two scripts
just call this one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 21:46:44 -08:00
Dirk Hohndel
bb687f7f8b Remove plasma mobile components, pull from upstream at build time
This prevents us from constantly having to worry about keeping them in sync.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 10:22:20 -08:00
Dirk Hohndel
6051bf9f89 Android build: we should build Subsurface-mobile by default
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 17:38:55 -08:00
Dirk Hohndel
320ff2eba3 Android build: use better sed syntax
There is no reason to use '!' as separator and in some shell environments this
can cause problems.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-25 21:58:30 -08:00
Dirk Hohndel
b747e1bc72 Android build: more tweaking
Don't ever link against a shared libcrypt. One of the recent changes to
make things build on the various Linux build systems apparently broke the
Android build as it now adds an extra -lcrypt right after the correct
static link to libcrypt.a. Instead of fiddling even more with this and
re-breaking all the other builds I just hack around it here and remove any
calls to a simply -lcrypt as that won't work on Android.

This also passes through the remaining options on the command line to make
so we can do things like VERBOSE=1 or -j12

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:52:56 -08:00
Dirk Hohndel
697bd94198 Android build: allow selecting Debug / Release build
And never build the tests. Makes no sense to do so when cross building for
Android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 09:48:44 -08:00
Dirk Hohndel
e2d5bef073 Switch the Android build.sh to set up mobile build correctly
We now need to set SUBSURFACE_TARGET_EXECUTABLE to MobileExecutable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-18 07:46:00 -08:00
Tomaz Canabrava
d0b526eda4 Do not try to compile FTDI_EPROM
this was requiring libconfuse and we don't need it.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 11:48:31 -08:00
Tomaz Canabrava
cbe06cca8f Use newer libraries
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-17 11:48:24 -08:00
Dirk Hohndel
7aab635585 Remove support for older libgit2 - we now require 0.23 or later
Also fixes a capitalization error that prevented finding libssh2 in some
circumstances. And adds a missing include when building with libzip on Mac.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-15 13:33:00 -08:00
Anton Lundin
c1f8ecd67a Correct Qt version in README for android building
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 09:21:14 -08:00
Anton Lundin
58901690dd Remove defaults for Android from cmake
Some of the flags needed to build for android was set in cmake. There
are many more that needs to be set correctly for things to work, so
having some in cmake and some in the Android build.sh is just confusing.

This removes the bits from cmake and moves everything into build.sh.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 09:20:50 -08:00
Joakim Bygdell
3c2179fea9 Android: ask which pkg-config to use
Since pkg-config is installed in different places on linux and mac,
let's ask where it is.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 09:46:18 -08:00
Joakim Bygdell
bc1473b1a0 Android: disable ftdi on mac
Until we can get libftdi to build on mac we are better of just diabeling it.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 09:46:01 -08:00
Joakim Bygdell
f44d47325d Android: Clean up variable export
Removes duplicate variable export.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 09:45:48 -08:00
Sebastian Kügler
10b68dad96 android build: remote -u flag from git pull
git pull -u isn't known on my systems (recent Debian and Ubuntu), so
better not use this flag.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-06 14:07:43 -08:00
Anton Lundin
8d73e4f81c Connect up serial_ftdi custom serial
This connects the serial_ftdi implementation to subsurface, and builds
libftdi1 for the android builds.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20 22:59:54 -07:00
Anton Lundin
72872bd7fd Enable android logging from libusb
This makes libusb to log straight to the android logging system. This
makes sure we can reach the logs and debug things.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20 22:53:01 -07:00
Anton Lundin
676c1b319f Patch libusb for android custom open function
This idea was inspired by:
https://github.com/PointCloudLibrary/mobile/blob/master/3rdparty/android/patches/libusb.patch

The whole thing is re-written from scratch but the idea came from there,
and its a way simpler way of getting a system-opened fd to the right
place than patching every call in the stack to pass a fd down.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-20 22:52:21 -07:00
Joakim Bygdell
7baa18db5f Enable Android build on Mac
This Changes the NDK, SDK, JAVA_HOME and ant to the appropriate versions
and locations when the script runs on a Mac.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-20 05:52:11 -07:00
Dirk Hohndel
8590c6dc33 Remove cmake hack that wasn't supposed to go upstream
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-18 06:03:12 -07:00
Anton Lundin
86bd9c7a90 Build libssh for android
Now when we build openssl for https support, its easy to add libssh2 to
get ssh support to, so this does that.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:37 -07:00
Anton Lundin
17bab9554d Build openssl without legacy protocols.
SSL2 and SSL3 are deprecated, and we can gladly leave them out of our
build.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:25 -07:00
Anton Lundin
b8b597ec72 Sanitize openssl building for android
The openssl build step polluted the variable space, and overrode the CC
env, thus breaking the build if you did build openssl in the same
session.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-16 14:09:19 -07:00
Dirk Hohndel
eb9f07c789 Android build script: minor adjustments
When retrying a clean build several libraries failed to build and I
finally tracked this down to the cross build tools not finding their
sysroot.

Also, on my main build server I have an older cmake version and one of the
tools claims to require cmake 3 but I see no actual incompatibility, so
I'm patching out that check.

Hackish? Yes. But it seems to work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-15 10:37:57 -07:00
Dirk Hohndel
ad79476f54 Update Android build script
This now includes OpenSSL so we can actually use cloud storage (which
requires https transport).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-13 15:21:30 -07:00
Anton Lundin
9217a03ef3 Teach android build about subsurface-mobile
This teaches android build.sh and cmake about how to build the qml ui of
subsurface-mobile as a apk.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-09 15:10:48 -07:00
Anton Lundin
5cbbff0084 Use qt-android-cmake to produce a android apk
This introduces code to use qt-android-cmake to produce a working apk.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 15:48:42 -07:00
Anton Lundin
1f112c7738 Make the libssh linking optional
Due to bugs in libgit2, we force linking with libssh2 to add
git-over-ssh support. On android we currency don't want libssh2 due to
its dependency chain, so this makes the libssh2 force linking opt-out.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 15:48:30 -07:00
Anton Lundin
a558f09f8d Update suggested versions in android build script
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 15:48:10 -07:00
Anton Lundin
016c56a210 Teach android build script out of tree builds
This teaches the android build script how to do out of tree builds.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 15:47:55 -07:00
Anton Lundin
b560dc6293 Upgrade libgit2 for android
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-08 15:47:47 -07:00
Anton Lundin
4c0f6a0ac0 Update android build script for CMake
This updates the android build script to something that uses CMake.

This can't produce a working APK yet, but it at least builds the shared
object which should be wrapped into the APK.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-07-01 09:01:04 -07:00
Anton Lundin
deb2caf3e0 Import subsurface-android build script
Over one year ago i started with a crazy idea, "Wouldn't Subsurface on
android be nice?" when i read about Android support in Qt.

After playing around with it and doing some quite ugly hacks i got it to
build and run.

Now are all the patches upstream and this imports the quite crude build
script, for others to continue on.

This is a squash-import of what have have happened in
https://github.com/glance-/subsurface-android during 2014.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
CC: Joseph W. Joshua <joejoshw@gmail.com>
CC: Venkatesh Shukla <venkatesh.shukla.eee11@iitbhu.ac.in>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-09 12:53:01 -07:00