![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
![]() |
This document describes Qtopia device package distribution.
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.
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/.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 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.
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.
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:
Suffix | Notes |
---|---|
.preinst | This script will execute before files are moved into place at installation. |
.postinst | This script will execute after files are moved into place at
installation. Common uses of this script are:
|
.prerm | This script will execute before files are removed at de-installation. |
.postrm | This script will execute after files are removed at
de-installation. Common uses of this script are:
|
Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|