Chinaunix首页 | 论坛 | 博客
  • 博客访问: 324970
  • 博文数量: 145
  • 博客积分: 2500
  • 博客等级: 少校
  • 技术积分: 1510
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-19 11:12
文章分类

全部博文(145)

文章存档

2007年(75)

2006年(70)

我的朋友

分类:

2007-04-19 13:06:40

只要下载相关的软件 交叉编译器我使用的是2。95。3的 使用3。4。0的出现内部错误

 #!/bin/sh
#enviroment variable

export QTOPIABUILD=$PWD

rm install.log -f
#test comilper
echo "int main() { return 0; }" > test_comilper.c
if `arm-linux-gcc -g -o test_comilper test_comilper.c 2>install.log` ; then
    echo "arm-linux-gcc .OK!"
    rm test_comilper*.* -f
else
    echo 'please check your cross-comilper path in your $PATH'
    rm test_comilper*.* -f
    exit 1
fi
#test over

if [ -e e2fsprogs-1.39.tar.gz ] && [ -e jpegsrc.v6b.tar.gz ] && [ -e qt-embedded-2.3.10-free.tar.gz ] && [ -e qt-x11-2.3.2.tar.gz ] && [ -e tmake-1.13.tar.gz ] && [ -e tslib-1.3.tar.bz2 ] && [ -e libpng-1.2.14.tar.bz2 ]; then
    echo "ok lets begin~"
else
    echo "we need e2fsprogs-1.39.tar.gz jpegsrc.v6b.tar.gz qt-embedded-2.3.10-free.tar.gz qtopia-free-source-2.1.1.tar.bz2 qt-x11-2.3.2.tar.gz tmake-1.13.tar.gz tslib-1.3.tar.bz2 libpng-1.2.14.tar.bz2"
   echo "please loaddown these files again~"
    exit 1
fi


echo "************remove old dirs************"
rm -rf qt-x11
rm -rf qtopia
rm -rf qte
rm -rf tmake
rm -rf jpeg
rm -rf e2fs
rm -rf tslib
rm -rf lib
rm -rf include
rm -rf png


echo "************unpack tar packages************"
tar -xvf e2fsprogs-1.39.tar.gz
tar -xvf jpegsrc.v6b.tar.gz
tar -xvf qt-embedded-2.3.10-free.tar.gz
tar -xvf qtopia-free-source-2.1.1.tar.bz2
tar -xvf qt-x11-2.3.2.tar.gz
tar -xvf tmake-1.13.tar.gz
tar -xvf tslib-1.3.tar.bz2
tar -xvf libpng-1.2.14.tar.bz2

echo "************rename packages****************"

mv e2fsprogs-1.39 e2fs
mv qt-2.3.10 qte
mv qt-2.3.2 qt-x11
mv qtopia-free-2.1.1 qtopia
mv jpeg-6b jpeg
mv tmake-1.13 tmake
mv tslib-1.3 tslib
mv libpng-1.2.14 png

echo "install qt-x11"
cd qt-x11
export QTDIR=$PWD
echo yes|./configure -static -no-xft -no-opengl -no-sm
make -C src/moc 2>install.log
cp src/moc/moc bin
#correct header file error
#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 2>>install.log
make -C tools/designer 2>>install.log
make -C tools/qvfb 2>>install.log
cp tools/qvfb/qvfb bin
strip bin/uic bin/moc bin/designer bin/qvfb

cd $QTOPIABUILD
mkdir qte/bin
cp qt-x11/bin/* qte/bin

##install libs
mkdir $QTOPIABUILD/lib
mkdir $QTOPIABUILD/include
cd e2fs
./configure --host=arm-linux CC=arm-linux-gcc
make 2>install.log
cp lib/uuid/libuuid.a $QTOPIABUILD/lib
cp lib/uuid/ $QTOPIABUILD/include -r
cd $QTOPIABUILD



cd jpeg
CC=arm-linux-gcc ./configure --host=arm-linux
make
cp libjpeg.a ../lib/
cd $QTOPIABUILD

cd png
./configure --host=arm-linux CC=arm-linux-gcc
make
cp .libs/libpng* $QTOPIABUILD/lib
cd $QTOPIABUILD


#here
cd tslib
./autogen.sh
./configure --host=arm-linux CC=arm-linux-gcc
cd plugins
sed 's/-rpath \$(PLUGIN_DIR)/-rpath \`cd \$(PLUGIN_DIR) \&\& pwd\`/' Makefile>Makefile.temp
rm Makefile -f
mv Makefile.temp Makefile
cd ..
make
cd src
cp .libs/libts* ../../lib/
cp *.h ../../include/
cd $QTOPIABUILD






echo "install qte"

export QTDIR=$PWD/qte
export QPEDIR=$PWD/qtopia
export TMAKEDIR=$PWD/tmake
export TMAKEPATH=$TMAKEDIR/lib/qws/linux-arm-g++
export PATH=$QTDIR/bin:$QPEDIR/bin:$TMAKEDIR/bin:$PATH

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

(echo yes ; echo no) |./configure -qconfig qpe -system-jpeg -no-xft -gif -depths 16,24,32 -xplatform linux-arm-g++ -tslib -I$QTOPIABUILD/include -L$QTOPIABUILD/lib
make -C src

cd $QTOPIABUILD
mkdir /opt/qtopia

cd qtopia

cd mkspecs/qws/linux-arm-g++
sed -e 's/-lqte/-lqte -lpng -lts -lz -luuid -ljpeg/' -e 's/-lqte -lpng -lts -lz -luuid -ljpeg-mt/-lqte-mt/' qmake.conf>qmake.conf.temp
rm qmake.conf -f
mv qmake.conf.temp qmake.conf
cd $QTOPIABUILD/qtopia
cp src/libraries/qtopia/custom-linux-generic-g++.h src/libraries/qtopia/custom-linux-arm-g++.h
cp src/libraries/qtopia/custom-linux-generic-g++.cpp src/libraries/qtopia/custom-linux-arm-g++.cpp

ln -s $QTOPIABUILD/qte/src/tools/qconfig-qpe.h $QTOPIABUILD/qte/include/qconfig-qpe.h

./configure -xplatform linux-arm-g++ -prefix /opt/qtopia -L$QTOPIABUILD/lib -I$QTOPIABUILD/include
make
make install
echo "*******************************"
echo "good luck"
echo "*******************************"

Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1563020

阅读(1067) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~