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