 |
phoneME Advanced: Building Qt Embedded
Introduction
|
Note:
These notes describe how to configure and build a library for Qt Embedded that can be used with the CDC build system in the Linux/x86 host environment.
|
Qt is a cross-platform application development framework. For phoneME Advanced, both PBP and MIDP use Qt as a portability layer for their graphics implementations on Linux.
PBP uses Qt 3.x for Linux/x86 host-based support and Qt Embedded 2.3.x for Linux device-based support. The MIDP uses Qt Embedded 2.3.x for Linux support.
Ubuntu Linux includes the Debian package management system that provides prebuilt packages for a variety of applications, libraries and other system resources.
The Ubuntu package repository includes prebuilt packages for Qt 3.x and these simplify PBP and MIDP support for Linux/x86 host development.
However, the Qt Embedded 2.3.x framework is not available in prebuilt package form for Ubuntu.
This means that you will have to download the source code bundle from the Trolltech web site and build it.
Building Qt Embedded
Qt has many build options, not all of which are appropriate for the devices and development style used by phoneME Advanced.
These build notes show how to configure the Qt Embedded build system to generate libraries and header files that are appropriate for use with the phoneME Advanced build system.
There are basically two build files described here:
-
A build script that selects some top-level configuration options and then drives the overall build process,
-
A configuration file that selects a number of compile-time build options.
|
Note:
Qt Embedded 2.3.x is an older version of the embedded Qt framework.
It should be built with the version 3.x gcc/g++ compiler.
|
Get the Qt Embedded Source Bundle
The source bundle for embedded Qt framework can be downloaded from the Trolltech ftp site:
% wget ftp://ftp.trolltech.com/qt/source/qt-embedded-2.3.10-free.tar.gz
Then unbundle it into a suitable directory.
Install the qconfig-pmea.h Configuration File
-
Create a file named src/tools/qconfig-pmea.h in the Qt Embedded source hierarchy:
#ifndef QT_H
#endif // QT_H
#define QT_NO_QWS_CURSOR
#define QT_NO_QWS_MOUSE_AUTO
#define QT_NO_CODECS
#define QT_NO_FREETYPE
#define QT_NO_BDF
#define QT_NO_STYLE_POCKETPC
#define QT_NO_STYLE_AQUA
#define QT_NO_STYLE_MOTIF
#define QT_NO_STYLE_PLATINUM
#define QT_NO_QWS_BEOS_WM_STYLE
#define QT_NO_QWS_KDE2_WM_STYLE
#define QT_NO_QWS_KDE_WM_STYLE
#define QT_NO_QWS_WINDOWS_WM_STYLE
#define QT_NO_UNICODETABLES
#define QT_NO_IMAGEIO_MNG
#define QT_NO_PROPERTIES
#define QT_NO_COLORNAMES
#define QT_NO_IMAGEIO_PPM
#define QT_NO_NETWORKPROTOCOL
#define QT_NO_PICTURE
#define QT_NO_PRINTER
#define QT_NO_QWS_SAVEFONTS
#define QT_NO_COLORDIALOG
#define QT_NO_FILEDIALOG
#define QT_NO_FONTDIALOG
#define QT_NO_DIAL
#define QT_NO_DRAGANDDROP
#define QT_NO_IMAGE_TEXT
#define QT_NO_INPUTDIALOG
#define QT_NO_PRINTDIALOG
#define QT_NO_PROGRESSDIALOG
#define QT_NO_SEMIMODAL
#define QT_NO_SIZEGRIP
#define QT_NO_SPLITTER
#define QT_NO_WORKSPACE
#define QT_NO_DOM
#define QT_NO_EFFECTS
#define QT_NO_TRANSFORMATIONS
#define QT_NO_QMEMORYFILE
#undef QT_USE_MALLOC_FOR_NEW
-
Make a symbolic link for src/tools/qconfig-pmea.h into the include directory:
% ln -s src/tools/qconfig-pmea.h include/
Modify and Run the Build Script
The build script below is an example of how to build Qt Embedded
that can be modified for your local system.
#!/bin/sh
export QTEDIR=`pwd`/qt-2.3.10
export QTDIR=$QTEDIR
cd $QTEDIR
./configure \
-shared \
-xplatform linux-x86-g++ \
-qconfig pmea \
-qvfb \
-system-jpeg \
-qt-libpng \
-depths 16 \
-keypad-mode \
-debug
make
Relocate the Target Library and Header Files (optional)
The CDC build system can use the target library and header files as they are in the Qt Embedded build hierarchy,
or you can relocate just the library and header files to a target directory.
Here's an example of how to do this:
#!/bin/sh
export QTDIR=`pwd`/qt-2.3.10
export TARGETDIR=`pwd`/target
mkdir -p $TARGETDIR/lib
cp -RLf $QTDIR/lib/* $TARGETDIR/lib
mkdir -p $TARGETDIR/include
cp -RLf $QTDIR/include/* $TARGETDIR/include
|