[maemo-developers] how to create a desktop applet

From: Jeremiah Foster jeremiah at jeremiahfoster.com
Date: Wed Nov 18 14:32:30 EET 2009
On Nov 18, 2009, at 9:19, ibrahim wrote:

> Didn't work either. Maybe there is something wrong with the way i create 
> packages:

There isn't really a wrong or right way, just a way that works for you and allows the package to be installed according to policy. That said, there are some 'best practices' that will make your life easier.

> 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

You may want to look at dh-make. This program creates a whole bunch of skeleton files and directories which can provide a template for your package. You just have to edit the files you want and make them relevant to your package. The debian New Maintainers Guide describes this process in detail. You get the added benefit that your eventual package is installable on a number of OSes, like Ubuntu, Mepis, debian, etc. 

>   5. rename the parent folder to : <appname>-<version>||
>   6. |run the command : dpkg-deb --build app-folder|

Like Kimmo mentioned, using dpkg-buildpackage is probably a best practice. I think this is the command used most often both in Maemo and in debian which means you will have lots of help if you run into some weird behavior.

>   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?

I think following Kimmo's advice would be an excellent way to go. :-)

More information about the maemo-developers mailing list