Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Qt and Android...
Re: Qt and Android... [message #28165 is a reply to message #28164] Thu, 19 August 2010 23:04 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
thanks, i'm just curious Smile i'll try it ASAP.
Re: Qt and Android... [message #28173 is a reply to message #28165] Fri, 20 August 2010 10:00 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
http://code.google.com/p/android-pong/

is another very simple free little app, probably more simple than a full blown vnc app.

i'l try to modify it soon, removing all unnessesary things and just leaving one paddle to show / grab user interaction and provide it here.

[Updated on: Fri, 20 August 2010 10:13]

Report message to a moderator

Re: Qt and Android... [message #28214 is a reply to message #28173] Mon, 23 August 2010 15:29 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
here comes a pong version where the game logic has been striped. its pure startscreen, and moving padles. an example where quite a lot of underlying infrastructure is shown how to use it.

is anyone struggeling setting up eclipse btw? i've installed the galileo 3.5. version, adding it quite a bunch of plugins alltogether, and installing the current java sdk. this works pretty well from scratch, following the guide available at android.com. so this should be no problem. i thinkg ine needs to get familiar with this thing anyway, so i spare the work to describe how to set it all up, thus one digs in where it's needed Smile at the source.

another question arised while i was reading code ( i need to learn java anyway). the use things like

    @Override
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
// draw operations on canvas

which is pretty much the idea of Draw interface and primitive calls on it. so the port to android should find a way to map the Upp calls DrawXYZ to respective calls to a canvas (a SystemDraw to a System canvas Smile). this is not easy though, because of the java thing. but absolutely a must, because it uses hw accelerated stuff..

there are also native popups etc. how to do when porting the chameleon to android ? the common look and feel on android is sooo different..
Re: Qt and Android... [message #28228 is a reply to message #28214] Tue, 24 August 2010 10:22 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i've accomplished to intall cygwin Smile and run an NDK based example (bitmap-plasma). so we could draw things Smile.

on the JNI (java native interface), it is possible to call java stuff from c++ as well..

http://java.sun.com/developer/onlineTraining/Programming/JDC Book/jni.html
Re: Qt and Android... [message #28229 is a reply to message #28228] Tue, 24 August 2010 11:11 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
a conceptional question:
android development is handled in eclipse, which is a good thing, for java, has android build stuff plugins etc..
the NDK based applications, are still java applications that use a libfoo.so packaged code to be linked in the .apk application file.
so this is the point that we need to produce. but we wont be able to provide a 'full' IDE support for java development (it's U++ after all..).
so the handling is to have a build method for this .so file, which is then coyied to a location in the android project, which is in last step built and pushed to the target using eclipse.
we neither will be able to debug it..thus the code / classes will need to be tested in Ultimate++ using test cases / test projects.

i'm trying to analyze the build process using the 'ndk-build' script, to be able to make own build method in Upp..the plasma example is my base.. maybe soon Core can be compiled..

EDIT: is it possible to define a buildmethod that acually uses the 'ndk-build' script? we would save ourselves a lot of hassle, needing only to define a Ultimate.mk file which declares the sources needed to be compiled also..

[Updated on: Tue, 24 August 2010 11:18]

Report message to a moderator

Re: Qt and Android... [message #28231 is a reply to message #28229] Tue, 24 August 2010 13:13 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
this could impose some difficulties actually..
-fno-exceptions -fno-rtti

build flags from arm-eabi toolchain
how to deal with it?
Re: Qt and Android... [message #28232 is a reply to message #28229] Tue, 24 August 2010 14:46 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i found in the ide a 'SCRIPT' builder. is there some docu around it?
is it something i could use to map to ndk-builder?? providing some flags for it like execution dir etc.?
any hints?
Re: Qt and Android... [message #28238 is a reply to message #28232] Tue, 24 August 2010 22:00 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
kohait00 wrote on Tue, 24 August 2010 14:46

i found in the ide a 'SCRIPT' builder. is there some docu around it?



Hello, Konstantin.

You can read about SCRIPT builder from source code: uppsrc/ide/Builders/ScriptBuilder.cpp
Basicly, you have following built-in variables:
array INCLUDE
array LIBPATH

and built-in functions:
int Execute(string cmdLine)
void PutConsole(string text)
void PutVerbose(string text)

In the specified script file with bsc extension you need to implement (some of) following functions:
string objectfile(string pathToFile)
int compile(string pathToFile, string objectFile, string options)
string libraryfile(string packageName)
int library(array objlist, string product)
int link(objlist, liblist, target, linkoptions)
int preprocess(string file, string target)


kohait00 wrote on Tue, 24 August 2010 14:46

any hints?


In my previous experience, ESC standard library need to be extended (e.g. with GetFileName, GetFileExt, etc. functions or they need to be implemented in the script file) and SCRIPT builder, as well (e.g. to get output directory).

[Updated on: Tue, 07 September 2010 09:45]

Report message to a moderator

Re: Qt and Android... [message #28244 is a reply to message #28238] Wed, 25 August 2010 08:38 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
thanks, sender ghost..
is there any bsc file i can look into? a builder script u use somewhere in the build / release process of upp?
Re: Qt and Android... [message #28262 is a reply to message #28244] Wed, 25 August 2010 11:45 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
kohait00 wrote on Wed, 25 August 2010 08:38


is there any bsc file i can look into?


I made some template file for SCRIPT builder which you can look.
You can find it in attachment.

Edit:
Some mistakes fixed.

[Updated on: Sat, 11 September 2010 15:48]

Report message to a moderator

Re: Qt and Android... [message #28263 is a reply to message #28244] Wed, 25 August 2010 11:58 Go to previous messageGo to next message
Sender Ghost is currently offline  Sender Ghost
Messages: 301
Registered: November 2008
Senior Member
Also, you can be interested in lightweight ESC IDE.
It unfinished, but can be used as text editor with syntax highlighting based on uppsrc/CodeEditor.

With it you can test created functions inside main function using Print as output.

Edit:
Updated for newer changes in uppsrc/CodeEditor.

[Updated on: Thu, 10 October 2019 15:32]

Report message to a moderator

Re: Qt and Android... [message #28339 is a reply to message #28229] Sun, 29 August 2010 21:49 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Tue, 24 August 2010 05:11

a conceptional question:
android development is handled in eclipse, which is a good thing, for java, has android build stuff plugins etc..
the NDK based applications, are still java applications that use a libfoo.so packaged code to be linked in the .apk application file.
so this is the point that we need to produce. but we wont be able to provide a 'full' IDE support for java development (it's U++ after all..).



Actually, while little known, TheIDE already supports Java... Smile

(Tom needed to develop something in Java).

Anyway, in this context, it is pershaps just interesting note, nothing more. You analysis seems correct..

Quote:


EDIT: is it possible to define a buildmethod that acually uses the 'ndk-build' script? we would save ourselves a lot of hassle, needing only to define a Ultimate.mk file which declares the sources needed to be compiled also..


Definitely. TheIDE should be modified to support Android development. Which perhaps invludes ndk-build. Maybe even some Java support.
Re: Qt and Android... [message #28340 is a reply to message #28339] Sun, 29 August 2010 22:12 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i've managed to build an ndk example, but would definitely need some help with the build script 'ndk-build'. it includes actually those 2 steps only.

the ndk-build is invoked in the project directlry itself.

cd <your project main dir that contains also the jni folder>
/<whatever path to ndk environmend>/ndk-build

if some help provided, i might handle to build a Core supprting first ndk based project.

another story is to definitely think about a better modularisation of code base. imagine every android app using upp taking up 3 MB ?? actually containing the same Core/Ctrl .so stuff..
Re: Qt and Android... [message #28363 is a reply to message #28340] Mon, 30 August 2010 19:17 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 29 August 2010 16:12


another story is to definitely think about a better modularisation of code base. imagine every android app using upp taking up 3 MB ??



I see no problem with that. Cheapest android devices have >1GB of storage. Of course, RAM might be another question, but based on Linux, I guess process mapping will take care of that anyway.

And, practically, before we succeed, basic android devices will have more than 256MB.

I would not care about this now.
Previous Topic: Number of U++ Developers/Users?
Next Topic: About freelance..
Goto Forum:
  


Current Time: Fri Mar 29 07:45:32 CET 2024

Total time taken to generate the page: 0.01545 seconds