Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded

Building Qtopia from Source

This document should be read inconjunction with Getting Started which explains the process of downloading and installing Qtopia. It assumes that you have already gathered the necessary files and are ready to build Qtopia from the source code.

If you have installed Qtopia using an rpm then you cannot compile Qtopia yourself. Please proceed to Running Qtopia or go to the "Building and Compiling" section in the reference documentation which tells you more about building and compiling your own Qtopia applications.

If you have access to the Qtopia Tools package then you do not need to build either Qt/X11-2.x or Qt/X-3.3.x and can skip to the Build Qt/Embedded section.

To actually build Qtopia yourself you will need the software packages as described in the "Install procedures" section. If you haven't installed all the packages yet, then please go through that section before proceeding.

If you have installed all the packages and have set the environment variables:

 TMAKEDIR, QT2DIR, DQTDIR, QTEDIR 
and
 QPEDIR 
then you are ready to build Qtopia.

Note: Qt/X11 2.3.2 will attempt to locate and use the freetype 1.x library for font smoothing (freetype 2.x is a different thing that doesn't work with Qt/X11 2.3.2). Unfortunately this can happen even if you don't have the freetype development library and headers installed. Either install the freetype-devel package or configure with -no-xft.

Acceptable directory characters

There are some limits to the acceptable characters in directories. The details are in the Build Environment document.

The Easy Way

For your convenience we have provided a build script in the $QPEDIR/scripts subdirectory. Please understand that this script is just a starting point and may require some tweaking for your specific situation. We have also filled the script with lots of comments and added extra debugging output lines.

To run the script simply do the following:

    $QPEDIR/scripts/build_qtopia
Depending on your package type this will build you a Qtopia Phone, a Qtopia PDA, or a Qtopia Core version.

In the event of trouble you may want to get in touch with us for help in resolving the issue. If that happens please pipe the output of the script into a file and send us that file together with the script that you actually used and any additional comments. This way we can solve your problem much faster and much more efficiently. To log the script output into a file do the following:

    $QPEDIR/scripts/build_qtopia > log.txt 2>&1

The Hard Way

Although the script is nice for starters it is sometimes not enough, or maybe you just want to do it all by yourself. If so, then here are the instructions:

Compiling Qtopia for the Device

This process is very similar to the steps taken for building Qtopia for the X11 capable host, the major difference is the arguments to configure. It is recommended, but not required, that fresh copies of Qtopia and Qt/Embedded be extracted to a location such as ~/dev/arm.

See System Integrators' Guide for additional details on customization qtopia to suit a new device.

Now what?

After running the script or building Qtopia manually you should have a set of Qtopia binaries and be ready to run them. The binaries are put into places like $QPEDIR/bin, $QPEDIR/lib and $QPEDIR/plugins but these are not the ones you should install onto a device. In order to make integrating Qtopia on a device easier we have provided an image directory that contains all the files (and only those files) that should be installed onto the device. This image directory is located at $QPEDIR/image/opt/Qtopia and if you cd into it you'll see a bin dir, a lib dir and so on.

IMPORTANT: Depending on the device you are installing Qtopia on you may or may not need the additional libraries libjpeg and libc. For backward compatibility reasons we have provided these libraries in the arm/lib directory. If you run Qtopia on your device and you get error messages referring to one of these libraries then please move them to a different location and ensure that you have the correct version of these libraries on your device.

For information about running Qtopia please go to Running Qtopia

Touchscreen Phone Calibration

If you are building Qtopia Phone edition for a touchscreen device, you will need to calibrate the touchscreen manually as Calibration is not run automatically. With Qtopia Phone running, enter the following command to start Calibration.

qcop "QPE/System" "execute(QString)" "calibrate"

This outputs calibration information to the $HOME/Settings/pointercal file which you should copy to /etc/ so you won't have to repeat this process.

NOTE : You must have QPE_NEED_CALIBRATION defined in your custom-<platform-spec>.h file. See also Qtopia - Customizing Qtopia for a Device .

Troubleshooting


Copyright © 2001-2005 Trolltech Trademarks
Qtopia version 2.1.1