1*d15d0b9cSJürgen Schmidtrem ************************************************************* 2*d15d0b9cSJürgen Schmidtrem 3*d15d0b9cSJürgen Schmidtrem Licensed to the Apache Software Foundation (ASF) under one 4*d15d0b9cSJürgen Schmidtrem or more contributor license agreements. See the NOTICE file 5*d15d0b9cSJürgen Schmidtrem distributed with this work for additional information 6*d15d0b9cSJürgen Schmidtrem regarding copyright ownership. The ASF licenses this file 7*d15d0b9cSJürgen Schmidtrem to you under the Apache License, Version 2.0 (the 8*d15d0b9cSJürgen Schmidtrem "License"); you may not use this file except in compliance 9*d15d0b9cSJürgen Schmidtrem with the License. You may obtain a copy of the License at 10*d15d0b9cSJürgen Schmidtrem 11*d15d0b9cSJürgen Schmidtrem http://www.apache.org/licenses/LICENSE-2.0 12*d15d0b9cSJürgen Schmidtrem 13*d15d0b9cSJürgen Schmidtrem Unless required by applicable law or agreed to in writing, 14*d15d0b9cSJürgen Schmidtrem software distributed under the License is distributed on an 15*d15d0b9cSJürgen Schmidtrem "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d15d0b9cSJürgen Schmidtrem KIND, either express or implied. See the License for the 17*d15d0b9cSJürgen Schmidtrem specific language governing permissions and limitations 18*d15d0b9cSJürgen Schmidtrem under the License. 19*d15d0b9cSJürgen Schmidtrem 20*d15d0b9cSJürgen Schmidtrem ************************************************************* 21cdf0e10cSrcweir@echo off 22d1bc5a71SJü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 267477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_NAME=openoffice4.0_sdk" 277477dbb9SJürgen Schmidt@set "OO_SDK_NAME=<your_input_here>" 28cdf0e10cSrcweir 29cdf0e10cSrcweirREM Installation directory of the Software Development Kit. 307477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_HOME=C:\Program Files\OpenOffice\4\sdk" 317477dbb9SJürgen Schmidt@set "OO_SDK_HOME=<your_input_here>" 32cdf0e10cSrcweir 33cdf0e10cSrcweirREM Office installation directory. 347477dbb9SJürgen SchmidtREM Example: @set "OFFICE_HOME=C:\Program Files\OpenOffice 4" 357477dbb9SJürgen Schmidt@set "OFFICE_HOME=<your_input_here>" 36cdf0e10cSrcweir 37cdf0e10cSrcweirREM Directory of the make command. 387477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_MAKE_HOME=C:\UnxUtils\usr\local\wbin" 397477dbb9SJürgen Schmidt@set "OO_SDK_MAKE_HOME=<your_input_here>" 40cdf0e10cSrcweir 41cdf0e10cSrcweirREM Directory of the zip tool. 427477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_ZIP_HOME=C:\UnxUtils\usr\local\wbin" 437477dbb9SJürgen Schmidt@set "OO_SDK_ZIP_HOME=<your_input_here>" 44cdf0e10cSrcweir 45985d02c7SAriel Constenla-HaileREM Directory of the cat tool. 467477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin" 477477dbb9SJürgen Schmidt@set "OO_SDK_CAT_HOME=<your_input_here>" 48985d02c7SAriel Constenla-Haile 49985d02c7SAriel Constenla-HaileREM Directory of the sed tool. 507477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin" 517477dbb9SJürgen Schmidt@set "OO_SDK_SED_HOME=<your_input_here>" 52985d02c7SAriel Constenla-Haile 53cdf0e10cSrcweirREM Directory of the C++ compiler. 547477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin" 557477dbb9SJürgen Schmidt@set "OO_SDK_CPP_HOME=<your_input_here>" 567477dbb9SJürgen Schmidt@set "CPP_MANIFEST=true" 577477dbb9SJürgen Schmidt@set "CPP_WINDOWS_SDK=<your_input_here>" 58cdf0e10cSrcweir 59cdf0e10cSrcweirREM Directory of the C# and VB.NET compilers. 607477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705" 617477dbb9SJürgen Schmidt@set "OO_SDK_CLI_HOME=<your_input_here>" 62cdf0e10cSrcweir 63cdf0e10cSrcweirREM Java SDK installation directory. 647477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05" 657477dbb9SJürgen Schmidt@set "OO_SDK_JAVA_HOME=<your_input_here>" 66cdf0e10cSrcweir 67cdf0e10cSrcweirREM Special output directory 687477dbb9SJürgen SchmidtREM Example: @set "OO_SDK_OUT=C:\openoffice4.0_sdk" 697477dbb9SJürgen Schmidt@set "OO_SDK_OUT=<your_input_here>" 70cdf0e10cSrcweir 71cdf0e10cSrcweirREM Automatic deployment 727477dbb9SJürgen SchmidtREM Example: @set "SDK_AUTO_DEPLOYMENT=YES" 737477dbb9SJürgen Schmidt@set "SDK_AUTO_DEPLOYMENT=YES" 74cdf0e10cSrcweir 75b3ba5bc7SJürgen SchmidtREM Check installation path for the Office Development Kit. 76cdf0e10cSrcweirif not defined OO_SDK_HOME ( 77cdf0e10cSrcweir echo Error: the variable OO_SDK_HOME is missing! 787477dbb9SJürgen Schmidt goto :error 79cdf0e10cSrcweir ) 80cdf0e10cSrcweir 817477dbb9SJürgen Schmidt 82cdf0e10cSrcweirREM Check installation path for GNU make. 83cdf0e10cSrcweirif not defined OO_SDK_MAKE_HOME ( 84cdf0e10cSrcweir echo Error: the variable OO_SDK_MAKE_HOME is missing! 857477dbb9SJürgen Schmidt goto :error 86cdf0e10cSrcweir ) 87cdf0e10cSrcweir 88cdf0e10cSrcweirREM Check installation path for the zip tool. 89cdf0e10cSrcweirif not defined OO_SDK_ZIP_HOME ( 90cdf0e10cSrcweir echo Error: the variable OO_SDK_ZIP_HOME is missing! 917477dbb9SJürgen Schmidt goto :error 92cdf0e10cSrcweir ) 93cdf0e10cSrcweir 94985d02c7SAriel Constenla-HaileREM Check installation path for the cat tool. 95985d02c7SAriel Constenla-Haileif not defined OO_SDK_CAT_HOME ( 96985d02c7SAriel Constenla-Haile echo Error: the variable OO_SDK_CAT_HOME is missing! 977477dbb9SJürgen Schmidt goto :error 98985d02c7SAriel Constenla-Haile ) 99985d02c7SAriel Constenla-Haile 100985d02c7SAriel Constenla-HaileREM Check installation path for the sed tool. 101985d02c7SAriel Constenla-Haileif not defined OO_SDK_SED_HOME ( 102985d02c7SAriel Constenla-Haile echo Error: the variable OO_SDK_SED_HOME is missing! 1037477dbb9SJürgen Schmidt goto :error 104985d02c7SAriel Constenla-Haile ) 105985d02c7SAriel Constenla-Haile 106cdf0e10cSrcweirREM Set library path. 1077477dbb9SJürgen Schmidt@set "LIB=%OO_SDK_HOME%\lib;%LIB%" 108cdf0e10cSrcweirif defined CPP_WINDOWS_SDK ( 1097477dbb9SJürgen Schmidt @set "LIB=%LIB%;%CPP_WINDOWS_SDK%\lib" 110cdf0e10cSrcweir ) 111cdf0e10cSrcweir 112cdf0e10cSrcweirREM Set office program path. 113cdf0e10cSrcweirif defined OFFICE_HOME ( 1147477dbb9SJürgen Schmidt @set "OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program" 115cdf0e10cSrcweir ) 116cdf0e10cSrcweirREM Set UNO path, necessary to ensure that the cpp examples using the 117cdf0e10cSrcweirREM new UNO bootstrap mechanism use the configured office installation 118cdf0e10cSrcweirREM (only set when using an Office). 119cdf0e10cSrcweirif defined OFFICE_HOME ( 1207477dbb9SJürgen Schmidt @set "UNO_PATH=%OFFICE_PROGRAM_PATH%" 1217477dbb9SJürgen Schmidt ) 122cdf0e10cSrcweir 123b3ba5bc7SJürgen Schmidt 1247477dbb9SJürgen Schmidt@set "OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%" 1257477dbb9SJürgen Schmidt@set "OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%" 1267477dbb9SJürgen Schmidt@set "OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes" 127cdf0e10cSrcweir 128cdf0e10cSrcweirREM Set classpath 1297477dbb9SJü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" 130cdf0e10cSrcweir 131cdf0e10cSrcweirREM Add directory of the SDK tools to the path. 1327477dbb9SJürgen Schmidtset "PATH=%OO_SDK_HOME%\bin;%OO_SDK_OFFICE_BIN_DIR%;%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%" 133cdf0e10cSrcweir 1347477dbb9SJürgen SchmidtREM Set PATH appropriate to the output directory 135cdf0e10cSrcweirif defined OO_SDK_OUT ( 1367477dbb9SJürgen Schmidt @set "PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%" 1377477dbb9SJürgen Schmidt ) else ( 1387477dbb9SJürgen Schmidt @set "PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%" 1397477dbb9SJürgen Schmidt ) 140b3ba5bc7SJürgen Schmidt 141b3ba5bc7SJürgen SchmidtREM Add directory of the Win SDK to the path, if necessary. 142b3ba5bc7SJürgen Schmidtif defined CPP_WINDOWS_SDK ( 1437477dbb9SJürgen Schmidt @set "PATH=%CPP_WINDOWS_SDK\bin%;%PATH%" 1447477dbb9SJürgen Schmidt @set "INCLUDE=%CPP_WINDOWS_SDK\Include%;%INCLUDE%" 145b3ba5bc7SJürgen Schmidt) 146cdf0e10cSrcweirREM Add directory of the C# and VB.NET compilers to the path, if necessary. 1477477dbb9SJürgen Schmidtif defined OO_SDK_CLI_HOME @set "PATH=%OO_SDK_CLI_HOME%;%PATH%" 148cdf0e10cSrcweir 149cdf0e10cSrcweirREM Add directory of the Java tools to the path, if necessary. 1507477dbb9SJürgen Schmidtif defined OO_SDK_JAVA_HOME @set "PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%" 151cdf0e10cSrcweir 152cdf0e10cSrcweirREM Set environment for C++ compiler tools, if necessary. 153cdf0e10cSrcweirif defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat" 154cdf0e10cSrcweir 155cdf0e10cSrcweirREM Set tilte to identify the prepared shell. 156cdf0e10cSrcweirtitle Shell prepared for SDK 157cdf0e10cSrcweir 158cdf0e10cSrcweirREM Prepare shell with all necessary environment variables. 159cdf0e10cSrcweirecho. 160cdf0e10cSrcweirecho ****************************************************************** 161cdf0e10cSrcweirecho * 162cdf0e10cSrcweirecho * SDK environment is prepared for Windows 163cdf0e10cSrcweirecho * 164cdf0e10cSrcweirecho * SDK = %OO_SDK_HOME% 165cdf0e10cSrcweirecho * Office = %OFFICE_HOME% 166cdf0e10cSrcweirecho * Make = %OO_SDK_MAKE_HOME% 167cdf0e10cSrcweirecho * Zip = %OO_SDK_ZIP_HOME% 168985d02c7SAriel Constenla-Haileecho * cat = %OO_SDK_CAT_HOME% 169985d02c7SAriel Constenla-Haileecho * sed = %OO_SDK_SED_HOME% 170cdf0e10cSrcweirecho * C++ Compiler = %OO_SDK_CPP_HOME% 171cdf0e10cSrcweirecho * C# and VB.NET compilers = %OO_SDK_CLI_HOME% 172cdf0e10cSrcweirecho * Java = %OO_SDK_JAVA_HOME% 173cdf0e10cSrcweirecho * Special Output directory = %OO_SDK_OUT% 174cdf0e10cSrcweirecho * Auto deployment = %SDK_AUTO_DEPLOYMENT% 175cdf0e10cSrcweirecho * 176cdf0e10cSrcweirecho ****************************************************************** 177cdf0e10cSrcweirecho. 1787477dbb9SJürgen Schmidtgoto end 179cdf0e10cSrcweir 1807477dbb9SJürgen Schmidt :error 181cdf0e10cSrcweirError: Please insert the necessary environment variables into the batch file. 182cdf0e10cSrcweir 1837477dbb9SJürgen Schmidt :end 184