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=apacheopenoffice3.0_sdk 27set OO_SDK_NAME=apacheopenoffice3.0_sdk 28 29REM Installation directory of the Software Development Kit. 30REM Example: set OO_SDK_HOME=C:\Program Files\Apache OpenOffice\Basic 3.0\sdk 31set OO_SDK_HOME= 32 33REM Office installation directory. 34REM Example: set OFFICE_HOME=C:\Program Files\Apache OpenOffice 3 35set OFFICE_HOME= 36 37REM Example: set OFFICE_HOME=C:\Program Files\Apache OpenOffice\Basis 3.0 38set OFFICE_BASE_HOME= 39 40REM URE installation directory. 41REM Example: set OO_SDK_URE_HOME=C:\Program Files\Apache OpenOffice\URE 42set OO_SDK_URE_HOME= 43 44REM Directory of the make command. 45REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make 46set OO_SDK_MAKE_HOME= 47 48REM Directory of the zip tool. 49REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin 50set OO_SDK_ZIP_HOME= 51 52REM Directory of the cat tool. 53REM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin\ 54set OO_SDK_CAT_HOME= 55 56REM Directory of the sed tool. 57REM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin\ 58set OO_SDK_SED_HOME= 59 60REM Directory of the C++ compiler. 61REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin 62REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\ 63set OO_SDK_CPP_HOME= 64set CPP_VC8= 65set CPP_WINDOWS_SDK= 66 67REM Directory of the C# and VB.NET compilers. 68REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 69set OO_SDK_CLI_HOME= 70 71REM Java SDK installation directory. 72REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 73set OO_SDK_JAVA_HOME= 74 75REM Special output directory 76REM Example: set OO_SDK_OUT=C:\apacheopenoffice3.0_sdk 77set OO_SDK_OUT= 78 79REM Automatic deployment 80REM Example: set SDK_AUTO_DEPLOYMENT=YES 81set SDK_AUTO_DEPLOYMENT=YES 82 83set STLDEBUG= 84REM check stlport lib in 4NT shell 85REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". ( 86REM set STLDEBUG=_stldebug 87REM ) 88 89REM Check installation path for the StarOffice Development Kit. 90if not defined OO_SDK_HOME ( 91 echo Error: the variable OO_SDK_HOME is missing! 92 goto :error 93 ) 94 95REM Check installation path for the office. 96REM if not defined OFFICE_HOME ( 97REM if not defined OO_SDK_URE_HOME ( 98REM echo Error: either of the variables OFFICE_HOME and 99REM echo OO_SDK_URE_HOME is missing! 100REM goto :error 101REM ) 102REM ) 103 104REM Check installation path for GNU make. 105if not defined OO_SDK_MAKE_HOME ( 106 echo Error: the variable OO_SDK_MAKE_HOME is missing! 107 goto :error 108 ) 109 110REM Check installation path for the zip tool. 111if not defined OO_SDK_ZIP_HOME ( 112 echo Error: the variable OO_SDK_ZIP_HOME is missing! 113 goto :error 114 ) 115 116REM Check installation path for the cat tool. 117if not defined OO_SDK_CAT_HOME ( 118 echo Error: the variable OO_SDK_CAT_HOME is missing! 119 goto :error 120 ) 121 122REM Check installation path for the sed tool. 123if not defined OO_SDK_SED_HOME ( 124 echo Error: the variable OO_SDK_SED_HOME is missing! 125 goto :error 126 ) 127 128REM Set library path. 129set LIB=%OO_SDK_HOME%\lib;%LIB% 130if defined CPP_WINDOWS_SDK ( 131 set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib 132 ) 133 134REM Set office program path. 135if defined OFFICE_HOME ( 136 set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program 137 ) 138 139REM Set office program path. 140if defined OFFICE_BASE_HOME ( 141 set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\program 142 ) 143 144REM Set UNO path, necessary to ensure that the cpp examples using the 145REM new UNO bootstrap mechanism use the configured office installation 146REM (only set when using an Office). 147if defined OFFICE_HOME ( 148 set UNO_PATH=%OFFICE_PROGRAM_PATH% 149 ) 150 151REM if defined OO_SDK_URE_HOME ( 152set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin 153set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin 154set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java 155REM ) else ( 156set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% 157set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH% 158set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes 159REM ) 160 161REM Set classpath 162set 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 163REM if defined OFFICE_HOME ( 164REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar 165REM ) 166 167REM Add directory of the SDK tools to the path. 168set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH% 169 170REM Set PATH appropriate to the output directory 171if defined OO_SDK_OUT ( 172 set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% 173 ) else ( 174 set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% 175 ) 176 177REM Add directory of the command make to the path, if necessary. 178if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH% 179 180REM Add directory of the zip tool to the path, if necessary. 181if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH% 182 183REM Add directory of the cat tool to the path, if necessary. 184if defined OO_SDK_CAT_HOME set PATH=%OO_SDK_CAT_HOME%;%PATH% 185 186REM Add directory of the sed tool to the path, if necessary. 187if defined OO_SDK_SED_HOME set PATH=%OO_SDK_SED_HOME%;%PATH% 188 189REM Add directory of the C++ compiler to the path, if necessary. 190if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH% 191 192REM Add directory of the C# and VB.NET compilers to the path, if necessary. 193if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH% 194 195REM Add directory of the Java tools to the path, if necessary. 196if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% 197 198REM Set environment for C++ compiler tools, if necessary. 199if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 200 201REM Set tilte to identify the prepared shell. 202title Shell prepared for SDK 203 204REM Prepare shell with all necessary environment variables. 205echo. 206echo ****************************************************************** 207echo * 208echo * SDK environment is prepared for Windows 209echo * 210echo * SDK = %OO_SDK_HOME% 211echo * Office = %OFFICE_HOME% 212echo * Office Base = %OFFICE_BASE_HOME% 213echo * URE = %OO_SDK_URE_HOME% 214echo * Make = %OO_SDK_MAKE_HOME% 215echo * Zip = %OO_SDK_ZIP_HOME% 216echo * cat = %OO_SDK_CAT_HOME% 217echo * sed = %OO_SDK_SED_HOME% 218echo * C++ Compiler = %OO_SDK_CPP_HOME% 219echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 220echo * Java = %OO_SDK_JAVA_HOME% 221echo * Special Output directory = %OO_SDK_OUT% 222echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% 223echo * 224echo ****************************************************************** 225echo. 226goto end 227 228 :error 229Error: Please insert the necessary environment variables into the batch file. 230 231 :end 232