2012-10-02 03:47:50 +00:00
|
|
|
Creating a Subsurface bundle
|
2012-10-07 14:39:17 +00:00
|
|
|
============================
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2012-10-21 20:38:19 +00:00
|
|
|
(we now have a small shell script that should automate this process;
|
|
|
|
look for make-package.sh)
|
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
After you build Subsurface and install it on your Mac
|
|
|
|
|
|
|
|
make install-macosx
|
|
|
|
|
|
|
|
you need gtk-mac-bundler (this has been tested with version 0.7.3); run
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2012-10-07 14:39:17 +00:00
|
|
|
$ gtk-mac-bundler subsurface.bundle
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
This should install an almost self-contained Subsurface application under
|
2012-10-19 19:53:08 +00:00
|
|
|
./staging/Subsurface.app
|
|
|
|
|
|
|
|
Sadly because of the way gettext accesses the gtk20.mo file, this fails
|
2013-02-15 09:17:27 +00:00
|
|
|
for localized use - so I ended up building MacPorts with
|
2012-10-19 19:53:08 +00:00
|
|
|
-prefix /Applications/Subsurface.app/Contents/Resources
|
|
|
|
And then things work correctly IFF the app gets installed with that path.
|
|
|
|
|
|
|
|
What a pain.
|
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
Worse, gtk-mac-bundler 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:
|
2012-10-21 04:06:35 +00:00
|
|
|
|
2012-10-21 20:38:19 +00:00
|
|
|
cd packaging/macosx/staging/Subsurface.app/Contents
|
2012-10-21 04:06:35 +00:00
|
|
|
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
|
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
Next you should sign your binaries if you plan to use them 10.8 (or later).
|
|
|
|
|
|
|
|
Then you can use git://github.com/dirkhh/yoursway-create-dmg.git to create
|
|
|
|
a DMG (use the readlink-fix branch - unless this has been pulled into the
|
|
|
|
main project by the time you read this).
|
|
|
|
|
|
|
|
Here is roughly how I run this to create the official DMG
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
~/yoursway-create-dmg/create-dmg --background ./Subsurface-Background.png \
|
|
|
|
--window-size 500 300 --icon-size 96 \
|
|
|
|
--volname "Subsurface-${VERSION}" --app-drop-link 380 205 \
|
|
|
|
--volicon ~/subsurface/packaging/macosx/Subsurface.icns \
|
|
|
|
--icon "Subsurface" 110 205 ./Subsurface-${VERSION}.dmg ./staging
|
|
|
|
|
|
|
|
The --volicon doesn't appear to work for me even though it does create the
|
|
|
|
correct file in the DMG. I'm leaving it in here to remind me to
|
|
|
|
investigate this issue.
|
2012-10-19 19:53:08 +00:00
|
|
|
|
2012-10-07 14:39:17 +00:00
|
|
|
Caveats
|
|
|
|
-------
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2012-10-07 14:39:17 +00:00
|
|
|
* You need (at least with MacPorts) to build pango like this:
|
|
|
|
|
|
|
|
$ sudo port install pango +builtin_modules +no_x11 +quartz
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
Without the builtin modules the installed application fails to find the
|
|
|
|
modules and doesn't render any text.
|
|
|
|
|
2012-10-19 19:53:08 +00:00
|
|
|
Also note the comment above about the -prefix
|
2012-10-02 03:47:50 +00:00
|
|
|
|
2012-10-07 14:39:17 +00:00
|
|
|
* 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:
|
2012-10-02 19:13:19 +00:00
|
|
|
|
2012-10-07 14:39:17 +00:00
|
|
|
$ sudo cp /usr/lib/charset.alias /opt/local/lib
|
2012-10-02 19:13:19 +00:00
|
|
|
|
2013-02-15 09:17:27 +00:00
|
|
|
* libdivecomputer needs to be configured with
|
|
|
|
--with-prefix=/Applications/Subsurface.app/Contents/Resources
|
|
|
|
as well.
|