|
|
(137 intermediate revisions by 44 users not shown) |
Line 1: |
Line 1: |
− | It is quite possible to run gnucash-1.9.5+ from svn on Mac OS X. This is how I accomplished it (with a bit of help, of course).
| + | {{Lowercase title}} |
| + | == Download, Drag, and Drop == |
| + | Download the current release from the [http://www.gnucash.org/download.phtml download page]. Note that GnuCash 3 and later are supported only on OS X 10.9 (Mavericks) and later; users of Mac OS X 10.5 (Leopard) - 10.8 (Mountain Lion), including those with PowerPC Macs, should be sure to download GnuCash 2.6.21, paying attention to the supported architecture. |
| | | |
− | == Dependencies and Fink ==
| + | Open the disk image and drag GnuCash from there to your applications folder. If you want to retrieve stock prices from the web, double-click on ''Finance Quote Update''. '''This will run a terminal application, even opening Terminal for you. It's a bit of a pain and requires that you have Xcode installed. We're sorry about that, but we haven't been able to figure out a better way.''' |
| | | |
− | Gnucash has a significant number of dependencies. Although it should be entirely possible to install them manually, it's much easier to use fink.
| + | ''Upgrades:'' Same procedure: Download, drag, and drop. If, ''and only if'' you're upgrading from a version before 2.4.0, double click on ''Upgrade Dirs'' in the disk-image. |
| | | |
− | === Fink === | + | == Building yourself == |
| + | Instructions for building a complete Gnucash application, including bundling it for distribution, are at [[MacOS/Quartz]]. |
| | | |
− | [http://fink.sourceforge.net/ Fink] is a package-management tool making it easier to install all your favorite *nix tools and libraries under OS X. It's also the easiest way to run gnucash-1.8 under Mac OS X; in general, gnucash-1.8 installation is as simple as:
| |
− | # download and install fink
| |
− | # follow the instructions to configure fink and allow it to pull from the 'unstable' tree (generally this is not hard)
| |
− | # run 'sudo fink install gnucash'
| |
− | # start up X11 and run 'gnucash &' from an xterm
| |
− | Once a gnucash-2.0 package is available for fink, the process for gnucash-2.0 will be similar. At this time, however, gnucash-1.9 is not yet available in fink and requires a bit more effort on the part of the installer. If running prerelease software for your financial data, downloading and compiling from source, or making minor tweaks to software configuration files by hand makes you uneasy, you might want to stick with 1.8 until 2.0 is available as a fink package. If not, read on.
| |
| | | |
− | ==== Installing dependencies ==== | + | === MacPorts === |
| | | |
− | Note: you probably do need the unstable tree turned on in fink to get some of these packages.
| + | MacPorts is a parallel package manager to make macOS work like Linux. See [[MacOS/MacPortsDetail]] for more information. |
| | | |
− | David Reiser advised me to start with the following fink packages to get my dependencies straightened out:
| + | === HomeBrew === |
| | | |
− | <pre>
| + | A newer and more popular package manager for making macOS work like Linux, [https://brew.sh/ HomeBrew] just redistributes the GnuCash application bundle. You might as well get it from [https://www.gnucash.org here]. |
− | gconf2, gconf2-dev, gconf2-shlibs
| |
− | glib2, glib2-dev, glib2-shlibs
| |
− | gtk+2, gtk+2-dev, gtk+2-shlibs
| |
− | guile16, guile16-dev, guile16-libs, guile16-shlibs, guile16-gtk
| |
− | slib, slib-gu16
| |
− | libart2, libart2-shlibs
| |
− | libglade2, libglade2-shlibs
| |
− | libgnomeprint2.2, libgnomeprint2.2-dev, libgnomeprint2.2-shlibs
| |
− | libgnomeui2, libgnomeui2-dev, libgnomeui2-shlibs
| |
− | libgsf, libgsf-dev
| |
− | gtkhtml3.8.15, gtkhtml3.8.15-dev, gtkhtml3.8.15-shlibs
| |
− | libxml2, libxml2-bin, libxml2-shlibs
| |
− | pango1-dev, pango1-xft2, pango1-xft2, pango1-xft2-shlibs
| |
− | pango1-xft2-ft219, pango1-xft2-ft219-dev, pango1-xft2-ft219-shlibs
| |
− | freetype219, freetype219-shlibs
| |
− | </pre>
| |
| | | |
− | You can probably do this in one fink command, although you may run into circular dependency issues and need to keep trying (fink won't try to reinstall packages that are already installed):
| + | == Final Words == |
− | <pre>
| |
− | fink install gconf2 gconf2-dev gconf2-shlibs glib2 glib2-dev glib2-shlibs gtk+2 gtk+2-dev gtk+2-shlibs guile16 guile16-dev guile16-libs guile16-shlibs guile16-gtk slib slib-gu16 libart2 libart2-shlibs libglade2 libglade2-shlibs libgnomeprint2.2 libgnomeprint2.2-dev libgnomeprint2.2-shlibs libgnomeui2 libgnomeui2-dev libgnomeui2-shlibs libgsf libgsf-dev gtkhtml3.8.15 gtkhtml3.8.15-dev gtkhtml3.8.15-shlibs libxml2 libxml2-bin libxml2-shlibs pango1-dev pango1-xft2 pango1-xft2 pango1-xft2-shlibs pango1-xft2-ft219 pango1-xft2-ft219-dev pango1-xft2-ft219-shlibs freetype219 freetype219-shlibs</pre>
| |
| | | |
− | This will probably pull in other dependencies; although I had all but seven of the packages above installed, my fink command pulled in 58 additional packages and took roughly four hours to complete on a G4/800 with 1 GB of RAM.
| + | If you encounter problems, please check the mailing list archives first and then, if your problem cannot be resolved based on the information found there, report it to the mailing list. Please do remember that GnuCash developers are volunteers and are not responsible for your computer; as such, your help (in the form of exhausting readily available resources before asking for help and in [http://www.catb.org/~esr/faqs/smart-questions.html asking for help in a clear manner]) is appreciated. |
| | | |
− | ===== g-wrap =====
| |
| | | |
− | This is where things start to get a little interesting. g-wrap 1.3.4-14 is the most recent version available via fink. g-wrap 1.3.4 is not compatible with aqbanking / ofxconnect, so if you need that functionality you are advised to download and install a more recent g-wrap yourself. Not having done this, I'm not sure of the exact procedure.
| + | [[Category: MacOS]] |
− | | |
− | To further complicate matters, g-wrap 1.3.4 does not compile with gcc 4.0. To avoid this problem, we will compile both g-wrap and gnucash with gcc 3.3 (by changing the default compiler). Hopefully, this will be as simple as:
| |
− | | |
− | <pre>
| |
− | $ sudo gcc_select 3.3
| |
− | </pre>
| |
− | | |
− | (If this does not work, you probably don't have gcc 3.3 installed. I'm not sure whether XCode or fink is the appropriate place from which to get gcc 3.3, but I had it installed. Fink does have a gcc3.3 virtual package, and that may be a good place to start.)
| |
− | | |
− | Now, I was slightly concerned about whether or not g-wrap might try to interface with the wrong version of guile, so I decided to remove guile 1.4. This may or may not be necessary, but it can be achieved by:
| |
− | <pre>
| |
− | $ sudo fink remove guile guile-dev guile-shlibs
| |
− | </pre>
| |
− | | |
− | As I didn't get any complaints from fink about dependency breakage, I'm guessing that I didn't really need guile 1.4 installed anyhow.
| |
− | | |
− | With those side excursions out of the way, go ahead and install g-wrap:
| |
− | <pre>
| |
− | $ sudo fink install g-wrap g-wrap-dev g-wrap-shlibs
| |
− | </pre>
| |
− | | |
− | == gnucash ==
| |
− | | |
− | === Get the source ===
| |
− | | |
− | Go to an appropriate directory and grab either a tarball from the website or just pull the latest source from [[Subversion svn]]. I did the latter, putting the gnucash tree under my 'src' directory in my Documents folder:
| |
− | | |
− | <pre>
| |
− | $ cd ~/Documents/src/
| |
− | $ svn checkout http://svn.gnucash.org/repo/gnucash/trunk gnucash
| |
− | </pre>
| |
− | | |
− | (If you get '<tt>svn: command not found</tt>', then you don't have Subversion installed; you can install it from fink with '<tt>sudo fink install svn-client-ssl</tt>' or download and expand a tarball from the website. If <tt>~/Documents/src</tt> does not exist, you can either '<tt>mkdir ~/Documents/src</tt>' and then <tt>cd</tt> to it or you can use another location of your choosing, so long as you remember where it is.)
| |
− | | |
− | ===Remove gnucash-1.8===
| |
− | | |
− | Unfortunately, it is necessary to remove gnucash-1.8 prior to compiling 1.9 or later versions. Assuming you used fink to install gnucash-1.8, you may uninstall it with:
| |
− | | |
− | <pre>
| |
− | $ sudo fink remove gnucash
| |
− | </pre>
| |
− | | |
− | If you have never installed 1.8, then you may skip this step. If you installed 1.8 via another method, you will have to uninstall it via another method.
| |
− | | |
− | ===Set environment variables===
| |
− | # Add guile executables that fink puts in an odd location to your path:
| |
− | <pre>
| |
− | $ export PATH=$PATH:/sw/share/guile/1.6/scripts/binoverride/
| |
− | </pre>
| |
− | # Set CFLAGS, CPPFLAGS, and LDFLAGS to make sure that the compile process includes fink-provided libraries:
| |
− | <pre>
| |
− | $ export CFLAGS="-L/sw/lib -I/sw/include"
| |
− | $ export CPPFLAGS="-L/sw/lib -I/sw/include"
| |
− | $ export LDFLAGS="-L/sw/lib"
| |
− | </pre>
| |
− | | |
− | === autogen, configure, make ===
| |
− | | |
− | First, change to the gnucash directory from where you either downloaded the svn tree or expanded the tarball.
| |
− | <pre>
| |
− | $ cd gnucash
| |
− | </pre>
| |
− | | |
− | Feeling lucky? Run:
| |
− | <pre>
| |
− | $ ./autogen.sh ; ./configure --with-g-wrap-prefix=/sw --enable-compile-warnings ; make ; sudo make install
| |
− | </pre>
| |
− | | |
− | Note that this will install in the usual <tt>/usr/local</tt> locations. If you'd prefer to install elsewhere, you may do so by using the <tt>--prefix</tt> switch; I did this because I wanted to keep the prerelease, non-fink built stuff in one place so that it would be easier to remove later when 2.0 becomes available through fink. I created a directory <tt>~/usr</tt> and installed there with:
| |
− | | |
− | <pre>
| |
− | $ ./autogen.sh ; ./configure --with-g-wrap-prefix=/sw --enable-compile-warnings --prefix=~/usr ; make install
| |
− | </pre>
| |
− | | |
− | (sudo was not necessary for the <tt>make install</tt> step because I wasn't installing into a privileged directory)
| |
− | | |
− | If this doesn't work, you should probably try each step separately:
| |
− | <pre>
| |
− | $ ./autogen.sh
| |
− | $ ./configure --with-g-wrap-prefix=/sw --enable-compile-warnings --prefix=~/usr
| |
− | $ make install
| |
− | </pre>
| |
− | | |
− | == Caveats ==
| |
− | # This is pre-release software on a platform that is very similar yet significantly different from those use by most of the developers. Unexpected stuff is to be expected.
| |
− | # If you change your mind on where you want to install gnucash after the first time you run make, you may need to clean up and recompile to get things cleanly installed in the new location, i.e.:
| |
− | <pre>
| |
− | $ make distclean ; ./autogen.sh ; ./configure --with-g-wrap-prefix=/sw --enable-compile-warnings --prefix=~/other ; make install
| |
− | </pre>
| |
− | # Compiling may take a while, especially on older hardware, so you're advised to get the location right the first time. Trust me.
| |
Open the disk image and drag GnuCash from there to your applications folder. If you want to retrieve stock prices from the web, double-click on Finance Quote Update. This will run a terminal application, even opening Terminal for you. It's a bit of a pain and requires that you have Xcode installed. We're sorry about that, but we haven't been able to figure out a better way.
Instructions for building a complete Gnucash application, including bundling it for distribution, are at MacOS/Quartz.
If you encounter problems, please check the mailing list archives first and then, if your problem cannot be resolved based on the information found there, report it to the mailing list. Please do remember that GnuCash developers are volunteers and are not responsible for your computer; as such, your help (in the form of exhausting readily available resources before asking for help and in asking for help in a clear manner) is appreciated.