Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1556332
  • 博文数量: 290
  • 博客积分: 3468
  • 博客等级: 中校
  • 技术积分: 3461
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-28 22:21
文章分类

全部博文(290)

文章存档

2016年(13)

2015年(3)

2014年(42)

2013年(67)

2012年(90)

2011年(75)

分类: 嵌入式

2012-02-29 11:44:41

系统环境: ubuntu 10.04

1. qtopia-2.2.0-x86
# 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' -L/usr/local/qte-3.3.7-x86/lib

make[5]: /opt/qtopia-free-2.2.0/qt2/bin/uic: Command not found
$ /qt2/bin$ cp ../../../qt-x11-free-3.3.7/bin/uic ./

/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:214: warning: ‘typedef’ was ignored in this declaration
/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:230: error: ‘QWSInputMethod’ has not been declared
/opt/qtopia-free-2.2.0/qt2/include/qwindowsystem_qws.h:237: error: ‘QWSGestureMethod’ has not been declared

$ vim qt2/include/qwindowsystem_qws.h

在前面增加以下两行(57,58)
class QWSInputMethod;
class QWSGestureMethod;

http://blog.csdn.net/yimiyangguang1314/article/details/6068029

qdawg.cpp:294: error: extra qualification ‘QDawgPrivate::’ on member ‘QDawgPrivate’

$ vim qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp

    QDawgPrivate::~QDawgPrivate()
    {
         delete memoryFile;
    }
修改为:

    ~QDawgPrivate()  //  delete   "QDawgPrivate::~" 2010-12-10
    {
        delete memoryFile;
    }

 inlined from ‘QMemoryFileData* QMemoryFile::openData(const QString&, int, uint)’ at qmemoryfile_unix.cpp:141:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments

$ vim qtopia/src/libraries/qtopia/qmemoryfile_unix.cpp +141

f = open(tmpFile.latin1(), O_CREAT | O_WRONLY);   
  修改为s
f = open(tmpFile.latin1(), O_CREAT | O_WRONLY, 0666);

backend/vobject.cpp: In function ‘VObject* addGroup(VObject*, const char*)’:
backend/vobject.cpp:419: error: invalid conversion from ‘const char*’ to ‘char*’

$ vim qtopia/src/libraries/qtopia/backend/vobject.cpp +419
char *dot = strrchr(g,'.');    修改为 char *dot = (char *)strrchr(g,'.');

.ui/release-shared/passwordbase_p.cpp: In constructor ‘PasswordBase::PasswordBase(QWidget*, const char*, uint)’:
.ui/release-shared/passwordbase_p.cpp:35: error: no matching function for call to ‘QSizePolicy::QSizePolicy(QSizePolicy::SizeType, QSizePolicy::SizeType, int, int, bool)’
$ vim qtopia-free-2.2.0/qtopia/src/libraries/qtopia/.ui/release-shared/passwordbase_p.cpp 文件中的38行位置

  prompt = new QLabel( this, "prompt" );
    prompt->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, 0, 0, prompt->sizePolicy().hasHeightForWidth() ) )

  修改为:
    prompt = new QLabel( this, "prompt" );
    prompt->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)1, prompt->sizePolicy  ().hasHeightForWidth() ) );
即去掉0,0 两个参数

/usr/bin/ld: cannot find -luuid
collect2: ld returned 1 exit status

# apt-get install  uuid-dev

# make && make install
默认安装在当前目录的 Qtopia/image 下
编写运行在 fb 模式下的脚本
# 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
# chmod a+x run.sh
# ./run.sh
启动后无桌面显示(只有一张底色图)原因是没有字体
# cp qt2/lib/fonts/ -av qtopia/image/opt/Qtopia/lib/
再次启动正常



2. qt-extended-4.4.3-x86
$ tar xf qt-extended-4.4.3.tar.gz
$ mkdir -p qt_extended4.4.3/buildx86

$ export LC_CTYPE="en_US"
bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US): No such file or directory
$ sudo locale-gen en_US
$ export LANG="en_US"
$ export LANGUAGE="en_US"

$ cd qt_extended4.4.3/buildx86
$ echo yes | ../../qt-extended-4.4.3/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


../qt-extended-4.4.3/configure -build-qt -image /opt/qt-extended-4.4.3/target -prefix /opt/qt-extended-4.4.3/target

# bin/qbuild


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相关的就好了

# bin/build
# bin/build image  //安装到了target目录下
编译安装完运行
# bin/runqtopia
阅读(2904) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~