Re: [sword-devel] Bishop source / JNI instructions

2010-04-20 Thread Troy A. Griffitts
Dear Wes,

These are all problems fixed in recent commits to SVN.  Had you pulled
sword from SVN before I answered with instructions?  If so, you should
pull again.  I committed my latest code just before sending my first
email with instructions to you.

Wes Widner wrote:
> Troy,
> 
> I'm building on a 64bit Ubuntu 9.10 laptop.
> 
> Adding in the extra include directory I got it to compile. Actually, I
> entered the full path instead of a relative path. I'm guessing getting
> the paths problem solved in a programmatic fashion would be a great
> first step in cleaning things up.
> 
> At any rate, now the linker fails with the following:
> SharedLibrary  : libsword.so
> /usr/src/android-ndk-r3-crystax/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld:
> cannot find -lstlport
> collect2: ld returned 1 exit status
> 
> I'm guessing this is because I don't have STL support properly built
> yet. Do you know how I should go about building it for
> android-ndk-r3-crystax?
> 
> Thanks,
> -Wes
> 
> 
> On Sun, Apr 18, 2010 at 11:36 PM, Troy A. Griffitts
> mailto:scr...@crosswire.org>> wrote:
> 
> Hey Wes,
> 
> Glad you can use the prebuilt library.
> 
> Can you tell me if you have this line for both sword and swordcore in
> your sword/bindings/java-jni/jni/Android.mk
> 
> LOCAL_C_INCLUDES := ../src/sword/include
> ../src/sword/include/internal/regex
> 
> Your directories are slightly off from what mine are.  Notice I have my
> ndk in my home directory, not my src directory.
> 
> May I ask what platform you are building on?
> 
> Troy
> 
> 
> Wes Widner wrote:
> > Thanks Troy,
> >
> > I'm now able to use your prebuilt libsword.so library in my android
> > application. This will at least let me continue building the
> Android app
> > I had in mind initially.
> >
> > However I would still like to learn how to at least build the
> library on
> > my own, I'd like to help as much as I can as well, but I figure
> getting
> > it to build is a good first step.
> >
> > I moved my code to the following directories:
> > /usr/src/bishop
> > /usr/src/sword
> > /usr/src/android-ndk-r3-crystax
> >
> > Now it compiles a bit farther, but it still throws an error:
> > Compile thumb  : swordcore <=
> > apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c
> > apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:177:19:
> > error: regex.h: No such file or directory
> > apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:942:
> > error: expected '=', ',', ';', 'asm' or '__attribute__' before
> > 're_syntax_options'
> >
> > Other errors follow, but I assume they are cascading from these.
> >
> > -Wes
> >
> >
> > On Sun, Apr 18, 2010 at 8:01 PM, Troy A. Griffitts
> mailto:scr...@crosswire.org>
> > >> wrote:
> >
> > Yes, unless you want to rebuild libsword.so, you don't need
> the ndk.
> > Simply place libsword.so at:
> >
> > bishop/libs/armeabi/libsword.so
> >
> >
> > But again, the most useful thing at this stage would be to help me
> > stabilize libsword.so
> >
> > But I understand if you'd rather work on your frontend.  I'll
> keep you
> > posted on my progress with libsword.so for android.
> >
> > The issues you've posted below seem to have something to do
> with your
> > paths.  Maybe you could try putting things relative to the
> same place I
> > have my stuff.  It is quite possible I have a path setup
> somewhere which
> > depends on my directory structure.
> >
> > /home/scribe/src/sword/
> > /home/scribe/src/bishop/
> > /home/scribe/android-ndk-r3-crystax/
> > /home/scribe/android-ndk-r3-crystax/apps/bishop/Application.mk
> >
> > with:
> >
> > APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop
> > APP_MODULES  := sword swordcore
> > APP_PLATFORM := android-3
> >
> >
> > I'm sure you could change /home/scribe to your $HOME, but
> maybe try to
> > put everything else relative to your home like mine and see if
> it works.
> >  Once we get your setup working maybe we can determine which
> component
> > is counting on another being at a certain location, and if we
> can easily
> > break that requirement.
> >
> > Troy
> >
> >
> >
> > Wes Widner wrote:
> > > Troy,
> > >
> > > Thank you VERY much for pointing me in the right direction.
> > >
> > > I've gotten crystax and have created a test project of my
> own. But
> > when
> > > I attempt to run 'make APP=bisho

Re: [sword-devel] Bishop source / JNI instructions

2010-04-19 Thread David Haslam

I take it you've tried one or two Go Bible apps converted to .APK using J2ME
Bridge from netmite.com

See  http://gobible.blogspot.com/2009/10/go-bible-for-android-phones.html
http://gobible.blogspot.com/2009/10/go-bible-for-android-phones.html 

Sadly, some scripts of interest to your friends were not supported by the
default fonts.

David
-- 
View this message in context: 
http://n4.nabble.com/Bishop-source-JNI-instructions-tp2013818p2015709.html
Sent from the SWORD Dev mailing list archive at Nabble.com.

___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page


Re: [sword-devel] Bishop source / JNI instructions

2010-04-19 Thread Peter von Kaehne
I am excited about the prospect of a Android application

(HTC Hero owner)

Troy A. Griffitts wrote:
> Hey Wes,
> 
> Glad you can use the prebuilt library.
> 
> Can you tell me if you have this line for both sword and swordcore in
> your sword/bindings/java-jni/jni/Android.mk
> 
> LOCAL_C_INCLUDES := ../src/sword/include ../src/sword/include/internal/regex
> 
> Your directories are slightly off from what mine are.  Notice I have my
> ndk in my home directory, not my src directory.
> 
> May I ask what platform you are building on?
> 
> Troy
> 
> 
> Wes Widner wrote:
>> Thanks Troy, 
>>
>> I'm now able to use your prebuilt libsword.so library in my android
>> application. This will at least let me continue building the Android app
>> I had in mind initially.
>>
>> However I would still like to learn how to at least build the library on
>> my own, I'd like to help as much as I can as well, but I figure getting
>> it to build is a good first step.
>>
>> I moved my code to the following directories:
>> /usr/src/bishop
>> /usr/src/sword
>> /usr/src/android-ndk-r3-crystax
>>
>> Now it compiles a bit farther, but it still throws an error:
>> Compile thumb  : swordcore <=
>> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c
>> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:177:19:
>> error: regex.h: No such file or directory
>> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:942:
>> error: expected '=', ',', ';', 'asm' or '__attribute__' before
>> 're_syntax_options'
>>
>> Other errors follow, but I assume they are cascading from these.
>>
>> -Wes
>>
>>
>> On Sun, Apr 18, 2010 at 8:01 PM, Troy A. Griffitts > > wrote:
>>
>> Yes, unless you want to rebuild libsword.so, you don't need the ndk.
>> Simply place libsword.so at:
>>
>> bishop/libs/armeabi/libsword.so
>>
>>
>> But again, the most useful thing at this stage would be to help me
>> stabilize libsword.so
>>
>> But I understand if you'd rather work on your frontend.  I'll keep you
>> posted on my progress with libsword.so for android.
>>
>> The issues you've posted below seem to have something to do with your
>> paths.  Maybe you could try putting things relative to the same place I
>> have my stuff.  It is quite possible I have a path setup somewhere which
>> depends on my directory structure.
>>
>> /home/scribe/src/sword/
>> /home/scribe/src/bishop/
>> /home/scribe/android-ndk-r3-crystax/
>> /home/scribe/android-ndk-r3-crystax/apps/bishop/Application.mk
>>
>> with:
>>
>> APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop
>> APP_MODULES  := sword swordcore
>> APP_PLATFORM := android-3
>>
>>
>> I'm sure you could change /home/scribe to your $HOME, but maybe try to
>> put everything else relative to your home like mine and see if it works.
>>  Once we get your setup working maybe we can determine which component
>> is counting on another being at a certain location, and if we can easily
>> break that requirement.
>>
>> Troy
>>
>>
>>
>> Wes Widner wrote:
>> > Troy,
>> >
>> > Thank you VERY much for pointing me in the right direction.
>> >
>> > I've gotten crystax and have created a test project of my own. But
>> when
>> > I attempt to run 'make APP=bishop' (I named my test app bishop as
>> well)
>> > I get the following:
>> > Android NDK: Building for application 'bishop'
>> > Compile++ thumb: sword <= /usr/src/bishop/jni/swordstub.cpp
>> > /usr/src/bishop/jni/swordstub.cpp:25:21: warning: utilstr.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:26:23: warning: swversion.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:27:19: warning: swmgr.h: No such
>> file
>> > or directory
>> > /usr/src/bishop/jni/swordstub.cpp:28:19: warning: swlog.h: No such
>> file
>> > or directory
>> > /usr/src/bishop/jni/swordstub.cpp:29:21: warning: filemgr.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:30:22: warning: swmodule.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:31:22: warning: versekey.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:32:23: warning: localemgr.h: No such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:33:24: warning: treekeyidx.h: No
>> such
>> > file or directory
>> > /usr/src/bishop/jni/swordstub.cpp:34:24: warning: installmgr.h: No
>> such
>> > file or directory
>> > In file included from /usr/src/bishop/jni/swordstub.cpp:36:
>> > /usr/src/bishop/jni/webmgr.hpp:23:22: warning: swfilter.h: No such
>> file
>> > or directory
>> > /usr/src/bishop/jni/webmgr.hpp:24:27: warning: markupfiltmgr.h: No
>> such
>> > file or directory
>> > /usr/src/bishop/jni/webmgr.hpp:25:24: war

Re: [sword-devel] Bishop source / JNI instructions

2010-04-18 Thread Troy A. Griffitts
Hey Wes,

Glad you can use the prebuilt library.

Can you tell me if you have this line for both sword and swordcore in
your sword/bindings/java-jni/jni/Android.mk

LOCAL_C_INCLUDES := ../src/sword/include ../src/sword/include/internal/regex

Your directories are slightly off from what mine are.  Notice I have my
ndk in my home directory, not my src directory.

May I ask what platform you are building on?

Troy


Wes Widner wrote:
> Thanks Troy, 
> 
> I'm now able to use your prebuilt libsword.so library in my android
> application. This will at least let me continue building the Android app
> I had in mind initially.
> 
> However I would still like to learn how to at least build the library on
> my own, I'd like to help as much as I can as well, but I figure getting
> it to build is a good first step.
> 
> I moved my code to the following directories:
> /usr/src/bishop
> /usr/src/sword
> /usr/src/android-ndk-r3-crystax
> 
> Now it compiles a bit farther, but it still throws an error:
> Compile thumb  : swordcore <=
> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c
> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:177:19:
> error: regex.h: No such file or directory
> apps/bishop/../../../bishop/jni/../../../src/utilfuns/regex.c:942:
> error: expected '=', ',', ';', 'asm' or '__attribute__' before
> 're_syntax_options'
> 
> Other errors follow, but I assume they are cascading from these.
> 
> -Wes
> 
> 
> On Sun, Apr 18, 2010 at 8:01 PM, Troy A. Griffitts  > wrote:
> 
> Yes, unless you want to rebuild libsword.so, you don't need the ndk.
> Simply place libsword.so at:
> 
> bishop/libs/armeabi/libsword.so
> 
> 
> But again, the most useful thing at this stage would be to help me
> stabilize libsword.so
> 
> But I understand if you'd rather work on your frontend.  I'll keep you
> posted on my progress with libsword.so for android.
> 
> The issues you've posted below seem to have something to do with your
> paths.  Maybe you could try putting things relative to the same place I
> have my stuff.  It is quite possible I have a path setup somewhere which
> depends on my directory structure.
> 
> /home/scribe/src/sword/
> /home/scribe/src/bishop/
> /home/scribe/android-ndk-r3-crystax/
> /home/scribe/android-ndk-r3-crystax/apps/bishop/Application.mk
> 
> with:
> 
> APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop
> APP_MODULES  := sword swordcore
> APP_PLATFORM := android-3
> 
> 
> I'm sure you could change /home/scribe to your $HOME, but maybe try to
> put everything else relative to your home like mine and see if it works.
>  Once we get your setup working maybe we can determine which component
> is counting on another being at a certain location, and if we can easily
> break that requirement.
> 
> Troy
> 
> 
> 
> Wes Widner wrote:
> > Troy,
> >
> > Thank you VERY much for pointing me in the right direction.
> >
> > I've gotten crystax and have created a test project of my own. But
> when
> > I attempt to run 'make APP=bishop' (I named my test app bishop as
> well)
> > I get the following:
> > Android NDK: Building for application 'bishop'
> > Compile++ thumb: sword <= /usr/src/bishop/jni/swordstub.cpp
> > /usr/src/bishop/jni/swordstub.cpp:25:21: warning: utilstr.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:26:23: warning: swversion.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:27:19: warning: swmgr.h: No such
> file
> > or directory
> > /usr/src/bishop/jni/swordstub.cpp:28:19: warning: swlog.h: No such
> file
> > or directory
> > /usr/src/bishop/jni/swordstub.cpp:29:21: warning: filemgr.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:30:22: warning: swmodule.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:31:22: warning: versekey.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:32:23: warning: localemgr.h: No such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:33:24: warning: treekeyidx.h: No
> such
> > file or directory
> > /usr/src/bishop/jni/swordstub.cpp:34:24: warning: installmgr.h: No
> such
> > file or directory
> > In file included from /usr/src/bishop/jni/swordstub.cpp:36:
> > /usr/src/bishop/jni/webmgr.hpp:23:22: warning: swfilter.h: No such
> file
> > or directory
> > /usr/src/bishop/jni/webmgr.hpp:24:27: warning: markupfiltmgr.h: No
> such
> > file or directory
> > /usr/src/bishop/jni/webmgr.hpp:25:24: warning: osiswordjs.h: No such
> > file or directory
> > /usr/src/bishop/jni/webmgr.hpp:26:24: warning: thmlwordjs.h: No such
> > file or directory
> > /usr/src/bishop/jni/webmgr.hpp:27:23: warning: gbfwordjs.h: No
>

Re: [sword-devel] Bishop source / JNI instructions

2010-04-18 Thread Troy A. Griffitts
Yes, unless you want to rebuild libsword.so, you don't need the ndk.
Simply place libsword.so at:

bishop/libs/armeabi/libsword.so


But again, the most useful thing at this stage would be to help me
stabilize libsword.so

But I understand if you'd rather work on your frontend.  I'll keep you
posted on my progress with libsword.so for android.

The issues you've posted below seem to have something to do with your
paths.  Maybe you could try putting things relative to the same place I
have my stuff.  It is quite possible I have a path setup somewhere which
depends on my directory structure.

/home/scribe/src/sword/
/home/scribe/src/bishop/
/home/scribe/android-ndk-r3-crystax/
/home/scribe/android-ndk-r3-crystax/apps/bishop/Application.mk

with:

APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop
APP_MODULES  := sword swordcore
APP_PLATFORM := android-3


I'm sure you could change /home/scribe to your $HOME, but maybe try to
put everything else relative to your home like mine and see if it works.
 Once we get your setup working maybe we can determine which component
is counting on another being at a certain location, and if we can easily
break that requirement.

Troy



Wes Widner wrote:
> Troy,
> 
> Thank you VERY much for pointing me in the right direction. 
> 
> I've gotten crystax and have created a test project of my own. But when
> I attempt to run 'make APP=bishop' (I named my test app bishop as well)
> I get the following:
> Android NDK: Building for application 'bishop'
> Compile++ thumb: sword <= /usr/src/bishop/jni/swordstub.cpp
> /usr/src/bishop/jni/swordstub.cpp:25:21: warning: utilstr.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:26:23: warning: swversion.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:27:19: warning: swmgr.h: No such file
> or directory
> /usr/src/bishop/jni/swordstub.cpp:28:19: warning: swlog.h: No such file
> or directory
> /usr/src/bishop/jni/swordstub.cpp:29:21: warning: filemgr.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:30:22: warning: swmodule.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:31:22: warning: versekey.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:32:23: warning: localemgr.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:33:24: warning: treekeyidx.h: No such
> file or directory
> /usr/src/bishop/jni/swordstub.cpp:34:24: warning: installmgr.h: No such
> file or directory
> In file included from /usr/src/bishop/jni/swordstub.cpp:36:
> /usr/src/bishop/jni/webmgr.hpp:23:22: warning: swfilter.h: No such file
> or directory
> /usr/src/bishop/jni/webmgr.hpp:24:27: warning: markupfiltmgr.h: No such
> file or directory
> /usr/src/bishop/jni/webmgr.hpp:25:24: warning: osiswordjs.h: No such
> file or directory
> /usr/src/bishop/jni/webmgr.hpp:26:24: warning: thmlwordjs.h: No such
> file or directory
> /usr/src/bishop/jni/webmgr.hpp:27:23: warning: gbfwordjs.h: No such file
> or directory
> In file included from /usr/src/bishop/jni/swordstub.cpp:22:
> build/platforms/android-3/arch-arm/usr/include/jni.h:489: note: the
> mangling of 'va_list' has changed in GCC 4.4
> In file included from /usr/src/bishop/jni/swordstub.cpp:36:
> /usr/src/bishop/jni/webmgr.hpp:29: error: 'sword' is not a namespace-name
> /usr/src/bishop/jni/webmgr.hpp:29: error: expected namespace-name before
> ';' token
> /usr/src/bishop/jni/webmgr.hpp:31: error: expected class-name before '{'
> token
> /usr/src/bishop/jni/webmgr.hpp:32: error: ISO C++ forbids declaration of
> 'OSISWordJS' with no type
> /usr/src/bishop/jni/webmgr.hpp:32: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:33: error: ISO C++ forbids declaration of
> 'ThMLWordJS' with no type
> /usr/src/bishop/jni/webmgr.hpp:33: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:34: error: ISO C++ forbids declaration of
> 'GBFWordJS' with no type
> /usr/src/bishop/jni/webmgr.hpp:34: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:35: error: ISO C++ forbids declaration of
> 'SWModule' with no type
> /usr/src/bishop/jni/webmgr.hpp:35: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:36: error: ISO C++ forbids declaration of
> 'SWModule' with no type
> /usr/src/bishop/jni/webmgr.hpp:36: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:37: error: ISO C++ forbids declaration of
> 'SWModule' with no type
> /usr/src/bishop/jni/webmgr.hpp:37: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:38: error: ISO C++ forbids declaration of
> 'SWModule' with no type
> /usr/src/bishop/jni/webmgr.hpp:38: error: expected ';' before '*' token
> /usr/src/bishop/jni/webmgr.hpp:68: error: 'SWModule' has not been declared
> /usr/src/bishop/jni/webmgr.hpp:68: error: 'ConfigEntMap' has not been
> declared
> /usr/src/bishop/jni/webmgr.hpp:68: error: 'ConfigEntMap' has not been
> declared
> /usr/src/bishop/jni/we

Re: [sword-devel] Bishop source / JNI instructions

2010-04-16 Thread Troy A. Griffitts
Dear Wes,

The files I threw together are still very much a prototype / proof of
concept.  But with that warning, everything you need to build libsword
for android is included in the svn repository for the SWORD engine.  You
can get the source here:

svn co https://crosswire.org/svn/sword/trunk sword/

The Bishop code is merely a bunch of calls to try out and help develop
the libsword bindings and really aren't worth checking in anywhere, but
if you'd like me to post them for an example, I can certainly do that.

Please again realize these android jni wrappers are fragile and
incomplete.  Please feel free to improve them, but please don't count on
them working dependably.

Build instructions.

You'll need an NDK with STL support.  I have been trying crystax release
lately.  You can find it on the web.

After that, you'll need a basic Application.mk file to place in your
apps folder.  Mine for bishop is here:

~/android-ndk-r3-crystax/apps/bishop/Application.mk

and contains:

APP_PROJECT_PATH := $(call my-dir)/../../../src/bishop
APP_MODULES  := sword swordcore
APP_PLATFORM := android-3

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

Hope this helps get you started.  Let me know your progress!

Troy




Wes Widner wrote:
> Hey everyone,
> 
> I'm new to this list so forgive me if it's answered elsewhere and I've
> simply overlooked it. Where is the source code for the android project
> that uses the sword library via jni?
> 
> Also, does anyone know how I should go about building the jni library
> for sword? I can mange to build the .java interface files, but I am
> having trouble figuring out where to build the system library (the .so
> file).
> 
> Any help is much appreciated!
> 
> Blessings,
> -Wes
> 
> 
> 
> 
> ___
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page


___
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page