subsurface/packaging/macosx
Dirk Hohndel f481622156 Yet more changes to create localized builds for Mac
It turns out that we need aliases for all the languages. And more fiddling
when creating the dmg. And a specialized MacPorts build with the install
path as prefix. What this basically means is that our app will be
correctly localized iff run as /Applications/Subsurface.app
Otherwise the gtk default texts (on buttons for example) may or may not be
translated.

One remaining issue is that apparently Gtk's Mac integration triggers on
the untranslated name Help the Menu tree in order to work. Yet we can't
easily tell the app not to translate that word as the translations are
done internally in gtk - we'd basicall have to build special subsurface.mo
files for Mac that don't contain a translation of the word "Help" for this
to work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-10-19 12:58:59 -07:00
..
Info.plist Bumped version to 2.1-rc2 2012-10-18 22:33:36 -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 Yet more changes to create localized builds for Mac 2012-10-19 12:58:59 -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.sh Redoing the Mac bundling 2012-10-16 21:37:43 -07:00

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

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.

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

 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)