guowenxue
2019-07-16 4a84ac1e75212a5625ff6b83c413692bb83ce95d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
 
#+--------------------------------------------------------------------------------------------
#|Description:  This shell script used to download qt-extended-4.4.3 code and cross compile it.
#|     Author:  GuoWenxue <guowenxue@gmail.com>
#|  ChangeLog:
#|           1, Initialize 1.0.0 on 2012.03.28
#+--------------------------------------------------------------------------------------------
 
APP_NAME="qt-everywhere-opensource-src-4.6.4"
PACK_SUFIX="tar.gz"
DL_ADDR="http://releases.qt-project.org/qt4/source/$APP_NAME.$PACK_SUFIX"
 
INST_PATH=/apps
QT_INST_PATH=$INST_PATH/qt-everywhere-rpi
 
ARCH=cortexa53
 
if [ -z "$ARCH" -a $# -gt 0 ] ; then
   ARCH=$1
fi
 
sup_arch=("" "arm920t" )
 
function select_arch()
{
   echo "Current support ARCH: "
   i=1
   len=${#sup_arch[*]}
 
   while [ $i -lt $len ]; do
     echo "$i: ${sup_arch[$i]}"
     let i++;
   done
 
   echo "Please select: "
   index=
   read index
   ARCH=${sup_arch[$index]}
}
 
 
if [ -z "$CROSS" ] ; then
    if [ -z $ARCH ] ; then
        select_arch
    fi
    CROSS=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
fi
 
export PATH=`dirname $CROSS`:$PATH
 
mkdir -p ${QT_INST_PATH}
 
echo "+------------------------------------------------------------------+"
echo "|          Build $APP_NAME for $ARCH "
echo "| Crosstool:  $CROSS"
echo "+------------------------------------------------------------------+"
 
# Download source code packet
if [ ! -s $APP_NAME.$PACK_SUFIX ] ; then 
    echo "+------------------------------------------------------------------+" 
    echo "|  Download $APP_NAME.$PACK_SUFIX now "  
    echo "+------------------------------------------------------------------+" 
    wget $DL_ADDR 
fi 
 
# Decompress source code packet 
if [ ! -d $APP_NAME ] ; then 
    tar -xzf $APP_NAME.$PACK_SUFIX 
fi
 
cd $APP_NAME
 
 
#Configure for the QT
./configure -opensource -confirm-license -release -prefix ${QT_INST_PATH} \
-embedded arm -xplatform qws/linux-arm-g++ -shared -no-fast -no-largefile -no-multimedia \
-no-audio-backend  -no-phonon -no-phonon-backend -no-svg -qt-freetype \
-little-endian -nomake tools -nomake docs -no-xmlpatterns \
-no-javascript-jit -no-script -no-scripttools -no-declarative -qt-zlib \
-no-gif -qt-libtiff -qt-libpng  -no-libmng -qt-libjpeg -no-openssl \
-no-nis -no-cups -no-dbus -no-mmx -no-3dnow -no-sse -no-sse2 -no-rpath -no-glib \
-no-xcursor -no-xfixes -no-xrandr -no-xrender -no-separate-debug-info
 
make -j 16 && make install
 
cd -