Installation Guide

The Apache OpenOffice %PRODUCT_RELEASE% SDK comes with a set of development tools, base libraries, header files and helper class files that can be used to develop Java/C++ components, to embed the Apache OpenOffice %PRODUCT_RELEASE% application in your own programs, or to use the API (scripting or remote control the office). For a complete working environment, we have some additional requirements:

Apache OpenOffice %PRODUCT_RELEASE% installation The SDK works on top of an existing office installation and uses the same libraries as the office installation.
JDK (1.5 or higher)

A JDK is necessary for developing Java components or applications. An appropriate Java SDK can be found on http://java.sun.com/products.

Recommendation is to use Java 6 excepting for Mac OS because initially Mac OS supported a 64bit version of Java 6 only.

Note: The Java compiler is optional!

C++ compiler A C++ compiler is necessary for developing C++ components or applications. UNO depends on a compiler dependent language binding, so that we use the appropriate compiler where a language binding exists:
Solaris Sun Studion 8 (20070730)
Linux GNU C++ compiler, gcc version 4.0.1
Windows Microsoft C++ Compiler, Microsoft Visual Studio 2008 or the Express version (cl, version 15.00.21022)

Note: The C++ compiler is optional! If you use the Express edition you have to ensure that the Microsoft Visual Studio 2008 Redistributable Package is also installed. You can download this package from Microsoft directly.

Microsoft .NET Framework SDK version 1.0 or higher The SDK is required for building CLI applications. That is, programs written in languages, such as C# or VB.NET.

Note: The .NET Framework is optional!

GNU make (3.79.1 or higher)

GNU make is used to build the examples of the SDK. GNU make is available from http://www.gnu.org. It can be ftped via ftp://ftp.gnu.org/gnu/make

Note: Windows user can find an executable of gnu make under http://www.mingw.org/wiki/Getting_Started (see the mingw32-make link under "Manual Installation"). Do not use the Cygwin make, because it does not work well. On Solaris gnu make can be found often under /usr/sfw/bin/gmake, but keep in mind that you have to use 'gmake' then. Or you can find gnu make also under http://www.sunfreeware.com/.

zip tool (2.3 or higher) The zip tool is used to create UNO packages. zip is a new requirement to make the SDK independent of a Java SDK.
If you do not have these already, you can download them from http://www.info-zip.org. Note: The cygwin zip.exe does not work for the build under the 4NT shell. You have to use the native w32 version.
cat and sed tools The cat and set tools are used to create some extensions.

Note for Windows users: If you do not have these already, you can download them from http://sourceforge.net/projects/unxutils/files/latest/download.

Boost (Unix only and optional) The boost library is used today on Unix systems as replacement for the stlport library. The stlport library is removed and replaced by either the compiler stl (on Windows) or the boost stl on all Unix based systems. We are planning to switch to the compiler stl completely as soon as possible. The boost headers/library are optional and for C++ development only if stl containers are used.

Download: http://sourceforge.net/projects/boost/files/boost/1.48.0/boost_1_48_0.tar.bz2/download.

The SDK provides an implicit configuration mechanism, which configures the SDK build environment to your personal needs the first time you use the SDK environment. This configuration step creates a new setsdkenv_XXX script in the user's home directory:

  • $HOME/$OO_SDK_NAME/setsdkenv_unix.sh  -> for Unix
  • C:\Documents and Settings\<username>\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat  -> for Windows2000/XP or later

The automatically started configure script (Unix and Windows2000/XP) requests relevant information and directories (SDK, the Office, GNU make, Java, C++), in order to prepare a working SDK environment. After completing the configure script once, the newly created script is always used to set the necessary environment variables for using the SDK and the required tools.

On UNIX operating systems, the configure script uses Perl. LINUX systems should have installed a working Perl version, and on Solaris you can find a working Perl version under http://www.sunfreeware.com/ if necessary. On Windows, the configure script uses Windows Script and a JScipt. If you have problems with Windows Script, you can download a newer version of Windows Script.

On other versions of Windows, use the batch file template <OO_SDK_HOME>\setsdkenv_windows.template, rename it to *.bat, and adapt it to your local environment.

If you use the template batch file, edit and set the following variables:

OFFICE_HOME Path to an existing Apache OpenOffice installation, e.g. "/opt/openoffice4". Be sure that it is not a user installation only.
OO_SDK_NAME The configuration uses the directory name of the SDK, but you can use another name as well. It is important that the name does not contain spaces, because of a limitation of gnu make which cannot handle spaces correctly. This name is, for example, used to create an output directory in the users home directory for any generated output when you use the SDK build environment.
OO_SDK_HOME Path to the SDK root directory, e.g. "/usr/local/StarOffice8_SDK"
OO_SDK_JAVA_HOME Path to a JDK root directory. The JDK is optional and only necessary if you like to run the Java examples or if you like to use the SDK environment to develop your own Java solution.
OO_SDK_CPP_HOME Path to the C++ compiler (on Windows, the directory where the "vcvar32.bat" file can be found). The C++ compiler is optional and only necessary for building the C++ examples.
OO_SDK_CLI_HOME Path to the C# compiler and VB.NET compiler (on Windows, this directory can be found under the system directory (e.g. c:\WINXP\Microsoft.NET\Framework\v1.0.3705). The compilers are optional and only necessary for building the CLI examples.
Note: Windows only!
OO_SDK_MAKE_HOME Path to GNU make.
OO_SDK_ZIP_HOME Path to the 'zip' tool.
OO_SDK_CAT_HOME Path to the 'cat' tool.
OO_SDK_SED_HOME Path to the 'sed' tool.
OO_SDK_BOOST_HOME Path to a boost installation, this is optional for C++ and Unix only.
OO_SDK_OUTPUT_DIR Path to an existing directory where the example output is generated. The output directory is optional, by default the output is generated in the SDK directory itself. If an output directory is specified, the output is generated in a SDK dependent subdirectory in this directory (e.g. <OO_SDK_OUTPUT_DIR> /Apache OpenOffice %PRODUCT_RELEASE%/LINUXExample.out)
SDK_AUTO_DEPLOYMENT If this variable is set, the component examples are automatically deployed into the Office installation referenced by OFFICE_HOME. See also chapter "Extension Manager - unopkg" from the Developer's Guide. This variable is only relevant when OFFICE_HOME is set.

You must run the setsdkenv_XXX script every time you want to use the configured SDK environment. The settings are local for the current shell on Windows or the new started shell on UNIX. On UNIX you can now source one of the prepared environment script files ("setsdkenv_unix.sh" or "setsdkenv_unix.csh" dependending on the shell you use) to prepare your current shell instead of starting a new shell.

Manual Setting

If you do not want to use the script to set your working environment, you must set the appropriate environment variables yourself. The script sets the following environment variables:

Common Environment Variables

OO_SDK_NAME See description above.
OO_SDK_OFFICE_BIN_DIR The path to the program directory in the office installation (e.g. $OFFICE_HOME/program).
OO_SDK_OFFICE_LIB_DIR The path to the office program directory in the office installtion (e.g. $OFFICE_HOME/program).
OO_SDK_OFFICE_JAVA_DIR The path to the classes direcgtory in the office program directory where Java JARs are located (e.g. $OFFICE_HOME/program/classes).
CLASSPATH =$OO_SDK_OFFICE_JAVA_DIR/juh.jar; $OO_SDK_OFFICE_JAVA_DIR/jurt.jar; $OO_SDK_OFFICE_JAVA_DIR/ridl.jar; $OO_SDK_OFFICE_JAVA_DIR/unoloader.jar; [$OO_SDK_OFFICE_JAVA_DIR/unoil.jar;] $CLASSPATH

The classpath will be set or extended to the necessary jar files of the specified office installation.

OFFICE_PROGRAM_PATH =$OFFICE_HOME/program

This variable is used to find, for example, the office type library and the UNO package deployment tool.

UNO_PATH =$OFFICE_PROGRAM_PATH

This variable is used to ensure that the new C++ UNO bootstrap mechanism uses the configured office installation of the SDK. Normally the bootstrap mechanism finds the default office installation for the user on the system. This variable is optional but is set from the scripts to ensure a homogeneous environment. Especially useful during development where you might have more than one office installation installed.

Environment Variables for UNIX

Solaris

LD_LIBRARY_PATH =$OO_SDK_OFFICE_LIB_DIR: $OO_SDK_HOME/(solsparc|solintel)/lib: $LD_LIBRARY_PATH

The LD_LIBRARY_PATH will be set or will be extended by the office library path, the platform dependent lib directory for several additional libraries.

PATH =$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_OFFICE_BIN_DIR: $PATH

The PATH variable will be extended by the paths for the SDK development tools, the compiler, the JDK, GNU make, the zip tool and the OO_SDK_OFFICE_BIN_DIR, where the compiler or the JDK are optional.

Based OFFICE_HOME, the script additionally creates symbolic links to the public dynamic libraries of the office UNO runtime in $OO_SDK_HOME/(solsparc|solintel)/lib, which are needed for linking.

Linux

LD_LIBRARY_PATH =$OO_SDK_OFFICE_LIB_DIR: $SDK_HOME/linux/lib: $LD_LIBRARY_PATH

The LD_LIBRARY_PATH will be set or will be extended by the office library path, the platform dependent lib directory for some additional libraries.

PATH =$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_OFFICE_BIN_DIR: $PATH

The PATH variable will be extended by the paths for the SDK development tools, the compiler, the JDK, GNU make, the zip tool and the OO_SDK_OFFICE_BIN_DIR, where the compiler and the JDK are optional.

Based on OFFICE_HOME, the script additionally creates symbolic links to the public dynamic libraries of the office UNO runtime in $OO_SDK_HOME/linux/lib, which are needed for linking.

Environment Variables for Windows

PATH =%OO_SDK_HOME%\windows\bin; %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%; [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;] [%OO_SDK_JAVA_HOME%\bin;] %OO_SDK_OFFICE_BIN_DIR%; %PATH%

The PATH variable will be extended by the paths for the SDK development tools, the compiler, the JDK, GNU make, the zip tool and the OO_SDK_OFFICE_BIN_DIR.

LIB =%OO_SDK_HOME%\windows\lib; %LIB%

The LIB variable will be extended by the path to the import libraries that are necessary for Windows.

In addition to setting these environment variables, the script calls the "vcvar32.bat" batch file which is provided by the Microsoft Developer Studio to set the necessary environment variables for the compiler.

Copyright © 2011-2023 The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.