1@echo off 2REM This script sets all enviroment variables, which 3REM are necessary for building the examples of the Office Development Kit. 4REM The Script was developed for the operating systems Windows. 5REM The SDK name 6REM Example: set OO_SDK_NAME=openoffice3.0_sdk 7set OO_SDK_NAME=openoffice.org3.0_sdk 8 9REM Installation directory of the Software Development Kit. 10REM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice.org\Basic 3.0\sdk 11set OO_SDK_HOME= 12 13REM Office installation directory. 14REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice.org 3 15set OFFICE_HOME= 16 17REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice.org\Basis 3.0 18set OFFICE_BASE_HOME= 19 20REM URE installation directory. 21REM Example: set OO_SDK_URE_HOME=C:\Program Files\OpenOffice.org\URE 22set OO_SDK_URE_HOME= 23 24REM Directory of the make command. 25REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make 26set OO_SDK_MAKE_HOME= 27 28REM Directory of the zip tool. 29REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin 30set OO_SDK_ZIP_HOME= 31 32REM Directory of the C++ compiler. 33REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin 34REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\ 35set OO_SDK_CPP_HOME= 36set CPP_VC8= 37set CPP_WINDOWS_SDK= 38 39REM Directory of the C# and VB.NET compilers. 40REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 41set OO_SDK_CLI_HOME= 42 43REM Java SDK installation directory. 44REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 45set OO_SDK_JAVA_HOME= 46 47REM Special output directory 48REM Example: set OO_SDK_OUT=C:\openoffice.org3.0_sdk 49set OO_SDK_OUT= 50 51REM Automatic deployment 52REM Example: set SDK_AUTO_DEPLOYMENT=YES 53set SDK_AUTO_DEPLOYMENT=YES 54 55set STLDEBUG= 56REM check stlport lib in 4NT shell 57REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". ( 58REM set STLDEBUG=_stldebug 59REM ) 60 61REM Check installation path for the StarOffice Development Kit. 62if not defined OO_SDK_HOME ( 63 echo Error: the variable OO_SDK_HOME is missing! 64 goto :error 65 ) 66 67REM Check installation path for the office. 68REM if not defined OFFICE_HOME ( 69REM if not defined OO_SDK_URE_HOME ( 70REM echo Error: either of the variables OFFICE_HOME and 71REM echo OO_SDK_URE_HOME is missing! 72REM goto :error 73REM ) 74REM ) 75 76REM Check installation path for GNU make. 77if not defined OO_SDK_MAKE_HOME ( 78 echo Error: the variable OO_SDK_MAKE_HOME is missing! 79 goto :error 80 ) 81 82REM Check installation path for the zip tool. 83if not defined OO_SDK_ZIP_HOME ( 84 echo Error: the variable OO_SDK_ZIP_HOME is missing! 85 goto :error 86 ) 87 88REM Set library path. 89set LIB=%OO_SDK_HOME%\lib;%LIB% 90if defined CPP_WINDOWS_SDK ( 91 set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib 92 ) 93 94REM Set office program path. 95if defined OFFICE_HOME ( 96 set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program 97 ) 98 99REM Set office program path. 100if defined OFFICE_BASE_HOME ( 101 set OFFICE_BASE_PROGRAM_PATH=%OFFICE_BASE_HOME%\program 102 ) 103 104REM Set UNO path, necessary to ensure that the cpp examples using the 105REM new UNO bootstrap mechanism use the configured office installation 106REM (only set when using an Office). 107if defined OFFICE_HOME ( 108 set UNO_PATH=%OFFICE_PROGRAM_PATH% 109 ) 110 111REM if defined OO_SDK_URE_HOME ( 112set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin 113set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin 114set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java 115REM ) else ( 116set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% 117set OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH% 118set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes 119REM ) 120 121REM Set classpath 122set 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 123REM if defined OFFICE_HOME ( 124REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar 125REM ) 126 127REM Add directory of the SDK tools to the path. 128set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH% 129 130REM Set PATH appropriate to the output directory 131if defined OO_SDK_OUT ( 132 set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% 133 ) else ( 134 set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% 135 ) 136 137REM Add directory of the command make to the path, if necessary. 138if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH% 139 140REM Add directory of the zip tool to the path, if necessary. 141if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH% 142 143REM Add directory of the C++ compiler to the path, if necessary. 144if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH% 145 146REM Add directory of the C# and VB.NET compilers to the path, if necessary. 147if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH% 148 149REM Add directory of the Java tools to the path, if necessary. 150if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% 151 152REM Set environment for C++ compiler tools, if necessary. 153if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 154 155REM Set tilte to identify the prepared shell. 156title Shell prepared for SDK 157 158REM Prepare shell with all necessary environment variables. 159echo. 160echo ****************************************************************** 161echo * 162echo * SDK environment is prepared for Windows 163echo * 164echo * SDK = %OO_SDK_HOME% 165echo * Office = %OFFICE_HOME% 166echo * Office Base = %OFFICE_BASE_HOME% 167echo * URE = %OO_SDK_URE_HOME% 168echo * Make = %OO_SDK_MAKE_HOME% 169echo * Zip = %OO_SDK_ZIP_HOME% 170echo * C++ Compiler = %OO_SDK_CPP_HOME% 171echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 172echo * Java = %OO_SDK_JAVA_HOME% 173echo * Special Output directory = %OO_SDK_OUT% 174echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% 175echo * 176echo ****************************************************************** 177echo. 178goto end 179 180 :error 181Error: Please insert the necessary environment variables into the batch file. 182 183 :end 184