Revert "svg-export: fix wrong conflict resolution"
[LibreOffice.git] / odk / docs / install.html
blob5d4a5922437fe94e65ba5b9c96419dfc238c3679
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/"
30 title="Go to the Home of LibreOffice and the LibreOffice Community page"></a>
31 <p id="HeaderTagLine">
32 Software Development Kit %PRODUCT_RELEASE%
33 </p>
34 </div>
35 <div class="clear">
36 </div>
37 <div id="Layout">
38 <div class="typography">
39 <h1>Installation Guide</h1>
40 <table class="table1" cellpadding="0">
41 <tr>
42 <td colspan="3"><img class="nothing10" src="images/nada.gif"/></td>
43 </tr>
44 <tr>
45 <td class="content1"><img class="nothing8" src="images/nada.gif"/></td>
46 <td>
47 <table class="table2">
48 <tr>
49 <td colspan="3"><img class="nothing1" src="images/nada.gif"/></td>
50 </tr>
51 <tr>
52 <td>
53 <table class="table3">
54 <tr>
55 <td colspan="2">
56 <p>The LibreOffice %PRODUCT_RELEASE% SDK comes with
57 a set of development tools, base libraries, header
58 files and helper class files that can be used to
59 develop Java/C++ components, to embed the
60 LibreOffice %PRODUCT_RELEASE% application in your
61 own programs, or to use the API (scripting or
62 remote control the office). For a complete working
63 environment, we have some additional
64 requirements:</p>
65 </td>
66 </tr>
67 <tr valign="top">
68 <td><b>LibreOffice %PRODUCT_RELEASE%
69 installation</b></td>
70 <td class="content80">The SDK works on top of an
71 existing LibreOffice installation and uses the same
72 libraries as the LibreOffice installation.</td>
73 </tr>
74 <tr valign="middle">
75 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
76 </tr>
77 <tr valign="top">
78 <td><b>JDK (1.5 or higher)</b></td>
79 <td class="content80">
80 <p>A JDK is necessary for developing Java components
81 or applications. An appropriate Java SDK can be
82 found on
83 <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>
84 <p>Recommendation is to use Java 7 or later for
85 64bit, and Java 6 for 32bit.</p>
86 <p><b>Note</b>: The Java compiler is
87 <b><u>optional</u></b>!</p></td>
88 </tr>
89 <tr valign="middle">
90 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
91 </tr>
92 <tr valign="top">
93 <td><b>C++ compiler</b></td>
94 <td class="content80">A C++ compiler is necessary for
95 developing C++ components or applications. UNO
96 depends on a compiler dependent language binding, so
97 that we use the appropriate compiler where a
98 language binding exists:
99 <table class="table4">
100 <tr>
101 <td class="cell15">Linux</td>
102 <td class="cell80">GNU C++ compiler, gcc version
103 4.1 or later</td>
104 </tr>
105 <tr>
106 <td class="cell15">Mac OS X</td>
107 <td class="cell80">XCode</td>
108 </tr>
109 <tr>
110 <td class="cell15">Windows</td>
111 <td class="cell80">Microsoft C++ Compiler,
112 Microsoft Visual Studio 2010 or later, or the
113 Express edition thereof</td>
114 </tr>
115 </table>
116 <p><b>Note</b>: The C++ compiler is
117 <b><u>optional</u></b>! If you use the Express
118 edition you have to ensure that the
119 <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>
120 is also installed. You can download this package
121 from Microsoft directly.</p></td>
122 </tr>
123 <tr valign="middle">
124 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
125 </tr>
126 <tr valign="top">
127 <td><b>Microsoft .NET Framework SDK version 1.0 or
128 higher</b></td>
129 <td class="content80">The SDK is required for building
130 CLI applications. That is, programs written in
131 languages, such as C# or VB.NET.<br/>
132 <p><b>Note</b>: The .NET Framework is
133 <b><u>optional</u></b>!</p></td>
134 </tr>
135 <tr valign="middle">
136 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
137 </tr>
138 <tr valign="top">
139 <td><b>GNU make (3.79.1 or higher)</b></td>
140 <td class="content80">
141 <p>GNU make is used to build the examples of the
142 SDK. GNU make is available from
143 <a target="_blank" href="http://www.gnu.org" title="link to www.gnu.org (online)">http://www.gnu.org</a>.
144 It can be ftped via
145 <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>
146 <p><b>Note</b>: Windows user can find an executable
147 of gnu make under
148 <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>
149 (see the mingw32-make link under &quot;Manual
150 Installation&quot;). Do not use the Cygwin make,
151 because it does not work well. On Solaris gnu make
152 can be found often under
153 <b><i>/usr/sfw/bin/gmake</i></b>, but keep in mind
154 that you have to use <b>'gmake'</b> then. Or you
155 can find gnu make also under
156 <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a>.</p></td>
157 </tr>
158 <tr valign="middle">
159 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
160 </tr>
161 <tr valign="top">
162 <td><b>zip tool (2.3 or higher)</b></td>
163 <td class="content80">The zip tool is used to create
164 UNO packages. zip is a new requirement to make the
165 SDK independent of a Java SDK.<br/>
166 If you do not have these already, you can download
167 them from
168 <a target="_blank" href="http://www.info-zip.org" title="link to www.ubfi-zip.org (online)">http://www.info-zip.org</a>.
169 Note: The cygwin zip.exe does not work for the build
170 under the 4NT shell. You have to use the native w32
171 version.</td>
172 </tr>
173 <tr valign="middle">
174 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"></td>
175 </tr>
176 <tr valign="top">
177 <td><b>cat and sed tools<b></td>
178 <td class="content80">The cat and set tools are used
179 to create some extensions.
180 <p><b>Note for Windows users</b>: If you do not have
181 these already, you can download them from
182 <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>
183 </td>
184 </tr>
185 <tr valign="middle">
186 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
187 </tr>
188 <tr valign="middle">
189 <td colspan="2">
190 <p>The SDK provides an implicit configuration
191 mechanism, which configures the SDK build
192 environment to your personal needs the first time
193 you use the SDK environment. This configuration
194 step creates a new setsdkenv_XXX script in the
195 user's home directory:</p>
196 <ul>
197 <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh</b>&nbsp;&nbsp;-&gt;
198 for Unix</li>
199 <li><b>C:\Documents and Settings\&lt;username&gt;\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat</b>&nbsp;&nbsp;-&gt;
200 for Windows2000/XP or later</li>
201 </ul>
202 <p>The automatically started configure script (Unix
203 and Windows2000/XP) requests relevant information
204 and directories (SDK, LibreOffice, GNU make, Java,
205 C++), in order to prepare a working SDK
206 environment. After completing the configure script
207 once, the newly created script is always used to
208 set the necessary environment variables for using
209 the SDK and the required tools.</p>
210 <p>On UNIX operating systems, the configure script
211 uses Perl. LINUX systems should have installed a
212 working Perl version, and on Solaris you can find
213 a working Perl version under
214 <a target="_blank" href="http://www.sunfreeware.com/" title="link to www.sunfreeware.com (online)">http://www.sunfreeware.com/</a>
215 if necessary. On Windows, the configure script
216 uses Windows Script and a JScipt. If you have
217 problems with Windows Script, you can download a
218 newer version of
219 <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>.</p>
220 <p>If you use the template batch file, edit and set
221 the following variables:</p>
222 <table class="table4">
223 <tr valign="top">
224 <td class="cell20"><b>OFFICE_HOME</b></td>
225 <td class="cell80">Path to an existing
226 LibreOffice installation, e.g.
227 &quot;/opt/libreoffice8&quot;. Be sure that it
228 is not a user installation only.</td>
229 </tr>
230 <tr>
231 <td class="cell20"><a name="oosdkname"/><b>OO_SDK_NAME</b></td>
232 <td class="cell80">The configuration uses the
233 directory name of the SDK, but you can use
234 another name as well. It is important that the
235 name does not contain spaces, because of a
236 limitation of gnu make which cannot handle
237 spaces correctly. This name is, for example,
238 used to create an output directory in the
239 users home directory for any generated output
240 when you use the SDK build environment.</td>
241 </tr>
242 <tr>
243 <td class="cell20"><b>OO_SDK_HOME</b></td>
244 <td class="cell80">Path to the SDK root
245 directory, e.g.
246 &quot;/opt/libreoffice/sdk&quot;</td>
247 </tr>
248 <tr>
249 <td class="cell20"><b>OO_SDK_JAVA_HOME</b></td>
250 <td class="cell80">Path to a JDK root directory.
251 The JDK is <b>optional</b> and only necessary
252 if you like to run the Java examples or if you
253 like to use the SDK environment to develop
254 your own Java solution.</td>
255 </tr>
256 <tr>
257 <td class="cell20"><b>OO_SDK_CPP_HOME</b></td>
258 <td class="cell80">Path to the C++ compiler (on
259 Windows, the directory where the
260 &quot;<i>vcvar32.bat</i>&quot; file can be
261 found). The C++ compiler is <b>optional</b>
262 and only necessary for building the C++
263 examples.</td>
264 </tr>
265 <tr>
266 <td class="cell20"><b>OO_SDK_CLI_HOME</b></td>
267 <td class="cell80">Path to the C# compiler and
268 VB.NET compiler (on Windows, this directory
269 can be found under the system directory (e.g.
270 c:\WINXP\Microsoft.NET\Framework\v1.0.3705).
271 The compilers are <b>optional</b> and only
272 necessary for building the CLI examples.<br/>
273 <b>Note: Windows only!</b></td>
274 </tr>
275 <tr>
276 <td class="cell20"><b>OO_SDK_MAKE_HOME</b></td>
277 <td class="cell80">Path to GNU make.</td>
278 </tr>
279 <tr>
280 <td class="cell20"><b>OO_SDK_ZIP_HOME</b></td>
281 <td class="cell80">Path to the 'zip' tool.</td>
282 </tr>
283 <tr>
284 <td class="cell20"><b>OO_SDK_CAT_HOME</b></td>
285 <td class="cell80">Path to the 'cat' tool.</td>
286 </tr>
287 <tr>
288 <td class="cell20"><b>OO_SDK_SED_HOME</b></td>
289 <td class="cell80">Path to the 'sed' tool.</td>
290 </tr>
291 <tr>
292 <td class="cell20"><b>OO_SDK_OUTPUT_DIR</b></td>
293 <td class="cell80">Path to an existing directory
294 where the example output is generated. The
295 output directory is <b>optional</b>, by
296 default the output is generated in the SDK
297 directory itself. If an output directory is
298 specified, the output is generated in a SDK
299 dependent subdirectory in this directory (e.g.
300 &lt;OO_SDK_OUTPUT_DIR&gt; /LibreOffice
301 %PRODUCT_RELEASE%/LINUXExample.out)</td>
302 </tr>
303 <tr>
304 <td class="cell20"><b>SDK_AUTO_DEPLOYMENT</b></td>
305 <td class="cell80">If this variable is set, the
306 component examples are automatically deployed
307 into the LibreOffice installation referenced
308 by OFFICE_HOME. See also chapter
309 <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>
310 from the Developer's Guide.</td>
311 </tr>
312 </table>
313 <p>You must run the <b>setsdkenv_XXX</b> script
314 every time you want to use the configured SDK
315 environment. The settings are local for the
316 current shell on Windows or the new started shell
317 on UNIX. On UNIX you can now source the prepared
318 environment script file
319 (&quot;setsdkenv_unix.sh&quot;) to prepare your
320 current shell instead of starting a new shell.</p>
321 </td>
322 </tr>
323 <tr valign="middle">
324 <td colspan="2"><img class="line" src="images/sdk_line-1.gif"/></td>
325 </tr>
326 <tr>
327 <td colspan="2">
328 <p class="head2">Manual Setting</p>
329 <p>If you do not want to use the script to set your
330 working environment, you must set the appropriate
331 environment variables yourself. The script sets
332 the following environment variables:</p>
333 <p class="head3">Common Environment Variables</p>
334 <table class="table4">
335 <tr valign="top">
336 <td class="cell20">OO_SDK_NAME</td>
337 <td class="cell80">See description
338 <a href="#oosdkname" title="link to the description of the environment variable OO_SDK_NAME">above</a>.</td>
339 </tr>
340 <tr valign="top">
341 <td class="cell20">OO_SDK_URE_BIN_DIR</td>
342 <td class="cell80">The path within the chosen
343 LibreOffice URE installation where binary
344 executables are located.</td>
345 </tr>
346 <tr valign="top">
347 <td class="cell20">OO_SDK_URE_LIB_DIR</td>
348 <td class="cell80">The path within the chosen
349 LibreOffice URE installation where dynamic
350 libraries are located.</td>
351 </tr>
352 <tr valign="top">
353 <td class="cell20">OO_SDK_URE_JAVA_DIR</td>
354 <td class="cell80">The path within the chosen
355 LibreOffice URE installation where Java JARs
356 are located.</td>
357 </tr>
358 <tr valign="top">
359 <td class="cell20">CLASSPATH</td>
360 <td class="cell80">=<i>$OO_SDK_URE_JAVA_DIR/juh.jar;
361 $OO_SDK_URE_JAVA_DIR/jurt.jar;
362 $OO_SDK_URE_JAVA_DIR/ridl.jar;
363 $OO_SDK_URE_JAVA_DIR/unoloader.jar;
364 $OO_SDK_URE_JAVA_DIR/unoil.jar;
365 $CLASSPATH</i><br/>
366 <p>The classpath will be set or extended to
367 the necessary jar files of the specified
368 LibreOffice installation.</p>
369 </td>
370 </tr>
371 <tr valign="top">
372 <td class="cell20">OFFICE_PROGRAM_PATH</td>
373 <td class="cell80">=<i>$OFFICE_HOME/program</i><br/>
374 <p>This variable is used to find, for example,
375 the office type library and the UNO package
376 deployment tool.</p>
377 </td>
378 </tr>
379 <tr valign="top">
380 <td class="cell20">UNO_PATH</td>
381 <td class="cell80">=<i>$OFFICE_PROGRAM_PATH</i><br/>
382 <p>This variable is used to ensure that the
383 new C++ UNO bootstrap mechanism uses the
384 configured LibreOffice installation of the
385 SDK. Normally the bootstrap mechanism finds
386 the default office installation for the user
387 on the system. This variable is optional but
388 is set from the scripts to ensure a
389 homogeneous environment. Especially useful
390 during development where you might have more
391 than one office installation installed.</p>
392 </td>
393 </tr>
394 </table>
395 <p class="head3">Environment Variables for UNIX</p>
396 <p class="head4">Solaris</p>
397 <table class="table4">
398 <tr valign="top">
399 <td class="cell20">LD_LIBRARY_PATH</td>
400 <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR:
401 $OO_SDK_HOME/(solsparc|solintel)/lib:
402 $LD_LIBRARY_PATH</i><br/>
403 <p>The LD_LIBRARY_PATH will be set or will be
404 extended by the office/URE library path, the
405 platform dependent lib directory for several
406 additional libraries.</p>
407 </td>
408 </tr>
409 <tr valign="top">
410 <td class="cell20">PATH</td>
411 <td class="cell80">=<i>$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME:
412 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
413 [$OO_SDK_JAVA_HOME/bin:]
414 $OO_SDK_URE_BIN_DIR: $PATH</i><br/>
415 <p>The PATH variable will be extended by the
416 paths for the SDK development tools, the
417 compiler, the JDK, GNU make, the zip tool
418 and the OO_SDK_URE_BIN_DIR, where the
419 compiler or the JDK are optional.</p>
420 </td>
421 </tr>
422 <tr>
423 <td colspan="2" class="cell80">The script
424 additionally creates symbolic links to the
425 public dynamic libraries of the URE in
426 <i>$OO_SDK_HOME/(solsparc|solintel)/lib</i>,
427 which are needed for linking.</td>
428 </tr>
429 </table>
430 <p class="head4">Linux</p>
431 <table class="table4">
432 <tr valign="top">
433 <td class="cell20">LD_LIBRARY_PATH</td>
434 <td class="cell80">=<i>$OO_SDK_URE_LIB_DIR:
435 $SDK_HOME/linux/lib:
436 $LD_LIBRARY_PATH</i><br/>
437 <p>The LD_LIBRARY_PATH will be set or will be
438 extended by the office/URE library path, the
439 platform dependent lib directory for some
440 additional libraries.</p>
441 </td>
442 </tr>
443 <tr valign="top">
444 <td class="cell20">PATH</td>
445 <td class="cell80">=<i>$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME:
446 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
447 [$OO_SDK_JAVA_HOME/bin:]
448 $OO_SDK_URE_BIN_DIR: $PATH</i><br/>
449 <p>The PATH variable will be extended by the
450 paths for the SDK development tools, the
451 compiler, the JDK, GNU make, the zip tool
452 and the OO_SDK_URE_BIN_DIR, where the
453 compiler and the JDK are optional.</p>
454 </td>
455 </tr>
456 <tr>
457 <td colspan="2" class="cell80">The script
458 additionally creates symbolic links to the
459 public dynamic libraries of the URE in
460 <i>$OO_SDK_HOME/linux/lib</i>, which are
461 needed for linking.</td>
462 </tr>
463 </table>
464 <p class="head3">Environment Variables for Windows</p>
465 <table class="table4">
466 <tr valign="top">
467 <td class="cell20">PATH</td>
468 <td class="cell80">=<i>%OO_SDK_HOME%\windows\bin;
469 %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%;
470 [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;]
471 [%OO_SDK_JAVA_HOME%\bin;]
472 %OO_SDK_URE_BIN_DIR%; %PATH%</i><br/>
473 <p>The PATH variable will be extended by the
474 paths for the SDK development tools, the
475 compiler, the JDK, GNU make, the zip tool
476 and the OO_SDK_URE_BIN_DIR.</p>
477 </td>
478 </tr>
479 <tr valign="top">
480 <td class="cell20">LIB</td>
481 <td class="cell80">=<i>%OO_SDK_HOME%\windows\lib;
482 %LIB%</i><br/>
483 <p>The LIB variable will be extended by the
484 path to the import libraries that are
485 necessary for Windows.</p>
486 </td>
487 </tr>
488 <tr valign="top">
489 <td colspan="2" class="cell80">In addition to
490 setting these environment variables, the
491 script calls the
492 &quot;<i>vcvar32.bat</i>&quot; batch file
493 which is provided by the Microsoft Developer
494 Studio to set the necessary environment
495 variables for the compiler.</td>
496 </tr>
497 </table>
498 </td>
499 </tr>
500 </table>
501 </td>
502 </tr>
503 </table>
504 </td>
505 </tr>
506 </table>
507 </div>
508 <div id="Footer">
509 <div id="FooterText">
510 <p>Copyright © 2000, 2015 LibreOffice contributors. All rights
511 reserved.<br/>
512 LibreOffice was created by The Document Foundation, based on
513 Apache OpenOffice, which is Copyright 2011 The Apache Software
514 Foundation.<br/>
515 The Document Foundation acknowledges all community members, please
516 find more info
517 <a href="https://www.libreoffice.org/about-us/credits/" target="_blank">at our website</a>.</p>
518 <p>&nbsp;</p>
519 <p><a href="http://www.documentfoundation.org/privacy" target="_blank">Privacy Policy</a>
521 <a href="http://www.documentfoundation.org/imprint" target="_blank">Impressum (Legal Info)</a>
522 | Copyright information: The source code of LibreOffice is
523 licensed under the Mozilla Public License v2.0
524 (<a href="http://www.libreoffice.org/download/license/" target="_blank">MPLv2</a>).
525 "LibreOffice" and "The Document Foundation" are registered
526 trademarks of their corresponding registered owners or are in
527 actual use as trademarks in one or more countries. Their
528 respective logos and icons are also subject to international
529 copyright laws. Use thereof is explained in our
530 <a href="http://wiki.documentfoundation.org/TradeMark_Policy" target="_blank">trademark policy</a>.</p>
531 </div>
532 </div>
533 </div>
534 </div>
535 </div>
536 </body>
537 </html>