Qt Extended Home · Build System Home · Reference · User Guide · Internals codeless banner

Create a launcher folder

This information is only useful when building a Qt Extended image. If you are creating an installable package see A note on packages for the limitations imposed on packages.

The process involves several pieces. First you will need to create a .directory file to describe the new folder.

This example registers an "Examples" folder (/apps/Examples) using the same icon as the "Applications" folder.

    [Translation]
    File=Categories-examplesdirectory
    Context=Categories
    [Desktop Entry]
    Name[]=Examples
    Icon=qpe/AppsIcon

Once you have the .directory file you must tell the build system to do something with it. If you are modifying Qt Extended you can just put the file in $QTOPIA_SOURCE/apps/Examples/.directory and add it to src/libraries/qtopia/qbuild.pro. If that's not an option, you should create or edit a project and insert the following.

    f_dir.hint=desktop nct prep_db
    f_dir.files=$$PWD/.directory
    f_dir.path=/apps/Examples
    f_dir.trtarget=Categories-examplesdirectory

It is important that this rule runs before the rule that installs the .desktop file as it creates the category that the .desktop install rule will use. If you have this rule in a separate project you should ensure it runs first (hint, use dependencies). If you have it in the same project you can just make the .desktop rule depend on the .directory rule.

    desktop.hint=nct desktop
    desktop.files=example.desktop
    desktop.path=/apps/Examples
    desktop.trtarget=example-nct
    # Ensure the path is registered first
    desktop.depends=install_docapi_f_dir

Finally, you must edit defaultbuttons.conf to use your new directory. You will also want to get some apps to install there by changing their .desktop files to install to /apps/Examples.

    [Menu]
    ...
    3=Examples

A note on packages

The handling of .directory files is ignored for packages. Instead, the .directory files will be installed on the device where they will be ignored. If you want to register a system category you will need to use QCategoryManager::ensureSystemCategory().

The package manager is responsible for handling the .desktop files on the device. It ignores any specified categories so that all installed apps appear in the same folder.

See also Tasks and hint=nct.


Copyright © 2009 Nokia
Qt Extended - Build System Documentation