xref: /glogg/release-win64-x.sh (revision 24bff4d40138367c4ce8de063ccd39ee27ba5e72)
1d022340fSNicolas Bonnefon#!/bin/bash
2d022340fSNicolas Bonnefon
3d022340fSNicolas Bonnefon# Build glogg for win32 using the cross-compiler
4d022340fSNicolas Bonnefon
5d022340fSNicolas BonnefonQTXDIR=$HOME/qt-x-win32
640ecf53eSNicolas BonnefonQTVERSION=5.5.1-64
7d022340fSNicolas BonnefonBOOSTDIR=$QTXDIR/boost_1_50_0
8d022340fSNicolas Bonnefon
940ecf53eSNicolas 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*24bff4d4SNicolas 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-" INCLUDEPATH+="$QTXDIR/$QTVERSION/include $QTXDIR/$QTVERSION/include/QtCore $QTXDIR/$QTVERSION/include/QtGui $QTXDIR/$QTVERSION/include/QtNetwork $QTXDIR/$QTVERSION/include/QtWidgets"
17d022340fSNicolas Bonnefonelse
18d022340fSNicolas Bonnefon    echo "Building version $VERSION-x86_64"
19*24bff4d4SNicolas 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-" INCLUDEPATH+="$QTXDIR/$QTVERSION/include $QTXDIR/$QTVERSION/include/QtCore $QTXDIR/$QTVERSION/include/QtGui $QTXDIR/$QTVERSION/include/QtNetwork $QTXDIR/$QTVERSION/include/QtWidgets"
20d022340fSNicolas Bonnefonfi
21d022340fSNicolas Bonnefonmake -j3
2240ecf53eSNicolas Bonnefoncp $QTXDIR/$QTVERSION/bin/{Qt5Core,Qt5Gui,Qt5Network,Qt5Widgets}.dll release/
237029a38bSNicolas Bonnefoncp $QTXDIR/$QTVERSION/plugins/platforms/qwindows.dll release/
2440ecf53eSNicolas Bonnefoncp $QTXDIR/$QTVERSION/bin/{Qt5Core,Qt5Gui,Qt5Network,Qt5Widgets}d.dll debug/
25d022340fSNicolas Bonnefoncp /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll release/
26d022340fSNicolas Bonnefonif [ -z "$VERSION" ]; then
27d022340fSNicolas Bonnefon    VERSION=`git describe`;
28d022340fSNicolas Bonnefonfi
29d022340fSNicolas Bonnefonecho Generating installer for glogg-$VERSION
30d022340fSNicolas Bonnefonwine $QTXDIR/NSIS/makensis -DVERSION="$VERSION-x86_64" glogg.nsi
31