Reply
Thread Tools
JapieB's Avatar
Posts: 59 | Thanked: 42 times | Joined on Nov 2009 @ Wageningen (NL)
#1
Does anyone have a working example of a qt4 homescreen widget for PR1.2 that can be built using Madde?

I downloaded the example (qt4-homescreen-example), but I cannot build the project using Madde 0.6.72. (first error: hd-plugin-loader-qt.c:42:47: error: libhildondesktop/libhildondesktop.h: No such file or directory)

Installing qt4-homescreen-loader from extras-testing doesn't seem to work on my PR1.2 N900.
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#2
Homescreen widgets can be compiled with MADDE, see EveHomescreen for a working example.

The only issue is that they are extremely hard to test on the device.
(When launched with MADDE, they appear as full screen apps and not as widgets.)

Note that you only need to use the QMaemo5HomescreenAdaptor, no need to manually build the loader. It is enough if you create a dependency on qt4-homescreen-loader.

Note that the Qt example also involved including weird libraries, which is quite tricky, as it is buggy in both Qt Creator and MADDE.
Basically, you must add all the libraries in question to INCLUDEPATH and LIBS in your project file. (Like this one.)
 

The Following User Says Thank You to Venemo For This Useful Post:
JapieB's Avatar
Posts: 59 | Thanked: 42 times | Joined on Nov 2009 @ Wageningen (NL)
#3
Originally Posted by Venemo View Post
<snip/>
Basically, you must add all the libraries in question to INCLUDEPATH and LIBS in your project file. (Like this one.)
Using the qt-labs-maemo5-homescreen example and using the following qtpluginloader.pro the plugin builds!

Code:
TARGET = qtpluginloader

TEMPLATE = lib
CONFIG += plugin
SOURCES = hd-plugin-loader-qt.c
HEADERS = hd-plugin-loader-qt.h


QT += maemo5
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\libhildondesktop-1
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\glib-2.0
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\lib\glib-2.0\include
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\gtk-2.0    
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\lib\gtk-2.0\include  
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\cairo     
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\pango-1.0    
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\atk-1.0     
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\include\dbus-1.0     
INCLUDEPATH += /sysroots/fremantle-arm-sysroot-10.2010.19-1-slim\usr\lib\dbus-1.0\include
After copying the libqtpluginloader.so to /usr/lib/hildon-desktop/loaders on my n900 the qt-homescreen-example works!
 

The Following User Says Thank You to JapieB For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#4
Originally Posted by JapieB View Post
Using the qt-labs-maemo5-homescreen example and using the following qtpluginloader.pro the plugin builds!

[...]

After copying the libqtpluginloader.so to /usr/lib/hildon-desktop/loaders on my n900 the qt-homescreen-example works!
This is very nice to know, thank you very much for sharing!
(I always wanted to create a widget but couldn't figure out the details.)

Last edited by Venemo; 2010-06-03 at 23:45.
 

The Following User Says Thank You to Venemo For This Useful Post:
JapieB's Avatar
Posts: 59 | Thanked: 42 times | Joined on Nov 2009 @ Wageningen (NL)
#5
I've looked into the build problems a bit further:

It turns out that the qt4-homescreen-example didn't build out of the box in Madde (I use the Windows version) because the Madde file '/madbin/pkg-config.cmd' is wrong...

it contains
@env.exe PERL5LIB=/madlib/perl5 /madlib/pkg-config %*

but it should contain
@env.exe PERL5LIB=/madlib/perl5 /madbin/pkg-config %*

(the pkg-config program is installed in /madbin instead of /madlib)

After fixing this file, the example builds unchanged!

The lines
Code:
CONFIG += link_pkgconfig
PKGCONFIG += hildon-1 libhildondesktop-1
in the .pro file take care of configuring INCLUDEPATH and LIBS
 

The Following User Says Thank You to JapieB For This Useful Post:
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#6
Originally Posted by JapieB View Post
It turns out that the qt4-homescreen-example didn't build out of the box in Madde (I use the Windows version) because the Madde file '/madbin/pkg-config.cmd' is wrong...

it contains
@env.exe PERL5LIB=/madlib/perl5 /madlib/pkg-config %*

but it should contain
@env.exe PERL5LIB=/madlib/perl5 /madbin/pkg-config %*

(the pkg-config program is installed in /madbin instead of /madlib)

After fixing this file, the example builds unchanged!
Very nice work there.
I could never have figured this one out.
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:53.