Difference between revisions of "MacOS/Quartz"

From GnuCash
Jump to: navigation, search
(Preliminaries: Better description of .jhbuildrc-custom)
(Overview: Add cups link)
Line 1: Line 1:
 
==Overview==
 
==Overview==
 
[http://downloads.sourceforge.net/sourceforge/gnucash/Gnucash-2.2.9.dmg Gnucash-2.2.9.dmg]''' is now available as a binary download from the Gnucash project at Sourceforge.'''  
 
[http://downloads.sourceforge.net/sourceforge/gnucash/Gnucash-2.2.9.dmg Gnucash-2.2.9.dmg]''' is now available as a binary download from the Gnucash project at Sourceforge.'''  
Release notes are included in the disk-image. MacOSX 10.4 (Tiger) users must still upgrade CUPS (see below) to run Gnucash. '''For virtually all users it is more appropriate to download the binary rather than to use the procedure described here.'''
+
Release notes are included in the disk-image. MacOSX 10.4 (Tiger) users must still [http://downloads.sourceforge.net/cups/cups-1.2.12.dmg upgrade to CUPS-1.2.12] to run Gnucash. '''For virtually all users it is more appropriate to download the binary rather than to use the procedure described here.'''
  
 
GnuCash can be built to run more or less natively on OSX -- meaning without X11. Better yet, the build is almost automatic.
 
GnuCash can be built to run more or less natively on OSX -- meaning without X11. Better yet, the build is almost automatic.

Revision as of 23:09, 20 August 2009

Overview

Gnucash-2.2.9.dmg is now available as a binary download from the Gnucash project at Sourceforge. Release notes are included in the disk-image. MacOSX 10.4 (Tiger) users must still upgrade to CUPS-1.2.12 to run Gnucash. For virtually all users it is more appropriate to download the binary rather than to use the procedure described here.

GnuCash can be built to run more or less natively on OSX -- meaning without X11. Better yet, the build is almost automatic.

You can do this also with MacPorts: The details are described at [MacOSX/MacPortsDetail]. If you already have MacPorts installed, you should use that procedure, as gtk-osx doesn't work well with a MacPorts installation.

If you want to have a clickable GnuCash.app to put in your Applications folder, this is the solution to use. If you want to be able to easily customize your installation, this is also the solution for you. Don't want all of the extra stuff that MacPorts drags in? Well, this might be a bit better... but GnuCash is notorious for its huge list of dependencies. Want to keep up with the latest work from the Gnome developers? This solution gets many of its packages directly from source-code-control... That's a double-edged sword, of course, because if a build gets broken, you're pretty well stuck until the developers for that package fix it.

This build now integrates Gnucash menus with the mac menubar at the top of the screen. About, Preferences, and Quit are in the "GnuCash" menu (it's named "gnucash-bin" when you run from the command line) in standard Mac style. Standard accelerator keys like Command-Q (quit), Command-S (save), and Command-O (Open) now work as well.

The build scripts have been tested on Leopard running on Intel and Tiger running on PowerPC.

Support

This procedure is related to the GTK-OSX project at SourceForge, http://gtk-osx.sourceforge.net/ There is a forum, a users mailing list, and a tracker for bugs, patches, and enhancement requests. If you have problems or suggestions, that's the place to go.

Preliminaries

Tiger or newer is required for gtk-osx, as is XCode 2.3 or better.

This procedure uses GTK-OSX, which in turn uses a program called jhbuild.

Download .jhbuildrc-custom into your home directory. It reconfigures jhbuild for building gnucash.

Note that by default, jhbuild will put everything into your home directory. I prefer to build and install into /usr/local, so you'll find commented out settings to do it that way at the top of .jhbuildrc-custom. You can uncomment these and change them to whatever you like -- or leave them as they are. If you use the /usr/local/gtk and /usr/local/src/gnome settings, you will need to create them and chmod them with sudo before you can use them, of course.

Go to the GTK-OSX Build Instructions and follow the instructions up through running jhbuild bootstrap.

Tiger users will need to retrieve and install CUPS-1.2.12.

Building

Once all of the preliminaries are complete, run:

$> jhbuild build

You also need to $> mkdir $PREFIX/tmp

Running from the commandline

Now you're ready to try it out:

$ $PREFIX/bin/gnucash

($PREFIX is the path to where you've built gtk; you can fill it in yourself or use jhbuild shell to set it for you.)

Making a Bundle

So far so good, but you don't really want to have to open a Terminal window every time you want to use GnuCash, now do you? Of course not. You want a nice icon in your Applications folder (and maybe in the Dock) to click on when you run GnuCash. Here's how to do this:

Download the bundler from http://downloads.sourceforge.net/sourceforge/gtk-osx/ige-mac-bundler-0.5.2.tar.gz, unpack it, cd into the ige-mac-bundler directory, and make install
Download http://downloads.sourceforge.net/sourceforge/gtk-osx/gnucash-bundler-1.0.3.tar.gz and unpack it.
cd gnucash-bundler
Look through gnucash-launcher and gnucash.bundle and adjust the paths to match your installation.
make gnucash-launcher executable (chmod +x gnucash-launcher)
execute jhbuild shell to set up the environment for the bundler
export PATH=$PREFIX/bin:$PATH because jhbuild shell doesn't do this for some reason
ige-mac-bundler gnucash.bundle
exit

And your bundle should be ready to go. Try GnuCash.app/Contents/MacOSX/GnuCash from the command-line so that you can see any error messages. If that works, try open GnuCash.app. If that works, then you can move GnuCash.app to your Applications folder and it's ready to use. (If it doesn't, error messages are written to the console log. You can run IGE_DEBUG_LAUNCHER=1 open Gnucash.app to see what the launcher script is doing wrong.) Don't move or remove the installation directory (~/gtk/inst by default): Both dbus and GnuCash have links pointing into it which can't at present be changed.