xref: /glogg/release-osx.sh (revision 624d1a5d36b65381352edb05e353a391d7bc98b2)
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
12f6034637SNicolas BonnefonBOOSTDIR=$HOME/Sandbox/boost_1_59_0
13c11410ccSNicolas Bonnefon
14c11410ccSNicolas Bonnefonmake clean
15f6034637SNicolas Bonnefonif [ ! -d "$BOOSTDIR" ]; then
16f6034637SNicolas Bonnefon    echo $BOOSTDIR not found.
17f6034637SNicolas Bonnefon    exit 1
18f6034637SNicolas Bonnefonelif [ -z "$VERSION" ]; then
19a3ee2aa1SNicolas Bonnefon    echo Please specify a version to build: VERSION=1.2.3 $0
20c11410ccSNicolas Bonnefon    exit 1
21c11410ccSNicolas Bonnefonelse
22*624d1a5dSNicolas Bonnefon    $QTDIR/qtbase/bin/qmake glogg.pro LIBS+="-dead_strip" CONFIG+="release no-dbus version_checker" BOOST_PATH=$BOOSTDIR VERSION="$VERSION"
23c11410ccSNicolas Bonnefonfi
24c11410ccSNicolas Bonnefonmake -j8
25*624d1a5dSNicolas Bonnefondsymutil release/glogg.app/Contents/MacOS/glogg
26f6034637SNicolas Bonnefonmv release/glogg.app/Contents/MacOS/glogg.dSYM release/glogg-$VERSION.dSYM
27c11410ccSNicolas Bonnefon
28a3ee2aa1SNicolas Bonnefonsed -e "s/\"glogg\"/\"glogg $VERSION\"/" osx_installer.json >osx_${VERSION}_installer.json
29c11410ccSNicolas Bonnefonrm glogg_${VERSION}_installer.dmg
30a3ee2aa1SNicolas Bonnefonappdmg osx_${VERSION}_installer.json glogg_${VERSION}_installer.dmg
31a3ee2aa1SNicolas Bonnefonrm osx_${VERSION}_installer.json
32