Version 4.3.0.0.beta1, tag libreoffice-4.3.0.0.beta1
[LibreOffice.git] / odk / docs / install.html
blob13425da0cfa1deb458d5a316f92795530280075d
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2 <!--
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 -->
19 <html>
20 <head>
21 <title>LibreOffice %PRODUCT_RELEASE% SDK - Installation Guide</title>
22 <link rel="stylesheet" type="text/css" href="sdk_styles.css"/>
23 <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
24 </head>
25 <body>
26 <div id="BgContainer">
27 <div id="Container">
28 <div id="TopHeader">
29 <a id="Logo" href="http://www.libreoffice.org/" title="Go to the Home of LibreOffice and the LibreOffice Community page"></a>
30 <p id="HeaderTagLine">
31 Software Development Kit %PRODUCT_RELEASE%
32 </p>
33 </div>
34 <div class="clear">
35 </div>
36 <div id="Layout">
37 <div class="typography">
38 <h1>
39 Installation Guide
40 </h1>
41 <table class="table1" cellpadding="0">
42 <tr>
43 <td colspan="3"><img class="nothing10" src="images/nada.gif"/></td>
44 </tr>
45 <tr>
46 <td class="content1"><img class="nothing8" src="images/nada.gif"/></td>
47 <td>
48 <table class="table2">
49 <tr>
50 <td colspan="3"><img class="nothing1" src="images/nada.gif"/></td>
51 </tr>
52 <tr>
53 <td>
54 <table class="table3">
55 <tr>
56 <td colspan="2">
57 <p>The LibreOffice %PRODUCT_RELEASE% SDK comes with a set of development tools, base
58 libraries, header files and helper class files that can be used to
59 develop Java/C++ components, to embed the LibreOffice %PRODUCT_RELEASE% application in
60 your own programs, or to use the API (scripting or remote control the
61 office). For a complete working environment, we have some additional
62 requirements:</p>
63 </td>
64 </tr>
65 <tr valign="top">
66 <td><b>LibreOffice %PRODUCT_RELEASE% installation</b></td>
67 <td class="content80">The SDK works on top of an existing office
68 installation and uses the same libraries as the office installation.</td>
69 </tr>
70 <tr valign="middle">
71 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
72 </tr>
73 <tr valign="top">
74 <td><b>JDK (1.5 or higher)</b></td>
75 <td class="content80">
76 <p>A JDK is necessary for developing Java components or applications. An appropriate Java SDK can be found on <a target="_blank" href="http://java.sun.com/products" title="link to the Java SDK download page (online)">http://java.sun.com/products</a>.</p>
77 <p>Recommendation is to use Java 6 excepting for Mac OS because initially Mac OS supported a 64bit version of Java 6 only.</p>
78 <p><b>Note</b>: The Java compiler is <b><u>optional</u></b>!</p></td>
79 </tr>
80 <tr valign="middle">
81 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
82 </tr>
83 <tr valign="top">
84 <td><b>C++ compiler</b></td>
85 <td class="content80">A C++ compiler is necessary for developing C++
86 components or applications. UNO depends on a compiler dependent language
87 binding, so that we use the appropriate compiler where a language binding
88 exists:
89 <table class="table4">
90 <tr>
91 <td class="cell15">Solaris</td>
92 <td class="cell85">Sun Studio 8 (20070730)</td>
93 </tr>
94 <tr>
95 <td class="cell15">Linux</td>
96 <td class="cell80">GNU C++ compiler, gcc version 4.0.1</td>
97 </tr>
98 <tr>
99 <td class="cell15">Windows</td>
100 <td class="cell80">Microsoft C++ Compiler, Microsoft Visual Studio 2008 or the Express version (cl, version 15.00.21022)</td>
101 </tr>
102 </table>
103 <p><b>Note</b>: The C++ compiler is <b><u>optional</u></b>! If you use the Express edition you have to ensure that the <a href="http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&amp;displaylang=en">Microsoft Visual Studio 2008 Redistributable Package</a> is also installed. You can download this package from Microsoft directly.</p></td>
104 </tr>
105 <tr valign="middle">
106 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
107 </tr>
108 <tr valign="top">
109 <td><b>Microsoft .NET Framework SDK version 1.0 or higher</b></td>
110 <td class="content80">The SDK is required for building CLI applications.
111 That is, programs written in languages, such as C# or VB.NET.<br/>
112 <p><b>Note</b>: The .NET Framework is <b><u>optional</u></b>!</p></td>
113 </tr>
114 <tr valign="middle">
115 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
116 </tr>
117 <tr valign="top">
118 <td><b>GNU make (3.79.1 or higher)</b></td>
119 <td class="content80">
120 <p>GNU make is used to build the examples of the SDK. GNU make is available from <a target="_blank" href="http://www.gnu.org" title="link to www.gnu.org (online)">http://www.gnu.org</a>. It can be ftped via <a target="_blank" href="ftp://ftp.gnu.org/gnu/make" title="link to gnumake on www.gnu.org (online)">ftp://ftp.gnu.org/gnu/make</a></p>
121 <p><b>Note</b>: Windows user can find an executable of gnu make under <a target="_blank" href="http://www.mingw.org/wiki/Getting_Started" title="link to the MinGW Getting Started wiki (online)">http://www.mingw.org/wiki/Getting_Started</a> (see the mingw32-make link under &quot;Manual Installation&quot;). Do not use the Cygwin make, because it does not
122 work well. On Solaris gnu make can be found often under <b><i>/usr/sfw/bin/gmake</i></b>, but keep in mind that you have to use <b>'gmake'</b> then. Or you can find gnu make also under <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a>.</p></td>
123 </tr>
124 <tr valign="middle">
125 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
126 </tr>
127 <tr valign="top">
128 <td><b>zip tool (2.3 or higher)</b></td>
129 <td class="content80">The zip tool is used to create UNO packages. zip is
130 a new requirement to make the SDK independent of a Java SDK.<br/>
131 If you do not have these already, you can download them from <a target="_blank" href="http://www.info-zip.org" title="link to www.ubfi-zip.org (online)">http://www.info-zip.org</a>. Note: The cygwin zip.exe does not work for the build under
132 the 4NT shell. You have to use the native w32 version.</td>
133 </tr>
134 <tr valign="middle">
135 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
136 </tr>
137 <tr valign="top">
138 <td><b>cat and sed tools<b></td>
139 <td class="content80">The cat and set tools are used to create some extensions.
140 <p><b>Note for Windows users</b>: If you do not have these already, you can download them from
141 <a target="_blank" href="http://sourceforge.net/projects/unxutils/files/latest/downloadg" title="link to UnxUtils (online)">http://sourceforge.net/projects/unxutils/files/latest/download</a>.</p>
142 </td>
143 </tr>
144 <tr valign="middle">
145 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
146 </tr>
147 <tr valign="middle">
148 <td colspan="2">
149 <p>The SDK provides an implicit configuration mechanism, which
150 configures the SDK build environment to your personal needs the first
151 time you use the SDK environment. This configuration step creates a
152 new setsdkenv_XXX script in the user's home directory:</p>
153 <ul>
154 <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh</b>&nbsp;&nbsp;-&gt; for Unix</li>
155 <li><b>C:\Documents and Settings\&lt;username&gt;\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat</b>&nbsp;&nbsp;-&gt; for Windows2000/XP or later</li>
156 </ul>
157 <p>The automatically started configure script (Unix and Windows2000/XP)
158 requests relevant information and directories (SDK, LibreOffice, GNU make,
159 Java, C++), in order to prepare a working SDK environment. After completing the
160 configure script once, the newly created script is always used to set the
161 necessary environment variables for using the SDK and the required
162 tools.</p>
163 <p>On UNIX operating systems, the configure script uses Perl. LINUX systems should have
164 installed a working Perl version, and on Solaris you can find a working
165 Perl version under <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a> if
166 necessary. On Windows, the configure script uses Windows Script and
167 a JScipt. If you have problems with Windows Script, you can download a
168 newer version of <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&amp;displaylang=en" title="link to the download page for the Windows Script">Windows Script</a>.
169 </p>
170 <p>On other versions of Windows, use the batch
171 file template <b>&lt;OO_SDK_HOME&gt;\setsdkenv_windows.template</b>,
172 rename it to *.bat, and adapt it to your local environment.</p>
173 <p>If you use the template batch file, edit and set
174 the following variables:</p>
175 <table class="table4">
176 <tr valign="top">
177 <td class="cell20"><b>OFFICE_HOME</b></td>
178 <td class="cell80">Path to an existing LibreOffice
179 base installation, e.g. &quot;/opt/libreoffice8&quot;. Be sure
180 that it is not a user installation only. Exactly one of OFFICE_HOME
181 and OO_SDK_URE_HOME must be set. The other should be either unset or
182 set to an empty value.</td>
183 </tr>
184 <tr>
185 <td class="cell20"><a name="oosdkname"/><b>OO_SDK_NAME</b></td>
186 <td class="cell80">The configuration uses the
187 directory name of the SDK, but you can use another name as well.
188 It is important that the name does not contain spaces, because of a limitation
189 of gnu make which cannot handle spaces correctly. This name is, for
190 example, used to create an output directory in the users home directory
191 for any generated output when you use the SDK build environment.</td>
192 </tr>
193 <tr>
194 <td class="cell20"><b>OO_SDK_URE_HOME</b></td>
195 <td class="cell80">Path to an existing UNO Runtime Environment
196 installation, e.g. &quot;/opt/libreoffice/ure&quot;. Exactly one of
197 OFFICE_HOME and OO_SDK_URE_HOME must be set. The other should be
198 either unset or set to an empty value.</td>
199 </tr>
200 <tr>
201 <td class="cell20"><b>OO_SDK_HOME</b></td>
202 <td class="cell80">Path to the SDK root directory, e.g.
203 &quot;/opt/libreoffice/sdk&quot;</td>
204 </tr>
205 <tr>
206 <td class="cell20"><b>OO_SDK_JAVA_HOME</b></td>
207 <td class="cell80">Path to a JDK root directory. The JDK is
208 <b>optional</b> and only necessary if you like to run the Java examples
209 or if you like to use the SDK environment to develop your own Java
210 solution.</td>
211 </tr>
212 <tr>
213 <td class="cell20"><b>OO_SDK_CPP_HOME</b></td>
214 <td class="cell80">Path to the C++ compiler (on Windows, the directory
215 where the &quot;<i>vcvar32.bat</i>&quot; file can be found). The C++
216 compiler is <b>optional</b> and only necessary for building the C++
217 examples.</td>
218 </tr>
219 <tr>
220 <td class="cell20"><b>OO_SDK_CLI_HOME</b></td>
221 <td class="cell80">Path to the C# compiler and VB.NET compiler (on
222 Windows, this directory can be found under the system directory (e.g.
223 c:\WINXP\Microsoft.NET\Framework\v1.0.3705). The compilers are
224 <b>optional</b> and only necessary for building the CLI examples.<br/>
225 <b>Note: Windows only!</b></td>
226 </tr>
227 <tr>
228 <td class="cell20"><b>OO_SDK_MAKE_HOME</b></td>
229 <td class="cell80">Path to GNU make.</td>
230 </tr>
231 <tr>
232 <td class="cell20"><b>OO_SDK_ZIP_HOME</b></td>
233 <td class="cell80">Path to the 'zip' tool.</td>
234 </tr>
235 <tr>
236 <td class="cell20"><b>OO_SDK_CAT_HOME</b></td>
237 <td class="cell80">Path to the 'cat' tool.</td>
238 </tr>
239 <tr>
240 <td class="cell20"><b>OO_SDK_SED_HOME</b></td>
241 <td class="cell80">Path to the 'sed' tool.</td>
242 </tr>
243 <tr>
244 <td class="cell20"><b>OO_SDK_OUTPUT_DIR</b></td>
245 <td class="cell80">Path to an existing directory where the example output
246 is generated. The output directory is <b>optional</b>, by default
247 the output is generated in the SDK directory itself. If an output
248 directory is specified, the output is generated in a SDK dependent
249 subdirectory in this directory (e.g. &lt;OO_SDK_OUTPUT_DIR&gt;
250 /LibreOffice %PRODUCT_RELEASE%/LINUXExample.out)</td>
251 </tr>
252 <tr>
253 <td class="cell20"><b>SDK_AUTO_DEPLOYMENT</b></td>
254 <td class="cell80">If this variable is set, the component examples are automatically deployed into the Office installation referenced by
255 OFFICE_HOME. See also chapter <a href="http://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/unopkg" title="link to the &quot;Extension Manager - unopkg&quot; chapter in the Developer's Guide">&quot;Extension Manager - unopkg&quot;</a> from the Developer's Guide.
256 This variable is only relevant when OFFICE_HOME is set.</td>
257 </tr>
258 </table>
259 <p>You must run the <b>setsdkenv_XXX</b> script every time you want to
260 use the configured SDK environment. The settings are local for the current
261 shell on Windows or the new started shell on UNIX. On UNIX you
262 can now source the prepared environment
263 script file (&quot;setsdkenv_unix.sh&quot;) to prepare
264 your current shell instead of starting a new shell.</p>
265 </td>
266 </tr>
267 <tr valign="middle">
268 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
269 </tr>
270 <tr>
271 <td colspan="2">
272 <p class="head2">Manual Setting</p>
273 <p>If you do not want to use the script to set your working
274 environment, you must set the appropriate environment variables
275 yourself. The script sets the following environment variables:</p>
276 <p class="head3">Common Environment Variables</p>
277 <table class="table4">
278 <tr valign="top">
279 <td class="cell20">OO_SDK_NAME</td>
280 <td class="cell80">See description <a href="#oosdkname" title="link to the description of the environment variable OO_SDK_NAME">above</a>.</td>
281 </tr>
282 <tr valign="top">
283 <td class="cell20">OO_SDK_URE_BIN_DIR</td>
284 <td class="cell80">The path within the chosen office or URE
285 installation where binary executables are located (e.g.,
286 <i>$OFFICE_HOME/program</i> for an office installation, or
287 <i>$OO_SDK_URE_HOME/bin</i> for a Unix URE installation).</td>
288 </tr>
289 <tr valign="top">
290 <td class="cell20">OO_SDK_URE_LIB_DIR</td>
291 <td class="cell80">The path within the chosen office or URE
292 installation where dynamic libraries are located (e.g.,
293 <i>$OFFICE_HOME/program</i> for an office installation, or
294 <i>$OO_SDK_URE_HOME/lib</i> for a Unix URE installation).</td>
295 </tr>
296 <tr valign="top">
297 <td class="cell20">OO_SDK_URE_JAVA_DIR</td>
298 <td class="cell80">The path within the chosen office or URE
299 installation where Java JARs are located (e.g.,
300 <i>$OFFICE_HOME/program/classes</i> for an office installation, or
301 <i>$OO_SDK_URE_HOME/share/java</i> for a Unix URE installation).</td>
302 </tr>
303 <tr valign="top">
304 <td class="cell20">CLASSPATH</td>
305 <td class="cell80">
306 =<i>$OO_SDK_URE_JAVA_DIR/juh.jar;
307 $OO_SDK_URE_JAVA_DIR/jurt.jar;
308 $OO_SDK_URE_JAVA_DIR/ridl.jar;
309 $OO_SDK_URE_JAVA_DIR/unoloader.jar;
310 [$OO_SDK_URE_JAVA_DIR/unoil.jar;]
311 $CLASSPATH</i><br/>
312 <p>The classpath will be set or extended to the necessary jar files of
313 the specified office installation. (<i>unoil.jar</i> is only included
314 when OFFICE_HOME is set.)</p>
315 </td>
316 </tr>
317 <tr valign="top">
318 <td class="cell20">OFFICE_PROGRAM_PATH</td>
319 <td class="cell80">=<i>$OFFICE_HOME/program</i><br/>
320 <p>This variable is used to find, for example, the office type library and
321 the UNO package deployment tool. This variable is only relevant when
322 OFFICE_HOME is set.</p>
323 </td>
324 </tr>
325 <tr valign="top">
326 <td class="cell20">UNO_PATH</td>
327 <td class="cell80">=<i>$OFFICE_PROGRAM_PATH</i><br/>
328 <p>This variable is used to ensure that the new C++ UNO bootstrap
329 mechanism uses the configured office installation of the SDK. Normally
330 the bootstrap mechanism finds the default office installation for the
331 user on the system. This variable is optional but is set from the scripts
332 to ensure a homogeneous environment. Especially useful during development
333 where you might have more than one office installation installed. This
334 variable is only relevant when OFFICE_HOME is set.</p>
335 </td>
336 </tr>
337 </table>
338 <p class="head3">Environment Variables for UNIX</p>
339 <p class="head4">Solaris</p>
340 <table class="table4">
341 <tr valign="top">
342 <td class="cell20">LD_LIBRARY_PATH</td>
343 <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR: $OO_SDK_HOME/(solsparc|solintel)/lib: $LD_LIBRARY_PATH</i><br/>
344 <p>The LD_LIBRARY_PATH will be set or will be extended by the office/URE
345 library path, the platform dependent lib directory for several additional
346 libraries.</p>
347 </td>
348 </tr>
349 <tr valign="top">
350 <td class="cell20">PATH</td>
351 <td class="cell80">=<i>$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_URE_BIN_DIR: $PATH</i><br/>
352 <p>The PATH variable will be extended by the paths for the SDK development
353 tools, the compiler, the JDK, GNU make, the zip tool and the
354 OO_SDK_URE_BIN_DIR, where the compiler or the JDK are
355 optional.</p>
356 </td>
357 </tr>
358 <tr>
359 <td colspan="2" class="cell80">When OO_SDK_URE_HOME is set, the script
360 additionally creates symbolic links to the public dynamic libraries of
361 the URE in <i>$OO_SDK_HOME/(solsparc|solintel)/lib</i>, which are
362 needed for linking.</td>
363 </tr>
364 </table>
365 <p class="head4">Linux</p>
366 <table class="table4">
367 <tr valign="top">
368 <td class="cell20">LD_LIBRARY_PATH</td>
369 <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR: $SDK_HOME/linux/lib: $LD_LIBRARY_PATH</i><br/>
370 <p>The LD_LIBRARY_PATH will be set or will be extended by the office/URE
371 library path, the platform dependent lib directory for some additional
372 libraries.</p>
373 </td>
374 </tr>
375 <tr valign="top">
376 <td class="cell20">PATH</td>
377 <td class="cell80">=<i>$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME: $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:] [$OO_SDK_JAVA_HOME/bin:] $OO_SDK_URE_BIN_DIR: $PATH</i><br/>
378 <p>The PATH variable will be extended by the paths for the SDK development
379 tools, the compiler, the JDK, GNU make, the zip tool and the
380 OO_SDK_URE_BIN_DIR, where the compiler and the JDK are
381 optional.</p>
382 </td>
383 </tr>
384 <tr>
385 <td colspan="2" class="cell80">When OO_SDK_URE_HOME is set, the script
386 additionally creates symbolic links to the public dynamic libraries of
387 the URE in <i>$OO_SDK_HOME/linux/lib</i>, which are needed for
388 linking.</td>
389 </tr>
390 </table>
391 <p class="head3">Environment Variables for Windows</p>
392 <table class="table4">
393 <tr valign="top">
394 <td class="cell20">PATH</td>
395 <td class="cell80">=<i>%OO_SDK_HOME%\windows\bin; %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%; [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;] [%OO_SDK_JAVA_HOME%\bin;] %OO_SDK_URE_BIN_DIR%; %PATH%</i><br/>
396 <p>The PATH variable will be extended by the paths for the SDK development
397 tools, the compiler, the JDK, GNU make, the zip tool and the
398 OO_SDK_URE_BIN_DIR.</p>
399 </td>
400 </tr>
401 <tr valign="top">
402 <td class="cell20">LIB</td>
403 <td class="cell80">=<i>%OO_SDK_HOME%\windows\lib; %LIB%</i><br/>
404 <p>The LIB variable will be extended by the path to the import libraries
405 that are necessary for Windows.</p>
406 </td>
407 </tr>
408 <tr valign="top">
409 <td colspan="2" class="cell80">In addition to setting these environment
410 variables, the script calls the &quot;<i>vcvar32.bat</i>&quot; batch file
411 which is provided by the Microsoft Developer Studio to set the necessary
412 environment variables for the compiler.</td>
413 </tr>
414 </table>
415 </td>
416 </tr>
417 </table>
418 </td>
419 </tr>
420 </table>
421 </td>
422 </tr>
423 </table>
424 </div>
425 <div id="Footer">
426 <div id="FooterText">
428 Copyright © 2000, 2014 LibreOffice contributors. All rights reserved.
429 <br/>
430 LibreOffice was created by The Document Foundation,
431 based on Apache OpenOffice, which is Copyright 2011
432 The Apache Software Foundation.
433 <br/>
434 The Document Foundation acknowledges all community members, please find more info <a href="http://www.libreoffice.org/about-us/credits/" target="_blank">at our website</a>.
435 </p>
437 &nbsp;
438 </p>
440 <a href="http://www.documentfoundation.org/privacy" target="_blank">Privacy Policy</a> | <a href="http://www.documentfoundation.org/imprint" target="_blank">Impressum (Legal Info)</a>
441 | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (<a href="http://www.libreoffice.org/download/license/" target="_blank">LGPLv3</a>). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our <a href="http://wiki.documentfoundation.org/TradeMark_Policy" target="_blank">trademark policy</a>.
442 </p>
443 </div>
444 </div>
445 </div>
446 </div>
447 </div>
448 </body>
449 </html>