2 REM This script sets all enviroment variables, which
3 REM are necessary for building the examples of the Office Development Kit.
4 REM The Script was developed for the operating systems Windows.
6 REM Example: set OO_SDK_NAME=openoffice3.0_sdk
7 set OO_SDK_NAME=openoffice.org3.0_sdk
9 REM Installation directory of the Software Development Kit.
10 REM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice.org\Basic 3.0\sdk
13 REM Office installation directory.
14 REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice.org 3
17 REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice.org\Basis 3.0
20 REM URE installation directory.
21 REM Example: set OO_SDK_URE_HOME=C:\Program Files\OpenOffice.org\URE
24 REM Directory of the make command.
25 REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make
28 REM Directory of the zip tool.
29 REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
32 REM Directory of the C++ compiler.
33 REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
34 REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
39 REM Directory of the C# and VB.NET compilers.
40 REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
43 REM Java SDK installation directory.
44 REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
47 REM Special output directory
48 REM Example: set OO_SDK_OUT=C:\openoffice.org3.0_sdk
51 REM Automatic deployment
52 REM Example: set SDK_AUTO_DEPLOYMENT=YES
53 set SDK_AUTO_DEPLOYMENT=YES
56 REM check stlport lib in 4NT shell
57 REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". (
58 REM set STLDEBUG=_stldebug
61 REM Check installation path for the StarOffice Development Kit.
62 if not defined OO_SDK_HOME (
63 echo Error: the variable OO_SDK_HOME is missing!
67 REM Check installation path for the office.
68 REM if not defined OFFICE_HOME (
69 REM if not defined OO_SDK_URE_HOME (
70 REM echo Error: either of the variables OFFICE_HOME and
71 REM echo OO_SDK_URE_HOME is missing!
76 REM Check installation path for GNU make.
77 if not defined OO_SDK_MAKE_HOME (
78 echo Error: the variable OO_SDK_MAKE_HOME is missing!
82 REM Check installation path for the zip tool.
83 if not defined OO_SDK_ZIP_HOME (
84 echo Error: the variable OO_SDK_ZIP_HOME is missing!
89 set LIB=%OO_SDK_HOME%\lib;%LIB%
90 if defined CPP_WINDOWS_SDK (
91 set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
94 REM Set office program path.
95 if defined OFFICE_HOME (
96 set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
99 REM Set office program path.
100 if defined OFFICE_BASE_HOME (
101 set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\program
104 REM Set UNO path, necessary to ensure that the cpp examples using the
105 REM new UNO bootstrap mechanism use the configured office installation
106 REM (only set when using an Office).
107 if defined OFFICE_HOME (
108 set UNO_PATH=%OFFICE_PROGRAM_PATH%
111 REM if defined OO_SDK_URE_HOME (
112 set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin
113 set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin
114 set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java
116 set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
117 set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%
118 set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes
122 set CLASSPATH=%OO_SDK_URE_JAVA_DIR%\juh.jar;%OO_SDK_URE_JAVA_DIR%\jurt.jar;%OO_SDK_URE_JAVA_DIR%\ridl.jar;%OO_SDK_URE_JAVA_DIR%\unoloader.jar;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
123 REM if defined OFFICE_HOME (
124 REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
127 REM Add directory of the SDK tools to the path.
128 set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
130 REM Set PATH appropriate to the output directory
131 if defined OO_SDK_OUT (
132 set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
134 set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
137 REM Add directory of the command make to the path, if necessary.
138 if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%
140 REM Add directory of the zip tool to the path, if necessary.
141 if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
143 REM Add directory of the C++ compiler to the path, if necessary.
144 if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
146 REM Add directory of the C# and VB.NET compilers to the path, if necessary.
147 if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%
149 REM Add directory of the Java tools to the path, if necessary.
150 if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
152 REM Set environment for C++ compiler tools, if necessary.
153 if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
155 REM Set tilte to identify the prepared shell.
156 title Shell prepared for SDK
158 REM Prepare shell with all necessary environment variables.
160 echo ******************************************************************
162 echo * SDK environment is prepared for Windows
164 echo * SDK = %OO_SDK_HOME%
165 echo * Office = %OFFICE_HOME%
166 echo * Office Base = %OFFICE_BASE_HOME%
167 echo * URE = %OO_SDK_URE_HOME%
168 echo * Make = %OO_SDK_MAKE_HOME%
169 echo * Zip = %OO_SDK_ZIP_HOME%
170 echo * C++ Compiler = %OO_SDK_CPP_HOME%
171 echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
172 echo * Java = %OO_SDK_JAVA_HOME%
173 echo * Special Output directory = %OO_SDK_OUT%
174 echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
176 echo ******************************************************************
181 Error: Please insert the necessary environment variables into the batch file.