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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>