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=openoffice4.0_sdk 7set OO_SDK_NAME=openoffice4.0_sdk 8 9REM Installation directory of the Software Development Kit. 10REM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice 4\sdk 11@set OO_SDK_HOME= 12 13REM Office installation directory. 14REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice 4 15@set OFFICE_HOME= 16 17REM Directory of the make command. 18REM Example: set OO_SDK_MAKE_HOME=C:\UnixTools\usr\local\wbin 19@set OO_SDK_MAKE_HOME= 20 21REM Directory of the zip tool. 22REM Example: set OO_SDK_ZIP_HOME=C:\UnixTools\usr\local\wbin 23@set OO_SDK_ZIP_HOME= 24 25REM Directory of the cat tool. 26REM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin 27@set OO_SDK_CAT_HOME= 28 29REM Directory of the sed tool. 30REM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin 31@set OO_SDK_SED_HOME= 32 33REM Directory of the C++ compiler. 34REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin 35@set OO_SDK_CPP_HOME= 36@set CPP_MANIFEST= 37@set 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 41@set 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 45@set OO_SDK_JAVA_HOME= 46 47REM Special output directory 48REM Example: set OO_SDK_OUT=C:\openoffice4.0_sdk 49@set OO_SDK_OUT= 50 51REM Automatic deployment 52REM Example: set SDK_AUTO_DEPLOYMENT=YES 53@set SDK_AUTO_DEPLOYMENT=YES 54 55@set 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 Office 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 GNU make. 68if not defined OO_SDK_MAKE_HOME ( 69 echo Error: the variable OO_SDK_MAKE_HOME is missing! 70 goto error 71 ) 72 73REM Check installation path for the zip tool. 74if not defined OO_SDK_ZIP_HOME ( 75 echo Error: the variable OO_SDK_ZIP_HOME is missing! 76 goto error 77 ) 78 79REM Check installation path for the cat tool. 80if not defined OO_SDK_CAT_HOME ( 81 echo Error: the variable OO_SDK_CAT_HOME is missing! 82 goto error 83 ) 84 85REM Check installation path for the sed tool. 86if not defined OO_SDK_SED_HOME ( 87 echo Error: the variable OO_SDK_SED_HOME is missing! 88 goto error 89 ) 90 91REM Set library path. 92@set LIB=%OO_SDK_HOME%\lib;%LIB% 93if defined CPP_WINDOWS_SDK ( 94 @set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib 95 ) 96 97REM Set office program path. 98if defined OFFICE_HOME ( 99 @set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program 100 ) 101 102REM Set UNO path, necessary to ensure that the cpp examples using the 103REM new UNO bootstrap mechanism use the configured office installation 104REM (only set when using an Office). 105if defined OFFICE_HOME ( 106 @set UNO_PATH=%OFFICE_PROGRAM_PATH% 107) 108 109REM set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH% 110REM set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH% 111REM set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 112 113@set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% 114@set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH% 115@set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 116 117REM Set classpath 118@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 119 120REM Add directory of the SDK tools to the path. 121@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% 122 123if defined OO_SDK_OUT ( 124 @set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% 125) else ( 126 @set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% 127) 128 129REM Add directory of the command make to the path, if necessary. 130REM if defined OO_SDK_MAKE_HOME @set PATH+=%OO_SDK_MAKE_HOME% 131 132Rem Add directory of the zip tool to the path, if necessary. 133REM if defined OO_SDK_ZIP_HOME @set PATH+=%OO_SDK_ZIP_HOME% 134 135REM Add directory of the cat tool to the path, if necessary. 136REM if defined OO_SDK_CAT_HOME @set PATH+=%OO_SDK_CAT_HOME 137 138REM Add directory of the sed tool to the path, if necessary. 139REM if defined OO_SDK_SED_HOME @set PATH+=%OO_SDK_SED_HOME% 140 141REM Add directory of the C++ compiler to the path, if necessary. 142REM if defined OO_SDK_CPP_HOME @set PATH+=%OO_SDK_CPP_HOME% 143 144REM Add directory of the Win SDK to the path, if necessary. 145if defined CPP_WINDOWS_SDK ( 146 @set PATH=%CPP_WINDOWS_SDK%\bin;%PATH% 147 @set INCLUDE=%CPP_WINDOWS_SDK%\Include;%INCLUDE% 148) 149 150REM Add directory of the C# and VB.NET compilers to the path, if necessary. 151if defined OO_SDK_CLI_HOME @set PATH=%OO_SDK_CLI_HOME%;%PATH% 152 153REM Add directory of the Java tools to the path, if necessary. 154if defined OO_SDK_JAVA_HOME @set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% 155 156REM Set environment for C++ compiler tools, if necessary. 157if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 158 159REM Set tilte to identify the prepared shell. 160title Shell prepared for SDK 161 162REM Prepare shell with all necessary environment variables. 163echo. 164echo ****************************************************************** 165echo * 166echo * SDK environment is prepared for Windows 167echo * 168echo * SDK = %OO_SDK_HOME% 169echo * Office = %OFFICE_HOME% 170echo * Make = %OO_SDK_MAKE_HOME% 171echo * Zip = %OO_SDK_ZIP_HOME% 172echo * cat = %OO_SDK_CAT_HOME% 173echo * sed = %OO_SDK_SED_HOME% 174echo * C++ Compiler = %OO_SDK_CPP_HOME% 175echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 176echo * Java = %OO_SDK_JAVA_HOME% 177echo * Special Output directory = %OO_SDK_OUT% 178echo * Auto deployment = %SDK_AUTO_DEPLOYMENT% 179echo * 180echo ****************************************************************** 181echo. 182goto:end 183 184:error 185Error: Please insert the necessary environment variables into the batch file. 186 187:end 188 189