xref: /glogg/release-win32-x.sh (revision 702af59ea138e3124b906092de415e3601c74d3e)
1#!/bin/bash
2
3# Build glogg for win32 using the cross-compiler
4
5QTXDIR=$HOME/qt-x-win32
6QTVERSION=4.8.6-32
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/lib/{QtCore4,QtGui4,QtNetwork4}.dll release/
22cp $QTXDIR/$QTVERSION/lib/{QtCored4,QtGuid4,QtNetworkd4}.dll debug/
23cp /usr/i686-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 -DARCH32 glogg.nsi
29