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=libreoffice3.4_sdk
7 set OO_SDK_NAME=libreoffice3.4_sdk
9 REM Installation directory of the Software Development Kit.
10 REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\sdk
13 REM Office installation directory.
14 REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3
17 REM URE installation directory.
18 REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE
21 REM Directory of the make command.
22 REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make
25 REM Directory of the zip tool.
26 REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
29 REM Directory of the C++ compiler.
30 REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
31 REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
36 REM Directory of the C# and VB.NET compilers.
37 REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
40 REM Java SDK installation directory.
41 REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
44 REM Special output directory
45 REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\sdk
48 REM Automatic deployment
49 REM Example: set SDK_AUTO_DEPLOYMENT=YES
50 set SDK_AUTO_DEPLOYMENT=YES
52 REM Check installation path for the StarOffice Development Kit.
53 if not defined OO_SDK_HOME (
54 echo Error: the variable OO_SDK_HOME is missing!
58 REM Check installation path for the office.
59 REM if not defined OFFICE_HOME (
60 REM if not defined OO_SDK_URE_HOME (
61 REM echo Error: either of the variables OFFICE_HOME and
62 REM echo OO_SDK_URE_HOME is missing!
67 REM Check installation path for GNU make.
68 if not defined OO_SDK_MAKE_HOME (
69 echo Error: the variable OO_SDK_MAKE_HOME is missing!
73 REM Check installation path for the zip tool.
74 if not defined OO_SDK_ZIP_HOME (
75 echo Error: the variable OO_SDK_ZIP_HOME is missing!
80 set LIB=%OO_SDK_HOME%\lib;%LIB%
81 if defined CPP_WINDOWS_SDK (
82 set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
85 REM Set office program path.
86 if defined OFFICE_HOME (
87 set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
90 REM Set UNO path, necessary to ensure that the cpp examples using the
91 REM new UNO bootstrap mechanism use the configured office installation
92 REM (only set when using an Office).
93 if defined OFFICE_HOME (
94 set UNO_PATH=%OFFICE_PROGRAM_PATH%
97 REM if defined OO_SDK_URE_HOME (
98 set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin
99 set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin
100 set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java
102 set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
103 set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%
104 set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
108 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
109 REM if defined OFFICE_HOME (
110 REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
113 REM Add directory of the SDK tools to the path.
114 set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
116 REM Set PATH appropriate to the output directory
117 if defined OO_SDK_OUT (
118 set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
120 set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
123 REM Add directory of the command make to the path, if necessary.
124 if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%
126 REM Add directory of the zip tool to the path, if necessary.
127 if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
129 REM Add directory of the C++ compiler to the path, if necessary.
130 if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
132 REM Add directory of the C# and VB.NET compilers to the path, if necessary.
133 if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%
135 REM Add directory of the Java tools to the path, if necessary.
136 if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
138 REM Set environment for C++ compiler tools, if necessary.
139 if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
141 REM Set tilte to identify the prepared shell.
142 title Shell prepared for SDK
144 REM Prepare shell with all necessary environment variables.
146 echo ******************************************************************
148 echo * SDK environment is prepared for Windows
150 echo * SDK = %OO_SDK_HOME%
151 echo * Office = %OFFICE_HOME%
152 echo * URE = %OO_SDK_URE_HOME%
153 echo * Make = %OO_SDK_MAKE_HOME%
154 echo * Zip = %OO_SDK_ZIP_HOME%
155 echo * C++ Compiler = %OO_SDK_CPP_HOME%
156 echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
157 echo * Java = %OO_SDK_JAVA_HOME%
158 echo * Special Output directory = %OO_SDK_OUT%
159 echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
161 echo ******************************************************************
166 Error: Please insert the necessary environment variables into the batch file.