| Home · All Classes · Annotated · Functions |
This document describes how to build a Qtopia source package. It should be read after:
Before continuing, you must ensure that the necessary source packages have been downloaded and you are ready to build Qtopia from the source code.
Note: If you have downloaded an RPM package such as a qtopia-phone-sdk-suse82.i386.rpm then you need to:
A Qtopia source package is a combination of Qtopia and Qt sources.
Qtopia packages can be installed anywhere, as long as the user has read/write access to the directories. There are some limits to the acceptable characters in directories however; spaces and characters that can be interpreted as a regular expression (regexp) are not allowed and spaces in file and directory names are not supported.
To install the package, cd into the directory where the package is to be installed and run the following command:
tar -xzf mypackage (where 'mypackage' is the fully qualified path + filename of the package to be installed)
After execution of the tar command a sub-directory is created that forms the root directory of the Qtopia source package. For the various Qtopia products the product base directory name will be as follows:
| Product | Directory Name |
|---|---|
| Qtopia Platform Edition | qtopia-platform-<version> |
| Qtopia Phone Edition | qtopia-phone-<version> |
For the rest of this documentation it is assumed that the package was unpacked in:
~/src/qtopia
and that the unpacked package was a phone source package. That is, there will now be a:
~/src/qtopia/qtopia-phone-<version>
directory, referred to as <qtopia-depot-dir>.
The following sub-directories are found in <qtopia-depot-dir>:
| Sub-directory | Description |
|---|---|
| doc/html | contains the reference documentation (you're reading it!). |
| help | contains the help files that will be installed on a device. |
| bin | contains binaries and scripts needed to build Qtopia. |
| src | contains the Qtopia source files. |
| scripts | contains additional scripts. |
| qtopiacore/qt | contains the Qtopia Core (and some X11) source files. |
The following files and scripts are also contained in <qtopia-depot-dir>:
| File/Script | Description |
|---|---|
| LICENSE | a text that describes the license that is applicable to the package. Note: For an evaluation package the LICENSE file will not be available until the configure command has been executed at least once. |
| LODI | List Of Deliverable Items, that is, a list of all files that can be found in the package. |
| README.html | a basic introduction that guides the user to the help documentation. |
| configure | the script that is used to configure Qtopia. |
In addition to the Qtopia Edition source packages such as Qtopia Phone Trolltech also offers additional packages for:
All of these packages are installed in exactly the same manner: cd into the directory where the qtopia sources are installed and then untar the package
cd <qtopia-depot-dir>
tar -xzf my-add-on-package (where 'my-add-on-package' is the fully qualified path + filename of the package to be installed)
The file naming convention of the add on packages is as follows:
| Add on product | File Name convention |
|---|---|
| Device package | qtopia-device-<devicename>-<version>.tar.gz |
| Language Pack | qtopia-language-<language-name>-<version>.tar.gz |
| Thirdparty add-on | qtopia-<thirdparty-product>-[commercial|opensource]-<version>.tar.gz |
In all cases <version> refers to the Qtopia version number to which the add-on package is applicable. Generally speaking, the version number of the add-on package must match the version number of the installed Qtopia src package.
For information on how to obtain add-on packages please contact sales@trolltech.com
It is recommended to build Qtopia in a so called shadow build directory. This is a directory other than <qtopia-depot-dir> that will contain all the intermediate files (such as object files) and the produced binaries. When using a shadow build directory the <qtopia-depot-dir> will remain free of any build specific files and the same Qtopia sources can be used for many different configurations. For the rest of this documentation it is assumed that the build will be performed in
~/src/qtopia/build-<version>
, referred to as <qtopia-build-dir>.
cd <qtopia-build-dir>
<qtopia-depot-dir>/configure -edition <phone|platform>
make
make install
That's it!
There is obviously more to tell, so the next sections go into a little more detail.
The configure script can build all configurations of Qtopia with additional configuration options controlled via command-line options to the configure script.
For a full overview of all possible options use the following command:
<qtopia-depot-dir>/configure -help -verbose
Starting with Qtopia 4.1.x the QPEDIR environment variable is deprecated when running configure. So please make sure that QPEDIR is unset when running configure by typing "export QPEDIR=" or "unset QPEDIR". Please be advised that QPEDIR still must be set when running scripts though.
It is possible to suppress most of the compiler command output by configuring Qtopia with the "-silent" option. The resulting make output is much more compact and 'friendly to the eye'. In ad-hoc situations where a more verbose output is required the verbose output can be re-enabled by adding 'loud' to the make command:
make loud
The default Qtopia configuration is to build for an x86 target, running from <qtopia-build-dir>/image/opt/Qtopia. If you wish to configure Qtopia for your device at some stage, it is recommended to use a device-specific add-on package. These packages are provided by Trolltech or by the device manufacturer. You will also need to use the -prefix argument to configure to specify the location that Qtopia will run from. This is typically /opt/Qtopia though it may differ from device to device.
As a rule, a device also requires a specific tool chain that allows cross-compiling for the specific device. These tool chains are usually provided by the device manufacturer or are freely available on the internet.
Once the device package is installed a subdirectory for that device will exist in <qtopia-depot-dir>/devices. Building for a device is really simple:
./configure -edition <phone|platform> -device <device-name> -prefix /opt/Qtopia
make
make install
Please refer to the following links for further information:
| Link | Description |
|---|---|
| Prerequisites | details the prerequisites for running Qtopia. |
| System Customization | details how to customize many aspects of Qtopia. |
| Build System User Guide | User guide for the build system. There is also a Build System Reference. |
Once Qtopia is built you will have a set of Qtopia binaries that are ready to run! The binaries are located in <qtopia-build-dir>/image/opt/Qtopia. This directory contains all the files (and only the files) that should be installed onto the device. Note that you should have passed -prefix to speficy the location that Qtopia will run from. If you did not do this, Qtopia will be setup to run from <qpedir>/image/opt/Qtopia and will not work when installed into /opt/Qtopia.
Note: Depending on the installation device, the following additional libraries may be required:
For backwards compatibility some of these libraries are provided in the arm/lib directory of the Qtopia SDK packages. More information about this can be found in the Prerequisites section of the documentation.
If an error referring to one of these libraries occurs when running Qtopia, please move the libraries to a different location and ensure that the correct version of the libraries is installed on your device.
For further information about running Qtopia refer to Running Qtopia.
To install a RPM called <PACKAGE> run:
su -c "rpm -ivh <PACKAGE>"
To remove the RPM <NAME> run:
su -c "rpm -e <NAME>"
| Copyright © 2006 Trolltech | Trademarks | Qtopia 4.1.7 |