1d022340fSNicolas Bonnefon#!/bin/bash 2d022340fSNicolas Bonnefon 3d022340fSNicolas Bonnefon# Build glogg for win32 using the cross-compiler 4d022340fSNicolas Bonnefon 5d022340fSNicolas BonnefonQTXDIR=$HOME/qt-x-win32 6*40ecf53eSNicolas BonnefonQTVERSION=5.5.1-64 7d022340fSNicolas BonnefonBOOSTDIR=$QTXDIR/boost_1_50_0 8d022340fSNicolas Bonnefon 9*40ecf53eSNicolas Bonnefonrm release debug .obj .ui .moc -rf 10d022340fSNicolas Bonnefonmake clean 11d022340fSNicolas Bonnefonif [ "$1" == "debug" ]; then 12d022340fSNicolas Bonnefon echo "Building a debug version" 13d022340fSNicolas Bonnefon qmake-qt4 glogg.pro -spec win64-x-g++ -r CONFIG+="debug win32 rtti no-dbus version_checker" BOOST_PATH=$BOOSTDIR 14d022340fSNicolas Bonnefonelif [ -z "$VERSION" ]; then 15d022340fSNicolas Bonnefon echo "Building default version" 16*40ecf53eSNicolas Bonnefon qmake glogg.pro -spec win64-x-g++ -r CONFIG+="release win32 rtti no-dbus version_checker" BOOST_PATH=$BOOSTDIR QMAKE_CXXFLAGS="-m64" CROSS_COMPILE="x86_64-w64-mingw32-" 17d022340fSNicolas Bonnefonelse 18d022340fSNicolas Bonnefon echo "Building version $VERSION-x86_64" 19*40ecf53eSNicolas Bonnefon qmake glogg.pro -spec win64-x-g++ -r CONFIG+="release win32 rtti no-dbus version_checker" BOOST_PATH=$BOOSTDIR VERSION="$VERSION-x86_64" QMAKE_CXXFLAGS="-m64" CROSS_COMPILE="x86_64-w64-mingw32-" 20d022340fSNicolas Bonnefonfi 21d022340fSNicolas Bonnefonmake -j3 22*40ecf53eSNicolas Bonnefoncp $QTXDIR/$QTVERSION/bin/{Qt5Core,Qt5Gui,Qt5Network,Qt5Widgets}.dll release/ 23*40ecf53eSNicolas Bonnefoncp $QTXDIR/$QTVERSION/bin/{Qt5Core,Qt5Gui,Qt5Network,Qt5Widgets}d.dll debug/ 24d022340fSNicolas Bonnefoncp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/ 25d022340fSNicolas Bonnefonif [ -z "$VERSION" ]; then 26d022340fSNicolas Bonnefon VERSION=`git describe`; 27d022340fSNicolas Bonnefonfi 28d022340fSNicolas Bonnefonecho Generating installer for glogg-$VERSION 29d022340fSNicolas Bonnefonwine $QTXDIR/NSIS/makensis -DVERSION="$VERSION-x86_64" glogg.nsi 30