arm-linux-gcc 版本4.3.2
1.
安装tslib1.4
先安装
apt-get install automake
apt-get install libtool
然后
./autogen.sh
echo ac_cv_func_malloc_0_nonnull=yes>arm-linux.cache
./configure --host=arm-linux --prefix=/usr/local/tslib --cache-file=arm-linux.cache
make
make install
2.
进入qt-embedded-linux-opensource-src-4.5.2目录
./configure -prefix /usr/local/Trolltech/QtEmbedded-4.5.2-arm -embedded arm \
-release -shared -fast -no-largefile -qt-sql-sqlite -no-qt3support -no-xmlpatterns -no-mmx -no-3dnow -no-sse -no-sse2 -no-svg -no-webkit -qt-zlib -qt-gif \
-qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -make libs -nomake tools -nomake examples -nomake docs -nomake demo -no-nis -no-cups -no-iconv -no-dbus \
-no-openssl -xplatform qws/linux-arm-g++ -little-endian -qt-freetype -depths 16,18 -qt-gfx-linuxfb -no-gfx-transformed -no-gfx-multiscreen \
-no-gfx-vnc -no-gfx-qvfb -qt-kbd-usb -no-glib -qt-mouse-tslib -I/usr/local/tslib/include -L/usr/local/tslib/lib
3.
make
make install
4.
配置tslib触摸文件
将安装好的tslib文件件复制到文件系统根目录下
#ts.conf
module_raw input
module pthres pmin=1
module variance delta=30
module dejitter delta=100
module linear
tslib.sh
#!/bin/sh
export TSLIB_ROOT=/tslib
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CONFFILE=/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export LD_LIBRARY_PATH=$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
export QWS_MOUSE_PROTO="TPanel:/dev/event0"
5.
配置QT4.5.2
将安装好的/usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib 库文件
复制到文件系统qt4.5.2目录下
export QTDIR=/qt4.5.2
export QPEDIR=/qt4.5.2
export LD_LIBRARY_PATH=$QTDIR/lib:$TSLIB_ROOT/lib:/usr/local/lib:$LD_LIBRARY_PATH
6.
测试运行QT4.5.2例子
设置变量环境
export QTEDIR=/usr/local/Trolltech/QtEmbedded-4.5.2-arm/
export PATH=/usr/local/Trolltech/QtEmbedded-4.5.2-arm/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/:$LD_LIBRARY_PATH
编译calculator
cd /root/arm/qt-embedded-linux-opensource-src-4.5.2/examples/widgets/calcula
root@hoguowi-desktop:~/arm/qt-embedded-linux-opensource-src-4.5.2/examples/widgets/calculator#
root@hoguowi-desktop:~/arm/qt-embedded-linux-opensource-src-4.5.2/examples/widgets/calculator#qmake
root@hoguowi-desktop:~/arm/qt-embedded-linux-opensource-src-4.5.2/examples/widgets/calculator#make
./calculator -qws &
总环境配置
#!/bin/sh
export TSLIB_ROOT=/tslib
export TSLIB_TSDEVICE=/dev/event0
export TSLIB_CONFFILE=/tslib/etc/ts.conf
export TSLIB_PLUGINDIR=/tslib/lib/ts
export TSLIB_CALIBFILE=/etc/pointercal
export QWS_MOUSE_PROTO=Tslib:/dev/event0
export QTDIR=/qt
export QPEDIR=/qt
export PATH=$QTDIR/bin:$PATH
export PATH=$TSLIB_ROOT/bin:$PATH
export LD_LIBRARY_PATH=$QTDIR/lib:$TSLIB_ROOT/lib:$LD_LIBRARY_PATH
如果电脑安装的qt4.5.2在/usr/local/Trolltech/QtEmbedded-4.5.2-arm 目录下
嵌入寻找的fron默认字体在/usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/front下
因此要把qt/lib/front 复制到 /usr/local/Trolltech/QtEmbedded-4.5.2-arm/lib/front下
文章评论(0条评论)
登录后参与讨论