15 December 2007

wxGTK working on Maemo

Reading the official WxWidget blog, I discovered that one of their developer was working to hildonize WxWidgets. I wanted to know if that was just a test or if this library could work in Maemo, so I followed his suggestion and I grabbed the latest SVN sources:

svn checkout http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk wxWidgets

and I compiled it in this way:

cd wxWidgets
./configure --with-hildon
make
make install


then I grabbed a simple "HelloWorld" from the official documentation. You can find the complete source code here.

I compiled the source code in this way:

g++ hworld.cpp `wx-config --libs` `wx-config --cxxflags` -o hworld

then I ran it in the usual way:

run-standalone.sh ./hworld

The result? I think that a screenshoot is better than thousand words :)


N.b: I tested this inside Scratchbox, using CHINOOK_x86 target, so I think it will work fine on Os2008. This could be a good thing to help other developers porting some interesting applications (uhm... aMule for example ;) ) to Maemo.

8 comments:

timsamoff said...

Cool! :)

Robert said...

Interesting. I've been trying to trace through this issue myself, but I've been having some issues with the CHINOOK build (maemo 4). It seems that hildon-lgpl has been changed to hildon1, and some of the API has also been modified. Are you not seeing this error in configure?

checking for HILDON... configure: WARNING: libhildon_lgpl not found

Does your sbox have the old libs too? How did you pull that off? Thanks.

Andrea Grandi said...

I didn't notice any error :\
try: "apt-get update" then "fakeroot apt-get upgrade" inside ScratchBox.... maybe you have old libs, don't know...

Robert said...

I'm using the VMware image from: http://maemovmware.garage.maemo.org/
I've run the following:

(as maemo, outside sbox) ./maemo-sdk-install_4.0.sh -y

This is supposed to re-download all of the SDK files and re-setup the targets. I also ran the two commands you listed below. I still get the configure error. What install method did you use?

Also, here is my /etc/apt/sources.list:

deb http://repository.maemo.org/ chinook free non-free
deb-src http://repository.maemo.org/ chinook free
deb file:/home/maemo/maemo-sdk-nokia-binaries_4.0 chinook explicit

What do you get from these commands?
[sbox-CHINOOK_ARMEL: ~/sample_sources/chinook/cpp-samples/draw_example] > pkg-config hildon-1 --libs
-lhildon-1 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
[sbox-CHINOOK_ARMEL: ~/sample_sources/chinook/cpp-samples/draw_example] > pkg-config hildon-lgpl --libs
Package hildon-lgpl was not found in the pkg-config search path.
Perhaps you should add the directory containing `hildon-lgpl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'hildon-lgpl' found

Thanks!

Robert said...

Hi,

I was able to get everything to work once I ported it to the hildon-1 library (the new version for maemo 4). My results and procedure are posted here:

http://wxwidgets.blogspot.com/2007/11/hildonizing-wxgtk.html

I'll be posting binaries once I've verified everything is reasonably pretty. Thanks.

Hostman said...

Screenshots, binaries, etc. will be here:
http://maemolibs.blogspot.com/2007/12/first-some-screenshots.html

Hostman said...

Hi,

Binaries are here:

http://maemolibs.blogspot.com/

Marx said...

Hi there,

I'm trying to install Maemo on Fedora 8 (x86_64) but got no success so far: scratchbox1, scratchbox2, maemo sdk 3.x, 4.0, sdk+. Could you give me a hint please?

Thanks very much, experts!

Jakov