[maemo-developers] how to create a desktop applet

From: Kimmo Hämäläinen kimmo.hamalainen at Nokia.com
Date: Wed Nov 18 10:29:37 EET 2009
On Wed, 2009-11-18 at 09:19 +0100, ext ibrahim wrote:
> Kimmo Hämäläinen wrote:
> > On Tue, 2009-11-17 at 18:31 +0100, ext ibrahim wrote:
> >   
> >> daniel wilms wrote:
> >>     
> >>> Hi
> >>>       
> >>>> I can't seem to find the APIs needed to do such thing.
> >>>> where should a look to find something like that?
> >>>>         
> >>> there is a good tutorial how to do that in the developer guide:
> >>>
> >>> http://wiki.maemo.org/Documentation/Maemo_5_Developer_Guide/Application_Development/Writing_Desktop_Widgets 
> >>>
> >>>
> >>> Hope that helps,
> >>>
> >>> cheers Daniel
> >>>
> >>>       
> >> I tried the example, created a debian package out of the output, and 
> >> installed it on the emulator and the n900 phone. BUT noting happened!
> >> th eapplication is installed but i can't see the applicatin name in the 
> >> "Add Widget" menu from the "Desktop menu".
> >> What am I missing ?? is there anything else i can do to make the home 
> >> widget visible to the "Add widget" and the Desktop??
> >>     
> >
> > I haven't tried that, but libhildondesktop1-examples package has an
> > example Home applet that worked for me.  The package should be part of
> > the SDK.  The latest source is in the gitorious:
> >
> > http://maemo.gitorious.org/fremantle-hildon-desktop/libhildondesktop
> >
> > -Kimmo
> >
> >
> >
> >   
> Didn't work either. Maybe there is something wrong with the way i create 
> packages:
> the steps i take to create the package are :
> 
>    1. compile the source and header using gcc inside scratchbox
>           * gcc -shared 'pkg-config hildon-1 libhildondesktop-1 --libs
>             --cflags' example.c example.h -o output.so
>    2. create the folder structure : data/usr/lib/ and put the output.so
>       file inside it
>    3. create the folder : data/usr/share/applications/hildon-home and
>       put the .desktop file inside it
>    4. create the DEBIAN/control file and supply the package information
>       in it
>    5. rename the parent folder to : <appname>-<version>||
>    6. |run the command : dpkg-deb --build app-folder|
>    7. then setup the package to the emulator using dpkg -i packagename.deb
>    8. in the emulator; press on the upper area of the desktop, and enter
>       the desktop menu
>    9. click on the Desktop menu ---> add widget ---> didn't find my
>       application name in the widgets menu !!!
> 
> what's wrong with what i've done ?? can anybody help?

Easier way:

1) git clone git://gitorious.org/fremantle-hildon-
desktop/libhildondesktop.git
(you can do this also outside Scratchbox), or:
1) apt-get source libhildondesktop1

2) cd libhildondesktop
3) dpkg-buildpackage -rfakeroot -b
(this builds the Debian package)
4) copy libhildondesktop1-examples_<version>_armel.deb to your N900
5) install it as root: dpkg -i libhildondesktop1-
examples_<version>_armel.deb
(hildon-home should notice the new .desktop file and list it in the
dialog that you use to add applets on the Home view)

-Kimmo


More information about the maemo-developers mailing list