Revision as of 10:44, 21 April 2010 by divanov (Talk | contribs)

Creating Debian packages for Maemo 5 Qt applications and showing in the application menu

From Nokia Developer Wiki
Jump to: navigation, search
Featured Article



In this article, I will present how to build a .deb package . This is a usual implementation, but the difference is the Qt for Maemo application. The other problem that this article will address is how to put the Qt application at Menu of Maemo Device. The proposed strategy does not use dh_make to create the basic debian package structure, as described in Qt for Maemo Developers Guide.

Helloworldmaemo5qt 4.png

.Deb Packages In Brief

Deb is the extension of the Debian software package format and the most often used name for such binary packages. Like the Deb part of the term Debian. Debian packages are used in distributions based on Debian, such as Ubuntu and others.


You need to have libqt4-dev ,ScratchBox and Maemo SDK installed on your Computer and libqt4-dev installed on your Scratchbox ARM target and your Maemo Device . For more information on ScratchBox Installation click here and for Qt on Maemo click here.

Creating the Application

Helloworldmaemo5qt 1.png

You need to create a simple Qt HelloWorld Project on computer. I created a project with two labels how is showed below. Remember of to set the size of QWidget to 720 of Width and 420 of Height because the resolution of Maemo Device.

Copying the Application to Scratchbox

First , copy the sources files of application to a folder at Scratchbox. In general the address is /scratchbox/users/username/home/username/. I do this:

flavio@flavio-desktop:~/workspace$ cp -r  HelloWorld/ /scratchbox/users/${USER}/home/${USER}/

Compiling the Application at Scratchbox

At Start, you need login at Scratchbox:

~$ /scratchbox/login

If necessary select the ARM target using sb-conf se FREMANTLE_ARMEL . To compile do this :

[sbox-FREMANTLE_ARMEL: ~] > cd HelloWorld
[sbox-FREMANTLE_ARMEL: ~/HelloWorld] > qmake
[sbox-FREMANTLE_ARMEL: ~/HelloWorld] > make

Creating the Debian Source Package

The method of creation Debian packages is described in an external article Packaging a Qt application. Maemo is derivative of Debian Linux distribution, thus, should you have a question, feel free to consult Debian documentation Debian New Maintainer's Guide.

Building the Debian Package

To build both source and binary packages with checking build dependencies use the following command

[sbox-FREMANTLE_ARMEL: ~/HelloWorld] > dpkg-buildpackage -i -rfakeroot -D

Append "-nc -b" keys to avoid cleaning the source tree. This will speed up building a binary package. This is relevant for huge packages like Qt libraries, which are being built for several hours.

Sending the Debian Package to Maemo Device

I used the scp command with the IP address of device. The IP address of device is searched at Settings->Connection Manager , after that , click at Connection Manager at left-Up-Corner->internet connection->IP address.

[sbox-FREMANTLE_ARMEL: ~/HelloWorld] > scp hello-world-application.deb root@

Installing the Debian Package at Maemo Device

[sbox-FREMANTLE_ARMEL: ~/HelloWorld] > ssh root@ dpkg -i /home/user/hello-world-application.deb

Now, the application is installed at Maemo Device.

You will need to click at More... Menu and you will can see the HelloWorld Application with a icon of N900 :

Snapshoot of HelloWorld Application

Helloworldmaemo5qt 5.png

This post is avaiable too at QtEfforts of the Efforts Projects in the Embedded Systems and Pervasive Computing Laboratory.

238 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.