Difference between revisions of "MacOS/Quartz"

From GnuCash
Jump to: navigation, search
(Preliminaries: Removed items related to libxml-py, no longer needed; added changing $PATH for jhbuild after installing python on Tiger)
(Preliminaries: Updated requirements for Tiger users)
Line 13: Line 13:
  
 
==Preliminaries==
 
==Preliminaries==
Tiger or newer is '''''required''''' for gtk-osx.
+
Tiger or newer is '''''required''''' for gtk-osx, as is XCode 2.3 or better.
  
 
Download http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom into your home directory.
 
Download http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom into your home directory.
Line 21: Line 21:
 
Go to http://live.gnome.org/GTK%2B/OSX/BuildInstructions and follow the instructions up through running <tt>jhbuild bootstrap</tt>.  
 
Go to http://live.gnome.org/GTK%2B/OSX/BuildInstructions and follow the instructions up through running <tt>jhbuild bootstrap</tt>.  
  
You need Python 2.5 to run jhbuild past bootstrap. This is already part of Leopard (OSX 10.5), but Tiger (10.4) provided Python 2.3, so the gtk-osx maintainer has included logic to make a new python for Tiger users. However, when you run jhbuild, it will still run the first python it encounters on your regular path. You probably don't want to always use this new python (it's a minimal installation just to run jhbuild), so you can run:
+
Special instructions for Tiger Users:
 +
 
 +
You need Python 2.5 to run jhbuild past bootstrap. This is already part of Leopard (OSX 10.5), but Tiger (10.4) provided Python 2.3, so bootstrap builds a new one for Tiger users. However, when you run jhbuild, it will still run the first python it encounters on your regular path. You probably don't want to always use this new python (it's a minimal installation just to run jhbuild), so you can run:
  
 
<tt>
 
<tt>
Line 28: Line 30:
 
from the prompt, or add it to your .bashrc and call <tt>source .bashrc</tt>.
 
from the prompt, or add it to your .bashrc and call <tt>source .bashrc</tt>.
  
If you have set <tt>$MACOSX_DEPLOYMENT_TARGET</tt> to something other than your running version of OSX, you may get some odd errors. I recommend undefining it while building gnucash.
+
Tiger users will need to retrieve and install http://downloads.sourceforge.net/cups/cups-1.2.12.dmg
  
 
==Building==
 
==Building==

Revision as of 23:31, 4 May 2009

Overview

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.


I've succeeded in building this under various incarnations of Leopard while perfecting the modulesets, always on a Mac Pro... but it ought to work on any Mac running Tiger or Leopard.

The default configuration builds in your home folder. On my system, I build in /usr/local/src/gnome and install to /usr/local/gtk. If you want to do that, uncomment the checkoutroot and prefix lines in .jhbuildrc-custom, then create the folders up front and give yourself ownership. If you don't know how to do that, then you should probably leave it the way it is.

Preliminaries

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

Download http://github.com/jralls/gnucash-on-osx/raw/master/.jhbuildrc-custom into your home directory.

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.

Go to http://live.gnome.org/GTK%2B/OSX/BuildInstructions and follow the instructions up through running jhbuild bootstrap.

Special instructions for Tiger Users:

You need Python 2.5 to run jhbuild past bootstrap. This is already part of Leopard (OSX 10.5), but Tiger (10.4) provided Python 2.3, so bootstrap builds a new one for Tiger users. However, when you run jhbuild, it will still run the first python it encounters on your regular path. You probably don't want to always use this new python (it's a minimal installation just to run jhbuild), so you can run:

alias jhbuild='PATH=~/gtk/inst/bin:$PATH jhbuild' from the prompt, or add it to your .bashrc and call source .bashrc.

Tiger users will need to retrieve and install http://downloads.sourceforge.net/cups/cups-1.2.12.dmg

Building

Once all of the preliminaries are complete, run:

$> jhbuild build


Running from the commandline

Now you're ready to try it out:

$> $PREFIX/bin/gnucash

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://github.com/jralls/gnucash-on-osx/raw/master/ige-mac-bundler.tar.gz, unpack it, cd into the ige-mac-bundler directory, and make install
Download http://github.com/jralls/gnucash-on-osx/raw/master/gnucash-bundler.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.