1@echo off 2REM ************************************************************* 3REM 4REM Licensed to the Apache Software Foundation (ASF) under one 5REM or more contributor license agreements. See the NOTICE file 6REM distributed with this work for additional information 7REM regarding copyright ownership. The ASF licenses this file 8REM to you under the Apache License, Version 2.0 (the 9REM "License")rem you may not use this file except in compliance 10REM with the License. You may obtain a copy of the License at 11REM 12REM http://www.apache.org/licenses/LICENSE-2.0 13REM 14REM Unless required by applicable law or agreed to in writing, 15REM software distributed under the License is distributed on an 16REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17REM KIND, either express or implied. See the License for the 18REM specific language governing permissions and limitations 19REM under the License. 20REM 21REM ************************************************************* 22REM This script sets all enviroment variables, which 23REM are necessary for building the examples of the Office Development Kit. 24REM The Script was developed for the operating systems Windows. 25REM The SDK name 26REM Example: set OO_SDK_NAME=openoffice4.0_sdk 27set OO_SDK_NAME=openoffice4.0_sdk 28 29REM Installation directory of the Software Development Kit. 30REM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice 4\sdk 31@set OO_SDK_HOME= 32 33REM Office installation directory. 34REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice 4 35@set OFFICE_HOME= 36 37REM Directory of the make command. 38REM Example: set OO_SDK_MAKE_HOME=C:\UnixTools\usr\local\wbin 39@set OO_SDK_MAKE_HOME= 40 41REM Directory of the zip tool. 42REM Example: set OO_SDK_ZIP_HOME=C:\UnixTools\usr\local\wbin 43@set OO_SDK_ZIP_HOME= 44 45REM Directory of the cat tool. 46REM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin 47@set OO_SDK_CAT_HOME= 48 49REM Directory of the sed tool. 50REM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin 51@set OO_SDK_SED_HOME= 52 53REM Directory of the C++ compiler. 54REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin 55@set OO_SDK_CPP_HOME= 56@set CPP_MANIFEST= 57@set CPP_WINDOWS_SDK= 58 59REM Directory of the C# and VB.NET compilers. 60REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 61@set OO_SDK_CLI_HOME= 62 63REM Java SDK installation directory. 64REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 65@set OO_SDK_JAVA_HOME= 66 67REM Special output directory 68REM Example: set OO_SDK_OUT=C:\openoffice4.0_sdk 69@set OO_SDK_OUT= 70 71REM Automatic deployment 72REM Example: set SDK_AUTO_DEPLOYMENT=YES 73@set SDK_AUTO_DEPLOYMENT=YES 74 75@set STLDEBUG= 76REM check stlport lib in 4NT shell 77REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". ( 78REM @set STLDEBUG=_stldebug 79REM ) 80 81REM Check installation path for the Office Development Kit. 82if not defined OO_SDK_HOME ( 83 echo Error: the variable OO_SDK_HOME is missing! 84 goto error 85 ) 86 87REM Check installation path for GNU make. 88if not defined OO_SDK_MAKE_HOME ( 89 echo Error: the variable OO_SDK_MAKE_HOME is missing! 90 goto error 91 ) 92 93REM Check installation path for the zip tool. 94if not defined OO_SDK_ZIP_HOME ( 95 echo Error: the variable OO_SDK_ZIP_HOME is missing! 96 goto error 97 ) 98 99REM Check installation path for the cat tool. 100if not defined OO_SDK_CAT_HOME ( 101 echo Error: the variable OO_SDK_CAT_HOME is missing! 102 goto error 103 ) 104 105REM Check installation path for the sed tool. 106if not defined OO_SDK_SED_HOME ( 107 echo Error: the variable OO_SDK_SED_HOME is missing! 108 goto error 109 ) 110 111REM Set library path. 112@set LIB=%OO_SDK_HOME%\lib;%LIB% 113if defined CPP_WINDOWS_SDK ( 114 @set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib 115 ) 116 117REM Set office program path. 118if defined OFFICE_HOME ( 119 @set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program 120 ) 121 122REM Set UNO path, necessary to ensure that the cpp examples using the 123REM new UNO bootstrap mechanism use the configured office installation 124REM (only set when using an Office). 125if defined OFFICE_HOME ( 126 @set UNO_PATH=%OFFICE_PROGRAM_PATH% 127) 128 129REM set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH% 130REM set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH% 131REM set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 132 133@set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% 134@set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH% 135@set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 136 137REM Set classpath 138@set 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 139 140REM Add directory of the SDK tools to the path. 141@set PATH=%OO_SDK_HOME%\bin;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%OO_SDK_MAKE_HOME%;%OO_SDK_ZIP_HOME%;%OO_SDK_CAT_HOME%;%OO_SDK_SED_HOME%;%PATH% 142 143if defined OO_SDK_OUT ( 144 @set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% 145) else ( 146 @set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% 147) 148 149REM Add directory of the command make to the path, if necessary. 150REM if defined OO_SDK_MAKE_HOME @set PATH+=%OO_SDK_MAKE_HOME% 151 152Rem Add directory of the zip tool to the path, if necessary. 153REM if defined OO_SDK_ZIP_HOME @set PATH+=%OO_SDK_ZIP_HOME% 154 155REM Add directory of the cat tool to the path, if necessary. 156REM if defined OO_SDK_CAT_HOME @set PATH+=%OO_SDK_CAT_HOME 157 158REM Add directory of the sed tool to the path, if necessary. 159REM if defined OO_SDK_SED_HOME @set PATH+=%OO_SDK_SED_HOME% 160 161REM Add directory of the C++ compiler to the path, if necessary. 162REM if defined OO_SDK_CPP_HOME @set PATH+=%OO_SDK_CPP_HOME% 163 164REM Add directory of the Win SDK to the path, if necessary. 165if defined CPP_WINDOWS_SDK ( 166 @set PATH=%CPP_WINDOWS_SDK%\bin;%PATH% 167 @set INCLUDE=%CPP_WINDOWS_SDK%\Include;%INCLUDE% 168) 169 170REM Add directory of the C# and VB.NET compilers to the path, if necessary. 171if defined OO_SDK_CLI_HOME @set PATH=%OO_SDK_CLI_HOME%;%PATH% 172 173REM Add directory of the Java tools to the path, if necessary. 174if defined OO_SDK_JAVA_HOME @set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% 175 176REM Set environment for C++ compiler tools, if necessary. 177if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 178 179REM Set tilte to identify the prepared shell. 180title Shell prepared for SDK 181 182REM Prepare shell with all necessary environment variables. 183echo. 184echo ****************************************************************** 185echo * 186echo * SDK environment is prepared for Windows 187echo * 188echo * SDK = %OO_SDK_HOME% 189echo * Office = %OFFICE_HOME% 190echo * Make = %OO_SDK_MAKE_HOME% 191echo * Zip = %OO_SDK_ZIP_HOME% 192echo * cat = %OO_SDK_CAT_HOME% 193echo * sed = %OO_SDK_SED_HOME% 194echo * C++ Compiler = %OO_SDK_CPP_HOME% 195echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 196echo * Java = %OO_SDK_JAVA_HOME% 197echo * Special Output directory = %OO_SDK_OUT% 198echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% 199echo * 200echo ****************************************************************** 201echo. 202goto:end 203 204:error 205Error: Please insert the necessary environment variables into the batch file. 206 207:end 208 209