注:有参考网上其他作者的内容
环境:ubuntu 9.04
1.下载qt-embedded-free-3.3.4.tar.bz2到本地
2.copy 到/usr/local/qt
3.tar -jxvf qt-embedded-free-3.3.4.tar.bz2
4.进入/usr/local/qt/qt-embedded-free-3.3.4
5.写一个编译脚本build.sh,内容如下:
#!/bin/sh
export QTDIR=$PWD
export PATH=$QTDIR/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
./configure -qt-gfx-transformed -qvfb
make
6.执行./build.sh(这是一个漫长的过程,可以去喝杯咖啡了。。。)
7.编译makeqpf工具
cd /qte/qte/tools/makeqpf
../../bin/qmake -project
../../bin/qmake
make
8.执行qvfb &
结果出现:
Semop lock failure Identifier removed
Semop unlock failure Identifier removed
...
在网上搜索了下:
rm /tmp/qtembedded-rootusername/QtEmbedded-0
可以搞定,原因是:
QT/e checks whether the temporary directory exists, is writeable and has the permissions set right, otherwise it refuses to work...
9.在/usr/local/qt/qt-embedded-free-3.3.4/lib/fonts下添加你需要的font(我测试的是simfang.ttf)
10.编辑/usr/local/qt/qt-embedded-free-3.3.4/lib/fonts/fontdir文件
在末尾添加:
simfang simfang.ttf FT n 50 100 s
11.qvfb &(如果已经开启则不需要了)
12./usr/local/qt/qt-embedded-free-3.3.4/tools/makeqpf/makeqpf &
出错:
Connected to VFB server: 240 x 320 x 32
Can't drive depth 32
原因是我选择支持8 bpp的像素深度(这个在编译的时候6会提示的,喝咖啡时还是要在电脑旁边的)
在QT virtual framebuffer中File->configure->Depth->8 bit
13.在出现的列表上点击simfang,不出意外的话,则在/usr/local/qt/qt-embedded-free-3.3.4/lib/fonts下生成了simfang_100_50.qpf
阅读(1423) | 评论(0) | 转发(0) |