1#!/bin/bash 2 3# Build glogg for OSX and make a DMG installer 4# (uses https://github.com/LinusU/node-appdmg) 5# 6# brew install node 7# npm install -g appdmg 8# 9# QTDIR is built -static 10 11QTDIR=$HOME/Sandbox/qt-5.5.1-release-static 12BOOSTDIR=$HOME/Sandbox/boost_1_59_0 13 14make clean 15if [ ! -d "$BOOSTDIR" ]; then 16 echo $BOOSTDIR not found. 17 exit 1 18elif [ -z "$VERSION" ]; then 19 echo Please specify a version to build: VERSION=1.2.3 $0 20 exit 1 21else 22 $QTDIR/qtbase/bin/qmake glogg.pro CONFIG+="release no-dbus version_checker" BOOST_PATH=$BOOSTDIR VERSION="$VERSION" 23fi 24make -j8 25mv release/glogg.app/Contents/MacOS/glogg.dSYM release/glogg-$VERSION.dSYM 26 27sed -e "s/\"glogg\"/\"glogg $VERSION\"/" osx_installer.json >osx_${VERSION}_installer.json 28rm glogg_${VERSION}_installer.dmg 29appdmg osx_${VERSION}_installer.json glogg_${VERSION}_installer.dmg 30rm osx_${VERSION}_installer.json 31