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