Overview
of Building an Individual Project

You can use a prebuild version to build an individual project. Having a
prebuild version is neccessary because the individual project you want
to build could depend on other projects. A project
builds a particular component of OpenOffice.org.
For example, the Word Processing
project builds the Word Processing application. To build an individual project,
you must follow these steps:

Check out the modules for the project that you want to build from the
OpenOffice.org CVS tree.
If your project uses the resources module, res, check
out this module also.
You can, of course, also download the entire source from the download webpage
(www.openoffice.org/dev_docs/source/get_tarballs.html).
However, it is not possible to
download individual modules there.

Check out the module config_office. This is always
necessary to create the build environment.

Also check out the modules dmake, external, xml2cmp,
mkdepend (from 625 on), sal,
vos, tools and rscpp. These are required by bootstrap
(see below). They are not needed for builds 613 or earlier for which
the build tools are provided in solenv.

Unpack the solver tarball.

Run the configure script to check all requirements and
to create the script LinuxIntelEnv.Set.

Run the script
LinuxIntelEnv.Set
to set all environment variables.

Create the build tools using bootstrap (unless you
want to build the 613 or an earlier version for which the build
tools are provided in the solenv module).

from 613 on: STLPort Version 4.0, freely available from
http://www.stlport.org.
You have to download and install STLPort 4.0. The installation is
described in the files within STLPort 4.0. Put them anywhere you like,
but remember the absolute path to it.

from 627 on: The gpc general polygon clipper library release 2.31, located at, for instance,
http://penguinppc.org/files/pub/openoffice/633b/src/ (file gpc231.tar.Z,
the original site - www.cs.man.ac.uk/~amurta/software - is no longer
online).
Download and unpack the tarball. You should have the files
gpc.c and gpc.h in $SRC_ROOT/external/gpc.

The following external requirement is only necessary for older snapshots:

from 614 to 627: Berkeley DB 3.1.17 from
www.sleepycat.com.
Download the tarball from their download website
and build the data base following
their instructions given on the documentation website.
Remember that the java API has to be build as well which is not the
default option. This entails the enable java and enable dynamic option
to the configure command. Make also sure that javac is in
your PATH variable.
The data base will consist in a directory
structure (db3.1.17) including a subdirectory
java/classes. Go there and
create a java archive
(jar command) called db.jar (db31.jar for older releases) and place this
into the external/common directory:

From 632 on, all necessary components of the Berkeley DB are included
in the OpenOffice.org source.

Hardware Requirements

Intel Pentium II

128 MB RAM

3 GB free disk space

External Components

The code contains some further external components which are
already provided. If you are interested in details about these,
look at the External Components webpage at
http://tools.openoffice.org/ext_comp.html.

Get the source code

You have two options to get the source code:

Download the source code tarball from
www.openoffice.org/dev_docs/source/get_tarballs.html,
e.g. oo_609_src.tar.gz in case
of the 609 release.
There is a second source tarball called
solenv containing the build tools
for some early versions.
This tarball has become obsolete with the introduction of the
bootstrap utility (explained later) which creates those
build tools. However, if you want to build an early version, you have
to download this tarball as well.

Unpack the tarballs as follows (for the example 609):

> gunzip oo_609_src.tar.gz> tar -xvf oo_609_src.tar> cd oo_609_src

This will be $SRC_ROOT from now on.
For releases 613
or earlier you will also need the solenv tarball:

Generating
the Build Environment and Build Tools

You use the configure script to generate the build environment.
The configure script
checks that all software, hardware, and system requirements for the build
are satisfied, and it
creates a configuration file called
LinuxIntelEnv.Set
that you then run the source command
on to set all necessary build environment variables.
This configuration file will be moved into the SRC_ROOT
directory. A top-level makefile script makefile.rc
and the script bootstrap in the
config-office directory will be moved into SRC_ROOT
as well. This is due to technical reasons: The SRC_ROOT directory
in the cvs tree can only hold directories. On the other hand, the
top-level makefile.rc should logically be placed in the
top-level directory SRC_ROOT. The cvs tree holds these files in
config_office and configure copies them up.

In case you adjust the sample file winenvsample.bat to your
needs rather then running the configure script, you have to copy it by
hand to SRC_ROOT and name it winenv.bat.
Copying the file makefile.rc from $SRC_ROOT/config_office to
$SRC_ROOT had to be done by hand as well in this case.

If you experiment with newest sources from the cvs-tree,
mind that updates to the
configure process do not happen via updates of configure
(the script file) but via the file configure.in. The
configure script itself is created from configure.in
using the autoconf command. In this case, you would
run commands like the following:

where path is the absolute path pointing to your STLPort
installation. configure will probably also ask you for
the location of the Java Development Kit 1.2.2.

There are a number of further options that you can use with the
configure
script. To display these options, type the following command:

config_office> ./configure --help

The option --with-stlport4-home is a requirement.
For more information on the options that you can use with the
configure script, see the Build Environment document at
tools.openoffice.org/build_env.html.

After running configure, you have to source the configuration
file with sets all environment variables:

$SRC_ROOT> tcsh$SRC_ROOT> source LinuxIntelEnv.Set

To create the build tools, type the following command:

$SRC_ROOT> ./bootstrap

The bootstrap utility creates the tools required for building.
This involves already building some modules and will take a few minutes.

Build Instructions

Building
a Full Build of the Office Suite

Now you are ready to build OpenOffice.org.
To build the entire suite, all you have to do
(after having created the environment as described above) is to run dmake
from the top-level directory. This will take several hours.

$SRC_ROOT> dmake

If you are interested in the order in which the individual modules
are build, type

$SRC_ROOT> dmake -n

The following table shows the time required to build on a system with
a particular specification. You can use these details to estimate the time
required to build on your system.

Architecture

Intel

Processor

Pentium III

Processor speed

600 MHz

RAM

256 MB

Hard disk size

2 GB IDE

Time

~12 h

Building
Individual Projects with a Prebuild

OpenOffice.org is organised in several projects. For example,
the Word Processing Project. These in turn consist of several
modules, organised in separate directories. The source contains
approximately 90 modules.

You can build any project or module individually. Building modules
individually should not be misunderstood as reducing OpenOffice.org to a
special application, say, for instance, the spreadsheet application. The
program will always consist in the entire office suite: text processor,
spreadsheet, drawing application etc.. Building individual
modules comes in handy if you want to develop on a certain module.
Most modules will
depend on other modules to be already built. In other words, all modules
must build in a particular order.
To avoid building all modules which are prerequisites of the
module of your interest,
you can make use of a pre-build solver tree
against which you can build any module.

In order to create the build environment and build tools (bootstrap), you
also have to check out the modules
config_office, dmake, external, xml2cmp,
mkdepend (from 625 on), sal, vos, tools and rscpp.
Except for config_office,
they are not needed for builds 613 or earlier for which
the build tools are provided in solenv.

To build a project, you build each of its modules individually
in their directory with the dmake tool.

$SRC_ROOT/(module-name)> dmake

Files called makefile.rc in each directory with further
subdirectories iterate through all directories of the module and exectues
dmake in each of them (just like the top-level
makefile.rc does when building the entire office suite).
The last or second to last directory is usually
module-name/util
which is responsible for linking one or more shared libraries.

Building
a Project with Debug Information

To rebuild a complete project with debug information, remove all object
files by removing the
unxlngi3.pro
directory. Then run
dmake with the debug option set to true:

Apache and the Apache feather logo are trademarks of The Apache Software Foundation.
OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation.
Other names appearing on the site may be trademarks of their respective owners.