summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2007-10-04 02:13:42 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2007-10-04 02:13:42 +0000
commit1bded229ccb8e8976fcd702e5417c3565980d5c7 (patch)
tree1952d9942e761c95f460f4a70cdf56f33743b097 /tools
parent5aa2292fd2f80e9615f5a1156b3c3dbc1bd736d9 (diff)
improvements to build system for OSX native
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2511 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'tools')
-rwxr-xr-xtools/osx_packaging/osx_build88
1 files changed, 39 insertions, 49 deletions
diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build
index e20dbe3715..f6fde43e1e 100755
--- a/tools/osx_packaging/osx_build
+++ b/tools/osx_packaging/osx_build
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# script for pulling together a MacOSX app bundle.
@@ -25,13 +25,13 @@ echo "Version is $version"
APPROOT=Ardour2.app/Contents
Frameworks=$APPROOT/Frameworks
Resources=$APPROOT/Resources
+Plugins=$APPROOT/Plugins
Shared=$Resources/share
Etc=$Resources/etc
echo "Removing old Ardour2.app tree ..."
rm -rf Ardour2.app
-rm -rf libstaging
echo "Building new app directory structure ..."
@@ -64,58 +64,14 @@ sed -e "s?@ENV@?$env?g" -e "s?@VERSION@?$version?g" < Info.plist.in > Info.plist
cp Info.plist $APPROOT
cp -R Resources $APPROOT
-# copy all (approved) LADSPA plugins
-#if test x$WITH_JACK != x ; then
-# echo "Copying LADSPA plugins ..."
-# cp -r ladspa/* $APPROOT/Plugins
-#fi
-
-mkdir libstaging
echo "Copying ardour executable ...."
-cp ../../gtk2_ardour/ardour-$version libstaging
-if test x$WITH_JACK != x ; then
- cp /usr/local/lib/jack/jack_coreaudio.so libstaging
- cp /usr/local/bin/jackd libstaging
-fi
-
-cd libstaging
-echo "Evaluating dependencies ..."
-
-while [ true ] ; do
- missing=false
- for file in * ; do
- deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/local/|libs/)"`
- echo -n "."
- for dep in $deps ; do
- if ! test -f `basename $dep` ; then
- if echo $dep | grep -sq '^libs' ; then
- cp ../../../$dep .
- else
- cp $dep .
- fi
- missing=true
- fi
- done
- done
- if test x$missing = xfalse ; then
- # everything has been found
- break
- fi
-done
-echo
-cd ..
-
-# copy executable
-mv libstaging/ardour-$version $APPROOT/MacOS/Ardour2
+cp ../../gtk2_ardour/ardour-$version $APPROOT/MacOS/Ardour2
strip $APPROOT/MacOS/Ardour2
if test x$WITH_JACK != x ; then
- mv libstaging/jackd $APPROOT/MacOS
+ cp /usr/local/lib/jack/jack_coreaudio.so $Frameworks
+ cp /usr/local/bin/jackd $APPROOT/MacOS
fi
-# copy all libraries
-echo "Putting all libraries in place ..."
-mv libstaging/* $Frameworks
-
cp -R $GTKQUARTZ_ROOT/etc/* $Etc
echo "Copying all Pango modules ..."
cp -R $GTKQUARTZ_ROOT/lib/pango/1.6.0/modules/*.so $Frameworks/modules
@@ -124,6 +80,13 @@ cp -R $GTKQUARTZ_ROOT/lib/gtk-2.0/2.10.0/loaders/*.so $Frameworks/modules
# charset alias file
cp -R $GTKQUARTZ_ROOT/lib/charset.alias $Resources
+pwd=`pwd`
+
+if test x$WITH_LADSPA != x ; then
+ echo "Copying `ls ladspa | wc -l` plugins ..."
+ cp -r ladspa/* $Plugins
+fi
+
# generate new Pango module file
cat > pangorc <<EOF
[Pango]
@@ -144,6 +107,33 @@ mkdir -p $Frameworks/clearlooks/engines
cp ../../libs/surfaces/control_protocol/libardour_cp.dylib $Frameworks
+while [ true ] ; do
+ missing=false
+ for file in $APPROOT/MacOS/* $Frameworks/* $Frameworks/modules/* $Plugins/*.so ; do
+ if ! file $file | grep -qs Mach-O ; then
+ continue
+ fi
+ deps=`otool -L $file | awk '{print $1}' | egrep "($GTKQUARTZ_ROOT|/local/|libs/)"`
+ echo -n "."
+ for dep in $deps ; do
+ base=`basename $dep`
+ if ! test -f $Frameworks/$base; then
+ if echo $dep | grep -sq '^libs' ; then
+ cp ../../$dep $Frameworks
+ else
+ cp $dep $Frameworks
+ fi
+ missing=true
+ fi
+ done
+ done
+ if test x$missing = xfalse ; then
+ # everything has been found
+ break
+ fi
+done
+echo
+
echo "Copying other stuff to Ardour2.app ..."
cp ../../gtk2_ardour/ardour.bindings $Resources