Written: June 2nd, 2007, 5:30 (UTC) By: omer
So, after two days of one issue or another (see below), I finally got a successful build of OpenOffice.org for Aqua on Wednesday morning. Upon seeing the build, after doing a mental jump for joy, I promptly decided to rebuild yet again, and not because I wanted another five hours of not really being able to work. It turns out that two of my configuration options (I stole them almost word-for-word from the configuration described on the OOo's Aqua Build wiki page) were actually disabling the Mozilla address book, which is what my project is supposed to emulate. The configuration options are (or seem to me to be, as far as I understand how the program works) : --disable-mozab and --disable-mozilla (disable Mozilla Address Book and Disable Mozilla, respectively). I gave the parenthetical caveat because I'm not sure that --disable-mozilla is actually relevant based on OOo's description of configuration options, yet as far as I can tell the Mozilla Address Book is tied to Mozilla itself being enabled. I will investigate this more as the summer continues to see if I can better understand what the different configure options do. Note: after removing --disable-mozilla, the build failed. The build then required two things (only one of which is explicitly mentioned):
- mozilla-source-1.7.5.tar.bz2, to be placed in moz/download (available here, as described by the file mozilla-source.txt, which is also in moz/download)
- libidl2 -- I got this using fink (syntax: fink install libidl2)
The other main peculiarity that came up while I was trying to build is that, as far as I can tell, the OpenOffice.org code will not successfully compile using Java 6, only Java 5. I call this a peculiarity because Java 6 is supposed to be backwards compatible with Java 5, but apparently the Mac OS X version, since it is fairly new, might not be.
After my final build (to date), with the --disable-mozab and --disable-mozilla options removed, I was able to see a few options in the "Address Data Source" wizard (File->Wizards->Address Data Source...). The options available are, "Mozilla / Netscape," "Thunderbird," "LDAP address data," and "Other external data source." See it for yourself! Unfortunately, from here, things weren't quite so straight-forward. Although I removed the --disable-mozab and --disable-mozilla configuration options, when attempting to access the Mozilla or Thunderbird address books, I receive the following error:
I decided, before asking on the IRC channel or either of my mentors what this error means, to learn some more about it, under the assumption that investigating this error would lead me to the right areas of the OpenOffice.org code for integrating the OS X Address Book. It was a lucky guess because it led my almost directly to four directories that look quite promising:
- extensions/source/abpilot --> handles the address book wizard
- dbaccess/source/core/dataaccess --> handles data access using the driver provided by cpool
- connectivity/source/cpool --> stores a pool of drivers and their proxies, fails if a driver does not exist
- connectivity/source/drivers -> holds all of the drivers available for OOo (or at least for OOo database integration)
I've spent the remaining time since building trying to figure out what the various files/methods/classes in each of these directories is doing, mostly by following what happens from when I click on "next" using "Mozilla / Netscape" until I get the error shown above. I will report my progress as I have it!
Finally, during any off-time I had with OpenOffice.org, I started looking up some OS X Address Book API references. The most helpful of these references has been "A Look Inside Address Book" by Michael Bearn. Based on that article, as far as I can tell, the API works through Cocoa (rather than Carbon), which led me to "Getting Started with Cocoa" and, more specifically, the "What is Cocoa?" tutorial to which it links. Since "Getting Started with Cocoa" suggests reading up on Cocoa "before you write a line of code," and I am still rather early in the summer, I figured that I would do my best to do a lot of reading before starting to code, which is opposite my usual strategy. I will, as always, let you know my progress.