Difference between revisions of "MacOS Installation"

From GnuCash
Jump to: navigation, search
(Move MacPorts details to a separate page)
(lc title)
 
(60 intermediate revisions by 22 users not shown)
Line 1: Line 1:
= PPC Macs =
+
{{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.
  
== Using 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.'''
  
[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 quickest and easiest way to get at least some version of GnuCash running on a PowerPC Mac (Intel Mac users see [[#Intel_Macs|below]].)
+
''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.
  
=== gnucash-1.8 ===
+
== Building yourself ==
Under Mac OS X 10.4 on a PowerPC Mac, gnucash-1.8 installation is as simple as:
+
Instructions for building a complete Gnucash application, including bundling it for distribution, are at [[MacOS/Quartz]].
# download and install fink
 
# run 'sudo apt-get install gnucash'
 
# start up [http://www.apple.com/downloads/macosx/apple/x11formacosx.html X11] and run 'gnucash &' from an xterm
 
  
=== gnucash-2.0.x ===
 
Installing a recent version of GnuCash-2.0 is slightly more complicated, since the Fink package for this is still being tested and is therefore in their 'unstable' tree.  So in addition to the basic install of Fink you must [http://fink.sourceforge.net/faq/usage-fink.php?phpLang=en#unstable enable the unstable tree]. Note that the Fink package name for GnuCash-2.0.x is "gnucash2", and that this package is in the "crypto" category in Fink, rather than the "gnome" category as "gnucash" is.  This categorization can make it tricky to see gnucash2 when browsing Fink packages. As of May 2007, the gnucash2 package was up-to-date with the latest 2.0.5 release. Note also that fink packages in 'unstable' need to be compiled from source, compared to most of the ones considered stable (ie gnucash 1.8).  So, if you are short of time or downloading and compiling from source makes you uneasy (even though Fink automates this process rather reliably and safely), you might want to stick with 1.8 until 2.0 is available as a stable fink package.  Other sections on this page describe ways of obtaining GnuCash versions 2.0 and higher, but note that they all involve, directly or indirectly, downloading and compiling source code.
 
  
=== Other Fink options ===
+
=== MacPorts ===
Further discussion of semi-manual ways to compile GnuCash using Fink tools can be found [[MacOSX/FinkManual|here]]. Most of that information is generally outdated since the availability of the gnucash2 package.  However, it may still be useful in some cases, for example if you would like to use Fink in conjunction with compiling a version of GnuCash newer than any available in a Fink package.
 
  
== Using MacPorts ==
+
MacPorts is a parallel package manager to make macOS work like Linux. See [[MacOS/MacPortsDetail]] for more information.
  
MacPorts (formerly known as DarwinPorts) is another, parallel package manager for Mac OS X. All of the options discussed below are covered in more detail in [[MacOSX/MacPortsDetail]].
+
=== HomeBrew ===
  
=== gnucash-2.0.x ===
+
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].
  
The standard gnucash port in MacPorts was up-to-date with GnuCash-2.0.5 as of May 2007. Therefore, installing the latest stable version of GnuCash consists simply of:
+
== Final Words ==
#Download and install [www.macports.org MacPorts].
 
#<code>sudo port selfupdate</code>
 
#<code>sudo port install gnucash</code> # Note this takes quite a while
 
#Run <code>gnucash</code> from an XTerm.
 
  
=== Development version ===
+
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.
  
To install a recent development version of GnuCash (2.1.1 as of May 2007), simply replace "gnucash" in the third step above with "gnucash-devel".
 
  
=== Even more bleeding edge ===
+
[[Category: MacOS]]
 
 
[[MacOSX/MacPortsDetail]] also includes instructions for compiling any GnuCash source distribution in the context of a MacPorts software installation.
 
 
 
== GnuCash 2.1.1 quartz (manual compilation) ==
 
 
 
This is the big kahuna. It is possible to get GnuCash running
 
completely without X Windows, thanks to recent work at the Gtk+ on Mac
 
OS X project. It's not for the faint of heart, though, as it currently
 
requires a laborious manual process. I list below the steps that
 
worked for me; I'm trying to automate this process using MacPorts so
 
that I won't have to do it again by hand. (If that gets to a workable
 
state, I'll update these instructions.) Before you begin, there are a
 
few important caveats: First, a number of the modifications below are
 
only for the sake of getting GnuCash to run. They're not appropriate
 
for using these packages with other software. That's why it's
 
important to keep this installation segregated from other software on
 
your computer.  Second, as the Gtk+ on Mac OS X describes itself, it's
 
a work in progress and not ready for general use. There are likely
 
unknown bugs lurking.  I would not recommend this build for use with
 
any really important data.  That being said, I have found the
 
usability over the past few days to be fine, I think it looks nicer
 
than the X11 version, and it's nice not to have to invoke X11.
 
Anyhow, here goes:
 
 
 
<ol>
 
<li>Install git and subversion from MacPorts or Fink.</li>
 
<li>Create a fresh new user account (e.g. "gtkbuild") ''without'' the MacPorts or Fink environment variables and path, and link just the git/subversion executables into a directory added to gtkbuild's PATH.</li>
 
<li>Follow the instructions to build gtk+ at http://developer.imendio.com/projects/gtk-macosx/build-instructions:
 
<ol>
 
  <li> First do the "bootstrap" </li>
 
  <li> Then the "core" </li>
 
  <li> And then build all of the modules in the "Extra:" list printed when you execute <code>gtk-osx-build help</code>, one by one in the order on that list.</li>
 
</ol>
 
<li> Execute <code>gtx-osx-build shell</code> to get the proper environment, and execute all further commands in the resulting shell.</li>
 
<li> What remains is a long series of download-configure-build-install cycles to get all of the packages GnuCash depends on.  For each one, I give the package name and version, a URL to download from, and a configure command.  If there are no other instructions, you download the tarball from the given URL, extract it (e.g. <code>tar -zxvf <tarball filename></code>,  cd into the top level directory extracted, execute the configure command, and then execute <code>make</code> and then <code>make install</code>. The "standard configure" command listed in many cases below is <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib</code> (probably in many cases not all of these options are necessary or even operational, it's just convenient to have one command that can be used in as many cases as possible.)
 
<ol>
 
  <li>readline-5.2, ftp.gnu.org/pub/gnu/readline, <code>./configure --prefix=/opt/gtk</code></li>
 
  <li>guile-1.6.8, ftp.gnu.org/pub/gnu/guile, standard configure. </li>
 
  <li>Download slib3a4 from  http://swiss.csail.mit.edu/~jaffer/SLIB.html and unzip it. You then need to link the top-level directory created by the unzipping into the guile library directory: <code>ln -s <slib directory> /opt/gtk/share/guile/1.6</code></li>
 
  <li>libIDL-0.8.8, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure</li>
 
  <li>ORBit2-2.14.7, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure</li>
 
  <li>GConf-2.18.0.1, http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, <code>./configure --prefix=/opt/gtk --enable-static --enable-shared --disable-scrollkeeper --disable-xlib</code> (note the --enable-static here)</li>
 
  <li>OpenSP-1.5.2, download.sourceforge.net/openjade, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-doc-build</code></li>
 
  <li>libofx-0.8.3, libofx.sourceforge.net, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --with-opensp-includes=/opt/gtk/include/OpenSP --with-opensp-libs=/opt/gtk/lib/</code></li>
 
  <li>popt-1.10.4, rpm.net.in/mirror/rpm-4.4.x, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>audiofile-0.2.6, ftp.gnome.org/pub/gnome/sources/audiofile, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>esound-0.2.37, ftp.gnome.org/pub/gnome/sources/esound, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared</code></li>
 
  <li>dbus-1.0.2 and dbus-glib-0.73, dbus.freedesktop.org/releases/, for each one: <code>./configure --prefix=/opt/gtk --disable-static --enable-shared </code></li>
 
  <li>gnome-mime-data-2.4.3, gnome-vfs-2.18.0.1, libbonobo-2.18.0, libgnome-2.18.0, libbonoboui-2.18.0,  from http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/, standard configure for each one.</li>
 
  <li>gnome-keyring-0.8.1, http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/, standard configure</li>
 
  <li>Download and extract libgnomeui-2.18.0.1 from http://ftp.gnome.org/pub/GNOME/platform/2.18/2.18.1/sources/<br>Then, in the libgnomeui directory: Comment out the following section of the configure script at line 23836:
 
<pre>
 
#    if test x$GNOME_HAVE_X11 != xyes ; then
 
#        { { echo "$as_me:$LINENO: error: libX11 not found" >&5
 
#echo "$as_me: error: libX11 not found" >&2;}
 
#  { (exit 1); exit 1; }; }
 
#    fi
 
</pre>
 
comment out line 845 of libgnomeui/gnome-ui-init.c:
 
<pre>
 
        /* XUngrabServer (GDK_DISPLAY ()); */
 
</pre>
 
Then <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --without-x</code>, and make and make install.
 
  </li>
 
  <li>libgnomecups-0.2.2, http://ftp.gnome.org/pub/gnome/sources/libgnomecups, standard configure</li>
 
  <li>Download and extract libgnomeprint-2.18.0 from http://ftp.gnome.org/pub/GNOME/desktop/2.18/2.18.1/sources/<br>Then, in the libgnomeprint directory: insert line 23717 in configure:
 
<pre>
 
  LIBM=" "
 
</pre>
 
And then <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib --disable-gtk-doc</code>; next you need to change line 945 of libgnomeprint/Makefile from:
 
<pre>
 
$(FLEX_PATH) -P_gnome_print_filter_parse_yy $^
 
</pre>
 
to
 
<pre>
 
$(FLEX_PATH) -P_gnome_print_filter_parse_yy parse.l
 
</pre> and finally do make and make install. </li>
 
  <li>libgsf-1.14.3, http://ftp.gnome.org/pub/gnome/sources/libgsf, standard configure</li>
 
  <li>pcre-7.1, ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/, <code>./configure --prefix=/opt/gtk --disable-static --enable-shared --enable-utf8</code></li>
 
  <li>libgoffice-0.3.8, ftp.gnome.org/pub/GNOME/sources/goffice, standard configure</li>
 
  <li>Download and extract gtkhtml-3.15.1.tar.gz from ftp.gnome.org/pub/GNOME/sources/gtkhtml<br>Then, execute the configure command <code>GAIL_CFLAGS=" " GAIL_LIBS=" " ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-xlib</code>; next, delete line 260 of Makefile:
 
<pre>
 
a11y \
 
</pre>
 
Delete ../a11y/gtkhtml-a11y.la from line 66 of src/Makefile, yielding
 
<pre>
 
$(am__DEPENDENCIES_1) \
 
</pre>
 
Delete ../a11y/gtkhtml-a11y.la from line 569 of src/Makefile, yielding
 
<pre>
 
libgtkhtml_3_14_la_LIBADD = $(GTKHTML_LIBS) $(GAIL_LIBS) $(REGEX_LIBS)
 
</pre>
 
Comment out line 3170 of src/gtkhtml.c:
 
<pre>
 
/* gtk_html_accessibility_init ();  */
 
</pre> and finally make and make install.</li>
 
</ol>
 
<li>Finally you're ready for GnuCash itself: Downloaded and extract gnucash-2.1.1 from gnucash.org. Then in the Gnucash directory: Delete X11/Xlib.h from line 23494 of configure, yielding:
 
<pre>
 
for ac_header in glob.h
 
</pre>
 
then execute the configure command
 
<pre>
 
  SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib ./configure --prefix=/opt/gtk --disable-static --enable-shared --disable-scrollkeeper --disable-gtk-docs --enable-ofx --disable-xlib
 
</pre>
 
and the make command
 
<pre>
 
  SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib make
 
</pre> and then make install. Then
 
<pre>
 
  mkdir /opt/gtk/libextra
 
  cd /opt/gtk/libextra
 
  ln -s ../lib/libgnc* ../lib/libguile* .
 
</pre>
 
then edit /opt/gtk/bin/gnucash as follows:  replace line 20, which is:
 
<pre>
 
DYLD_LIBRARY_PATH="${EXTRA_LIBS}:${DYLD_LIBRARY_PATH}"
 
</pre>
 
with the following two lines:
 
<pre>
 
DYLD_LIBRARY_PATH="/opt/gtk/lib/gnucash:/opt/gtk/libextra:${DYLD_LIBRARY_PATH}"
 
SCHEME_LIBRARY_PATH=/opt/gtk/share/guile/1.6/slib
 
</pre> and insert the following line:
 
<pre>
 
export SCHEME_LIBRARY_PATH
 
</pre> between:
 
<pre>
 
export DYLD_LIBRARY_PATH
 
</pre> and:
 
<pre>
 
exec gnucash-bin "$@"
 
</pre>
 
</li>
 
<li>Now cross your fingers and try running gnucash!</li>
 
</ol>
 
= Intel Macs =
 
 
 
== gnucash-1.8 ==
 
 
 
As of June, 2006, GnuCash-1.8 does '''not''' work on Intel-based Macs.  Both 1.8.''x'' and 1.9.''x'' series installations have dependencies (such as libgnomecanvas [http://bugzilla.gnome.org/show_bug.cgi?id=339489 Gnome Bug #339489]) which are known not to function correctly in this environment.  As the known issues reside in external libraries (i.e. not within the GnuCash source tree), we are hoping that they will be resolved by the maintainers of those libraries (or their fink ports).  Please check the [https://lists.gnucash.org/search/ gnucash (-users and -devel)] and [http://news.gmane.org/gmane.os.apple.fink.general fink-users] mailing list archives for more history and updates.
 
 
 
== gnucash-2.0 ==
 
 
 
As of August 2006, Gnucash 2 works fine on many Intel Macs. Installation instructions for gnucash-2.0 on Intel Macs may be found [http://captnswing.net/2006/07/10/gnucash20_on_intel_macs.html here] (or you could just jump to the top of this page...).
 
 
 
= Final Words =
 
 
 
Currently, none of the primary GnuCash development occurs under OS X; as such, clear and specific bug reports (particularly of new issues not already reported) may be helpful.  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.
 

Latest revision as of 02:16, 28 May 2021

Download, Drag, and Drop

Download the current release from the 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.

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.

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.

Building yourself

Instructions for building a complete Gnucash application, including bundling it for distribution, are at MacOS/Quartz.


MacPorts

MacPorts is a parallel package manager to make macOS work like Linux. See MacOS/MacPortsDetail for more information.

HomeBrew

A newer and more popular package manager for making macOS work like Linux, HomeBrew just redistributes the GnuCash application bundle. You might as well get it from here.

Final Words

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.