Created
October 17, 2012 14:20
-
-
Save zenoalbisser/3905760 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ $# -lt 1 -o $# -gt 2 ] ; then | |
| echo "usage: $0 WEEKLY_QT5_HASH [platform]" | |
| exit 0; | |
| fi | |
| if [ "$1" == "-no-update" ] ; then | |
| NO_UPDATE=1 | |
| fi | |
| if [ $# -eq 2 ] ; then | |
| if [ "$2" == "-update-only" ] ; then | |
| UPDATE_ONLY=1 | |
| else | |
| PLATFORM="-platform $2"; | |
| export QMAKESPEC=$2 | |
| fi | |
| fi | |
| WEEKLY_QT5_HASH="$1" | |
| QT5_MODULES="qtjsbackend qtxmlpatterns qtscript qtquick1 qtdeclarative qt3d qtsensors qtlocation" | |
| if [ "$NO_UPDATE" != "1" ] ; then | |
| git checkout master | |
| git clean -dxf | |
| git reset --hard HEAD | |
| git submodule foreach "git checkout master" | |
| git submodule foreach "git clean -dxf" | |
| git submodule foreach "git reset --hard HEAD" | |
| git fetch || exit 1 | |
| git reset --hard $WEEKLY_QT5_HASH || exit 1 | |
| ./init-repository --module-subset=qtbase,`echo $QT5_MODULES | tr " " ","` -f || exit 1 | |
| git submodule foreach "git fetch" || exit 1 | |
| git submodule update --recursive || exit 1 | |
| echo ========================================================== | |
| git submodule status | |
| echo ========================================================== | |
| export PATH=$QTDIR/bin:$PATH | |
| fi | |
| if [ "$UPDATE_ONLY" != "1" ] ; then | |
| # debug and release: | |
| # ./configure -developer-build -debug-and-release -confirm-license -opensource -no-pch -nomake examples -nomake demos -nomake tests -no-gtkstyle -nomake translations -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -prefix $QTDIR | |
| # release: | |
| ./configure -developer-build -release -confirm-license -opensource -no-pch -nomake examples -nomake demos -nomake tests -no-gtkstyle -nomake translations -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -prefix $QTDIR | |
| # debug | |
| # ./configure -developer-build -debug -confirm-license -opensource -no-pch -nomake examples -nomake demos -nomake tests -no-gtkstyle -nomake translations -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -prefix $QTDIR | |
| cd qtbase && make && cd .. | |
| if [ $? -ne 0 ] ; then | |
| echo FAIL: building qtbase | |
| exit 1 | |
| fi | |
| for module in $QT5_MODULES | |
| do | |
| cd $module && qmake && make && cd .. | |
| if [ $? -ne 0 ] ; then | |
| echo FAIL: building $module. | |
| exit 1 | |
| fi | |
| done | |
| fi | |
| echo | |
| echo Build Completed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment