![]() 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.
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, QTEDIRand
QPEDIRthen 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_qtopiaDepending 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 $DQTDIR export QTDIR=$DQTDIR 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/
If you are using the Qtopia Tools package then first
export LD_LIBRARY_PATH=$QT2DIR/lib:$LD_LIBRARY_PATH cp $QT2DIR/bin/qvfb $QTEDIR/bin/ cp $QT2DIR/bin/uic $QTEDIR/bin/
To build Qt/Embedded you must do the following:
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 --helpfor additional configure options
cd $QPEDIR export QTDIR=$QTEDIR export PATH=$QPEDIR/bin:$PATH ./configure -edition phone -no-qtopiadesktop make make installTo make the PDA version you must do the following:
cd $QPEDIR export QTDIR=$QTEDIR export PATH=$QPEDIR/bin:$PATH ./configure -edition pda -no-qtopiadesktop 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 customization qtopia to suit a new device.
mkdir $QTEDIR/bin/ cp $QT2DIR/bin/uic $QTEDIR/bin/other wise :
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 uuid and jpeg library/header files to suit the target system MUST be provided by your compiler tool chain or your system.
Extra options:
./configure --helpfor additional configure options
cd $QPEDIR export QTDIR=$QTEDIR export PATH=$QPEDIR/bin:$PATH ./configure -xplatform linux-arm-g++ -edition phone -no-qtopiadesktop make make installTo 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 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
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 .
killall qpe quicklauncher qvfb rm -rf "/tmp/qtembedded-$LOGNAME/" rm -rf /tmp/qtembedded-0/
cd $QPEDIR make installcleanand try running your application again.
Copyright © 2001-2005 Trolltech | Trademarks | Qtopia version 2.1.1
|