update OS X package build script to handle panners and other miscellany
git-svn-id: svn://localhost/ardour2/branches/3.0@10563 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
3b588d1cef
commit
36ac7f3e78
@ -28,12 +28,10 @@ fi
|
|||||||
|
|
||||||
SAE=
|
SAE=
|
||||||
MIXBUS=
|
MIXBUS=
|
||||||
INTERNAL_JACK=1
|
|
||||||
WITH_LADSPA=1
|
WITH_LADSPA=1
|
||||||
STRIP=1
|
STRIP=1
|
||||||
PRINT_SYSDEPS=
|
PRINT_SYSDEPS=
|
||||||
WITH_NLS=
|
WITH_NLS=
|
||||||
EXTERNAL_JACK=
|
|
||||||
|
|
||||||
while [ $# -gt 0 ] ; do
|
while [ $# -gt 0 ] ; do
|
||||||
echo "arg = $1"
|
echo "arg = $1"
|
||||||
@ -45,7 +43,6 @@ while [ $# -gt 0 ] ; do
|
|||||||
|
|
||||||
--sae) WITH_NLS= ;
|
--sae) WITH_NLS= ;
|
||||||
SAE=1 ;
|
SAE=1 ;
|
||||||
INTERNAL_JACK=1;
|
|
||||||
WITH_LADSPA=1;
|
WITH_LADSPA=1;
|
||||||
STRIP= ;
|
STRIP= ;
|
||||||
PRODUCT_PKG_DIR=ArdourSAE ;
|
PRODUCT_PKG_DIR=ArdourSAE ;
|
||||||
@ -54,7 +51,6 @@ while [ $# -gt 0 ] ; do
|
|||||||
--mixbus) MIXBUS=1;
|
--mixbus) MIXBUS=1;
|
||||||
WITH_NLS=1 ;
|
WITH_NLS=1 ;
|
||||||
SAE= ;
|
SAE= ;
|
||||||
INTERNAL_JACK=;
|
|
||||||
WITH_LADSPA=;
|
WITH_LADSPA=;
|
||||||
STRIP= ;
|
STRIP= ;
|
||||||
PRODUCT_PKG_DIR=MixBus;
|
PRODUCT_PKG_DIR=MixBus;
|
||||||
@ -62,7 +58,6 @@ while [ $# -gt 0 ] ; do
|
|||||||
shift ;;
|
shift ;;
|
||||||
--public) WITH_NLS= ;
|
--public) WITH_NLS= ;
|
||||||
SAE= ;
|
SAE= ;
|
||||||
INTERNAL_JACK=;
|
|
||||||
WITH_LADSPA=1;
|
WITH_LADSPA=1;
|
||||||
STRIP= ;
|
STRIP= ;
|
||||||
PRODUCT_PKG_DIR=Ardour;
|
PRODUCT_PKG_DIR=Ardour;
|
||||||
@ -70,30 +65,23 @@ while [ $# -gt 0 ] ; do
|
|||||||
shift ;;
|
shift ;;
|
||||||
--allinone) SAE= ;
|
--allinone) SAE= ;
|
||||||
WITH_NLS= ;
|
WITH_NLS= ;
|
||||||
INTERNAL_JACK=1;
|
|
||||||
WITH_LADSPA=1;
|
WITH_LADSPA=1;
|
||||||
STRIP= ;
|
STRIP= ;
|
||||||
PRODUCT_PKG_DIR=Ardour ;
|
PRODUCT_PKG_DIR=Ardour ;
|
||||||
shift ;;
|
shift ;;
|
||||||
--test) SAE= ; INTERNAL_JACK=; WITH_LADSPA=; STRIP= ; shift ;;
|
--test) SAE= ; WITH_LADSPA=; STRIP= ; shift ;;
|
||||||
|
|
||||||
#
|
#
|
||||||
# specific build flags
|
# specific build flags
|
||||||
#
|
#
|
||||||
|
|
||||||
--nojack) INTERNAL_JACK= ; shift ;;
|
|
||||||
--noladspa) WITH_LADSPA= ; shift ;;
|
--noladspa) WITH_LADSPA= ; shift ;;
|
||||||
--nostrip) STRIP= ; shift ;;
|
--nostrip) STRIP= ; shift ;;
|
||||||
--sysdeps) PRINT_SYSDEPS=1; shift ;;
|
--sysdeps) PRINT_SYSDEPS=1; shift ;;
|
||||||
--nls) WITH_NLS=1 ; shift ;;
|
--nls) WITH_NLS=1 ; shift ;;
|
||||||
--external_jack) EXTERNAL_JACK=$2; shift ; shift ;;
|
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ x$EXTERNAL_JACK != x -a x$INTERNAL_JACK != x ] ; then
|
|
||||||
echo "It makes no sense to package JACK internally and externally. Please pick one."
|
|
||||||
fi
|
|
||||||
|
|
||||||
BUILD_ROOT=../../build
|
BUILD_ROOT=../../build
|
||||||
|
|
||||||
#release_version=`grep -m 1 '^VERSION' ../../wscript | cut -d' ' -f 3 | sed "s/'//g"`
|
#release_version=`grep -m 1 '^VERSION' ../../wscript | cut -d' ' -f 3 | sed "s/'//g"`
|
||||||
@ -182,12 +170,8 @@ fi
|
|||||||
# jack in the places where it might be
|
# jack in the places where it might be
|
||||||
#
|
#
|
||||||
|
|
||||||
if test x$INTERNAL_JACK != x ; then
|
env="$env<key>PATH</key><string>/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>"
|
||||||
env="$env<key>ARDOUR_INTERNAL_JACK</key><string>true</string>"
|
env="$env<key>DYLIB_FALLBACK_LIBRARY_PATH</key><string>/usr/local/lib:/opt/lib</string>"
|
||||||
else
|
|
||||||
env="$env<key>PATH</key><string>/usr/local/bin:/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>"
|
|
||||||
env="$env<key>DYLIB_FALLBACK_LIBRARY_PATH</key><string>/usr/local/lib:/opt/lib</string>"
|
|
||||||
fi
|
|
||||||
|
|
||||||
env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</string></dict>"
|
env="<key>LSEnvironment</key><dict>$env<key>ARDOUR_BUNDLED</key><string>true</string></dict>"
|
||||||
|
|
||||||
@ -213,13 +197,9 @@ cp -R Resources $APPROOT
|
|||||||
# installed.
|
# installed.
|
||||||
#
|
#
|
||||||
|
|
||||||
if test x$INTERNAL_JACK != x ; then
|
cp startup_script $APPROOT/MacOS/Ardour3
|
||||||
MAIN_EXECUTABLE=Ardour3
|
chmod 775 $APPROOT/MacOS/Ardour3
|
||||||
else
|
MAIN_EXECUTABLE=Ardour3.bin
|
||||||
cp startup_script $APPROOT/MacOS/Ardour3
|
|
||||||
chmod 775 $APPROOT/MacOS/Ardour3
|
|
||||||
MAIN_EXECUTABLE=Ardour3.bin
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Copying ardour executable ...."
|
echo "Copying ardour executable ...."
|
||||||
cp $BUILD_ROOT/gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE
|
cp $BUILD_ROOT/gtk2_ardour/ardour-$release_version $APPROOT/MacOS/$MAIN_EXECUTABLE
|
||||||
@ -235,13 +215,6 @@ cp typeArdour.icns $Resources/
|
|||||||
if test x$STRIP != x ; then
|
if test x$STRIP != x ; then
|
||||||
strip $APPROOT/MacOS/Ardour3
|
strip $APPROOT/MacOS/Ardour3
|
||||||
fi
|
fi
|
||||||
if test x$INTERNAL_JACK != x ; then
|
|
||||||
if [ -f /usr/local/lib/jack/jack_coreaudio.so ] ; then
|
|
||||||
cp /usr/local/lib/jack/jack_coreaudio.so $Frameworks
|
|
||||||
cp /usr/local/bin/jackd $APPROOT/MacOS
|
|
||||||
JACK_SHARED_OBJECTS="$Frameworks/*.so"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# copy locale files
|
# copy locale files
|
||||||
if test x$WITH_NLS != x ; then
|
if test x$WITH_NLS != x ; then
|
||||||
@ -336,24 +309,21 @@ cp $BUILD_ROOT/libs/vamp-plugins/libardourvampplugins.dylib $Frameworks
|
|||||||
|
|
||||||
while [ true ] ; do
|
while [ true ] ; do
|
||||||
missing=false
|
missing=false
|
||||||
for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Plugins/*.so ; do
|
for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Panners/*.dylib $Plugins/*.so ; do
|
||||||
if ! file $file | grep -qs Mach-O ; then
|
if ! file $file | grep -qs Mach-O ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if test x$INTERNAL_JACK != x ; then
|
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
|
||||||
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)"`
|
# echo -n "."
|
||||||
else
|
|
||||||
# do not include libjack
|
|
||||||
deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | grep -v 'libjack\.'`
|
|
||||||
fi
|
|
||||||
echo -n "."
|
|
||||||
for dep in $deps ; do
|
for dep in $deps ; do
|
||||||
base=`basename $dep`
|
base=`basename $dep`
|
||||||
if ! test -f $Frameworks/$base; then
|
if ! test -f $Frameworks/$base; then
|
||||||
if echo $dep | grep -sq '^libs' ; then
|
if echo $dep | grep -sq '^libs' ; then
|
||||||
cp $BUILD_ROOT/$dep $Frameworks
|
cp $BUILD_ROOT/$dep $Frameworks
|
||||||
|
echo "$BUILD_ROOT/$dep => $Frameworks"
|
||||||
else
|
else
|
||||||
cp $dep $Frameworks
|
cp $dep $Frameworks
|
||||||
|
echo "$dep => $Frameworks"
|
||||||
fi
|
fi
|
||||||
missing=true
|
missing=true
|
||||||
fi
|
fi
|
||||||
@ -406,9 +376,6 @@ done
|
|||||||
# now fix up the executables
|
# now fix up the executables
|
||||||
echo "Fixing up executable dependency names ..."
|
echo "Fixing up executable dependency names ..."
|
||||||
executables=$MAIN_EXECUTABLE
|
executables=$MAIN_EXECUTABLE
|
||||||
if test x$INTERNAL_JACK != x ; then
|
|
||||||
executables="$executables jackd"
|
|
||||||
fi
|
|
||||||
if test x$SAE != x ; then
|
if test x$SAE != x ; then
|
||||||
executables="$executables"
|
executables="$executables"
|
||||||
fi
|
fi
|
||||||
@ -416,17 +383,10 @@ fi
|
|||||||
for exe in $executables; do
|
for exe in $executables; do
|
||||||
EXE=$APPROOT/MacOS/$exe
|
EXE=$APPROOT/MacOS/$exe
|
||||||
changes=""
|
changes=""
|
||||||
if test x$INTERNAL_JACK != x ; then
|
for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
|
||||||
for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}'` ; do
|
base=`basename $lib`
|
||||||
base=`basename $lib`
|
changes="$changes -change $lib @executable_path/../Frameworks/$base"
|
||||||
changes="$changes -change $lib @executable_path/../Frameworks/$base"
|
done
|
||||||
done
|
|
||||||
else
|
|
||||||
for lib in `otool -L $EXE | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
|
|
||||||
base=`basename $lib`
|
|
||||||
changes="$changes -change $lib @executable_path/../Frameworks/$base"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
if test "x$changes" != "x" ; then
|
if test "x$changes" != "x" ; then
|
||||||
install_name_tool $changes $EXE
|
install_name_tool $changes $EXE
|
||||||
fi
|
fi
|
||||||
@ -434,25 +394,30 @@ done
|
|||||||
|
|
||||||
echo "Fixing up library names ..."
|
echo "Fixing up library names ..."
|
||||||
# now do the same for all the libraries we include
|
# now do the same for all the libraries we include
|
||||||
for dylib in $JACK_SHARED_OBJECTS $Frameworks/*.dylib $Frameworks/modules/*.so $Surfaces/*.dylib ; do
|
for libdir in $Frameworks $Frameworks/modules $Surfaces $Panners ; do
|
||||||
# skip symlinks
|
|
||||||
if test ! -L $dylib ; then
|
echo "Now working on libraries in $libdir ..."
|
||||||
|
|
||||||
|
libbase=`basename $libdir`
|
||||||
|
|
||||||
|
for dylib in $libdir/*.dylib $libdir/*.so ; do
|
||||||
|
|
||||||
# change all the dependencies
|
# skip symlinks
|
||||||
|
|
||||||
|
if test -L $dylib ; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# change all the dependencies
|
||||||
|
|
||||||
|
echo "Looking at " $dylib
|
||||||
|
|
||||||
changes=""
|
changes=""
|
||||||
if test x$INTERNAL_JACK != x ; then
|
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
|
||||||
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}'` ; do
|
base=`basename $lib`
|
||||||
base=`basename $lib`
|
changes="$changes -change $lib @executable_path/../$libbase/$base"
|
||||||
changes="$changes -change $lib @executable_path/../Frameworks/$base"
|
done
|
||||||
done
|
|
||||||
else
|
|
||||||
for lib in `otool -L $dylib | egrep "($GTKQUARTZ_ROOT|/opt/|/local/|libs/)" | awk '{print $1}' | grep -v 'libjack\.'` ; do
|
|
||||||
base=`basename $lib`
|
|
||||||
changes="$changes -change $lib @executable_path/../Frameworks/$base"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$changes" != x ; then
|
if test "x$changes" != x ; then
|
||||||
if install_name_tool $changes $dylib ; then
|
if install_name_tool $changes $dylib ; then
|
||||||
:
|
:
|
||||||
@ -460,12 +425,13 @@ for dylib in $JACK_SHARED_OBJECTS $Frameworks/*.dylib $Frameworks/modules/*.so $
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# now the change what the library thinks its own name is
|
# now the change what the library thinks its own name is
|
||||||
|
|
||||||
base=`basename $dylib`
|
base=`basename $dylib`
|
||||||
install_name_tool -id @executable_path/../Frameworks/$base $dylib
|
install_name_tool -id @executable_path/../$libdir/$base $dylib
|
||||||
fi
|
echo "Updated linkage to self in $dylib to @executable_path/../$libbase/$base"
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -492,12 +458,7 @@ elif [ x$MIXBUS != x ] ; then
|
|||||||
echo "Creating Mixbus packaging directory"
|
echo "Creating Mixbus packaging directory"
|
||||||
mv $APPDIR $PRODUCT_PKG_DIR/
|
mv $APPDIR $PRODUCT_PKG_DIR/
|
||||||
cp MixBus_Install_QuickStart.pdf "$PRODUCT_PKG_DIR/Mixbus Install & Quick Start Guide.pdf"
|
cp MixBus_Install_QuickStart.pdf "$PRODUCT_PKG_DIR/Mixbus Install & Quick Start Guide.pdf"
|
||||||
|
|
||||||
if [ -x $EXTERNAL_JACK != x ] ; then
|
|
||||||
cp $EXTERNAL_JACK $PRODUCT_PKG_DIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
# create dmg
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "Creating $APPNAME packaging directory"
|
echo "Creating $APPNAME packaging directory"
|
||||||
|
Loading…
Reference in New Issue
Block a user