Qtopia Home · Home · Reference · User Guide · Internals

Project Files

Introduction

This overview will primarily focus on applications. If you want to create a project file for a library the Libraries page contains more relevant information.

The canonical definition of a project file is the example application.

    qtopia_project(qtopia app) # see buildsystem.html for more project keywords
    TARGET=example
    # main.cpp uses the QTOPIA_ADD_APPLICATION/QTOPIA_MAIN macros
    CONFIG+=qtopia_main
    # Despite using the QTOPIA_MAIN macro, do not build this app as a
    # quicklaunch plugin unless -force-quicklaunch was passed to configure
    CONFIG+=no_quicklaunch
    # Do not build this app into a singleexec binary
    CONFIG+=no_singleexec

    # Specify the languages that make lupdate should produce .ts files for
    AVAILABLE_LANGUAGES=en_US
    # Specify the langauges we want to install translations for
    LANGUAGES=$$AVAILABLE_LANGUAGES

    # These are the source files that get built to create the application
    FORMS=examplebase.ui
    HEADERS=example.h
    SOURCES=main.cpp example.cpp

    # Install the launcher item. The metadata comes from the .desktop file
    # and the path here.
    desktop.files=example.desktop
    desktop.path=/apps/Applications
    desktop.trtarget=example-nct
    desktop.hint=nct desktop
    INSTALLS+=desktop

    # Install some pictures.
    pics.files=pics/*
    pics.path=/pics/example
    pics.hint=pics
    INSTALLS+=pics

    # Install help files
    help.source=help
    help.files=example.html
    help.hint=help
    INSTALLS+=help

    # SXE information
    target.hint=sxe
    target.domain=untrusted

    # Package information (used for make packages)
    pkg.name=example
    pkg.desc=Example Application
    pkg.version=1.0.0-1
    pkg.maintainer=Trolltech (www.trolltech.com)
    pkg.license=Commercial

The following sections describe the parts of the project file.

Project Type

It is mandatory to use the qtopia_project() function to declare the type of project you are building. Third party applications will typically use qtopia_project(qtopia app) to declare a Qtopia application is being built.

TARGET

The TARGET is the name of the binary. In Qtopia applications must have unique names as several resources types are located using the application name.

Application configuration

Qtopia applications can be built in several ways. There are flags that you should set to indicate how your app can be built. See Applications for a discussion on this.

Internationalization

You can specify what translations exist for your application. See Internationalization for more information.

Source files

You specify your input files using FORMS, HEADERS and SOURCES.

Desktop file

Applications require a .desktop file which specifies the launcher meta-data for the application.

Pictures

Applications will require at least an image for the launcher icon. Other images and icon can be installed too. It's best to put all images into a subdirectory so that installpic will install them correctly.

Help files

You should install at least 1 help file for your application. You can install additional help files for context-sensitive help. Online help looks at TARGET-<objname>.html for context-sensitive help. The object name of the toplevel window is used.

Package meta-data

There's some meta-data attached to a package. You can read about this in Packages (overview).

See also Overviews, Create a new project file, Libraries, and Applications.


Copyright © 2008 Nokia Qtopia Build System Documentation