[BRLTTY] Compiling BRLTTY for Android on Windows
Robert Pösel
robyer at seznam.cz
Thu Mar 8 12:55:31 EST 2018
Hi,
from your reply I feel some defensive attitude, so I assure you my
message wasn't intended to push you into something. It was more like
sharing my experience from trying to build on Windows and ideas that
might help with that.
Dne 08.03.2018 v 16:50 Dave Mielke napsal(a):
> Simply changing brltty to build with cmake would be a bad idea because that's a
> Windows-specific tool. We need to build brltty on others platforms, not the
> laast of which is Linux., and I don't really want to have more than one way to
> do it.
Well, I understand CMake as a multiplatform tool, definitely not a
Windows-specific tool. On CMake about page (https://cmake.org/overview/)
they say:
/
"CMake is an extensible, open-source system that manages the build
process in an operating system and in a compiler-independent manner.
Unlike many cross-platform systems, CMake is designed to be used in
conjunction with the native build environment. Simple configuration
files placed in each source directory (called CMakeLists.txt files) are
used to generate standard build files (e.g., makefiles on Unix and
projects/workspaces in Windows MSVC) which are used in the usual way. (...)"
/
I saw various multiplatform projects using CMake and also on their
website they mention projects like MySQL or KDE are using it too. Since
it's so popular and makes building multiplatform projects much easier, I
////wanted to know whether you thought about it. I understand that when
something works it's better to keep it that way and don't change things
without proper reason.
> The only way I'd consider accommodating cmake is if we could convince autoconf
> to get it right.
As I understand it, CMake is an alternative to autoconf, so I think it
doesn't make sense to use both of them at the same time anyway.
> One reason you had difficulty building brltty is because you included brltty.c,
> which means that you tried to make an executable. That, of course, makes no
> sense on Android. If cfg-android has successfully run then all you need to do
> for the core part is to make the two needed shared objects: libbrltty_core.so,
> and libbrltty_jni.so.
I see, can you please tell me where can I find list of source files from
which is libbrltty_core.so compiled?
> We build with ant because it works. I don't personally see any need to convert
> to using gradle because we build brltty with older tools since it runs all the
> way back to ICS (4.0).
Google maintains backward compatibility with older Android versions, so
you don't need to use older build tools to support older Android
versions. You can use latest version of SDK / build tools and still keep
BRLTTY app working on Android 4.0 (by setting minSdkVersion value).
On the other hand, using old SDK / build tools might cause problems on
newer Android versions, as we've seen with the "native text relocations"
error recently.
Google previously used Eclipse as main IDE and Ant as build system. Few
years ago they created Android Studio and since then they use Gradle as
build system. With Gradle it is easier and also more powerful to build
Android projects. And as I mentioned in last e-mail, they even removed
the Ant build scripts from SDK last year, so they expect everyone
switching to Gradle eventually. For building native code via NDK they
use CMake - Gradle will run that CMake script to compile and get
binaries which then Gradle builds into resulting APK. That's why I
mentioned that (from this point of view) it would be best if whole
BRLTTY would use CMake too (but I'm not saying it should).
> The android command is part of the Android SDK.The directory it's in needs to
> be in your command search path.
Yes, that error message came from the /android/ command itself, because
support for that parameter was removed in recent build tools (same as
they removed the Ant scripts). In older SDK version that command works.
> My question is: Rather than introduce a bunch of needless and
> unwanted turbulence into our way of building, why not just install a Linux VM
> on Windows and do it our way?
Because since I already spent some time trying to make it work, I
thought that finishing it and finding working solution for building on
Windows would also help others who may want to do the same thing in the
future.
> I'd much rather invest my time and effort into solving real problems,
> and also would rather devote a chunk of it to my personal life (family, etc).
I understand that and I appreciate your time you invest in BRLTTY and in
this conversation.
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://brltty.com/pipermail/brltty/attachments/20180308/3de285d1/attachment.html>
More information about the BRLTTY
mailing list