Installation Guide

The [PRODUCTNAME] SDK comes with a set of development tools, base libraries, header files and helper class files which can be used to develop Java/C++ components, to embed the [PRODUCTNAME] 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:

[PRODUCTNAME] installation The SDK works on top of an existing office installation and uses the same libraries as the office installation.
JDK (1.4.1_01 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.

If Java 5.0 or higher is used you have to ensure that the used office installation uses Java 5.0 as well because of class format changes in Java 5.0. Components build with Java 5.0 cannot be deployed by unopkg (using the office Java) using a lower Java version than Java 5.0.

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 WorkShop 6 update 1 C++ 5.2 2000/09/11
Linux GNU C++ compiler, gcc version 3.0.1
Windows Microsoft C++ Compiler, Microsoft Visual Studio .NET 2003 (cl, version 13.10.3070)

Note: The C++ compiler is optional!

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.nextgeneration.dk/gnu/make.zip. It is not recommended to use the Cygwin make, because it does not work well. For Solaris 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 is not working for the build under the 4NT shell. You have to use the native w32 version.

The SDK provides a configure script (Unix and Windows2000/XP) that asks for relevant directories (SDK, StarOffice, GNU make, Java, C++). After completing the configure script a new script will be created (Windows2000/XP and UNIX) to set the necessary environment variables for using the SDK and the required tools. Under UNIX the configure script uses Perl. LINUX systems should have installed a working perl version and for Solaris you can find a working Perl version under http://www.sunfreeware.com/ if necessary. Under Windows the configure script uses Windows Script and a JScipt. If you have problems with Windows Script you can either use the <OO_SDK_HOME>\setsdkenv_windows.bat directly or you can download a newer version of Windows Script.

  • configure  -> for Unix
  • configureWindows.bat  -> for Windows2000/XP or newer versions

Other versions of the operating system Windows should use the batch program <OO_SDK_HOME>\setsdkenv_windows.bat directly and adopt it to their local environment.

The first time you use the batch file, you must prepare it for your environment. Edit the script and set the following variables:

OFFICE_HOME path to an existing StarOffice™ or OpenOffice.org base installation, e.g. "/opt/staroffice8". Please take care that it is not a user installation only.
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 (under 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 (under 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_OUTPUT_DIR path to an existing directory where the example output is generated. The output directory is optional, default is that 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> /[PRODUCTNAME]/LINUXExample.out)
SDK_AUTO_DEPLOYMENT if this variable is set, the component examples will be automatically deployed into the Office installation referenced by OFFICE_HOME. See also chapter "UNO Package Installation Using unopkg" from the Developer's Guide.

You have to run the setsdkenv_XXX script every time you want to use the configured SDK environment. The settings are local for the current shell under Windows or the new started shell under UNIX. Under UNIX you have now also the possibility to source one of the prepared environment script files ("setsdkenv_unix.sh" or "setsdkenv_unix.csh" dependent of your used shell) 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 by yourself. The script sets the following environment variables.

Common Environment Variables

CLASSPATH =$OFFICE_HOME/program/classes/jurt.jar; $OFFICE_HOME/program/classes/juh.jar; $OFFICE_HOME/program/classes/unoil.jar; $OFFICE_HOME/program/classes/ridl.jar; $OFFICE_HOME/program/classes/sandbox.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 does the bootstrap mechanism find 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 have maybe more than one office installation installed.

Environment Variables for UNIX

Solaris

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

The LD_LIBRARY_PATH will be set or will be extended by the office program path, the platform dependent lib directory for some 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:] $OFFICE_PROGRAM_PATH: $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 <OFFICE_PROGRAM_PATH> (where the compiler or the JDK are optional).

Linux

LD_LIBRARY_PATH =$OFFICE_PROGRAM_PATH:$SDK_HOM/linux/lib:$LD_LIBRARY_PATH

The LD_LIBRARY_PATH will be set or will be extended by the office program 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:] $OFFICE_PROGRAM_PATH: $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 <OFFICE_PROGRAM_PATH> (where the compiler and the JDK are optional).

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;] %OFFICE_PROGRAM_PATH%;%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 <OFFICE_PROGRAM_PATH>.

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

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

Additionally 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 2004 Sun Microsystems, Inc.