2 rem This file is part of the LibreOffice project.
4 rem This Source Code Form is subject to the terms of the Mozilla Public
5 rem License, v. 2.0. If a copy of the MPL was not distributed with this
6 rem file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 rem This file incorporates work covered by the following license notice:
10 rem Licensed to the Apache Software Foundation (ASF) under one or more
11 rem contributor license agreements. See the NOTICE file distributed
12 rem with this work for additional information regarding copyright
13 rem ownership. The ASF licenses this file to you under the Apache
14 rem License, Version 2.0 (the "License"); you may not use this file
15 rem except in compliance with the License. You may obtain a copy of
16 rem the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 REM This script sets all enviroment variables, which
21 REM are necessary for building the examples of the Office Development Kit.
22 REM The Script was developed for the operating systems Windows.
24 REM Example: set OO_SDK_NAME=libreoffice3.4_sdk
25 set OO_SDK_NAME=libreoffice3.4_sdk
27 REM Installation directory of the Software Development Kit.
28 REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\sdk
31 REM Office installation directory.
32 REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3
35 REM URE installation directory.
36 REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE
39 REM Directory of the make command.
40 REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make
43 REM Directory of the zip tool.
44 REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
47 REM Directory of the C++ compiler.
48 REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
49 REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
54 REM Directory of the C# and VB.NET compilers.
55 REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
58 REM Java SDK installation directory.
59 REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
62 REM Special output directory
63 REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\sdk
66 REM Automatic deployment
67 REM Example: set SDK_AUTO_DEPLOYMENT=YES
68 set SDK_AUTO_DEPLOYMENT=YES
70 REM Check installation path for the StarOffice Development Kit.
71 if not defined OO_SDK_HOME (
72 echo Error: the variable OO_SDK_HOME is missing!
76 REM Check installation path for the office.
77 REM if not defined OFFICE_HOME (
78 REM if not defined OO_SDK_URE_HOME (
79 REM echo Error: either of the variables OFFICE_HOME and
80 REM echo OO_SDK_URE_HOME is missing!
85 REM Check installation path for GNU make.
86 if not defined OO_SDK_MAKE_HOME (
87 echo Error: the variable OO_SDK_MAKE_HOME is missing!
91 REM Check installation path for the zip tool.
92 if not defined OO_SDK_ZIP_HOME (
93 echo Error: the variable OO_SDK_ZIP_HOME is missing!
98 set LIB=%OO_SDK_HOME%\lib;%LIB%
99 if defined CPP_WINDOWS_SDK (
100 set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
103 REM Set office program path.
104 if defined OFFICE_HOME (
105 set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
108 REM Set UNO path, necessary to ensure that the cpp examples using the
109 REM new UNO bootstrap mechanism use the configured office installation
110 REM (only set when using an Office).
111 if defined OFFICE_HOME (
112 set UNO_PATH=%OFFICE_PROGRAM_PATH%
115 REM if defined OO_SDK_URE_HOME (
116 set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin
117 set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin
118 set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java
120 set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
121 set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%
122 set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
126 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
127 REM if defined OFFICE_HOME (
128 REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
131 REM Add directory of the SDK tools to the path.
132 set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
134 REM Set PATH appropriate to the output directory
135 if defined OO_SDK_OUT (
136 set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
138 set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
141 REM Add directory of the command make to the path, if necessary.
142 if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%
144 REM Add directory of the zip tool to the path, if necessary.
145 if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
147 REM Add directory of the C++ compiler to the path, if necessary.
148 if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
150 REM Add directory of the C# and VB.NET compilers to the path, if necessary.
151 if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%
153 REM Add directory of the Java tools to the path, if necessary.
154 if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
156 REM Set environment for C++ compiler tools, if necessary.
157 if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
159 REM Set tilte to identify the prepared shell.
160 title Shell prepared for SDK
162 REM Prepare shell with all necessary environment variables.
164 echo ******************************************************************
166 echo * SDK environment is prepared for Windows
168 echo * SDK = %OO_SDK_HOME%
169 echo * Office = %OFFICE_HOME%
170 echo * URE = %OO_SDK_URE_HOME%
171 echo * Make = %OO_SDK_MAKE_HOME%
172 echo * Zip = %OO_SDK_ZIP_HOME%
173 echo * C++ Compiler = %OO_SDK_CPP_HOME%
174 echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
175 echo * Java = %OO_SDK_JAVA_HOME%
176 echo * Special Output directory = %OO_SDK_OUT%
177 echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
179 echo ******************************************************************
184 Error: Please insert the necessary environment variables into the batch file.