EnvironmentSetup/Mac OS X/pt

Back to Environment Setup

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

DRAFT / WORK IN PROGRESS

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 Fink. It is simply named "ccache". For MacPorts users the package is called "ccache".

If you don't use fink, you can download and build it yourself using the source provided at http://ccache.samba.org/

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...
The instructions below are for the current milestone "m51" of the master workspace "DEV300" 

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:

 * check out a milestone from SVN

svn checkout svn://svn.services.openoffice.org/ooo/tags/DEV300_m51


 * check out a ChildWorkSpace from SVN

svn checkout svn://svn.services.openoffice.org/ooo/cws/CWSNAME

Have a look at the SVN for OOo documentation for more details, e.g. if you want to do complex tasks like merging several CWS into a single build

Add the additional files and patches
[FIXME] : until a repository is created, we'll use patches and additional files.


 * Download the archive
 * Decompress it
 * Copy the files at the right location : the name of the folders are the locations in the tree.
 * Apply the patch
 * Run autoconf

As example, the content of the OOo4Kids_archive_09_06_29_ericb.tar.gz is :

The mandatory patch to be applied :

new_complete_OOo4Kids_0.3_trunk_09_06_29.diff

Folders, who contain file to be added to the tree :


 * default_images
 * desktop
 * external_images
 * framework
 * instsetoo_native
 * ooo_custom_images
 * packimages
 * setup_native
 * sysui

Files : 


 * icons_list.txt  # Maintainer file : does contain the list of trademarked icons.
 * create_OOo4Kids_diff # shell script who does generate the dayly patch
 * my_configure_MacOSX.txt # helper for configure on Mac OS X
 * my_configure_WindowsXP.txt # helper for configure on Windows XP
 * my_configure.Linux_PowerPC_ericb.txt # helper for configure on Linux PowerPC
 * my_configure_Linux_Intel.txt # helper for configure on Linux Intel

Additional dependencies for current milestone builds
Nothing yet

One-Time preparations and scripts
OpenOffice.org's build environment is configured using the popular open-source configuration-management package 'autoconf'. So you can do your beloved './configure' command, is now done in the ROOt source directory. To save the configure parameters and use them with different milestones I used to link-in my shellscript to fire up the ./configure line.

My directory-structure looks like this:

bin/ DEV300_m49/ DEV300_m50/ DEV300_m51/ ...

Now I go to the ROOT sources subdir and link in my startscript: cd DEV300_m51

Create 'build.sh' (this is a shell scrip to be written) :

Note: excepted important changes in configure, this has to be done once only.

Put this script into ~/bin and make sure it is executable :

chmod ug+x ~/bin/build.sh

Note :

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.

'''We used the bash shell in all example, since to our belief users of the C-shell are smart enough to figure out the differences anyway. If you want to dig deeper into the build process, please have a look at the description OpenOffice.org's Build Environment.'''

Doing the build (about 4,5 GB)
Fine, now we have a (hopefully) working 'build.sh' in the ROOT sources dir. We need to run it beforehand:

cd DEV300_m51 link the existing build.sh with the current milestone :

ln -s ../bin/build.sh ./build.sh

Run it to complete the configure step :

./build.sh

This will setup the necessary includefiles and create a couple of files in the parent directory (bootstrap, MacOSXPPCEnv.Set.sh, MacOSXPPCEnv.Set). If you are using the sh, ksh or bash you only need to take care for 'MacOSXPPCEnv.Set.sh'.

Now we need to get back to our base-directory, run the bootstrap script, source our Enviroment (MacOSXPPCEnv.Set.sh) and finally start the build-process:

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 of the problem
 * if the above two methods don"t work then please attach a file with the details provided by the AppleCrashReporter