Home · All Classes · Grouped Classes · Annotated · Functions

Distribution Packaging

Introduction

This document describes Qtopia device package distribution.

Package Formats

Packages for Qtopia devices should be distributed in IPKG (Itsy Package Management System) format.

This format is supported by make packages which is part of the Qtopia SDK. This uses the install rules from your .pro file to create a .ipk file. Pre/post install/uninstall scripts must have the same name as your package or they will not be used.

An older program that might be useful is mkipks. This program takes a control file and produces either an IPKG file or an RPM file. Sample control files are included in the Qtopia software developer's kit (SDK). However, this script looks for files relative to $QPEDIR so you will need to ensure that you have write privelages to $QPEDIR and that your files are put there.

make packages

You should setup install rules (see the example application for how to do this). You should also define the following variables:

If you are going to use pre/post install/uninstall scripts you will probably want to do something like this:

In the .pro file:

    postinst.commands=$$COMMAND_HEADER\
        export QPEDIR=$(INSTALL_ROOT);\
        export PATH=\$$QPEDIR/bin:\$$PATH;\
        $$PWD/$${PACKAGE_NAME}.postinst
    postinst.CONFIG=no_path
    INSTALLS+=postinst

In the .postinst file:

    if [ -x $QPEDIR/bin/qtopia-addmimetype ]; then
        $QPEDIR/bin/qtopia-addmimetype application/x-rom rom
    fi

This means that "make install" will work. It also means that make packages won't fail. INSTALL_ROOT is set to a temporary location when building the package so scripts/binaries won't exist.

The Control File

The control file has the following form:

    Files: bin/foo apps/Applications/foo.desktop etc/foo.dat
    Priority: optional
    Section: qpe/applications
    Maintainer: Your Name <you@yourdomain.com>
    Version: 1.2.3-1
    Depends: qpe-base
    Description: Very brief description.
     A much longer
     multi-line
     description.

Supported Fields

The following fields are supported:

Other IPKG fields are passed through unchanged to the the control file within the resulting .ipk file. See the documentation of the ipkg program for more information.

Replacing the .control suffix

For IPKG format, you may also have files with the same name as the control file, but with the .control suffix replaced by one of the following:

SuffixNotes
.preinstThis script will execute before files are moved into place at installation.
.postinstThis script will execute after files are moved into place at installation. Common uses of this script are:
  • qtopia-addmimetype type/subtype extension -- add a MIME type for your application.
  • /opt/Qtopia/bin/qcop QPE/TaskBar "reloadInputMethods()" -- reload input methods if your software is an input method plug-in.
  • /opt/Qtopia/bin/qcop QPE/TaskBar "reloadApplets()" -- reload applets if your software is a taskbar applet.
.prermThis script will execute before files are removed at de-installation.
.postrmThis script will execute after files are removed at de-installation. Common uses of this script are:
  • /opt/Qtopia/bin/qcop QPE/TaskBar "reloadInputMethods()" -- reload input methods if your software was an input method plug-in.
  • /opt/Qtopia/bin/qcop QPE/TaskBar "reloadApplets()" -- reload applets if your software was a taskbar applet.


Copyright © 2007 Trolltech Trademarks
Qtopia 4.2.5