1cdf0e10cSrcweir@echo off 2*b3ba5bc7SJürgen SchmidtRem This script sets all enviroment variables, which 3cdf0e10cSrcweirREM are necessary for building the examples of the Office Development Kit. 4cdf0e10cSrcweirREM The Script was developed for the operating systems Windows. 5cdf0e10cSrcweirREM The SDK name 6*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_NAME=openoffice4.0_sdk 7*b3ba5bc7SJürgen Schmidtset OO_SDK_NAME=openoffice4.0_sdk 8cdf0e10cSrcweir 9cdf0e10cSrcweirREM Installation directory of the Software Development Kit. 10*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice 4\sdk 11*b3ba5bc7SJürgen Schmidt@set OO_SDK_HOME= 12cdf0e10cSrcweir 13cdf0e10cSrcweirREM Office installation directory. 14599cc5b4SOliver-Rainer WittmannREM Example: set OFFICE_HOME=C:\Program Files\OpenOffice 4 15*b3ba5bc7SJürgen Schmidt@set OFFICE_HOME= 16cdf0e10cSrcweir 17cdf0e10cSrcweirREM Directory of the make command. 18*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_MAKE_HOME=C:\UnixTools\usr\local\wbin 19*b3ba5bc7SJürgen Schmidt@set OO_SDK_MAKE_HOME= 20cdf0e10cSrcweir 21cdf0e10cSrcweirREM Directory of the zip tool. 22*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_ZIP_HOME=C:\UnixTools\usr\local\wbin 23*b3ba5bc7SJürgen Schmidt@set OO_SDK_ZIP_HOME= 24cdf0e10cSrcweir 25985d02c7SAriel Constenla-HaileREM Directory of the cat tool. 26*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin 27*b3ba5bc7SJürgen Schmidt@set OO_SDK_CAT_HOME= 28985d02c7SAriel Constenla-Haile 29985d02c7SAriel Constenla-HaileREM Directory of the sed tool. 30*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin 31*b3ba5bc7SJürgen Schmidt@set OO_SDK_SED_HOME= 32985d02c7SAriel Constenla-Haile 33cdf0e10cSrcweirREM Directory of the C++ compiler. 34cdf0e10cSrcweirREM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin 35*b3ba5bc7SJürgen Schmidt@set OO_SDK_CPP_HOME= 36*b3ba5bc7SJürgen Schmidt@set CPP_MANIFEST= 37*b3ba5bc7SJürgen Schmidt@set CPP_WINDOWS_SDK= 38cdf0e10cSrcweir 39cdf0e10cSrcweirREM Directory of the C# and VB.NET compilers. 40cdf0e10cSrcweirREM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705 41*b3ba5bc7SJürgen Schmidt@set OO_SDK_CLI_HOME= 42cdf0e10cSrcweir 43cdf0e10cSrcweirREM Java SDK installation directory. 44cdf0e10cSrcweirREM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05 45*b3ba5bc7SJürgen Schmidt@set OO_SDK_JAVA_HOME= 46cdf0e10cSrcweir 47cdf0e10cSrcweirREM Special output directory 48*b3ba5bc7SJürgen SchmidtREM Example: set OO_SDK_OUT=C:\openoffice4.0_sdk 49*b3ba5bc7SJürgen Schmidt@set OO_SDK_OUT= 50cdf0e10cSrcweir 51cdf0e10cSrcweirREM Automatic deployment 52cdf0e10cSrcweirREM Example: set SDK_AUTO_DEPLOYMENT=YES 53*b3ba5bc7SJürgen Schmidt@set SDK_AUTO_DEPLOYMENT=YES 54cdf0e10cSrcweir 55*b3ba5bc7SJürgen Schmidt@set STLDEBUG= 56cdf0e10cSrcweirREM check stlport lib in 4NT shell 57cdf0e10cSrcweirREM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". ( 58*b3ba5bc7SJürgen SchmidtREM @set STLDEBUG=_stldebug 59cdf0e10cSrcweirREM ) 60cdf0e10cSrcweir 61*b3ba5bc7SJürgen SchmidtREM Check installation path for the Office Development Kit. 62cdf0e10cSrcweirif not defined OO_SDK_HOME ( 63cdf0e10cSrcweir echo Error: the variable OO_SDK_HOME is missing! 64*b3ba5bc7SJürgen Schmidt goto error 65cdf0e10cSrcweir ) 66cdf0e10cSrcweir 67cdf0e10cSrcweirREM Check installation path for GNU make. 68cdf0e10cSrcweirif not defined OO_SDK_MAKE_HOME ( 69cdf0e10cSrcweir echo Error: the variable OO_SDK_MAKE_HOME is missing! 70*b3ba5bc7SJürgen Schmidt goto error 71cdf0e10cSrcweir ) 72cdf0e10cSrcweir 73cdf0e10cSrcweirREM Check installation path for the zip tool. 74cdf0e10cSrcweirif not defined OO_SDK_ZIP_HOME ( 75cdf0e10cSrcweir echo Error: the variable OO_SDK_ZIP_HOME is missing! 76*b3ba5bc7SJürgen Schmidt goto error 77cdf0e10cSrcweir ) 78cdf0e10cSrcweir 79985d02c7SAriel Constenla-HaileREM Check installation path for the cat tool. 80985d02c7SAriel Constenla-Haileif not defined OO_SDK_CAT_HOME ( 81985d02c7SAriel Constenla-Haile echo Error: the variable OO_SDK_CAT_HOME is missing! 82*b3ba5bc7SJürgen Schmidt goto error 83985d02c7SAriel Constenla-Haile ) 84985d02c7SAriel Constenla-Haile 85985d02c7SAriel Constenla-HaileREM Check installation path for the sed tool. 86985d02c7SAriel Constenla-Haileif not defined OO_SDK_SED_HOME ( 87985d02c7SAriel Constenla-Haile echo Error: the variable OO_SDK_SED_HOME is missing! 88*b3ba5bc7SJürgen Schmidt goto error 89985d02c7SAriel Constenla-Haile ) 90985d02c7SAriel Constenla-Haile 91cdf0e10cSrcweirREM Set library path. 92*b3ba5bc7SJürgen Schmidt@set LIB=%OO_SDK_HOME%\lib;%LIB% 93cdf0e10cSrcweirif defined CPP_WINDOWS_SDK ( 94*b3ba5bc7SJürgen Schmidt @set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib 95cdf0e10cSrcweir ) 96cdf0e10cSrcweir 97cdf0e10cSrcweirREM Set office program path. 98cdf0e10cSrcweirif defined OFFICE_HOME ( 99*b3ba5bc7SJürgen Schmidt @set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program 100cdf0e10cSrcweir ) 101cdf0e10cSrcweir 102cdf0e10cSrcweirREM Set UNO path, necessary to ensure that the cpp examples using the 103cdf0e10cSrcweirREM new UNO bootstrap mechanism use the configured office installation 104cdf0e10cSrcweirREM (only set when using an Office). 105cdf0e10cSrcweirif defined OFFICE_HOME ( 106*b3ba5bc7SJürgen Schmidt @set UNO_PATH=%OFFICE_PROGRAM_PATH% 107*b3ba5bc7SJürgen Schmidt) 108cdf0e10cSrcweir 109*b3ba5bc7SJürgen SchmidtREM set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH% 110*b3ba5bc7SJürgen SchmidtREM set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH% 111*b3ba5bc7SJürgen SchmidtREM set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 112*b3ba5bc7SJürgen Schmidt 113*b3ba5bc7SJürgen Schmidt@set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH% 114*b3ba5bc7SJürgen Schmidt@set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH% 115*b3ba5bc7SJürgen Schmidt@set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes 116cdf0e10cSrcweir 117cdf0e10cSrcweirREM Set classpath 118*b3ba5bc7SJü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 119cdf0e10cSrcweir 120cdf0e10cSrcweirREM Add directory of the SDK tools to the path. 121*b3ba5bc7SJü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% 122cdf0e10cSrcweir 123cdf0e10cSrcweirif defined OO_SDK_OUT ( 124*b3ba5bc7SJürgen Schmidt @set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH% 125*b3ba5bc7SJürgen Schmidt) else ( 126*b3ba5bc7SJürgen Schmidt @set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH% 127*b3ba5bc7SJürgen Schmidt) 128cdf0e10cSrcweir 129cdf0e10cSrcweirREM Add directory of the command make to the path, if necessary. 130*b3ba5bc7SJürgen SchmidtREM if defined OO_SDK_MAKE_HOME @set PATH+=%OO_SDK_MAKE_HOME% 131cdf0e10cSrcweir 132*b3ba5bc7SJürgen SchmidtRem Add directory of the zip tool to the path, if necessary. 133*b3ba5bc7SJürgen SchmidtREM if defined OO_SDK_ZIP_HOME @set PATH+=%OO_SDK_ZIP_HOME% 134cdf0e10cSrcweir 135985d02c7SAriel Constenla-HaileREM Add directory of the cat tool to the path, if necessary. 136*b3ba5bc7SJürgen SchmidtREM if defined OO_SDK_CAT_HOME @set PATH+=%OO_SDK_CAT_HOME 137985d02c7SAriel Constenla-Haile 138985d02c7SAriel Constenla-HaileREM Add directory of the sed tool to the path, if necessary. 139*b3ba5bc7SJürgen SchmidtREM if defined OO_SDK_SED_HOME @set PATH+=%OO_SDK_SED_HOME% 140985d02c7SAriel Constenla-Haile 141cdf0e10cSrcweirREM Add directory of the C++ compiler to the path, if necessary. 142*b3ba5bc7SJürgen SchmidtREM if defined OO_SDK_CPP_HOME @set PATH+=%OO_SDK_CPP_HOME% 143*b3ba5bc7SJürgen Schmidt 144*b3ba5bc7SJürgen SchmidtREM Add directory of the Win SDK to the path, if necessary. 145*b3ba5bc7SJürgen Schmidtif defined CPP_WINDOWS_SDK ( 146*b3ba5bc7SJürgen Schmidt @set PATH=%CPP_WINDOWS_SDK%\bin;%PATH% 147*b3ba5bc7SJürgen Schmidt @set INCLUDE=%CPP_WINDOWS_SDK%\Include;%INCLUDE% 148*b3ba5bc7SJürgen Schmidt) 149cdf0e10cSrcweir 150cdf0e10cSrcweirREM Add directory of the C# and VB.NET compilers to the path, if necessary. 151*b3ba5bc7SJürgen Schmidtif defined OO_SDK_CLI_HOME @set PATH=%OO_SDK_CLI_HOME%;%PATH% 152cdf0e10cSrcweir 153cdf0e10cSrcweirREM Add directory of the Java tools to the path, if necessary. 154*b3ba5bc7SJürgen Schmidtif defined OO_SDK_JAVA_HOME @set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH% 155cdf0e10cSrcweir 156cdf0e10cSrcweirREM Set environment for C++ compiler tools, if necessary. 157cdf0e10cSrcweirif defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 158cdf0e10cSrcweir 159cdf0e10cSrcweirREM Set tilte to identify the prepared shell. 160cdf0e10cSrcweirtitle Shell prepared for SDK 161cdf0e10cSrcweir 162cdf0e10cSrcweirREM Prepare shell with all necessary environment variables. 163cdf0e10cSrcweirecho. 164cdf0e10cSrcweirecho ****************************************************************** 165cdf0e10cSrcweirecho * 166cdf0e10cSrcweirecho * SDK environment is prepared for Windows 167cdf0e10cSrcweirecho * 168cdf0e10cSrcweirecho * SDK = %OO_SDK_HOME% 169cdf0e10cSrcweirecho * Office = %OFFICE_HOME% 170cdf0e10cSrcweirecho * Make = %OO_SDK_MAKE_HOME% 171cdf0e10cSrcweirecho * Zip = %OO_SDK_ZIP_HOME% 172985d02c7SAriel Constenla-Haileecho * cat = %OO_SDK_CAT_HOME% 173985d02c7SAriel Constenla-Haileecho * sed = %OO_SDK_SED_HOME% 174cdf0e10cSrcweirecho * C++ Compiler = %OO_SDK_CPP_HOME% 175cdf0e10cSrcweirecho * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 176cdf0e10cSrcweirecho * Java = %OO_SDK_JAVA_HOME% 177cdf0e10cSrcweirecho * Special Output directory = %OO_SDK_OUT% 178cdf0e10cSrcweirecho * Auto deployment = %SDK_AUTO_DEPLOYMENT% 179cdf0e10cSrcweirecho * 180cdf0e10cSrcweirecho ****************************************************************** 181cdf0e10cSrcweirecho. 182*b3ba5bc7SJürgen Schmidtgoto:end 183cdf0e10cSrcweir 184*b3ba5bc7SJürgen Schmidt:error 185cdf0e10cSrcweirError: Please insert the necessary environment variables into the batch file. 186cdf0e10cSrcweir 187*b3ba5bc7SJürgen Schmidt:end 188*b3ba5bc7SJürgen Schmidt 189