summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-11-17 07:49:16 +0100
committerRobin Gareus <robin@gareus.org>2014-11-17 07:49:16 +0100
commitdc2de0126a57eb8da707f88cf2c574aac93f8976 (patch)
tree7a6d15ab6175cc68b0c8d82240fa71bb74212544 /tools
parentbd46de779f2f1e9c36b822e26fdd486fb172d48c (diff)
OSX packaging:
* postfix DMG with "-dbg" if not optimized. * strip binary and libs if optimized
Diffstat (limited to 'tools')
-rwxr-xr-xtools/osx_packaging/osx_build27
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build
index 3e9f2945a9..c6dfc2bb36 100755
--- a/tools/osx_packaging/osx_build
+++ b/tools/osx_packaging/osx_build
@@ -46,7 +46,6 @@ while [ $# -gt 0 ] ; do
--public) WITH_NLS= ;
SAE= ;
WITH_LADSPA=1;
- STRIP= ;
PRODUCT_PKG_DIR=Ardour;
APPNAME=Ardour ;
shift ;;
@@ -84,6 +83,17 @@ else
fi
echo "Info string is $info_string"
+if [ x$DEBUG = xT ]; then
+ STRIP=
+ echo "Debug build, strip disabled"
+else
+ if test x$STRIP != x ; then
+ echo "No debug build, strip enabled"
+ else
+ echo "No debug build, but strip disabled."
+ fi
+fi
+
# setup directory structure
APPDIR=${APPNAME}.app
@@ -222,9 +232,6 @@ else
cp Ardour3.icns $Resources/appIcon.icns
fi
cp typeArdour.icns $Resources/
-if test x$STRIP != x ; then
- strip $APPROOT/MacOS/Ardour3
-fi
# copy locale files
if test x$WITH_NLS != x ; then
@@ -407,6 +414,11 @@ while [ true ] ; do
if ! file $file | grep -qs Mach-O ; then
continue
fi
+
+ if test x$STRIP != x ; then
+ strip -u -r -arch all $file &>/dev/null
+ fi
+
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
# echo -n "."
for dep in $deps ; do
@@ -605,7 +617,12 @@ echo "Building DMG ..."
# UC_DMG=$APPNAME-${release_version}-UC.dmg
# FINAL_DMG=$APPNAME-${release_version}.dmg
-UC_DMG=$APPNAME-$release_version.dmg
+
+if [ x$DEBUG = xT ]; then
+ UC_DMG=$APPNAME-$release_version-dbg.dmg
+else
+ UC_DMG=$APPNAME-$release_version.dmg
+fi
VOLNAME=$APPNAME-$release_version
# TODO use mktemp