1#!/bin/bash -x
2
3# Build dmg installers for OS/X
4#
5# Qt came from a external installation and can be found using the default path
6# You have to make sure it will find that version of qmake, and not the version of macports
7# Compilation will happen with clang, make sure it's your default compiler set : sudo port select gcc none and test with gcc --version
8# This will possible work without macports but I didn't test it (if you have boost installed somewhere)
9
10
11OSNAME[7]="Lion"
12OSNAME[8]="MountainLion"
13OSNAME[9]="Mavericks"
14OSNAME[10]="Yosemite"
15OSNAME[11]="ElCapitan"
16OSNAME[12]="Sierra"
17
18OSSDK[7]="macosx10.7"
19OSSDK[8]="macosx10.8"
20OSSDK[9]="macosx10.9"
21OSSDK[10]="macosx10.10"
22OSSDK[11]="macosx10.11"
23OSSDK[12]="macosx10.12"
24
25#path of this script file
26SCRIPTPATH="$(dirname "$0")"
27
28for v in $(xcodebuild -showsdks | grep macosx | sed -e 's/.*macosx10\.//g')
29do
30	for t in $(seq 7 $v)
31	do
32		"${SCRIPTPATH}"/build-osx.sh --no-qtpath -qmake_opts="QMAKE_MAC_SDK=${OSSDK[$v]} QMAKE_MACOSX_DEPLOYMENT_TARGET=10.$t"
33		mv -v ${SCRIPTPATH}/../LibreCAD.dmg ${SCRIPTPATH}/../LibreCAD-${OSNAME[$t]}-${OSSDK[$v]}.dmg
34	done
35done
36
37