subsurface/packaging/macosx
Dirk Hohndel 4ea90fcb0b Add modules file for building prerequisites on MacOS X
This should allow the user to build osm-gps-map with jhbuild (all other
required components are already build by the jhbuild default modules).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-19 16:19:11 -08:00
..
Info.plist Bump version to 2.1 2012-10-22 20:57:57 -07:00
make-package.sh Add quick script to automate Mac dmg creation 2012-10-21 13:40:35 -07:00
PkgInfo Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable. 2011-10-31 09:49:13 +01:00
Read me first.txt Add readme file for MacOSX package 2012-10-04 03:01:27 -07:00
README Add quick script to automate Mac dmg creation 2012-10-21 13:40:35 -07:00
subsurface.bundle Yet more changes to create localized builds for Mac 2012-10-19 12:58:59 -07:00
Subsurface.icns Use the new packaging directory for MacOSX specific files, and provide shell script workaround to make the svg icon reachable. 2011-10-31 09:49:13 +01:00
subsurface.modules Add modules file for building prerequisites on MacOS X 2013-01-19 16:19:11 -08:00
subsurface.sh Redoing the Mac bundling 2012-10-16 21:37:43 -07:00

Creating a Subsurface bundle
============================

(we now have a small shell script that should automate this process;
 look for make-package.sh)

install gtk-mac-bundler (this has been tested with version 0.7.0) and run

  $ gtk-mac-bundler subsurface.bundle

This should install a self-contained Subsurface application under
./staging/Subsurface.app

Sadly because of the way gettext accesses the gtk20.mo file, this fails
for localized use - in that case you need to rebuild MacPorts with
-prefix /Applications/Subsurface.app/Contents/Resources
And then things work correctly IFF the app gets installed with that path.

What a pain.

Worse, gtk-mac-bundler misses fails to catch the .so files that
are part of the gdk-pixbuf loader infrastructure. So we need to
manually adjust the load paths in them:

cd packaging/macosx/staging/Subsurface.app/Contents
for i in Resources/lib/gdk-pixbuf-2.0/2.10.0/loaders/* ; do \
	~/gtk-mac-bundler/bundler/run-install-name-tool-change.sh $i \
	/Applications/Subsurface.app/Contents/Resources Resources change ; \
done

Finally, you need to change the IDs of the libraries:

for i in Resources/lib/*.dylib; do install_name_tool -id "@executable_path/../$i" $i; done

You still need to manually build a DMG if you want to easily distribute this.

cd ../../..
hdiutil create -volname Subsurface -srcfolder staging Subsurface-<version>.dmg

Caveats
-------

* You need (at least with MacPorts) to build pango like this:

  $ sudo port install pango +builtin_modules +no_x11 +quartz

Without the builtin modules the installed application fails to find the modules and doesn't render any text.
Also note the comment above about the -prefix

* It seems that gtk-mac-bundler expects the charset.alias file to be
  in the ${prefix}/lib folder which it isn't with the current version of
  MacPorts. The following fixes that:

  $ sudo cp /usr/lib/charset.alias /opt/local/lib

* libdivecomputer needs to be configured with --with-prefix=/opt/local
  (or /Applications/Subsurface.app/Contents/Resources for localized builds)