summaryrefslogtreecommitdiffstats
path: root/packaging
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-19 12:53:08 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-10-19 12:58:59 -0700
commitf481622156a0f953d5d44e5497377cf7f84f27b5 (patch)
treeb34e877e795eaed10c92564851998c48d7a232bf /packaging
parentcaccbfb6e989e0b94d22b44c2ac2cd7274ba8059 (diff)
downloadsubsurface-f481622156a0f953d5d44e5497377cf7f84f27b5.tar.gz
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>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/macosx/README15
-rw-r--r--packaging/macosx/subsurface.bundle10
2 files changed, 21 insertions, 4 deletions
diff --git a/packaging/macosx/README b/packaging/macosx/README
index a1a7cdad5..241057fca 100644
--- a/packaging/macosx/README
+++ b/packaging/macosx/README
@@ -5,9 +5,20 @@ 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 /Applications/Subsurface.app
+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
-------
@@ -16,6 +27,7 @@ Caveats
$ 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
@@ -24,4 +36,5 @@ Without the builtin modules the installed application fails to find the modules
$ 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)
diff --git a/packaging/macosx/subsurface.bundle b/packaging/macosx/subsurface.bundle
index bff9c962e..7cbeb9ee0 100644
--- a/packaging/macosx/subsurface.bundle
+++ b/packaging/macosx/subsurface.bundle
@@ -12,13 +12,13 @@
defined by jhbuild, so it you are not using jhbuild you can
either define your own or just hardcode the path here.
-->
- <prefix name="default">/opt/local</prefix>
+ <prefix name="default">/Applications/Subsurface.app/Contents/Resources</prefix>
<!-- The project directory is the default location of the created
app. If you leave out the path, the current directory is
used. Note the usage of an environment variable here again.
-->
- <destination overwrite="yes">/Applications</destination>
+ <destination overwrite="yes">./staging</destination>
<image>
<!-- Not implemented yet (DMG image). -->
@@ -82,14 +82,18 @@
want to copy in to the bundle. The "dest" attribute is
optional, as usual. Bundler will find all translations of that
library/program under the indicated directory and copy them.-->
+ <translations name="subsurface">
+ ${prefix}/share/locale
+ </translations>
<translations name="gtk20">
${prefix}/share/locale
</translations>
+ <!--
<data dest="${bundle}/Contents/Resources/share/locale">
${project}/Subsurface.app/Contents/Resources/share/locale
</data>
-
+ -->
<!-- Data to copy in, usually Glade/UI files, images, sounds files
etc. The destination inside the bundle can be specified if the
files should end up at a different location, by using the