diff options
-rw-r--r-- | README | 39 | ||||
-rw-r--r-- | packaging/macosx/README | 8 | ||||
-rwxr-xr-x | packaging/macosx/make-package.sh | 29 |
3 files changed, 57 insertions, 19 deletions
@@ -34,11 +34,13 @@ On Debian the package names are different; try libxml2-dev libgtk2.0-dev glib-2.0 libgconf2-dev, but it seems the cairo package at least in Squeeze is too old. -You also need to have libdivecomputer installed, which goes something like this: +You also need to have libdivecomputer version 0.2 installed, which goes +something like this: git clone \ git://libdivecomputer.git.sourceforge.net/gitroot/libdivecomputer/libdivecomputer cd libdivecomputer +git checkout v0.2.0 autoreconf --install ./configure make @@ -64,25 +66,14 @@ mingw32-configure mingw32-make sudo mingw32-make install -Jef Driesen, the developer behind libdivecomputer, provided his build -instructions on Windows (which are different from what I use): +Once you have built and installed libdivecomputer you can use -./configure --host=i586-mingw32msvc --prefix=$HOME/local -PKG_CONFIG_LIBDIR='/opt/i586-mingw32msvc/lib/pkgconfig' -make -make install - -These use different paths than what I get on Fedora. To do this the way -Jef does I would need - -PKG_CONFIG_LIBDIR='/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig' +sh packaging/Windows/mingw-make.sh -Either way, once you have built libdivecomputer you can use sh -packaging/Windows/mingw-make.sh to then build subsurface. +to then build subsurface. Building subsurface on a Mac - -Provided by Henrik Brautaset Aronsen +---------------------------- Install MacPorts and install the dependencies from MacPorts: sudo port install gtk2 +no_x11 +quartz -x11 libusb gtk-osx-application \ automake autoconf libtool @@ -101,9 +92,12 @@ cd subsurface PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/" make sudo make install-macosx +More instructions on how to create a Subsurface DMG can be found in +packaging/macosx/README + Usage: ------- +====== Install and start from the desktop (or you can run it locally from the build directory). @@ -192,6 +186,8 @@ Atomic Aquatics: * Cobalt +More detailed end user instructions can be found at Documentation/user-manual.html + Contributing: ------------- @@ -230,3 +226,12 @@ where that header line really should be meaningful, and really should be just one line. That header line is what is shown by tools like gitk and shortlog, and should summarize the change in one readable line of text, independently of the longer explanation. + + + +CREDITS: +======== + +This file was originally started by Linus. +The initial instructions for building on a Mac were provided by Henrik Brautaset Aronsen +Jef Driessen helped creating the cross-building instructions for Windows diff --git a/packaging/macosx/README b/packaging/macosx/README index c2c6caaef..47d49661c 100644 --- a/packaging/macosx/README +++ b/packaging/macosx/README @@ -1,6 +1,9 @@ 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 @@ -19,6 +22,7 @@ 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 ; \ @@ -26,12 +30,12 @@ done Finally, you need to change the IDs of the libraries: -cd packagin/macosx/staging/Subsurface.app/Contents 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. - hdiutil create -volname Subsurface -srcfolder staging Subsurface-<version>.dmg +cd ../../.. +hdiutil create -volname Subsurface -srcfolder staging Subsurface-<version>.dmg Caveats ------- diff --git a/packaging/macosx/make-package.sh b/packaging/macosx/make-package.sh new file mode 100755 index 000000000..328e73454 --- /dev/null +++ b/packaging/macosx/make-package.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# this simply automates the steps to create a DMG we can ship +# for this to work you need to have a custom build of MacPorts / gtk / etc +# with prefix=/Applications/Subsurface.app/Contents/Resources +# yes, that's a major hack, but otherwise gettext cannot seem to find +# the gtk related .mo files and localization is only partial +# +# run this from the packaging/macosx directory + +VERSION=`grep -1 CFBundleVersionString Info.plist | tail -1 | cut -d\> -f 2 | cut -d\< -f 1` +BUNDLER="../../../.local/bin/gtk-mac-bundler" + +${BUNDLER} subsurface.bundle +cd 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 +for i in Resources/lib/*.dylib; +do + install_name_tool -id "@executable_path/../$i" $i +done + +cd ../../.. +if [ -f Subsurface-${VERSION}.dmg ]; then + mv Subsurface-${VERSION}.dmg Subsurface-${VERSION}.dmg.bak +fi +hdiutil create -volname Subsurface -srcfolder staging Subsurface-${VERSION}.dmg + |