Qtopia Home - Classes - Hierachy - Annotated - Functions - Qt Embedded |
|
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.
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, QT3DIR, 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.
There are some limits to the acceptable characters in directories. The details are in the Build Environment document.
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
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:
cd $QT3DIR
export QTDIR=$QT3DIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
echo yes | ./configure -fast -thread
make sub-src
cd tools/linguist/lrelease
make
cd ../lupdate
make
cd ../../designer/uilib
make
cd ../uic
make
cd $QT2DIR
export TMAKEPATH=$TMAKEDIR/lib/linux-g++
export QTDIR=$QT2DIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
./configure -no-xft
make
mkdir $QTEDIR/bin
cp bin/uic $QTEDIR/bin/
export TMAKEPATH=$TMAKEDIR/lib/linux-g++
export QTDIR=$QT2DIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
cd $QTEDIR/tools/qvfb
tmake -o Makefile qvfb.pro
make
mv qvfb $QTEDIR/bin/
cd $QTEDIR
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-x86-g++
export QTDIR=$QTEDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
cp $QPEDIR/src/qt/qconfig-qpe.h src/tools/
./configure -system-jpeg -no-xft -qconfig qpe -keypad-mode -qvfb -depths 4,8,16,32 [extra options: see below]
make sub-src
Warning: To build Qtopia the jpeg library and header files to suit the target system MUST be provided by your compiler tool chain or your system.
Extra options:
./configure --help
for additional configure options
cd $QPEDIR
export QTDIR=$QTEDIR
export PATH=$QPEDIR/bin:$PATH
./configure -edition phone -no-qtopiadesktop -dqt $QT3DIR
make
make install
To make the PDA version you must do the following:
cd $QPEDIR
export QTDIR=$QTEDIR
export PATH=$QPEDIR/bin:$PATH
./configure -edition pda -no-qtopiadesktop -dqt $QT3DIR
make
make install
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 creating a configuration files for a new device.
cp $QT2DIR\lib\libqt.so* $QTEDIR\lib\
mkdir $QTEDIR\bin\
cp $QT2DIR\bin\uic $QTEDIR\bin\
cd $QTEDIR
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++
export QTDIR=$QTEDIR
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
cp $QPEDIR/src/qt/qconfig-qpe.h src/tools/
./configure -xplatform linux-arm-g++ -system-jpeg -no-xft -qconfig qpe -keypad-mode -no-qvfb -depths 4,8,16,32 [extra options: see below]
make sub-src
Warning: To build Qtopia the jpeg library and header files to suit the target system MUST be provided by your compiler tool chain or your system.
Extra options:
./configure --help
for additional configure options
cd $QPEDIR
export QTDIR=$QTEDIR
export PATH=$QPEDIR/bin:$PATH
./configure -xplatform linux-arm-g++ -edition phone -no-qtopiadesktop -dqt $QT3DIR
make
make install
To make the PDA version you must do the following:
cd $QPEDIR
export QTDIR=$QTEDIR
export PATH=$QPEDIR/bin:$PATH
./configure -xplatform linux-arm-g++ -edition pda -no-qtopiadesktop -dqt $QT3DIR
make
make install
cd $QPEDIR
make packages
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
killall qpe quicklauncher qvfb
rm -rf "/tmp/qtembedded-$LOGNAME/"
rm -rf /tmp/qtembedded-0/
cd $QPEDIR
make installclean
and try running your application again.
| Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 4.0.0
|