SUSE 10.3下成功重新编译了qtopia 2.2.0

SUSE 10.3下重新编译了一遍qtopia 2.2.0,基本上参照网上的资料。

主机为SUSE 10.3。感觉busybox和qtopia要用同样的gcc,关键是lib。

来不及细细整理,大致过程如下,最后还摘抄了点错误和解决方法。

zlib

./configure --shared

vi Makefile

CC=/usr/local/arm/3.4.1/bin/arm-linux-gcc

LDSHARED=/usr/local/arm/3.4.1/bin/arm-linux-gcc -shared -Wl,-soname,libz.so.1

CPP=/usr/local/arm/3.4.1/bin/arm-linux-gcc -E

AR=/usr/local/arm/3.4.1/bin/arm-linux-ar rc

RANLIB=/usr/local/arm/3.4.1/bin/arm-linux-ranlib

生成libz.so        libz.so.1      libz.so.1.2.3 

cp libz.so* ../dist/lib/

cp *.h ../dist/inlucde/

cd e2fsprogs-1.40.2

export PATH=$PATH:/usr/local/arm/3.4.1/bin

./configure --host=arm-linux CC=arm-linux-gcc  --enable-elf-shlibs

修改/usr/local/arm/3.4.1/arm-linux/sys-include/linux

中fd.h

添加#include <linux/compiler.h>

make

生成lib/libuuid.so *

cp lib/libuuid.so* ../dist/lib/

cd jpeg-6b/

(export PATH=$PATH:/usr/local/arm/3.4.1/bin)

./configure --host=arm-linux-gcc CC=arm-linux-gcc

make

生成libjpeg.a

cp libjpeg.a ../dist/lib/

cd libpng-1.2.23/

(export PATH=$PATH:/usr/local/arm/3.4.1/bin)

cp scripts/makefile.linux ./Makefile

vi Makefile

AR_RC=arm-linux-ar rc

CC=arm-linux-gcc

RANLIB=arm-linux-ranlib

ZLIBLIB=/home/wangbin/work/qt/zlib-1.2.3

ZLIBINC=/home/wangbin/work/qt/zlib-1.2.3

make

cp libpng12.so ../dist/lib/libpng.so

cp libpng12.so* ../dist/lib/

cp *.h ../dist/inlucde/

cd tslib-1.3/

./autogen.h

./configure --host=arm-linux CC=arm-linux-gcc

cd plugins

sed 's/-rpath \$(PLUGIN_DIR)/-rpath \`cd \$(PLUGIN_DIR) \&\& pwd\`/' Makefile>Makefile.temp

(LDFLAGS :=$(LDFLAGS) -rpath `cd $(PLUGIN_DIR) && pwd`)

rm Makefile -f

mv Makefile.temp Makefile

cd ..

make

cp src/.libs/libts* ../dist/lib/

cp src/*.h ../dist/inlucde/

以下生成本机用的uic designer等工具

cd qt2

export QTDIR=$PWD

export TMAKEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/tmake

export TMAKEPATH=$TMAKEDIR/lib/linux-g++

export PATH=$PATH:$TMAKEDIR/bin

echo yes|./configure -static -no-xft -no-sm

begin

cd src/tools/

sed 's/remove( this->fromLast() )/this->remove( this->fromLast())/' qvaluestack.h>temp.h

rm -f qvaluestack.h

mv temp.h qvaluestack.h

cd ../../

over

make -C src/moc

make -C src

make -C tools/designer

make -C tools/qvfb

qvfbview.o qvfbview.cpp

qvfbview.cpp: In constructor ‘QVFbView::QVFbView(int, int, int, int, QVFbView::Rotation, bool, QWidget*, const char*, uint)’:

qvfbview.cpp:171: error: cast from ‘unsigned char*’ to ‘int’ loses precision

make: *** [qvfbview.o] 错误 1

if ( (unsigned char *)data ==(unsigned char *) -1 ){

make

cp tools/qvfb/qvfb bin

cd qtopia-free-2.2.0/

vi qtopia/mkspecs/qws/linux-arm-g++/qmake.conf

将此行

QMAKE_LIBS_QT = -lqte

修改为

QMAKE_LIBS_QT = -lqte -lpng -lts -lz -luuid -ljpeg

export QTDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/qt2

export QPEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/qtopia

export LD_LIBRARY_PATH=$QTDIR/lib:$QPEDIR/lib:$LD_LIBRARY_PATH

export TMAKEDIR=/home/wangbin/work/qt/qtopia-free-2.2.0/tmake

export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++

export PATH=$PATH:$TMAKEDIR/bin:/usr/local/arm/3.4.1/bin

export PATH=$PATH:$QTDIR/bin:$QPEDIR/bin

cp $QPEDIR/src/qt/qconfig-qpe.h $QTDIR/src/tools

cd $QPEDIR/src/libraries/qtopia

cp custom-linux-ipaq-g++.cpp custom-linux-arm-g++.cpp

cp custom-linux-ipaq-g++.h custom-linux-arm-g++.h

cd /home/wangbin/work/qt/qtopia-free-2.2.0/

export PATH=$PATH:/usr/local/arm/3.4.1/bin

./configure -qte "-embedded -xplatform linux-arm-g++ -qconfig qpe -no-qvfb -depths 16 -system-jpeg -system-libpng -system-zlib -tslib -gif -thread -no-xft -release -I/home/wangbin/work/qt/dist/include -L/home/wangbin/work/qt/dist/lib -lpng -lts -lz -luuid -ljpeg" -qpe "-xplatform linux-arm-g++ -edition pda -displaysize 240x320 -I/home/wangbin/work/qt/dist/include -L/home/wangbin/work/qt/dist/lib -prefix=/home/wangbin/work/qt/dist/qtopia"

vi qtopia-free-2.2.0/qtopia/src/libraries/qtopia/qdawg.cpp

:294:

//   QDawgPrivate::~QDawgPrivate()

~QDawgPrivate()

yes

make

make install

qconfig.h

Qpainter要能够旋转的话,去掉QT_NO_TRANSFORMATIONS

所以实际要注释的宏是/qt/src/tools/ qconfig-qpe.h和/qt/src/tools/qfeart

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/c6e64efd3e76f23f99652f51e3756b2c.html