Qtopia-2.2.0
下载地址:ftp://ftp.ro.debian.org/pub/mirrors/ftp.trolltech.com/qtopia/source/
操作系统:ubuntu10.04
注意:下以操作都要在普通用户否则有可能跑不起来
Qtopia-2.2.0 编译过程出错处理可参考这片文章
http://blog.csdn.net/yimiyangguang1314/article/details/6068029
tar xf qtopia-free-src-2.2.0.tar.gz // 在opt 目录下
cd qtopia-free-src-2.2.0
$ echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
$ make
$ cp dqt/bin/uic qt2/bin/
$ make
$ patch -p1 < ../qtopia2.2.0.patch
qtopia2.2.0.zip $ echo yes | ./configure -qte '-embedded -no-xft -qconfig qpe -depths 16,32 -system-jpeg -gif' -qpe '-edition pda -displaysize 240x320' -qt2 '-no-opengl -no-xft' -dqt '-no-xft -thread'
$ make
.ui/release-shared/passwordbase_p.cpp:137: error: no ‘bool PasswordBase::event(QEvent*)’ member function declared in class ‘PasswordBase’
$ vim ./qtopia/include/qtopia/private/passwordbase_p.h
bool event(QEvent*) ; //int the class PasswordBase add this function
/opt/qtopia-free-2.2.0/qtopia/lib/libqpe.so: undefined reference to `PasswordBase::languageChange()'
/opt/qtopia-free-2.2.0/qtopia/lib/libqpe.so: undefined reference to `CategoryEditBase::languageChange()'
$ vim ./qtopia/include/qtopia/private/passwordbase_p.h
// virtual void languageChange();
$ vim ./qtopia/include/qtopia/private/categoryeditbase_p.h
// virtual void languageChange();
$ make && make install
编写运行qtopia 的脚本
$ vim run.sh
#!/bin/bash
./qt2/bin/qvfb -width 480 -height 272 -depth 16 &
cd qtopia/image
mkdir root 2>/dev/null || true
export HOME=$PWD/root
cd opt/Qtopia
export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH=$PWD/lib:$LD_LIBARAY_PATH
export QTDIR=$PWD
export QPEDIR=$PWD
export KDEDIR=$PWD/../kde
sleep 3
qpe
$ sudo chmod a+x run.sh
$ ./run.sh
启动后无桌面显示(只有一张底色图)原因是没有字体文件
$ cp qt2/lib/fonts/ -av qtopia/image/opt/Qtopia/lib/
再次启动正常
运行应用程序
$ cd /opt/qtopia2_apps/mycalc
$ export QTDIR=/opt/qtopia-free-2.2.0/qtopia/image/opt/Qtopia/
$ export QPEDIR=/opt/qtopia-free-2.2.0/qtopia/image/opt/Qtopia/
$ export HOME=$QPEDIR/root/
$ export LD_LIBRARY_PATH=$QPEDIR/lib:$LD_LIBARAY_PATH
$ ./mycalc
Qt-extended-4.4.3
下载地址:
$ tar xf qt-extended-4.4.3.tar.gz // 在opt 目录下
$ mkdir -p qt_extended4.4.3/build-x86
$ cd qt_extended4.4.3/build-x86
$ echo yes | ../configure \
-ui-type mobile \
-release \
-clean \
-sound-system oss \
-build-qt \
-no-sxe \
-no-ssl \
-no-v4l2 \
-no-vpn \
-no-phonon \
-no-libamr \
-dynamic-rotation \
-mediaengines cruxus \
-remove-mediaengine gstreamer,helix \
-pictureflow \
-remove-module bluetooth,drm \
-no-dbus \
-no-dbusipc \
-add-displaysize 240x320 \
-extra-qt-embedded-config "-qt-freetype -no-webkit -no-dbus -qt-gfx-transformed -qt-gfx-linuxfb" \
-extra-qt-config "-no-webkit" \
2>&1 | tee ../qtopiaconfig.log
ERROR: You requested "-sound-system alsa" but it was disabled.
把 -sound-system alsa 被成 -sound-system oss
或者
$ echo yes | ../qt-extended-4.4.3/configure -build-qt -image /opt/qt-extended-4.4.3/target -prefix /opt/qt-extended-4.4.3/target
Project () ERROR: An error occured while evaluating a QBuild script extension.
File: /opt/qt-extended-4.4.3/qbuild.pro@87
Error: SyntaxError: Parse error
()@:6732
网上说是跟安装了QT有关,删除QT相关的就好了(在没有安装QT的ubuntu 10.04 系统中确实不存在上面的问题)
$ bin/qbuild
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:43:34: warning: X11/extensions/XTest.h: No such file or directory
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp: In member function ‘void X11KeyFaker::sendKeyEvent(int, bool)’:
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:444: error: ‘XTestFakeKeyEvent’ was not declared in this scope
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:447: error: ‘XTestFakeKeyEvent’ was not declared in this scope
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:451: error: ‘XTestFakeKeyEvent’ was not declared in this scope
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:454: error: ‘XTestFakeKeyEvent’ was not declared in this scope
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:459: error: ‘XTestFakeKeyEvent’ was not declared in this scope
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp: In member function ‘void X11KeyFaker::connect()’:
/opt/qt-extended-4.4.3/qt-extended-4.4.3/qtopiacore/qt/tools/qvfb/x11keyfaker.cpp:545: error: ‘XTestQueryExtension’
$ sudo apt-file search X11/extensions/XTest.h
$ sudo apt-get install libxtst-dev
$ bin/qbuild image //安装到了target目录下
$ bin/qbuild sdk //安装sdk 到 build-x86/sdk 这步可有可无
$ bin/runqtopia 编译安装完运行
阅读(2613) | 评论(0) | 转发(1) |