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