1#!/bin/bash 2 3# Build glogg for win32 using the cross-compiler 4 5QTXDIR=$HOME/qt-x-win32 6QTVERSION=4.8.2 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 win32-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 win32-x-g++ -r CONFIG+="release win32 rtti no-dbus version_checker" BOOST_PATH=$BOOSTDIR 16else 17 echo "Building version $VERSION" 18 qmake-qt4 glogg.pro -spec win32-x-g++ -r CONFIG+="release win32 rtti no-dbus version_checker" BOOST_PATH=$BOOSTDIR VERSION="$VERSION" 19fi 20make -j3 21cp $QTXDIR/$QTVERSION/bin/{QtCore4,QtGui4,QtNetwork4}.dll release/ 22cp $QTXDIR/$QTVERSION/bin/{QtCored4,QtGuid4,QtNetworkd4}.dll debug/ 23if [ -z "$VERSION" ]; then 24 VERSION=`git describe`; 25fi 26echo Generating installer for glogg-$VERSION 27wine $QTXDIR/NSIS/makensis -DVERSION=$VERSION glogg.nsi 28