![]() Qtopia Home - Classes - Hierachy - Annotated - Functions - Licenses - Reference |
![]() |
This document describes the system used to configure and build the single-package Qtopia releases for Qtopia 2.2 and above. For information on the qmake based build system used by Qtopia please refer to: Qtopia Build System.
To build Qtopia requires three separate versions of Qt. In earlier releases of Qtopia, these packages were configured and built separately, which made the building of Qtopia rather complex.
Qtopia 2.2 introduces a single package containing all the files previously available in separate packages. The following table shows where the various packages are located:
Previous package | single package location |
---|---|
tmake-1.13.tar.gz | .../tmake |
qt-embedded-2.3.11-commercial.tar.gz | .../qt2 |
qt-x11-2.3.2-commercial.tar.gz | .../qt2 |
qt-x11-commercial-3.3.0-utf8.tar.gz | .../dqt |
qtopia-pda-source-2.1.2.tar.gz | .../qtopia |
The single package system simplifies package configuration by providing a scripted environment that is self-contained with no requirement to set environment variables or apply patch files.
The first step for any build is to run the configure script. The script uses default configuration values unless user-defined values are provided and generates a number of output files. All settings are written to a file for use by the build scripts and a Makefile is created to facilitate commands such as:
./configure; make; make install
The Makefile is not complex and invokes the buildQtopiaTools scripts. These scripts are based on the build scripts from earlier releases with the addition of functionality to obtain configuration variables from the output of configure.
The build scripts are responsible for the following tasks:
Script Name | Task |
---|---|
buildQtopiaTools | Building Qt 2 and Qt 3 |
buildQtopia | Building Qt/Embedded and Qtopia. |
The configure script generates a number of files required for a variety of tasks as shown below:
File | Purpose |
---|---|
config.cache | Sets up the package variables and stores the commandlines to use. |
config.status | Indicates to configure to use values in config.cache (reconfigure). |
setQt2Env | Sets up the environment to build Qt 2. |
setDqtEnv | Sets up the environment to build Qt 3. |
setQteEnv | Sets up the environment to build Qt/Embedded. |
setQpeEnv | Sets up the environment to build Qtopia. |
To reconfigure simply run:
./config.status
If you would like to build things manually you can source config.cache to obtain access to the component variables and configure lines.
./config.cache
Before configuring a component, you should source its environment variable. For example, to manually configure Qtopia using the configure line that was created by configure you would do the following.
. ./setQpeEnv cd $QPEDIR ./configure $QPE_CFG
Redefining the default configuration can be tedious so a facility to create a file of default configuration options is provided. Simply create a file named config.defaults containing the values required for configure command line options. The configure command will look for this file and use the arguments it contains. This occurs before the arguments are processed so it is still possible to override the contents of this file.
For example, the following config.defaults file:
QTE_CFG=no-keypad QPE_CFG="-edition pda" DEBUG=yes QTOPIADESKTOP=no
allows you to run configure and have the same effect as running the command:
configure -qte no-keypad -qpe '-edition pda' -debugNote: The variables are read by the configure script so they must make sense to it. No error checking is performed.
The variables available to override are as follows:
Variable | Description |
---|---|
QT2_CFG | Qt 2 configure line |
DQT_CFG | Qt 3 configure line |
QTE_CFG | Qt/Embedded configure line or a shortcut value |
QPE_CFG | Qtopia configure line or a shortcut value |
QTOPIADESKTOP |
|
DEBUG |
|
PREFIX | Sets the -prefix=value. However the value of -prefix=value provided on the command line will override this choice. |
DPREFIX | Sets the -dprefix=value. However the value of -dprefix=value provided on the command line will override this choice. |
EXTRA_QTOPIA_LIB_PATH | Set the value of -L=value -R=value. However the value of -L=value -R=value provided on the command line will override this choice. |
There is support for various types of shadow building in Qtopia.
The qt2 directory supports pseudo-shadow builds of object files. They are separated based on desktop/embedded, release/debug, static/shared and platform/xplatform. This means that you can build Qt/Embedded for x86 and then recompile for ARM without having to run make clean first. However, the location of libqte.* is the same for all of these ($QPEDIR/lib/lbiqte.*) so you must forcibly remove it when you change configuration. For example:
cd $QPE_ROOT ./configure [new qte options] rm -f qtopia/lib/libqte.* make qte
The qtopia directory also supports pseudo-shadow builds based of object files. However it only separates them based on release/debug and static/shared. Any other configuration differences can be handled by the proper shadow build support that Qtopia has. Also note that make cleaninstall is generally a good idea when changing configurations. It removes the image before installing so that no stale files are left behind.
An example would be the best way to demonstrate the shadow building abilities of both directories. Consider the following situation: Both Qt/Embedded and Qtopia are to be built, first for x86 then for ARM.
First, the source package is prepared for shadow building. Qtopia cannot handle the x86/arm split so 2 directories are created to build in. The source directory is moved to signal to the build system that shadow builds are taking place.
cd $QPE_ROOT mkdir qtopia_x86 mkdir qtopia_arm mv qtopia qtopia_depot
The build for x86 happens.
rm -f qtopia ln -s qtopia_x86 qtopia ./configure -qpe phone make make cleaninstall
The build for ARM happens.
rm -f qtopia ln -s qtopia_arm qtopia ./configure -qpe arm-phone make make cleaninstall
The table below shows where all of the build files for x86 are.
Files | Location |
---|---|
Qt/Embedded object files | $QPE_ROOT/qt2/src/tmp/...generic...shared.../ |
Qt/Embedded library | $QPE_ROOT/qtopia_x86/lib/ |
Qtopia object files | $QPE_ROOT/qtopia_x86/src/.../.obj/...shared.../ |
Qtopia library | $QPE_ROOT/qtopia_x86/lib/ |
Qtopia install image | $QPE_ROOT/qtopia_x86/image |
The table below shows where all of the build files for ARM are.
Files | Location |
---|---|
Qt/Embedded object files | $QPE_ROOT/qt2/src/tmp/...arm...shared.../ |
Qt/Embedded library | $QPE_ROOT/qtopia_arm/lib/ |
Qtopia object files | $QPE_ROOT/qtopia_arm/src/.../.obj/...shared.../ |
Qtopia library | $QPE_ROOT/qtopia_arm/lib/ |
Qtopia install image | $QPE_ROOT/qtopia_arm/image |
Copyright © 2005 Trolltech | Trademarks | Qtopia version 2.2.0
|