diff options
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/main.cc | 37 | ||||
-rwxr-xr-x | tools/osx_packaging/osx_build | 36 |
3 files changed, 63 insertions, 11 deletions
diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 302283f11c..3c6c766092 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -702,7 +702,6 @@ ARDOUR_UI::check_memory_locking () vbox->pack_start (hbox); hbox.show_all (); - editor->ensure_float (msg); msg.run (); } } diff --git a/gtk2_ardour/main.cc b/gtk2_ardour/main.cc index fb3257a609..c04ffe9969 100644 --- a/gtk2_ardour/main.cc +++ b/gtk2_ardour/main.cc @@ -73,6 +73,7 @@ show_ui_callback (void *arg) #include <mach-o/dyld.h> #include <sys/param.h> +#include <fstream> void fixup_bundle_environment () @@ -121,6 +122,42 @@ fixup_bundle_environment () path += "/../Resources/locale"; localedir = strdup (path.c_str()); + + /* write a pango.rc file and tell pango to use it */ + + path = dir_path; + path += "/../Resources/pango.rc"; + + std::ofstream pangorc (path.c_str()); + if (!pangorc) { + error << string_compose (_("cannot open pango.rc file %1") , path) << endmsg; + } else { + pangorc << "[Pango]\nModuleFiles="; + Glib::ustring mpath = dir_path; + mpath += "/../Resources/pango.modules"; + pangorc << mpath << endl; + + pangorc.close (); + setenv ("PANGO_RC_FILE", path.c_str(), 1); + } + + // gettext charset aliases + + setenv ("CHARSETALIASDIR", path.c_str(), 1); + + // font config + + path = dir_path; + path += "/../Resources/fonts.conf"; + + setenv ("FONTCONFIG_FILE", path.c_str(), 1); + + // GDK Pixbuf loader module file + + path = dir_path; + path += "/../Resources/gdk-pixbuf.loaders"; + + setenv ("GDK_PIXBUF_MODULE_FILE", path.c_str(), 1); } #endif diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 44625a5234..4c8bbe0e36 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -30,15 +30,12 @@ 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 +# only bother to make the longest paths + +mkdir -p $Frameworks/modules +mkdir -p $Shared/templates +mkdir -p $Etc + # copy executable echo "Copying Ardour executable ..." @@ -48,6 +45,23 @@ cp ../../gtk2_ardour/ardour-$version $APPROOT/MacOS/Ardour2 echo "Copying GTK-Quartz tree ..." cp -R /opt/gtk/lib/*.dylib $Frameworks/ cp -R /opt/gtk/etc/* $Etc +echo "Copying all Pango modules ..." +cp -R /opt/gtk/lib/pango/1.6.0/modules/*.so $Frameworks/modules +echo "Copying all GDK Pixbuf loaders ..." +cp -R /opt/gtk/lib/gtk-2.0/2.10.0/loaders/*.so $Frameworks/modules +# charset alias file +cp -R /opt/gtk/lib/charset.alias $Resources + +# generate new Pango module file +cat > pangorc <<EOF +[Pango] +ModulesPath=/opt/gtk/lib/pango/1.6.0/modules +EOF +env PANGO_RC_FILE=pangorc /opt/gtk/bin/pango-querymodules | sed 's?/opt/gtk/lib/pango/1.6.0/modules/?@executable_path/../Frameworks/modules/?' > $Resources/pango.modules +rm pangorc + +# generate a new GDK pixbufs loaders file +sed 's?/opt/gtk/lib/gtk-2.0/2.10.0/loaders/?@executable_path/../Frameworks/modules/?' < /opt/gtk/etc/gtk-2.0/gdk-pixbuf.loaders > $Resources/gdk-pixbuf.loaders echo "Copying Ardour libraries into .app ..." cp ../../libs/pbd/libpbd.dylib $Frameworks @@ -123,7 +137,7 @@ done echo "Fixing up library names ..." # now do the same for all the libraries we include -for dylib in $Frameworks/*.dylib ; do +for dylib in $Frameworks/*.dylib $Frameworks/modules/*.so ; do # skip symlinks if test ! -L $dylib ; then @@ -150,6 +164,8 @@ for dylib in $Frameworks/*.dylib ; do fi done +exit 0 + # make DMG rm -rf macdist mkdir "macdist" |