Commit graph

192 commits

Author SHA1 Message Date
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