2005-11-09 02:29:45 -06:00
@echo off
REM This script sets all enviroment variables, which
REM are necessary for building the examples of the Office Development Kit.
REM The Script was developed for the operating systems Windows.
REM The SDK name
2011-03-24 03:40:09 -05:00
REM Example: set OO_SDK_NAME=libreoffice3.4_sdk
set OO_SDK_NAME=libreoffice3.4_sdk
2005-11-09 02:29:45 -06:00
REM Installation directory of the Software Development Kit.
2011-10-21 10:18:13 -05:00
REM Example: set OO_SDK_HOME=C:\Program Files\LibreOffice 3\sdk
2005-11-09 02:29:45 -06:00
set OO_SDK_HOME=
REM Office installation directory.
2011-03-24 03:40:09 -05:00
REM Example: set OFFICE_HOME=C:\Program Files\LibreOffice 3
2005-11-09 02:29:45 -06:00
set OFFICE_HOME=
2008-01-28 09:15:29 -06:00
REM URE installation directory.
2011-03-24 03:40:09 -05:00
REM Example: set OO_SDK_URE_HOME=C:\Program Files\LibreOffice 3\URE
2008-01-28 09:15:29 -06:00
set OO_SDK_URE_HOME=
2005-11-09 02:29:45 -06:00
REM Directory of the make command.
REM Example: set OO_SDK_MAKE_HOME=D:\NextGenerationMake\make
set OO_SDK_MAKE_HOME=
REM Directory of the zip tool.
REM Example: set OO_SDK_ZIP_HOME=D:\infozip\bin
set OO_SDK_ZIP_HOME=
REM Directory of the C++ compiler.
2008-10-01 03:05:58 -05:00
REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
REM Example:set CPP_WINDOWS_SDK=C:\Program Files\\Microsoft SDKs\Windows\v6.0A\
2005-11-09 02:29:45 -06:00
set OO_SDK_CPP_HOME=
2008-01-28 09:15:29 -06:00
set CPP_VC8=
2008-10-01 03:05:58 -05:00
set CPP_WINDOWS_SDK=
2005-11-09 02:29:45 -06:00
REM Directory of the C# and VB.NET compilers.
2008-10-01 03:05:58 -05:00
REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
2005-11-09 02:29:45 -06:00
set OO_SDK_CLI_HOME=
2008-01-28 09:15:29 -06:00
REM Java SDK installation directory.
2008-10-01 03:05:58 -05:00
REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
2005-11-09 02:29:45 -06:00
set OO_SDK_JAVA_HOME=
REM Special output directory
2011-10-21 10:18:13 -05:00
REM Example: set OO_SDK_OUT=C:\Program Files\Libreoffice 3\sdk
2008-10-01 03:05:58 -05:00
set OO_SDK_OUT=
2005-11-09 02:29:45 -06:00
REM Automatic deployment
REM Example: set SDK_AUTO_DEPLOYMENT=YES
set SDK_AUTO_DEPLOYMENT=YES
REM Check installation path for the StarOffice Development Kit.
if not defined OO_SDK_HOME (
2008-01-28 09:15:29 -06:00
echo Error: the variable OO_SDK_HOME is missing!
goto :error
)
2005-11-09 02:29:45 -06:00
REM Check installation path for the office.
2008-10-01 03:05:58 -05:00
REM if not defined OFFICE_HOME (
REM if not defined OO_SDK_URE_HOME (
REM echo Error: either of the variables OFFICE_HOME and
REM echo OO_SDK_URE_HOME is missing!
REM goto :error
REM )
REM )
2005-11-09 02:29:45 -06:00
REM Check installation path for GNU make.
if not defined OO_SDK_MAKE_HOME (
2008-01-28 09:15:29 -06:00
echo Error: the variable OO_SDK_MAKE_HOME is missing!
goto :error
)
2005-11-09 02:29:45 -06:00
REM Check installation path for the zip tool.
if not defined OO_SDK_ZIP_HOME (
2008-01-28 09:15:29 -06:00
echo Error: the variable OO_SDK_ZIP_HOME is missing!
goto :error
)
2005-11-09 02:29:45 -06:00
2008-01-28 09:15:29 -06:00
REM Set library path.
2008-10-01 03:05:58 -05:00
set LIB=%OO_SDK_HOME%\lib;%LIB%
if defined CPP_WINDOWS_SDK (
set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
)
2005-11-09 02:29:45 -06:00
REM Set office program path.
2008-01-28 09:15:29 -06:00
if defined OFFICE_HOME (
set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
)
2005-11-09 02:29:45 -06:00
REM Set UNO path, necessary to ensure that the cpp examples using the
2008-01-28 09:15:29 -06:00
REM new UNO bootstrap mechanism use the configured office installation
REM (only set when using an Office).
if defined OFFICE_HOME (
set UNO_PATH=%OFFICE_PROGRAM_PATH%
)
2008-10-01 03:05:58 -05:00
REM if defined OO_SDK_URE_HOME (
set OO_SDK_URE_BIN_DIR=%OO_SDK_URE_HOME%\bin
set OO_SDK_URE_LIB_DIR=%OO_SDK_URE_HOME%\bin
set OO_SDK_URE_JAVA_DIR=%OO_SDK_URE_HOME%\java
REM ) else (
set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
2011-10-21 10:18:13 -05:00
set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
2008-10-01 03:05:58 -05:00
REM )
2005-11-09 02:29:45 -06:00
REM Set classpath
2008-10-01 03:05:58 -05:00
set 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
REM if defined OFFICE_HOME (
REM set CLASSPATH=%CLASSPATH%;%OO_SDK_OFFICE_JAVA_DIR%\unoil.jar
REM )
2005-11-09 02:29:45 -06:00
REM Add directory of the SDK tools to the path.
2008-10-01 03:05:58 -05:00
set PATH=%OO_SDK_HOME%\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_OFFICE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
2005-11-09 02:29:45 -06:00
REM Set PATH appropriate to the output directory
2008-10-01 03:05:58 -05:00
if defined OO_SDK_OUT (
set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
2008-01-28 09:15:29 -06:00
) else (
set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
)
2005-11-09 02:29:45 -06:00
REM Add directory of the command make to the path, if necessary.
if defined OO_SDK_MAKE_HOME set PATH=%OO_SDK_MAKE_HOME%;%PATH%
REM Add directory of the zip tool to the path, if necessary.
if defined OO_SDK_ZIP_HOME set PATH=%OO_SDK_ZIP_HOME%;%PATH%
REM Add directory of the C++ compiler to the path, if necessary.
if defined OO_SDK_CPP_HOME set PATH=%OO_SDK_CPP_HOME%;%PATH%
REM Add directory of the C# and VB.NET compilers to the path, if necessary.
if defined OO_SDK_CLI_HOME set PATH=%OO_SDK_CLI_HOME%;%PATH%
REM Add directory of the Java tools to the path, if necessary.
if defined OO_SDK_JAVA_HOME set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
REM Set environment for C++ compiler tools, if necessary.
if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
REM Set tilte to identify the prepared shell.
title Shell prepared for SDK
REM Prepare shell with all necessary environment variables.
2008-01-28 09:15:29 -06:00
echo.
echo ******************************************************************
2005-11-09 02:29:45 -06:00
echo *
echo * SDK environment is prepared for Windows
2008-01-28 09:15:29 -06:00
echo *
2005-11-09 02:29:45 -06:00
echo * SDK = %OO_SDK_HOME%
echo * Office = %OFFICE_HOME%
2008-01-28 09:15:29 -06:00
echo * URE = %OO_SDK_URE_HOME%
2005-11-09 02:29:45 -06:00
echo * Make = %OO_SDK_MAKE_HOME%
echo * Zip = %OO_SDK_ZIP_HOME%
echo * C++ Compiler = %OO_SDK_CPP_HOME%
echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
echo * Java = %OO_SDK_JAVA_HOME%
2008-10-01 03:05:58 -05:00
echo * Special Output directory = %OO_SDK_OUT%
2005-11-09 02:29:45 -06:00
echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
echo *
2008-01-28 09:15:29 -06:00
echo ******************************************************************
echo.
2005-11-09 02:29:45 -06:00
goto end
2008-01-28 09:15:29 -06:00
:error
2005-11-09 02:29:45 -06:00
Error: Please insert the necessary environment variables into the batch file.
2008-01-28 09:15:29 -06:00
:end