diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-22 04:30:29 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-22 04:30:29 +0000 |
commit | 7b5573f1850902f22eeb17cbe2826b9536f87c7b (patch) | |
tree | af2be6f3a05f740465d6af290ee33e40ad4282c9 /tools/osx_packaging/osx_build | |
parent | 4f4d82c998fa9297b3f290fd7641882007891290 (diff) |
changes to support packaging of the GTK-Quartz version of Ardour for OS X
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2338 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'tools/osx_packaging/osx_build')
-rwxr-xr-x | tools/osx_packaging/osx_build | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build new file mode 100755 index 0000000000..44625a5234 --- /dev/null +++ b/tools/osx_packaging/osx_build @@ -0,0 +1,165 @@ +#!/bin/sh + +# script for pulling together a MacOSX app bundle. + +version=`grep -m 1 '^ardour_version' ../../SConstruct | cut -d' ' -f 3 | sed "s/'//g"` +echo "Version is $version" + +# setup directory structure + +APPROOT=Ardour2.app/Contents + +echo "Removing old Ardour2.app tree ..." + +rm -rf Ardour2.app + +echo "Building new app directory structure ..." + +mkdir -p Ardour2.app/Contents/MacOS +mkdir -p Ardour2.app/Contents/Resources +mkdir -p Ardour2.app/Contents/Frameworks + +# copy static files + +cp Info.plist $APPROOT +cp PkgInfo $APPROOT +cp -r Resources/* $APPROOT/Resources + +Frameworks=$APPROOT/Frameworks +Resources=$APPROOT/Resources +Shared=$Resources/share +Etc=$Resources/etc + +if test ! -d $Frameworks ; then + mkdir -p $Frameworks +fi +if test ! -d $Shared/templates ; then + mkdir -p $Shared/templates +fi +if test ! -d $Etc ; then + mkdir -p $Etc +fi + +# copy executable +echo "Copying Ardour executable ..." +cp ../../gtk2_ardour/ardour-$version $APPROOT/MacOS/Ardour2 + +# copy everything related to gtk-quartz +echo "Copying GTK-Quartz tree ..." +cp -R /opt/gtk/lib/*.dylib $Frameworks/ +cp -R /opt/gtk/etc/* $Etc + +echo "Copying Ardour libraries into .app ..." +cp ../../libs/pbd/libpbd.dylib $Frameworks +cp ../../libs/midi++2/libmidi++.dylib $Frameworks +cp ../../libs/sigc++2/libsigc++2.dylib $Frameworks +cp ../../libs/soundtouch/libsoundtouch.dylib $Frameworks +cp ../../libs/libsndfile/libsndfile-ardour.dylib $Frameworks +cp ../../libs/libgnomecanvasmm/libgnomecanvasmm.dylib $Frameworks +cp ../../libs/gtkmm2ext/libgtkmm2ext.dylib $Frameworks +cp ../../libs/glibmm2/libglibmm2.dylib $Frameworks +cp ../../libs/gtkmm2/atk/libatkmm.dylib $Frameworks +cp ../../libs/gtkmm2/gdk/libgdkmm2.dylib $Frameworks +cp ../../libs/gtkmm2/gtk/libgtkmm2.dylib $Frameworks +cp ../../libs/gtkmm2/pango/libpangomm.dylib $Frameworks +cp ../../libs/ardour/libardour.dylib $Frameworks + +# this one is special - we will set GTK_PATH to $Frameworks/clearlooks +cp ../../libs/clearlooks/libclearlooks.dylib $Frameworks +mkdir -p $Frameworks/clearlooks/engines +(cd $Frameworks/clearlooks/engines && ln -s ../../libclearlooks.dylib libclearlooks.dylib && ln -s ../../libclearlooks.dylib libclearlooks.so) + +# push in ardour-required 3rd party libraries + +cp /opt/local/lib/libsamplerate.0.dylib $Frameworks +cp /opt/local/lib/liblrdf.2.dylib $Frameworks +cp /opt/local/lib/libraptor.1.dylib $Frameworks +cp /opt/local/lib/liblo.0.dylib $Frameworks + +# JACK + +cp /usr/local/lib/libjack.0.dylib $Frameworks +cp /usr/local/bin/jackd $APPROOT/MacOS/jackd + +# XXX STILL NEED TO DO SURFACES AND PANNERS + +cp ../../libs/surfaces/control_protocol/libardour_cp.dylib $Frameworks + +echo "Copying other stuff to Ardour2.app ..." + +cp ../../gtk2_ardour/ardour.bindings $Resources +cp ../../gtk2_ardour/ardour.menus $Resources +cp ../../gtk2_ardour/ardour-sae.menus $Resources +cp ../../ardour_system.rc $Resources +cp ../../gtk2_ardour/ardour2_ui_default.conf $Resources +cp ../../gtk2_ardour/ardour2_ui_light.rc $Resources +cp ../../gtk2_ardour/ardour2_ui_dark.rc $Resources + +cp -r ../../gtk2_ardour/icons $Resources +cp -r ../../gtk2_ardour/pixmaps $Resources + +# share stuff + +cp -R ../../gtk2_ardour/splash.png $Shared +cp ../../templates/*.template $Shared/templates/ + +# go through and recursively remove any .svn dirs in the bundle +for svndir in `find Ardour2.app -name .svn -type dir`; do + rm -rf $svndir +done + +# now fix up the executables +for exe in Ardour2 jackd ; do + EXE=$APPROOT/MacOS/$exe + changes="" + for lib in `otool -L $EXE | egrep '(/opt/gtk|/local/|libs/)' | awk '{print $1}'` ; do + base=`basename $lib` + changes="$changes -change $lib @executable_path/../Frameworks/$base" + done + if test "x$changes" != "x" ; then + install_name_tool $changes $EXE + fi +done + +echo "Fixing up library names ..." +# now do the same for all the libraries we include +for dylib in $Frameworks/*.dylib ; do + # skip symlinks + if test ! -L $dylib ; then + + # change all the dependencies + + changes="" + for lib in `otool -L $dylib | egrep '(/opt/gtk|/local/|libs/)' | awk '{print $1}'` ; do + base=`basename $lib` + changes="$changes -change $lib @executable_path/../Frameworks/$base" + done + + if test "x$changes" != x ; then + if install_name_tool $changes $dylib ; then + : + else + exit 1 + fi + fi + + # now the change what the library thinks its own name is + + base=`basename $dylib` + install_name_tool -id @executable_path/../Frameworks/$base $dylib + fi +done + +# make DMG +rm -rf macdist +mkdir "macdist" +cp -r README.rtf COPYING Ardour2.app macdist/ +# reduce size +strip macdist/Ardour2.app/Contents/MacOS/Ardour2 +dmgname="Ardour-$version" +rm -f $dmgname.dmg +echo "Creating DMG" +hdiutil create -fs HFS+ -volname $dmgname -srcfolder macdist $dmgname.dmg + +echo "Done." + |