xref: /glogg/release-osx.sh (revision f6034637393ad8ced9e2e73f2e8503ae38e3ffba)
1c11410ccSNicolas Bonnefon#!/bin/bash
2c11410ccSNicolas Bonnefon
3c11410ccSNicolas Bonnefon# Build glogg for OSX and make a DMG installer
41369f9b9SNicolas Bonnefon# (uses https://github.com/LinusU/node-appdmg)
51369f9b9SNicolas Bonnefon#
61369f9b9SNicolas Bonnefon# brew install node
71369f9b9SNicolas Bonnefon# npm install -g appdmg
81369f9b9SNicolas Bonnefon#
91369f9b9SNicolas Bonnefon# QTDIR is built -static
10c11410ccSNicolas Bonnefon
11c11410ccSNicolas BonnefonQTDIR=$HOME/Sandbox/qt-5.5.1-release-static
12*f6034637SNicolas BonnefonBOOSTDIR=$HOME/Sandbox/boost_1_59_0
13c11410ccSNicolas Bonnefon
14c11410ccSNicolas Bonnefonmake clean
15*f6034637SNicolas Bonnefonif [ ! -d "$BOOSTDIR" ]; then
16*f6034637SNicolas Bonnefon    echo $BOOSTDIR not found.
17*f6034637SNicolas Bonnefon    exit 1
18*f6034637SNicolas Bonnefonelif [ -z "$VERSION" ]; then
19a3ee2aa1SNicolas Bonnefon    echo Please specify a version to build: VERSION=1.2.3 $0
20c11410ccSNicolas Bonnefon    exit 1
21c11410ccSNicolas Bonnefonelse
22c11410ccSNicolas Bonnefon    $QTDIR/qtbase/bin/qmake glogg.pro CONFIG+="release no-dbus version_checker" BOOST_PATH=$BOOSTDIR VERSION="$VERSION"
23c11410ccSNicolas Bonnefonfi
24c11410ccSNicolas Bonnefonmake -j8
25*f6034637SNicolas Bonnefonmv release/glogg.app/Contents/MacOS/glogg.dSYM release/glogg-$VERSION.dSYM
26c11410ccSNicolas Bonnefon
27a3ee2aa1SNicolas Bonnefonsed -e "s/\"glogg\"/\"glogg $VERSION\"/" osx_installer.json >osx_${VERSION}_installer.json
28c11410ccSNicolas Bonnefonrm glogg_${VERSION}_installer.dmg
29a3ee2aa1SNicolas Bonnefonappdmg osx_${VERSION}_installer.json glogg_${VERSION}_installer.dmg
30a3ee2aa1SNicolas Bonnefonrm osx_${VERSION}_installer.json
31