FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index Off Topic / Otros temas Harbour on Android (?)
Posts: 52
Joined: Mon Oct 17, 2005 08:42 PM

Re: Harbour on Android (?)

Posted: Mon Apr 11, 2011 01:06 PM
How?
need modification in c:\harbour\config
Antonio Linares wrote:Massimo,

I am interested in it and I plan to continue research about it, first step is to be able to build Harbour for Android.
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Harbour on Android (?)

Posted: Thu Apr 14, 2011 03:59 AM
Massimo,

First tests building Harbour for Android :-)

https://groups.google.com/group/harbour-devel/t/d983d0d3462ca9d1?hl=es

Android.mk
Code (fw): Select all Collapse
LOCAL_PATH := ~/harbour/harbour/src 

include $(CLEAR_VARS) 

LOCAL_MODULE    := libhbvm 
LOCAL_SRC_FILES := vm/arrays.c vm/arrayshb.c vm/asort.c vm/vm.c 
LOCAL_CFLAGS    := -I/Users/anto/harbour/harbour/include 

include $(BUILD_STATIC_LIBRARY)


Application.mk
Code (fw): Select all Collapse
APP_MODULES=libhbvm


Then I run this:

then I run this:

antos-iMac:jni anto$ pwd
/Users/anto/Desktop/android-ndk-r5b/samples/harbour/jni
antos-iMac:jni anto$ ../../../ndk-build
Compile thumb : hbvm <= arrays.c
Compile thumb : hbvm <= arrayshb.c
Compile thumb : hbvm <= asort.c
Compile thumb : hbvm <= vm.c
StaticLibrary : libhbvm.a
antos-iMac:jni anto$

And libhbvm.a gets properly built :-)

In android-ndk-r5b/toolchain there is the gcc compiler, so I guess that we could avoid the call to ndk-build and adapt the Harbour makefile.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 111
Joined: Sat Jan 30, 2010 08:35 AM

Re: Harbour on Android (?)

Posted: Fri Apr 15, 2011 09:29 AM

Hola Antonio,

Como te podemos ayudar ?

Podemos hacer algo?

Lo que estas haciendo, es compilar desde Mac ?

Se puede hacer lo mismo con Windows?

Gracias.

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Harbour on Android (?)

Posted: Fri Apr 15, 2011 11:33 PM
Pere,

Lo que estamos intentando ahora es ver la forma de construir Harbour para Android.

Puedes descargar el NDK (Native Development Kit) para Android y revisar los ejemplos de la carpeta samples:
http://developer.android.com/sdk/ndk/index.html
Puedes usar el NDK desde Windows, Mac ó Linux.

Tenemos dos caminos, uno es usar los makes de ejemplo que proporciona el NDK y otro es modificar el make de Harbour para que llame al gcc del NDK.

De todas formas vamos a ir publicando aqui el resultado de nuestras pruebas y contando como vamos avanzando para que podais hacer un seguimiento
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Harbour on Android (?)

Posted: Sun Apr 17, 2011 11:49 AM

Pruebas actuales:

I have modified harbour/config/global.mk this way, as a start:

anto@ubuntu:~/harbour/harbour/config$ diff global.mk global_old.mk
970,975d969
< ifeq ($(HB_PLATFORM),android)
< HB_COMP_PATH := ~/Desktop/android-ndk-r5b/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/linux-x86/bin
< HB_COMPILER := arm-linux-androideabi-gcc
< HB_CPU := arm
< HB_CROSS_PLATFORM := yes
< HB_HOST_BIN := ~/harbour/harbour/bin/android/arm
1036d1029
< endif

Then I have created a folder harbour/config/android and copied gcc.mk
and global.mk from harbour/config/linux, then renamed gcc.mk as
arm-linux-androideabi-gcc.mk

Finally I do:
export HB_PLATFORM=android
make

Next I will set the right headers files path for the used gcc and test
it again

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Harbour on Android (?)

Posted: Sun Apr 17, 2011 12:09 PM

Also:

anto@ubuntu:~/harbour/harbour$ diff config/android/arm-linux-
androideabi-gcc.mk config/linux/gcc.mk
9c9
< HB_CMP := ~/Desktop/android-ndk-r5b/toolchains/arm-linux-
androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc


> HB_CMP := gcc

anto@ubuntu:~/harbour/harbour$

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM

Re: Harbour on Android (?)

Posted: Mon Apr 18, 2011 11:27 AM
We are on the right way! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 632
Joined: Thu Jan 19, 2006 10:45 AM

Re: Harbour on Android (?)

Posted: Sat Apr 23, 2011 07:42 AM

Hola Antonio, no se si voy bien encaminado. No tengo Linux en ninguna máquina de casa, solo en el trabajo. Por eso quería preguntarte si se puede hacer desde windows. He creado con un vmware la maquina virtual Android 2.2, pero ni por asomo está configurada con tu pantalla. Puedes explicar cual ha sido el procedimiento de creación. Eso que es un emulador o es el SO del Android?

Saludos



Andrés González desde Mallorca
Posts: 632
Joined: Thu Jan 19, 2006 10:45 AM

Re: Harbour on Android (?)

Posted: Sat Apr 23, 2011 09:46 AM

Sorry wrong language.

Saludos



Andrés González desde Mallorca

Continue the discussion