Harbour on Android (?)

Re: Harbour on Android (?)

Postby mbelgrano » Mon Apr 11, 2011 1: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.
User avatar
mbelgrano
 
Posts: 52
Joined: Mon Oct 17, 2005 8:42 pm

Re: Harbour on Android (?)

Postby Antonio Linares » Thu Apr 14, 2011 3:59 am

Massimo,

First tests building Harbour for Android :-)

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

Android.mk
Code: Select all  Expand view
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: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour on Android (?)

Postby pcordonet » Fri Apr 15, 2011 9: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.
pcordonet
 
Posts: 111
Joined: Sat Jan 30, 2010 8:35 am
Location: Girona

Re: Harbour on Android (?)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour on Android (?)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour on Android (?)

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour on Android (?)

Postby Antonio Linares » Mon Apr 18, 2011 11:27 am

We are on the right way! :-)

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour on Android (?)

Postby Andrés González » Sat Apr 23, 2011 7: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
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Re: Harbour on Android (?)

Postby Andrés González » Sat Apr 23, 2011 9:46 am

Sorry wrong language.
Saludos

Andrés González desde Mallorca
User avatar
Andrés González
 
Posts: 628
Joined: Thu Jan 19, 2006 10:45 am
Location: Mallorca

Previous

Return to Off Topic / Otros temas

Who is online

Users browsing this forum: No registered users and 5 guests