office-gobmx/odk/setsdkenv_windows.template

170 lines
5.2 KiB
Text
Raw Normal View History

@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
REM Example: set OO_SDK_NAME=OpenOffice.org_SDK
set OO_SDK_NAME=
REM Installation directory of the Software Development Kit.
REM Example: set OO_SDK_HOME=D:\OpenOffice.org_SDK
set OO_SDK_HOME=
REM Office installation directory.
REM Example: set OFFICE_HOME=C:\Programme\OpenOffice.org
set OFFICE_HOME=
REM URE installation directory.
REM Example: set OO_SDK_URE_HOME=C:\Programme\URE
set OO_SDK_URE_HOME=
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.
REM Example:set OO_SDK_CPP_HOME=C:\Programme\Microsoft Visual Studio\VC98\bin
set OO_SDK_CPP_HOME=
set CPP_VC8=
REM Directory of the C# and VB.NET compilers.
REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v2.0.50727
set OO_SDK_CLI_HOME=
REM Java SDK installation directory.
REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
set OO_SDK_JAVA_HOME=
REM Special output directory
REM Example: set OO_SDK_OUTPUT_DIR=c:\temp
set OO_SDK_OUTPUT_DIR=
REM Automatic deployment
REM Example: set SDK_AUTO_DEPLOYMENT=YES
set SDK_AUTO_DEPLOYMENT=YES
set STLDEBUG=
REM check stlport lib in 4NT shell
REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". (
REM set STLDEBUG=_stldebug
REM )
REM Check installation path for the StarOffice Development Kit.
if not defined OO_SDK_HOME (
echo Error: the variable OO_SDK_HOME is missing!
goto :error
)
REM Check installation path for the office.
if not defined OFFICE_HOME (
if not defined OO_SDK_URE_HOME (
echo Error: either of the variables OFFICE_HOME and
echo OO_SDK_URE_HOME is missing!
goto :error
)
)
REM Check installation path for GNU make.
if not defined OO_SDK_MAKE_HOME (
echo Error: the variable OO_SDK_MAKE_HOME is missing!
goto :error
)
REM Check installation path for the zip tool.
if not defined OO_SDK_ZIP_HOME (
echo Error: the variable OO_SDK_ZIP_HOME is missing!
goto :error
)
REM Set library path.
set LIB=%OO_SDK_HOME%\windows\lib;%LIB%
REM Set office program path.
if defined OFFICE_HOME (
set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
)
REM Set UNO path, necessary to ensure that the cpp examples using the
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%
)
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
) else (
set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH%
set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
)
REM Set classpath
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
if defined OFFICE_HOME (
set CLASSPATH=%CLASSPATH%;%OO_SDK_URE_JAVA_DIR%\unoil.jar
)
REM Add directory of the SDK tools to the path.
set PATH=%OO_SDK_HOME%\windows\bin;%OO_SDK_URE_BIN_DIR%;%OO_SDK_HOME%\WINexample.out\bin;%PATH%
REM Set PATH appropriate to the output directory
if defined OO_SDK_OUTPUT_DIR (
set PATH=%OO_SDK_OUTPUT_DIR%\%OO_SDK_NAME%\WINexample.out\bin;%PATH%
) else (
set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
)
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.
echo.
echo ******************************************************************
echo *
echo * SDK environment is prepared for Windows
echo *
echo * SDK = %OO_SDK_HOME%
echo * Office = %OFFICE_HOME%
echo * URE = %OO_SDK_URE_HOME%
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%
echo * Special Output directory = %OO_SDK_OUTPUT_DIR%
echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
echo *
echo ******************************************************************
echo.
goto end
:error
Error: Please insert the necessary environment variables into the batch file.
:end