免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2920 | 回复: 0
打印 上一主题 下一主题

[转]phoneME Advanced: Building Qt Embedded [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-11 01:07 |只看该作者 |倒序浏览



Introduction
Qt is a cross-platform application development framework. For phoneME Advanced MR2, both PBP and MIDP use Qt as a portability layer for their graphics implementations. PBP uses Qt 3.x for Linux/x86 host-based development and Qt Embedded 2.3.x for device-based development. MIDP uses only Qt Embedded 2.3.x is as a portability layer.
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 make setup for the CDC build system much easier for PBP.
However, MIDP requires Qt Embedded 2.3.x, which is not available in prebuilt package form. This means that to use Qt Embedded 2.3.10 with phoneME Advanced MR2, 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 MR2. 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 MR2 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.10 is an older version of the Qt framework that should be built with the gcc/g++ 3.x compilers.
Get the Qt Embedded Source Bundle
The source bundle for Qt Embedded 2.3.10 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 qconfig-pmea.h in the src/tools directory 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



    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85193/showart_1823121.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP