guowenxue
2019-08-08 47f7b47c8443994cf11be904407db826476f911f
update qt5 build shell script
2 files modified
4 files deleted
2 files added
456 ■■■■ changed files
qt4/apps/build.sh 3 ●●●●● patch | view | raw | blame | history
qt4/build-everywhere-4.6.4.sh 87 ●●●●● patch | view | raw | blame | history
qt5/build.sh 111 ●●●●● patch | view | raw | blame | history
qt5/build_QT4.sh 111 ●●●●● patch | view | raw | blame | history
qt5/build_QT5.sh 112 ●●●●● patch | view | raw | blame | history
qt5/iconv/build.sh 16 ●●●● patch | view | raw | blame | history
qt5/tslib/build.sh 16 ●●●● patch | view | raw | blame | history
qt5/tslib/tslib-1.16.tar.bz2 patch | view | raw | blame | history
qt4/apps/build.sh
File was deleted
qt4/build-everywhere-4.6.4.sh
File was deleted
qt5/build.sh
File was deleted
qt5/build_QT4.sh
New file
@@ -0,0 +1,111 @@
#!/bin/bash
#+--------------------------------------------------------------------------------------------
#|Description:  This shell script used download and compile QT5 for ARM
#|     Author:  GuoWenxue <guowenxue@gmail.com>
#|
#|   WARNNING:  QT >= 5.7 need crosstool g++ support C++11 support
#|              QT configure need host g++ support C++11, so need config g++ on ubuntu host:
#|              sudo update-alternatives --config g++
#|
#|  ChangeLog:
#|           1, Initialize 1.0.0 on 2011.04.12
#+--------------------------------------------------------------------------------------------
JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
PRJ_PATH=`pwd`
LIBS_PATH=$PRJ_PATH/install
#QT_INST_PATH=/apps/QT5.9_RPI
QT_INST_PATH=/apps/QT4.6_RPI
CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-
LYFTP_SRC=ftp://master.iot-yun.club/src/
function msg_banner()
{
    echo ""
    echo "+-----------------------------------------------------------------------"
    echo "|  $1 "
    echo "+-----------------------------------------------------------------------"
    echo ""
}
function check_result()
{
    if [ $? != 0 ] ; then
       echo ""
       echo "+-----------------------------------------------------------------------"
       echo "|  $1 "
       echo "+-----------------------------------------------------------------------"
       echo ""
       exit ;
    fi
}
function compile_qt()
{
    SRC_NAME=qt-everywhere-opensource-src-4.6.4
    PACK_SUFIX=tar.gz
    #rm -rf ${QT_INST_PATH}/lib/libQt5Gui.so
    if [ -f ${QT_INST_PATH}/lib/libQtGui.so ] ; then
        msg_banner "Already cross compile $SRC_NAME "
        return 0;
    fi
    if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then
        msg_banner "Start download ${SRC_NAME}.${PACK_SUFIX} "
        wget ${LYFTP_SRC}/qt/${SRC_NAME}.${PACK_SUFIX}
        check_result "ERROR: download ${SRC_NAME} failure"
    fi
    msg_banner "Start decompress $SRC_NAME.${PACK_SUFIX} "
    if [ ! -d ${SRC_NAME} ] ; then
        tar -xzf ${SRC_NAME}.${PACK_SUFIX}
    fi
    cd ${SRC_NAME}
    QMAKE_FILE=mkspecs/qws/linux-arm-g++/qmake.conf
    grep "`dirname ${CROSSTOOL}`" ${QMAKE_FILE} > /dev/null 2>&1
    if [ $? != 0 ] ; then
        sed -i "s|arm-linux-|$CROSSTOOL|" ${QMAKE_FILE}
    fi
    ./configure -opensource -confirm-license -release -shared -prefix ${QT_INST_PATH} -embedded arm \
        -xplatform qws/linux-arm-g++ -qt-freetype -make libs -no-fast -no-largefile \
        -qt-zlib  -no-gif -qt-libpng  -qt-libjpeg -no-openssl -no-cups -no-dbus -pch \
        -no-phonon -no-phonon-backend -no-opengl -no-xmlpatterns \
        -no-rpath -no-glib -no-javascript-jit -no-script -no-scripttools -no-declarative \
        -no-nis -no-mmx -no-3dnow -no-sse -no-sse2 -no-xcursor -no-xfixes -no-xrandr -no-xrender \
        -no-separate-debug-info -nomake tests -nomake tools -nomake examples \
        -I${LIBS_PATH}/include/  -L${LIBS_PATH}/lib/  -I${QT_INST_PATH}/include/  -L${QT_INST_PATH}/lib/
    msg_banner "Start cross compile $SRC_NAME "
    make -j${JOBS} && make install
    check_result "ERROR: compile ${SRC_NAME} failure"
    cp -af ${LIBS_PATH}/lib/libts*so* ${QT_INST_PATH}/lib
    cd -
}
if [ ! -f ${LIBS_PATH}/lib/libiconv.so ] ; then
    cd ./iconv
        ./build.sh
    cd -
fi
cd tslib
  ./build.sh
cd -
compile_qt
qt5/build_QT5.sh
New file
@@ -0,0 +1,112 @@
#!/bin/bash
#+--------------------------------------------------------------------------------------------
#|Description:  This shell script used download and compile QT5 for ARM
#|     Author:  GuoWenxue <guowenxue@gmail.com>
#|
#|   WARNNING:  QT >= 5.7 need crosstool g++ support C++11 support
#|              QT configure need host g++ support C++11, so need config g++ on ubuntu host:
#|              sudo update-alternatives --config g++
#|
#|  ChangeLog:
#|           1, Initialize 1.0.0 on 2011.04.12
#+--------------------------------------------------------------------------------------------
JOBS=`cat /proc/cpuinfo |grep "processor"|wc -l`
PRJ_PATH=`pwd`
LIBS_PATH=$PRJ_PATH/install
#QT_INST_PATH=/apps/QT5.9_RPI
QT_INST_PATH=/apps/QT5.6_RPI
CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-
LYFTP_SRC=ftp://master.iot-yun.club/src/
function msg_banner()
{
    echo ""
    echo "+-----------------------------------------------------------------------"
    echo "|  $1 "
    echo "+-----------------------------------------------------------------------"
    echo ""
}
function check_result()
{
    if [ $? != 0 ] ; then
       echo ""
       echo "+-----------------------------------------------------------------------"
       echo "|  $1 "
       echo "+-----------------------------------------------------------------------"
       echo ""
       exit ;
    fi
}
function compile_qt()
{
    # 5.6.3 is the last version can be compiled by g++ without c++11 support
    #SRC_NAME=qt-everywhere-opensource-src-5.9.8
    SRC_NAME=qt-everywhere-opensource-src-5.6.3
    PACK_SUFIX=tar.xz
    #rm -rf ${QT_INST_PATH}/lib/libQt5Gui.so
    if [ -f ${QT_INST_PATH}/lib/libQt5Gui.so ] ; then
        msg_banner "Already cross compile $SRC_NAME "
        return 0;
    fi
    if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then
        msg_banner "Start download ${SRC_NAME}.${PACK_SUFIX} "
        wget ${LYFTP_SRC}/qt/${SRC_NAME}.${PACK_SUFIX}
        check_result "ERROR: download ${SRC_NAME} failure"
    fi
    msg_banner "Start decompress $SRC_NAME.${PACK_SUFIX} "
    if [ ! -d ${SRC_NAME} ] ; then
        tar -xJf ${SRC_NAME}.${PACK_SUFIX}
    fi
    cd ${SRC_NAME}
    QMAKE_FILE=qtbase/mkspecs/linux-arm-gnueabi-g++/qmake.conf
    grep "`dirname ${CROSSTOOL}`" ${QMAKE_FILE} > /dev/null 2>&1
    if [ $? != 0 ] ; then
        sed -i "s|arm-linux-gnueabi-|$CROSSTOOL|" ${QMAKE_FILE}
    fi
    ./configure -opensource -confirm-license -release -shared -strip -prefix ${QT_INST_PATH} -c++std c++11 \
        -xplatform linux-arm-gnueabi-g++ -qt-freetype -no-libproxy -no-avx  -make libs \
        -qt-zlib -no-mtdev -no-gif -qt-libpng  -qt-libjpeg -no-openssl -no-cups -no-dbus -pch \
        -no-xcb -no-eglfs -no-kms -no-directfb -no-opengl -linuxfb -qpa linuxfb \
        -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-rpath -no-glib \
        -no-separate-debug-info -nomake tests -nomake tools -nomake examples \
        -tslib -I${LIBS_PATH}/include/  -L${LIBS_PATH}/lib/  -I${QT_INST_PATH}/include/  -L${QT_INST_PATH}/lib/
    msg_banner "Start cross compile $SRC_NAME "
    make -j${JOBS} && make install
    check_result "ERROR: compile ${SRC_NAME} failure"
    cp ./qtbase/plugins/platforms/libqlinuxfb.so  ${QT_INST_PATH}/lib
    cp -af ${LIBS_PATH}/lib/libts*so* ${QT_INST_PATH}/lib
    cd -
}
if [ ! -f ${LIBS_PATH}/lib/libiconv.so ] ; then
    cd ./iconv
        ./build.sh
    cd -
fi
cd tslib
  ./build.sh
cd -
compile_qt
qt5/iconv/build.sh
@@ -7,12 +7,11 @@
#|           1, Initialize 1.0.0 on 2011.04.12
#+--------------------------------------------------------------------------------------------
PROJ_PATH=`pwd`/../
ICONV_INST_PATH=${PROJ_PATH}/libs/
INST_PATH=`pwd`/../install
if [ -z $CROSSTOOL ] ; then
   CROSSTOOL=/opt/xtools/arm920t/bin/arm-linux-
fi
CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-
LYFTP_SRC=ftp://master.iot-yun.club/src/
function msg_banner()
{
@@ -61,7 +60,7 @@
    SRC_NAME=libiconv-1.15
    PACK_SUFIX=tar.gz
    if [ -f ${ICONV_INST_PATH}/lib/libiconv.so ] ; then
    if [ -f ${INST_PATH}/lib/libiconv.so ] ; then
        msg_banner "Already cross compile $SRC_NAME "
        return 0;
    fi
@@ -69,14 +68,15 @@
    msg_banner "Start cross compile $SRC_NAME "
    if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then
        wget https://ftp.gnu.org/gnu/libiconv/${SRC_NAME}.${PACK_SUFIX}
        #wget https://ftp.gnu.org/gnu/libiconv/${SRC_NAME}.${PACK_SUFIX}
        wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX}
        check_result "ERROR: download ${SRC_NAME} failure"
    fi
    tar -xzf ${SRC_NAME}.${PACK_SUFIX} 
    cd ${SRC_NAME}
    ./configure --prefix=${ICONV_INST_PATH} ${CONFIG_CROSS}
    ./configure --prefix=${INST_PATH} ${CONFIG_CROSS}
    make && make install
    cd -
qt5/tslib/build.sh
@@ -7,12 +7,11 @@
#|           1, Initialize 1.0.0 on 2011.04.12
#+--------------------------------------------------------------------------------------------
PROJ_PATH=`pwd`/..
TSLIB_INST_PATH=${PROJ_PATH}/libs/
INST_PATH=`pwd`/../install
if [ -z $CROSSTOOL ] ; then
   CROSSTOOL=/opt/xtools/arm920t/bin/arm-linux-
fi
CROSSTOOL=/opt/rpi/arm-bcm2708/arm-linux-gnueabihf/bin/arm-linux-
LYFTP_SRC=ftp://master.iot-yun.club/src/
function msg_banner()
{
@@ -61,7 +60,7 @@
    PACK_SUFIX=tar.bz2
    if [ -f ${TSLIB_INST_PATH}/lib/libts.so ] ; then
    if [ -f ${INST_PATH}/lib/libts.so ] ; then
        msg_banner "Already cross compile $SRC_NAME "
        return 0;
    fi
@@ -69,14 +68,15 @@
    msg_banner "Start cross compile $SRC_NAME "
    if [ ! -f ${SRC_NAME}.${PACK_SUFIX} ] ; then
        wget https://gitlab.com/tslib/tslib/uploads/021755cde4aba79478464459c8a2122c/${SRC_NAME}.${PACK_SUFIX}
        #wget https://gitlab.com/tslib/tslib/uploads/021755cde4aba79478464459c8a2122c/${SRC_NAME}.${PACK_SUFIX}
        wget ${LYFTP_SRC}/${SRC_NAME}.${PACK_SUFIX}
        check_result "ERROR: download ${SRC_NAME} failure"
    fi
    tar -xjf ${SRC_NAME}.${PACK_SUFIX} 
    cd ${SRC_NAME}
    ./configure --prefix=${TSLIB_INST_PATH} ${CONFIG_CROSS}
    ./configure --prefix=${INST_PATH} ${CONFIG_CROSS}
    make && make install
    cd -
qt5/tslib/tslib-1.16.tar.bz2
Binary files differ