org.quietmodem.Quiet icon indicating copy to clipboard operation
org.quietmodem.Quiet copied to clipboard

Build native libaries

Open alexbirkett opened this issue 8 years ago • 6 comments

Is it possible to build the NDK code as part of the build process rather than just including the pre-built binaries?

alexbirkett avatar Oct 22 '16 22:10 alexbirkett

Maybe - it's a fairly involved process. I decided to include the JNI source since that's specific to this repo but bundle the binaries for everything else.

The script that produces the binaries is https://github.com/quiet/quiet-scripts/blob/master/build-android.sh but it requires some changes that I haven't pushed yet. I'm going to wrap that up and push what's left in the next few days.

brian-armstrong avatar Oct 22 '16 22:10 brian-armstrong

This should not be too hard at all. Any updates on the script?

ItsShadowCone avatar Feb 10 '18 10:02 ItsShadowCone

I made some good progress on this recently. Previously this required building the NDK's standalone toolchains. Now I'm close to a build that doesn't require those. Once it's ready, I'll remove the static libs and just have it built alongside the library. It hasn't been a high priority for me though.

Is this something you'd like to see? I know shipping and using blobs isn't awesome.

brian-armstrong avatar Feb 10 '18 18:02 brian-armstrong

When I implemented a really similar thing in zstd it was as simple as adding two instructions to the cmake file to include the library for compilation plus adding a line to the Java part to load it (you probably already have that).

I might look at it, not sure yet.

ItsShadowCone avatar Feb 10 '18 19:02 ItsShadowCone

Before the unified headers, building was pretty complicated. The configure phase for libquiet's dependencies needed to be massaged carefully depending on the arch and API version targeted. Now it looks like this isn't needed, thankfully, but it's still somewhat fragile and bespoken. Still won't be as simple as adding a couple lines since the dependencies have to be built in a specific order. Also, one of the deps needs a CMakeLists.txt since it currently only builds with Make.

brian-armstrong avatar Feb 10 '18 19:02 brian-armstrong

@brian-armstrong , I would also be interested. It is not so straightforward to understand how all the components are interlinked, and being able to debug through the tests would really help ! Thanks !

aringot avatar Apr 12 '18 15:04 aringot