Skip to content

Instantly share code, notes, and snippets.

@rafaelbrandao
Created June 19, 2012 16:14
Show Gist options
  • Save rafaelbrandao/2955024 to your computer and use it in GitHub Desktop.
Save rafaelbrandao/2955024 to your computer and use it in GitHub Desktop.
Build Qt5
#!/bin/bash
WEEKLY_QT5_HASH="78b8403e415e7e8d9405daebc9619c4a7cb85910"
THREADS=-j50
QT5_MODULES="qtjsbackend qtxmlpatterns qtscript qtquick1 qtdeclarative qt3d qtsensors qtlocation"
cd qt5
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 QTDIR=/opt/git/qt5/qtbase
export PATH=$QTDIR/bin:$PATH
./configure -developer-build -opensource -confirm-license -no-pch -nomake examples -nomake demos -nomake tests -no-gtkstyle -nomake translations -qt-zlib -qt-libpng -qt-libjpeg -qt-sql-sqlite -release -prefix $QTDIR
cd qtbase && make $THREADS && cd ..
if [ $? -ne 0 ] ; then
echo FAIL: building qtbase
exit 1
fi
for module in $QT5_MODULES
do
cd $module && qmake && make $THREADS && cd ..
if [ $? -ne 0 ] ; then
echo FAIL: building $module.
exit 1
fi
done
echo
echo Build Completed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment