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

Setting up the Build Environment

Environment Variables

Building Qtopia applications on a target system requires that environment variables, such as QTDIR, are set. In some cases you may want to move between various versions of Qt and have the environment variables pointing to various library configurations.

One way to do this is to store the settings in a file and enable them by running the source command. In the case of Linux (default bash shell) the file could contain the following values:

$ cat qtopia
export QPEDIR=/opt/Qtopia
export QTDIR=/opt/Qtopia
export PATH=$QTDIR/bin:$PATH
export TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-generic-g++
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH

If you have an alias (in your .bashrc file) you could quickly enable these new environment values:

alias qtopia='source ~/bin/qtopia'

This assumes that the earlier file was placed in a bin directory in your home directory.

Creating the custom configuration files

It is through the following configuration files that compilation tools to use and extra global defines are specified. For example a new arm based device might create a qws/linux-myarm-g++ tool chain configuration based on a qws/linux-arm-g++ : eg

cp -r $TMAKEDIR/lib/qws/linux-arm-g++ $TMAKEDIR/lib/qws/linux-myarm-g++
cp -r $QTEDIR/configs/linux-arm-g++-shared $QTEDIR/configs/linux-myarm-g++-shared
cp -r $QPEDIR/mkspecs/qws/linux-arm-g++ $QPEDIR/mkspecs/qws/linux-myarm-g++

Acceptable directory characters

Regular expression characters

Qtopia 1.9.x and Qtopia 2.0.0 - 2.1.0 require that the characters in any directory the Qtopia build system will access do not contain regular expression characters. Specifically, any special character or character sequence that is recognised by QRegExp may cause problems.

Note: The . character seems to be ok, since it matches itself.

If you are using any of the affected Qtopia versions, you should avoid regular expression characters in your directory names. These characters include (but are not limited to) + . ? * [ ] \ ( ) ^ $ { }

A patch to remove this limitation exists for Qtopia 2.1.0. Qtopia 2.1.1 and higher do not have this limitation.

Spaces

The Qtopia buildsystem does not support spaces in directory names. This limitation will not fixed in the forseable future. Please ensure that no spaces appear in the directories that the Qtopia buildsystem accesses and the paths leading to those directories.


Copyright © 2001-2005 Trolltech Trademarks
Qtopia version 2.1.1