13
0

OSX packaging:

* postfix DMG with "-dbg" if not optimized.
* strip binary and libs if optimized
This commit is contained in:
Robin Gareus 2014-11-17 07:49:16 +01:00
parent bd46de779f
commit dc2de0126a

View File

@ -46,7 +46,6 @@ while [ $# -gt 0 ] ; do
--public) WITH_NLS= ; --public) WITH_NLS= ;
SAE= ; SAE= ;
WITH_LADSPA=1; WITH_LADSPA=1;
STRIP= ;
PRODUCT_PKG_DIR=Ardour; PRODUCT_PKG_DIR=Ardour;
APPNAME=Ardour ; APPNAME=Ardour ;
shift ;; shift ;;
@ -84,6 +83,17 @@ else
fi fi
echo "Info string is $info_string" 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 # setup directory structure
APPDIR=${APPNAME}.app APPDIR=${APPNAME}.app
@ -222,9 +232,6 @@ else
cp Ardour3.icns $Resources/appIcon.icns cp Ardour3.icns $Resources/appIcon.icns
fi fi
cp typeArdour.icns $Resources/ cp typeArdour.icns $Resources/
if test x$STRIP != x ; then
strip $APPROOT/MacOS/Ardour3
fi
# copy locale files # copy locale files
if test x$WITH_NLS != x ; then if test x$WITH_NLS != x ; then
@ -407,6 +414,11 @@ while [ true ] ; do
if ! file $file | grep -qs Mach-O ; then if ! file $file | grep -qs Mach-O ; then
continue continue
fi 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\.'` deps=`otool -L $file | awk '{print $1}' | egrep "($GTKSTACK_ROOT|$ARDOURSTACK_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
# echo -n "." # echo -n "."
for dep in $deps ; do for dep in $deps ; do
@ -605,7 +617,12 @@ echo "Building DMG ..."
# UC_DMG=$APPNAME-${release_version}-UC.dmg # UC_DMG=$APPNAME-${release_version}-UC.dmg
# FINAL_DMG=$APPNAME-${release_version}.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 VOLNAME=$APPNAME-$release_version
# TODO use mktemp # TODO use mktemp