diff options
Diffstat (limited to 'bindings/java-jni/README')
-rw-r--r-- | bindings/java-jni/README | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/bindings/java-jni/README b/bindings/java-jni/README index 80c256a..e4b89fb 100644 --- a/bindings/java-jni/README +++ b/bindings/java-jni/README @@ -1,27 +1,28 @@ -Android Build Instructions - -You'll need the Android NDK. - -Then link the sword/bindings/java-jni folder to your project's /jni folder. -I have a symlink: - -~/src/bishop/jni -> ~/src/sword/bindings/java-jni/jni/ - -~/src/sword is simply a checkout of the current sword svn repository. -(svn co https://crosswire.org/svn/sword/trunk ~/src/sword) - - -So, since my $HOME directly is /home/scribe, my configuration looks like this: - -/home/scribe/src/sword/ -/home/scribe/src/bishop/ -/home/scribe/android-ndk-r8e/ - -with: - -APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop -APP_MODULES := sword swordcore -APP_PLATFORM := android-3 - +This folder contains java-jni bindings. They are 99% generic but have +some Android-specific code which should eventually be removed. This +includes setting a SWLog::setSystemLog(new AndroidLogger()) and an +org.crosswire.android.sword.* package. This was not changed to +org.crosswire.sword.* because there are conflicting SWMgr, et. al. +classes from the crosswire-java project and the CORBA bindings. +org.crosswire.jni.sword.* is an option but exposing the impl in the +package name is bad practice. More thought needed. + +A make in here should produce the JNI wrappers. +jni/swordstub.cpp is the jni implementation + +This make also copies the java src/ files to the ../Android binding folder. +The ../Android binding folder symlinks to the jni cpp file generated here. + +There is an Android Studio project there to build the native libs + +The steps to build all of this are usually: +1) make in this folder +2) build all in ../Android/SWORD Android Studio project +3) a make in the ../Android/ folder, which finally copies the binary libs + to the ../cordova/ bindings folder to produce a working cordova + plugin + +Android java bindings can be used after step 2 +cordova javascript bindings can be used after step 3 Hope this helps get you started. Let me know your progress! |