setsdkenv_windows.template (d1bc5a71) setsdkenv_windows.template (7477dbb9)
1@echo off
1@echo off
2REM *************************************************************
3REM
4REM Licensed to the Apache Software Foundation (ASF) under one
5REM or more contributor license agreements. See the NOTICE file
6REM distributed with this work for additional information
7REM regarding copyright ownership. The ASF licenses this file
8REM to you under the Apache License, Version 2.0 (the
9REM "License")rem you may not use this file except in compliance
10REM with the License. You may obtain a copy of the License at
11REM
12REM http://www.apache.org/licenses/LICENSE-2.0
13REM
14REM Unless required by applicable law or agreed to in writing,
15REM software distributed under the License is distributed on an
16REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17REM KIND, either express or implied. See the License for the
18REM specific language governing permissions and limitations
19REM under the License.
20REM
21REM *************************************************************
22REM This script sets all enviroment variables, which
23REM are necessary for building the examples of the Office Development Kit.
24REM The Script was developed for the operating systems Windows.
25REM The SDK name
2REM This script sets all enviroment variables, which
3REM are necessary for building the examples of the Office Development Kit.
4REM The Script was developed for the operating systems Windows.
5REM The SDK name
26REM Example: set OO_SDK_NAME=openoffice4.0_sdk
27set OO_SDK_NAME=openoffice4.0_sdk
6REM Example: @set "OO_SDK_NAME=openoffice4.0_sdk"
7@set "OO_SDK_NAME=<your_input_here>"
28
29REM Installation directory of the Software Development Kit.
8
9REM Installation directory of the Software Development Kit.
30REM Example: set OO_SDK_HOME=C:\Program Files\OpenOffice 4\sdk
31@set OO_SDK_HOME=
10REM Example: @set "OO_SDK_HOME=C:\Program Files\OpenOffice\4\sdk"
11@set "OO_SDK_HOME=<your_input_here>"
32
33REM Office installation directory.
12
13REM Office installation directory.
34REM Example: set OFFICE_HOME=C:\Program Files\OpenOffice 4
35@set OFFICE_HOME=
14REM Example: @set "OFFICE_HOME=C:\Program Files\OpenOffice 4"
15@set "OFFICE_HOME=<your_input_here>"
36
37REM Directory of the make command.
16
17REM Directory of the make command.
38REM Example: set OO_SDK_MAKE_HOME=C:\UnixTools\usr\local\wbin
39@set OO_SDK_MAKE_HOME=
18REM Example: @set "OO_SDK_MAKE_HOME=C:\UnxUtils\usr\local\wbin"
19@set "OO_SDK_MAKE_HOME=<your_input_here>"
40
41REM Directory of the zip tool.
20
21REM Directory of the zip tool.
42REM Example: set OO_SDK_ZIP_HOME=C:\UnixTools\usr\local\wbin
43@set OO_SDK_ZIP_HOME=
22REM Example: @set "OO_SDK_ZIP_HOME=C:\UnxUtils\usr\local\wbin"
23@set "OO_SDK_ZIP_HOME=<your_input_here>"
44
45REM Directory of the cat tool.
24
25REM Directory of the cat tool.
46REM Example: set OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin
47@set OO_SDK_CAT_HOME=
26REM Example: @set "OO_SDK_CAT_HOME=C:\UnxUtils\usr\local\wbin"
27@set "OO_SDK_CAT_HOME=<your_input_here>"
48
49REM Directory of the sed tool.
28
29REM Directory of the sed tool.
50REM Example: set OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin
51@set OO_SDK_SED_HOME=
30REM Example: @set "OO_SDK_SED_HOME=C:\UnxUtils\usr\local\wbin"
31@set "OO_SDK_SED_HOME=<your_input_here>"
52
53REM Directory of the C++ compiler.
32
33REM Directory of the C++ compiler.
54REM Example:set OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin
55@set OO_SDK_CPP_HOME=
56@set CPP_MANIFEST=
57@set CPP_WINDOWS_SDK=
34REM Example: @set "OO_SDK_CPP_HOME=C:\Program Files\Microsoft Visual Studio 9.0\VC\bin"
35@set "OO_SDK_CPP_HOME=<your_input_here>"
36@set "CPP_MANIFEST=true"
37@set "CPP_WINDOWS_SDK=<your_input_here>"
58
59REM Directory of the C# and VB.NET compilers.
38
39REM Directory of the C# and VB.NET compilers.
60REM Example:set OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705
61@set OO_SDK_CLI_HOME=
40REM Example: @set "OO_SDK_CLI_HOME=C:\WINXP\Microsoft.NET\Framework\v1.0.3705"
41@set "OO_SDK_CLI_HOME=<your_input_here>"
62
63REM Java SDK installation directory.
42
43REM Java SDK installation directory.
64REM Example: set OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
65@set OO_SDK_JAVA_HOME=
44REM Example: @set "OO_SDK_JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05"
45@set "OO_SDK_JAVA_HOME=<your_input_here>"
66
67REM Special output directory
46
47REM Special output directory
68REM Example: set OO_SDK_OUT=C:\openoffice4.0_sdk
69@set OO_SDK_OUT=
48REM Example: @set "OO_SDK_OUT=C:\openoffice4.0_sdk"
49@set "OO_SDK_OUT=<your_input_here>"
70
71REM Automatic deployment
50
51REM Automatic deployment
72REM Example: set SDK_AUTO_DEPLOYMENT=YES
73@set SDK_AUTO_DEPLOYMENT=YES
52REM Example: @set "SDK_AUTO_DEPLOYMENT=YES"
53@set "SDK_AUTO_DEPLOYMENT=YES"
74
54
75@set STLDEBUG=
76REM check stlport lib in 4NT shell
77REM if exist "%OO_SDK_HOME%\windows\lib\stlport_vc71_stldebug.lib". (
78REM @set STLDEBUG=_stldebug
79REM )
80
81REM Check installation path for the Office Development Kit.
82if not defined OO_SDK_HOME (
83 echo Error: the variable OO_SDK_HOME is missing!
55REM Check installation path for the Office Development Kit.
56if not defined OO_SDK_HOME (
57 echo Error: the variable OO_SDK_HOME is missing!
84 goto error
58 goto :error
85 )
86
59 )
60
61
87REM Check installation path for GNU make.
88if not defined OO_SDK_MAKE_HOME (
89 echo Error: the variable OO_SDK_MAKE_HOME is missing!
62REM Check installation path for GNU make.
63if not defined OO_SDK_MAKE_HOME (
64 echo Error: the variable OO_SDK_MAKE_HOME is missing!
90 goto error
65 goto :error
91 )
92
93REM Check installation path for the zip tool.
94if not defined OO_SDK_ZIP_HOME (
95 echo Error: the variable OO_SDK_ZIP_HOME is missing!
66 )
67
68REM Check installation path for the zip tool.
69if not defined OO_SDK_ZIP_HOME (
70 echo Error: the variable OO_SDK_ZIP_HOME is missing!
96 goto error
71 goto :error
97 )
98
99REM Check installation path for the cat tool.
100if not defined OO_SDK_CAT_HOME (
101 echo Error: the variable OO_SDK_CAT_HOME is missing!
72 )
73
74REM Check installation path for the cat tool.
75if not defined OO_SDK_CAT_HOME (
76 echo Error: the variable OO_SDK_CAT_HOME is missing!
102 goto error
77 goto :error
103 )
104
105REM Check installation path for the sed tool.
106if not defined OO_SDK_SED_HOME (
107 echo Error: the variable OO_SDK_SED_HOME is missing!
78 )
79
80REM Check installation path for the sed tool.
81if not defined OO_SDK_SED_HOME (
82 echo Error: the variable OO_SDK_SED_HOME is missing!
108 goto error
83 goto :error
109 )
110
111REM Set library path.
84 )
85
86REM Set library path.
112@set LIB=%OO_SDK_HOME%\lib;%LIB%
87@set "LIB=%OO_SDK_HOME%\lib;%LIB%"
113if defined CPP_WINDOWS_SDK (
88if defined CPP_WINDOWS_SDK (
114 @set LIB=%LIB%;%CPP_WINDOWS_SDK%\lib
89 @set "LIB=%LIB%;%CPP_WINDOWS_SDK%\lib"
115 )
116
117REM Set office program path.
118if defined OFFICE_HOME (
90 )
91
92REM Set office program path.
93if defined OFFICE_HOME (
119 @set OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program
94 @set "OFFICE_PROGRAM_PATH=%OFFICE_HOME%\program"
120 )
95 )
121
122REM Set UNO path, necessary to ensure that the cpp examples using the
123REM new UNO bootstrap mechanism use the configured office installation
124REM (only set when using an Office).
125if defined OFFICE_HOME (
96REM Set UNO path, necessary to ensure that the cpp examples using the
97REM new UNO bootstrap mechanism use the configured office installation
98REM (only set when using an Office).
99if defined OFFICE_HOME (
126 @set UNO_PATH=%OFFICE_PROGRAM_PATH%
127)
100 @set "UNO_PATH=%OFFICE_PROGRAM_PATH%"
101 )
128
102
129REM set OO_SDK_URE_BIN_DIR=%OFFICE_PROGRAM_PATH%
130REM set OO_SDK_URE_LIB_DIR=%OFFICE_PROGRAM_PATH%
131REM set OO_SDK_URE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
132
103
133@set OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%
134@set OO_SDK_OFFICE_LIB_DIR=%OFFICE_PROGRAM_PATH%
135@set OO_SDK_OFFICE_JAVA_DIR=%OFFICE_PROGRAM_PATH%\classes
104@set "OO_SDK_OFFICE_BIN_DIR=%OFFICE_PROGRAM_PATH%"
105@set "OO_SDK_OFFICE_LIB_DIR=%OFFICE_BASE_PROGRAM_PATH%"
106@set "OO_SDK_OFFICE_JAVA_DIR=%OFFICE_BASE_PROGRAM_PATH%\classes"
136
137REM Set classpath
107
108REM Set classpath
138@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
109@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"
139
140REM Add directory of the SDK tools to the path.
110
111REM Add directory of the SDK tools to the path.
141@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%
112set "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%"
142
113
114REM Set PATH appropriate to the output directory
143if defined OO_SDK_OUT (
115if defined OO_SDK_OUT (
144 @set PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%
145) else (
146 @set PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%
147)
116 @set "PATH=%OO_SDK_OUT%\WINexample.out\bin;%PATH%"
117 ) else (
118 @set "PATH=%OO_SDK_HOME%\WINexample.out\bin;%PATH%"
119 )
148
120
149REM Add directory of the command make to the path, if necessary.
150REM if defined OO_SDK_MAKE_HOME @set PATH+=%OO_SDK_MAKE_HOME%
151
152Rem Add directory of the zip tool to the path, if necessary.
153REM if defined OO_SDK_ZIP_HOME @set PATH+=%OO_SDK_ZIP_HOME%
154
155REM Add directory of the cat tool to the path, if necessary.
156REM if defined OO_SDK_CAT_HOME @set PATH+=%OO_SDK_CAT_HOME
157
158REM Add directory of the sed tool to the path, if necessary.
159REM if defined OO_SDK_SED_HOME @set PATH+=%OO_SDK_SED_HOME%
160
161REM Add directory of the C++ compiler to the path, if necessary.
162REM if defined OO_SDK_CPP_HOME @set PATH+=%OO_SDK_CPP_HOME%
163
164REM Add directory of the Win SDK to the path, if necessary.
165if defined CPP_WINDOWS_SDK (
121REM Add directory of the Win SDK to the path, if necessary.
122if defined CPP_WINDOWS_SDK (
166 @set PATH=%CPP_WINDOWS_SDK%\bin;%PATH%
167 @set INCLUDE=%CPP_WINDOWS_SDK%\Include;%INCLUDE%
123 @set "PATH=%CPP_WINDOWS_SDK\bin%;%PATH%"
124 @set "INCLUDE=%CPP_WINDOWS_SDK\Include%;%INCLUDE%"
168)
125)
169
170REM Add directory of the C# and VB.NET compilers to the path, if necessary.
126REM Add directory of the C# and VB.NET compilers to the path, if necessary.
171if defined OO_SDK_CLI_HOME @set PATH=%OO_SDK_CLI_HOME%;%PATH%
127if defined OO_SDK_CLI_HOME @set "PATH=%OO_SDK_CLI_HOME%;%PATH%"
172
173REM Add directory of the Java tools to the path, if necessary.
128
129REM Add directory of the Java tools to the path, if necessary.
174if defined OO_SDK_JAVA_HOME @set PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%
130if defined OO_SDK_JAVA_HOME @set "PATH=%OO_SDK_JAVA_HOME%\bin;%OO_SDK_JAVA_HOME%\jre\bin;%PATH%"
175
176REM Set environment for C++ compiler tools, if necessary.
177if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
178
179REM Set tilte to identify the prepared shell.
180title Shell prepared for SDK
181
182REM Prepare shell with all necessary environment variables.

--- 11 unchanged lines hidden (view full) ---

194echo * C++ Compiler = %OO_SDK_CPP_HOME%
195echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
196echo * Java = %OO_SDK_JAVA_HOME%
197echo * Special Output directory = %OO_SDK_OUT%
198echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
199echo *
200echo ******************************************************************
201echo.
131
132REM Set environment for C++ compiler tools, if necessary.
133if defined OO_SDK_CPP_HOME call "%OO_SDK_CPP_HOME%\VCVARS32.bat"
134
135REM Set tilte to identify the prepared shell.
136title Shell prepared for SDK
137
138REM Prepare shell with all necessary environment variables.

--- 11 unchanged lines hidden (view full) ---

150echo * C++ Compiler = %OO_SDK_CPP_HOME%
151echo * C# and VB.NET compilers = %OO_SDK_CLI_HOME%
152echo * Java = %OO_SDK_JAVA_HOME%
153echo * Special Output directory = %OO_SDK_OUT%
154echo * Auto deployment = %SDK_AUTO_DEPLOYMENT%
155echo *
156echo ******************************************************************
157echo.
202goto:end
158goto end
203
159
204:error
160 :error
205Error: Please insert the necessary environment variables into the batch file.
206
161Error: Please insert the necessary environment variables into the batch file.
162
207:end
208
163 :end