Quartz version of GnuCash and dbus

John Ralls jralls at ceridwen.us
Wed May 18 20:45:00 EDT 2011


On May 18, 2011, at 4:13 PM, Mike Alexander wrote:

> Although my main machine is a Mac running Snow Leopard, I normally use the X11 version of GnuCash.  However this week I decided to give the Quartz version a try to see what it is like.  I downloaded the app bundle from sourceforge and gave it a try (as well as building it from source various ways).  The app bundle worked well, but I have a few suggestions.
> 
> First, I noticed that the About dialog says it's version 2.4.5 built on 2011-04-05 from r20417.  However, r20417 is actually version 2.4.4 from about 2011-03-13.  I don't know which is wrong, the version number or the SVN revision, but they are inconsistent.  Version 2.4.5 was the first from the new 2.4 branch, perhaps the code that gets the SVN revision doesn't work if it's not on trunk.
> 
> Second, and perhaps more importantly, I think you can easily fix up the dbus mess if you upgrade dbus to a newer version.  I don't know what version of dbus you're packaging with the app (it would be useful if sources.txt included version numbers to answer questions like this), but all versions since 1.4.1 have included support to integrate dbus with launchd on MacOSX.  If you use this you can avoid starting dbus at all and let launchd do it for you.
> 
> I patched the script in the app bundle as indicated in the attached patch and it seems to work fine using dbus 1.4.8 installed via MacPorts.  I had to replace libdbus-1.3.dylib in the app bundle, but otherwise everything is unchanged.  My patch assumes the path for the MacPorts dbus, you'll have to change the ln command to point to the launchd plist wherever you put it in the bundle.


Thanks.

The reason for the dbus dance is to provide a drag-and-drop app bundle rather than an installer. I'm pretty sure that using launchd requires installing dbus somewhere permanent and setting up a launch daemon for it -- which would require using an Installer bundle (a .mpkg) instead.

FWIW, direct use of dbus is now discouraged: One is supposed to use gdbus instead, and I've had to hold back the GConf version because recent releases do so and there's a race condition in gdbus that prevents it from connecting on OSX -- or there was in February when I last looked at it. That aside, though, gdbus also provides a hook for a platform-specific dbus replacement. I'd like to do one for OSX using NSUserDefaults and NSNotifications, which would eliminate the need for a dbus daemon entirely. Finding time to do that is a bit of a rub, though.

Regards,
John Ralls



More information about the gnucash-devel mailing list