EnvironmentSetup/Mac OS X

From Wiki.ooo4kids.org

Jump to: navigation, search

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


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.

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:

# create a directory for the links 
mkdir ~/bin
# create the symlinks pointing to ccache with the name of the compiler
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++
# no all you need to enable ccache is to prepend ~/bin to your PATH
$ export PATH=~/bin:$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.

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

 ./configure 
   --with-lang="ar de es fi fr it nb nl pt sl zh-CN zh-TW" \
   --disable-crashdump \
   --with-epm=internal \
   --disable-gtk \
   --disable-gnome-vfs \
   --with-system-curl \
   --with-stlport=no \
   --with-vendor="Eric Bachard" \
   --with-OOo4Kids

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 ... <see above> ... --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.

Installing, preparing and running OOo4Kids

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

OOo4Kids Bundle location.jpg

Install the new Build

Run the new Build

Screenshots

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

Contribute by finding, isolating, debugging or solving issues

Isolate a problem

Reduce a 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:

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:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox