Is porting really that easy?


Tavin

Member
Joined
May 31, 2010
Messages
51
The pandora needs a dictionary programm, so I thought: let's port one.


Goldendict is my favourite


http://goldendict.org/download.php


Is at really as easy as just downloading the source and compiling it?


I'm asking because I don't have a pandora yet, but I allready want to start porting/coding software for it.
 
all depends, some things are just a matter of recompiling and wrapping it all up in a pnd, others are harder, so something that just uses ncurses for a text interface, piece of cake, something that uses hard coded 800x600 graphics, and custom libraries is going to need some hacking


usually the inputs at least need to be remapped to the pandoras, things like that


the main question is, can you program/get things working in the general sense?
 
Is porting really that easy is not a simple yes or no answer. There a tons of variables involved.


In general, the more complicated and more graphically intense the software the more likely it is to be hard to compile. You can never really know if you're going to run into trouble until you actually try it, or do the research to see what the dependencies of the software is and look for discrepancies against the standard Pandora libs.


In the case of the software you've selected, yes, should be easy. If it saves any configurations anywhere you'll need to make some minor adjustments and include a small script to redirect writes to the home folder the to appdata (not has hard as it sounds).


Things that make compiling hard on the Pandora include, but aren't limited to:


1. Uses OpenGL, not OpenGL/ES - pretty hard - since you have to covert the graphics routines to GL/ES.


2. Uses odd/not-included libraries - tricky - since you have to compile and include those libraries yourself, which often in turn require more odd/non-included libraries.


3. Relies on a toolkit that is not included, like a more up to date GTK+ or QT than the Pandora has on board - means you have to track down a version of the source that uses a compatible toolkit, or include the newest toolkit in your finished package, which is tricky for the same reason as #2.


As an example. Remmina is a fairly complicated application that uses GTK+ and writes to the home folder a lot. It compiled fine after I tracked down all the necessary libs and installed dev packages into my toolchain. Then it was only some minor adjustments to the source code to keep it from writing to the home folder.
 
From a cursory glance at the site, it certainly looks possible to port.


The code should be reasonably portable if there are Windows and Linux versions.


It could still make some hardware assumptions, but given the low complexity of the app I expect they would be fixable.


It does say it needs some libs: libvorbisfile, libz, libhunspell and libxtst. First two are fine, not sure about the last two.


It also says it needs Qt 4.5, and that it isn't common yet.
 
It does say it needs some libs: libvorbisfile, libz, libhunspell and libxtst. First two are fine, not sure about the last two.


It also says it needs Qt 4.5, and that it isn't common yet.
xtst is part of the base system, we have qt 4.6.3 on board, so qt 4.5 is no problem.

The pandora needs a dictionary programm, so I thought: let's port one.


Goldendict is my favourite


http://goldendict.org/download.php


Is at really as easy as just downloading the source and compiling it?


I'm asking because I don't have a pandora yet, but I allready want to start porting/coding software for it.

IMHO, building a qt app shouldn't be your first cross-compiling experience. But to your general question, yeah that easy :) most linux software stack is at a few recompile away. I builded transmission yesterday in half an hour, from the source download to the pnd upload.


Sure it's a bit harder to cross-compile than to compile locally, but if you have a good gentoo or a LFS experience the learning curve is very small.


Setup DJWillis toolchain.


Get confident with it building something very simple.


Then get the build dependency, build libhunspell and finally build Goldendict.


I'm willing to help you from the begining to the end of the process (I'll give you the pandora mkspecs definition for qmake etc...)
 
Well, I was looking for a dictionary for the Pandora, and this seemed good, and it uses Qt, so I tried compiling... and it worked :)


Yes compiling to the Pandora is normally very easy.


I created a qmakespec file for the DJwillis toolchain, you can grab it here:


http://www.rangelreale.com/pandora/qmakespec-pandora.tar.gz


But it have some problems, it try to use some RECORD X11 extension that is not available on the pandora, but it seems to only use it for hotkeys, so it works without it.


Also some screen are larger than the Pandora screen. Don't know how difficult it would be to fix.


But, in the end, it works, it even fetches Wikipedia pages from the internet.


@Tavin: we can give you pointers if you want to start with this one, compiling it should be easy, fixing these problems should be fun! :)
 
Wow, thank you guys for all your useful and nice answers! :D


So let's get the replies going:


@darfgarf


About my coding-related-knowledge:


Some basic skills in c/c++ (I once made a little homebrew for the Nintendo DS using PAlib)


I also took the programming class in my school, thus I have a decent knowledge of how a computer works and did some little stuff with java.


I'm currently out of practise but started learning c++ (for real, this time)


@mindlord


So QT(not too new), OpenGL/ES or SDL are OK for the pandora?


@sebt3


I assume you're right, I'll take it easy at the beginning.


@Hitnrun


that sounds cool, so golden dict "kind of" works allready?


I once set my resolution to 800x480, just to see how it looks and everything was just fine (a little small of course, but but definitely usable )


@All


So how should I start? Where can I get a/How do I set up toolchain? What IDE should I use? And is there some kind of pandora emulator, so I can test stuff?


reading this thread now


...
 
Last edited by a moderator:
@mindlord


So QT(not too new), OpenGL/ES or SDL are OK for the pandora?
Yes, QT works fine but being xfce GTK applications tend to use fewer resouces since the libs are always loaded.


OpenGL/ES is the defacto way to get 3D accelration out of the Pandora. you can take a shortcut through NanoGL, but it's not effecient.


SDL works currently but is not accelerated, it will get better with time.
 
@Hitnrun


that sounds cool, so golden dict "kind of" works allready?


I once set my resolution to 800x480, just to see how it looks and everything was just fine (a little small of course, but but definitely usable )

Yes it works, it gives an error message at start stating that X11 does not support the RECORD extension, but besides this runs fine and fast.


I had to compile libhunspell-dev separatelly and put the .so on the run path, so one more thing to learn. But this uses autoconf so it is very easy.
 
[...] being xfce GTK applications tend to use fewer resouces [...]
afaik xfce is build with GTK - correct me if I'm wrong.


@Hitnrun


to be honest I did not quite get all the stuff you did to get it running...


but anyways: I'm sure there a people that'll like to see a .pnd of this, even with the errormessage
 
Yes, QT works fine but being xfce GTK applications tend to use fewer resouces since the libs are always loaded.


OpenGL/ES is the defacto way to get 3D accelration out of the Pandora. you can take a shortcut through NanoGL, but it's not effecient.


SDL works currently but is not accelerated, it will get better with time.

To say nanogl is not efficient is not right. Directly from the author:

talk on the nanogl performance, where people claim that it is slower than "pure native code". If using vertex arrays or VBOs, the overhead is simply one jump per draw call. If using glbegin-glend pair, nanogl even improves performance, as it can automaticly batch similar drawing calls if the gl state wasn't changed. All of this has been thorougly profiled with non-intrusive and very accurate profiling tools (ie. external profiling hw attached to the device running nanogl)....
 
afaik xfce is build with GTK - correct me if I'm wrong.


@Hitnrun


to be honest I did not quite get all the stuff you did to get it running...


but anyways: I'm sure there a people that'll like to see a .pnd of this, even with the errormessage

Post what you did here, we'll help you.


Or have you given up already!
 
afaik xfce is build with GTK - correct me if I'm wrong.
That's what I'm saying. Applications using GTK will just use the GTK libraries already in use by xfce instead of having to load all the QT ones for example. Thus, lighter.

To say nanogl is not efficient is not right. Directly from the author:
That's cool! I'm glad of that... should accelerate porting of GL stuff quite a bit if people aren't afraid of it bogging things down. :)
 
That's what I'm saying. Applications using GTK will just use the GTK libraries already in use by xfce instead of having to load all the QT ones for example. Thus, lighter.
Even if KDE was used, GTK+ would still be lighter, because Qt is a fat behemoth.


BTW: Unless you are using some rare desktop-environment specific stuff, you don't code a XFCE application, you code a GTK+ application, it shouldn't matter on which desktop environment you're using it. Running it on XFCE rather than fat Gnome doesn't make it lighter.
 
Last edited by a moderator:
So where is a good resource for learning GTK then?


I'd like to use it with C+++ so, I think I need GTKmm, right?
 
I'd like to use it with C+++ so, I think I need GTKmm, right?
Not necessarily, you can directly use the C API instead of the C++ bindings as well. Eventually you'll also find more documentations and tutorials.


A good point to start would be the stuff you can find at http://library.gnome.org/devel/, e.g. this one.


If you plan to create own widgets it could be easier to use the C++ bindings, though, as the whole GObject stuff is quite difficult (at least if you're not using Vala...), but that's just a guess as I have never used Gtkmm.
 
Hum, this looks like mine too :) (I guess you just used the one I posted using cpasjuste toolchain and fix path)

Yep, I tried to find one for DJwillis toolchain but didn't find, so let's just share it with everybody!
 
GTK uses an object oriented pattern in C, it's called GObject.


Then there is a *real C++* layer wrapped around that for people that want a cleaner C++ interface


Theres also wrappers verry similar for every language you can imagine.


however, when you use C++ you could choose between the C GObject and pure C++ coding styles because C++ is fully backward compatible with C
 
Back
Top