Is porting really that easy?


Exactly. If you just need the standard stuff provided by GTK+ you don't need to touch all that GObject stuff and everything looks like ordinary C stuff, so you can use it directly in C++ and you don't need to do any classes, which is enough for most of the stuff one wants to do. And I have to say, it is really easy to work with it.


But if you want to code a custom element (e.g. an analog dial widget with a pointer that the user can drag to set the value as used for the "Creating a widget from scratch" tutorial), you need to put it into a GObject class, which is really not easy (the base structure of a GObject class already contains over 100 lines of C code!), and as the C++ Wrapper Gtkmm surely allows to use C++ classes for this, it will be much easier to do it with a C++ class.


As an alternative, the Gnome guys created Vala, which is a C#/Java like language that generates GObject C code and C++-compatible headers for you which makes it easy to create a GObject class. It is still quite immature and produces lots of redundant code and stuff like that, but it is really nice for learning about the whole GObject system (the generated C code looks very cryptic, though).
 
Last edited by a moderator:
Thanks, I think I understand now.


I'll come back when my skills in C++ and Gtk are better and I have a working tool-chain.


And it's really cool that golden dict has now a port :)
 
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.
I prefer dict/dictd. I wonder if those have been ported 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...)
I've been looking for qmake-qt4 and make for the Pandora. Are they available?
 
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...)
Can you help me? I can't find make in DJWillis' toolchain.
 
Back
Top