EnvironmentSetup/Mac OS X

Back to Environment Setup

This page is Mac OS X (Intel and PowerPC) dedicated.

Prerequisites
Here are described the basics you need to build the Aqua Version of OOo4Kids

Mandatory Requirements

 * Mac OS X version 10.4 (aka Tiger) or later (if using 10.5 aka Leopard, have a look at User:Dyrcona/LeopardBuild)
 * XCode version 2.4.1 or later. If you want to use a newer version that is shipped with your Mac OS X installation media, you need to register at the Apple Developer Connection site (free of charge) to be able to download it

Notes on Java:

The Aqua version of OOo4Kids does not need Java at all.

Recommended tools
If you intend to build OpenOffice.org several times, you probably can benefit of ccache since it will speed up your future builds. The first time you make a build with ccache you won't notice it, but the next time the build will go up to five times faster.
 * ccache

You can install it using :
 * 1) Fink : Fink. It is simply named "ccache".
 * 2) MacPorts : MacPorts.The package is called "ccache".
 * 3) Sources : you can download and build it yourself using the source provided at http://ccache.samba.org/

./configure make sudo make install

There are two ways to enable ccache - one is to set environment variables, the other way is to use symlinks.

Using environment variables: export CC="ccache gcc" export CXX="ccache g++"

Using the symlink approach: mkdir ~/bin ln -s /path/to/ccache ~/bin/gcc ln -s /path/to/ccache ~/bin/g++ ln -s /path/to/ccache ~/bin/cc ln -s /path/to/ccache ~/bin/c++ $ export PATH=~/bin:$PATH
 * 1) create a directory for the links
 * 1) create the symlinks pointing to ccache with the name of the compiler
 * 1) no all you need to enable ccache is to prepend ~/bin to your PATH

for both methody, you can add the "export ..." lines to your ~/.profile - that way you don't need to manually set it when building. You can still temporarily disable ccache (export CCACHE_DISABLE=1) in case you don't want to use it.

Since OOo is rather huge, you should increase the cache-size to 1 GB or more ccache -M 1G

Since OOo's source code is managed using Subversion currently, you also need the svn client to checkout sources (otherwise you would be bount to source-tarballs that aren't generated that frequently). You can either compile yourself or use the subversion universal binaries from the subversion project Version 1.5.4 or later is required because of important fixes related to the merge-feature.
 * subversion version 1.5.4 or later

Get the source and prepare to build it...
You need about 3.2GB for a checkout from the SVN repository: The full source itself has about 1.6GB and SVN doubles that by its internal copy. Building the source requires another 5GB. The directory name should not contain any spaces, otherwise building it might be troublesome.

Get the source from SVN:
Simply do :

svn checkout -r1052 svn://svn.adullact.net/svnroot/ooo4kids1/trunk OOo4Kids

Configure
On PowerPC, don't forget to add --disable-cairo, else, you'll have some issues with Impress

All the options used above are mandatory, and you you want to change one, you'll probably have to face issues.

Thanks in advance to add further options, and/or to provide patches if you fix some issues related to configure.

On Mac Intel
./bootstrap source MacOSXX86Env.Set.sh cd instsetoo_native export TMP=/tmp

+ build --all -P2 -- -P2

On PowerPC
./bootstrap source MacOSXPPCEnv.Set.sh cd instsetoo_native export TMP=/tmp export SYSTEM_OPENSSL=YES

+ build --all -P2 -- -P2

Comments on above
The main purpose of the bootstrap script is to build (if necessary) the dmake utility used. Dmake once was a unix make-clone made by wticorp but got incorporated into OpenOffice since it was orphaned. For more information about dmake, it's history and manpage have a look here: http://tools.openoffice.org/dmake/index.html

Sourcing MacOSXPPCEnv.Set.sh is very important not only for building but also for running svdem later on. Here all the Environment-Variables for the Build will be set up. For a detailed description see Environment_Variables. Please note that on Intel machines, 'MacOSXPPCEnv.Set.sh' should be substituted with 'MacOSXX86Env.Set.sh'.

This Build process takes on my box (Dual 1.8 GHz G5, 1.5GB RAM) roughly 10 hours, and 3 to 6 hours on Mac Intel (3:30h on a 2GHz DualCore INTEL iMac). Be patient.

If you want to see how the progress on that build is you can use two build options to get a comfortable view:

build ... ... --html --html_path /Users/$USER/Sites

where $USER is your user name. Then you can load in Firefox (not Safari!) the HTML file unxmacxi.pro.build.html via the in Mac OS X included Apache web server or diretctly form the directory /Users/$USER/Sites/. This file is automatically being updated and is showing the status of the build and also the time needed since the build started.

Find the Bundle
Once the build completed, the final product ( en-US version ) is named : OOOo4Kids_0.4_090628_MacOSXIntel_install.dmg ( for version 0.4 e.g.)

And is located in instsetoo_native/unxmacxi.pro/OOo4Kids.app/dmg/install/en-US directory ( replace en-US with your locale )

As example, below the path for the en-US when built using OpenOffice.org trunk



Install the new Build

 * double click on the *.dmg icon
 * drag the OOo4Kids icon into a folder of your choice

Run the new Build

 * double click the application icon in that folder

Screenshots
Now you can start to work with this [FIXME : add screenshots]

Reduce a problem

 * make a problem reproducable
 * reduce it to a test case that is as small and simple as possible
 * if a problem is specific to a document then please attach it to the issue. A mininal excerpt of the document that still shows the problem is even better.
 * a screenshot of is a good idea if it clearly shows the problem

Using application switches
Application switches are often valuable for isolating a problem. Most of OOo4Kids's options can be found its Tools->Options menu. Some switches are so special that there is no user interface to change them. They are only useful for debugging and isolating a problem, but they are very valuable a that. So a developer might suggest to isolate a problem by setting an environment variable before running the application. E.g. for isolating problems with the menubar a developer might suggest to set the environment variable AQUA_NATIVE_MENUS to false. This is done by typing these commands into a terminal:
 * cd /OOo4Kids.app/Contents/MacOS
 * export AQUA_NATIVE_MENUS=false
 * ./soffice.bin

Provide a call stack for crash problems
Please note that bugs involving crashes should provide a description of how to reproduce the problem and a callstack. There are several ways to provide the callstack:
 * developers may provide a gdb backtrace (see gdb basics) of the problem
 * if the above two methods don"t work then please attach a file with the details provided by the AppleCrashReporter