1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 3.2 Final//EN">
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 .
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"/>
26 <div id=
"BgContainer">
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%
38 <div class=
"typography">
39 <h1>Installation Guide
</h1>
40 <table class=
"table1" cellpadding=
"0">
42 <td colspan=
"3"><img class=
"nothing10" src=
"images/nada.gif"/></td>
45 <td class=
"content1"><img class=
"nothing8" src=
"images/nada.gif"/></td>
47 <table class=
"table2">
49 <td colspan=
"3"><img class=
"nothing1" src=
"images/nada.gif"/></td>
53 <table class=
"table3">
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
68 <td><b>LibreOffice %PRODUCT_RELEASE%
70 <td class=
"content80"><p>The SDK works on top of an
71 existing LibreOffice installation and uses the same
72 libraries as the LibreOffice installation.
</p>
73 <p>Download the SDK from the same
74 source as your LibreOffice packages.
</p>
76 <li>If you have installed an official The
77 Document Foundation LibreOffice release,
78 download and install the corresponding SDK
79 release for your platform from
80 <a target=
"_blank" href=
"https://www.libreoffice.org/download" title=
"link to The Document Foundation download page">https://www.libreoffice.org/download
</a>
82 <li>If you have installed a downstream LibreOffice
83 release via your operating system's package
84 management tools, use the same package
85 management tools to install the corresponding
86 downstream SDK package(s).
89 <p><b>Note
</b>: Do not mix and match The Document
90 Foundation LibreOffice releases with downstream
91 SDK packages or vice versa!
</p></td>
95 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
98 <td><b>JDK (
1.5 or higher)
</b></td>
99 <td class=
"content80">
100 <p>A JDK is necessary for developing Java components
101 or applications. An appropriate Java SDK can be
103 <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>
104 <p>Recommendation is to use Java
7 or later for
105 64bit, and Java
6 for
32bit.
</p>
106 <p><b>Note
</b>: The Java compiler is
107 <b><u>optional
</u></b>!
</p></td>
110 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
113 <td><b>C++ compiler
</b></td>
114 <td class=
"content80">A C++ compiler is necessary for
115 developing C++ components or applications. UNO
116 depends on a compiler dependent language binding, so
117 that we use the appropriate compiler where a
118 language binding exists:
119 <table class=
"table4">
121 <td class=
"cell15">Linux
</td>
122 <td class=
"cell80">GNU C++ compiler, gcc version
126 <td class=
"cell15">Mac OS X
</td>
127 <td class=
"cell80">XCode
</td>
130 <td class=
"cell15">Windows
</td>
131 <td class=
"cell80">Microsoft C++ Compiler,
132 Microsoft Visual Studio
2010 or later, or the
133 Express edition thereof
</td>
136 <p><b>Note
</b>: The C++ compiler is
137 <b><u>optional
</u></b>! If you use the Express
138 edition you have to ensure that the
139 <a href=
"http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en">Microsoft Visual Studio
2008 Redistributable Package
</a>
140 is also installed. You can download this package
141 from Microsoft directly.
</p></td>
144 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
147 <td><b>Microsoft .NET Framework SDK version
1.0 or
149 <td class=
"content80">The SDK is required for building
150 CLI applications. That is, programs written in
151 languages, such as C# or VB.NET.
<br/>
152 <p><b>Note
</b>: The .NET Framework is
153 <b><u>optional
</u></b>!
</p></td>
156 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
159 <td><b>GNU make (
3.79.1 or higher)
</b></td>
160 <td class=
"content80">
161 <p>GNU make is used to build the examples of the
162 SDK. GNU make is available from
163 <a target=
"_blank" href=
"http://www.gnu.org" title=
"link to www.gnu.org (online)">http://www.gnu.org
</a>.
165 <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>
166 <p><b>Note
</b>: Windows user can find an executable
168 <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>
169 (see the mingw32-make link under
"Manual
170 Installation
"). Do not use the Cygwin make,
171 because it does not work well. On Solaris gnu make
172 can be found often under
173 <b><i>/usr/sfw/bin/gmake
</i></b>, but keep in mind
174 that you have to use
<b>'gmake'
</b> then. Or you
175 can find gnu make also under
176 <a target=
"_blank" href=
"http://www.sunfreeware.com/" title=
"link to www.sunfreeware.com (online)">http://www.sunfreeware.com/
</a>.
</p></td>
179 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
182 <td><b>zip tool (
2.3 or higher)
</b></td>
183 <td class=
"content80">The zip tool is used to create
184 UNO packages. zip is a new requirement to make the
185 SDK independent of a Java SDK.
<br/>
186 If you do not have these already, you can download
188 <a target=
"_blank" href=
"http://www.info-zip.org" title=
"link to www.ubfi-zip.org (online)">http://www.info-zip.org
</a>.
189 Note: The cygwin zip.exe does not work for the build
190 under the
4NT shell. You have to use the native w32
194 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"></td>
197 <td><b>cat and sed tools
<b></td>
198 <td class=
"content80">The cat and set tools are used
199 to create some extensions.
200 <p><b>Note for Windows users
</b>: If you do not have
201 these already, you can download them from
202 <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>
206 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
210 <p>The SDK provides an implicit configuration
211 mechanism, which configures the SDK build
212 environment to your personal needs the first time
213 you use the SDK environment. This configuration
214 step creates a new setsdkenv_XXX script in the
215 user's home directory:
</p>
217 <li><b>$HOME/$OO_SDK_NAME/setsdkenv_unix.sh
</b> -
>
219 <li><b>C:\Documents and Settings\
<username
>\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat
</b> -
>
220 for Windows2000/XP or later
</li>
222 <p>The automatically started configure script (Unix
223 and Windows2000/XP) requests relevant information
224 and directories (SDK, LibreOffice, GNU make, Java,
225 C++), in order to prepare a working SDK
226 environment. After completing the configure script
227 once, the newly created script is always used to
228 set the necessary environment variables for using
229 the SDK and the required tools.
</p>
230 <p>On UNIX operating systems, the configure script
231 uses Perl. LINUX systems should have installed a
232 working Perl version, and on Solaris you can find
233 a working Perl version under
234 <a target=
"_blank" href=
"http://www.sunfreeware.com/" title=
"link to www.sunfreeware.com (online)">http://www.sunfreeware.com/
</a>
235 if necessary. On Windows, the configure script
236 uses Windows Script and a JScript. If you have
237 problems with Windows Script, you can download a
239 <a href=
"http://www.microsoft.com/downloads/details.aspx?FamilyId=C717D943-7E4B-4622-86EB-95A22B832CAA&displaylang=en" title=
"link to the download page for the Windows Script">Windows Script
</a>.
</p>
240 <p>If you use the template batch file, edit and set
241 the following variables:
</p>
242 <table class=
"table4">
244 <td class=
"cell20"><b>OFFICE_HOME
</b></td>
245 <td class=
"cell80">Path to an existing
246 LibreOffice installation, e.g.
247 "/opt/libreoffice8
". Be sure that it
248 is not a user installation only.
</td>
251 <td class=
"cell20"><a name=
"oosdkname"/><b>OO_SDK_NAME
</b></td>
252 <td class=
"cell80">The configuration uses the
253 directory name of the SDK, but you can use
254 another name as well. It is important that the
255 name does not contain spaces, because of a
256 limitation of gnu make which cannot handle
257 spaces correctly. This name is, for example,
258 used to create an output directory in the
259 users home directory for any generated output
260 when you use the SDK build environment.
</td>
263 <td class=
"cell20"><b>OO_SDK_HOME
</b></td>
264 <td class=
"cell80">Path to the SDK root
266 "/opt/libreoffice/sdk
"</td>
269 <td class=
"cell20"><b>OO_SDK_JAVA_HOME
</b></td>
270 <td class=
"cell80">Path to a JDK root directory.
271 The JDK is
<b>optional
</b> and only necessary
272 if you like to run the Java examples or if you
273 like to use the SDK environment to develop
274 your own Java solution.
</td>
277 <td class=
"cell20"><b>OO_SDK_CPP_HOME
</b></td>
278 <td class=
"cell80">Path to the C++ compiler (on
279 Windows, the directory where the
280 "<i>vcvar32.bat
</i>" file can be
281 found). The C++ compiler is
<b>optional
</b>
282 and only necessary for building the C++
286 <td class=
"cell20"><b>OO_SDK_CLI_HOME
</b></td>
287 <td class=
"cell80">Path to the C# compiler and
288 VB.NET compiler (on Windows, this directory
289 can be found under the system directory (e.g.
290 c:\WINXP\Microsoft.NET\Framework\v1.0
.3705).
291 The compilers are
<b>optional
</b> and only
292 necessary for building the CLI examples.
<br/>
293 <b>Note: Windows only!
</b></td>
296 <td class=
"cell20"><b>OO_SDK_MAKE_HOME
</b></td>
297 <td class=
"cell80">Path to GNU make.
</td>
300 <td class=
"cell20"><b>OO_SDK_ZIP_HOME
</b></td>
301 <td class=
"cell80">Path to the 'zip' tool.
</td>
304 <td class=
"cell20"><b>OO_SDK_CAT_HOME
</b></td>
305 <td class=
"cell80">Path to the 'cat' tool.
</td>
308 <td class=
"cell20"><b>OO_SDK_SED_HOME
</b></td>
309 <td class=
"cell80">Path to the 'sed' tool.
</td>
312 <td class=
"cell20"><b>OO_SDK_OUTPUT_DIR
</b></td>
313 <td class=
"cell80">Path to an existing directory
314 where the example output is generated. The
315 output directory is
<b>optional
</b>, by
316 default the output is generated in the SDK
317 directory itself. If an output directory is
318 specified, the output is generated in a SDK
319 dependent subdirectory in this directory (e.g.
320 <OO_SDK_OUTPUT_DIR
> /LibreOffice
321 %PRODUCT_RELEASE%/LINUXExample.out)
</td>
324 <td class=
"cell20"><b>SDK_AUTO_DEPLOYMENT
</b></td>
325 <td class=
"cell80">If this variable is set, the
326 component examples are automatically deployed
327 into the LibreOffice installation referenced
328 by OFFICE_HOME. See also chapter
329 <a href=
"http://wiki.openoffice.org/wiki/Documentation/DevGuide/Extensions/unopkg" title=
"link to the "Extension Manager - unopkg" chapter in the Developer's Guide">"Extension Manager - unopkg
"</a>
330 from the Developer's Guide.
</td>
333 <p>You must run the
<b>setsdkenv_XXX
</b> script
334 every time you want to use the configured SDK
335 environment. The settings are local for the
336 current shell on Windows or the new started shell
337 on UNIX. On UNIX you can now source the prepared
338 environment script file
339 (
"setsdkenv_unix.sh
") to prepare your
340 current shell instead of starting a new shell.
</p>
344 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
348 <p class=
"head2">Manual Setting
</p>
349 <p>If you do not want to use the script to set your
350 working environment, you must set the appropriate
351 environment variables yourself. The script sets
352 the following environment variables:
</p>
353 <p class=
"head3">Common Environment Variables
</p>
354 <table class=
"table4">
356 <td class=
"cell20">OO_SDK_NAME
</td>
357 <td class=
"cell80">See description
358 <a href=
"#oosdkname" title=
"link to the description of the environment variable OO_SDK_NAME">above
</a>.
</td>
361 <td class=
"cell20">OO_SDK_URE_BIN_DIR
</td>
362 <td class=
"cell80">The path within the chosen
363 LibreOffice URE installation where binary
364 executables are located.
</td>
367 <td class=
"cell20">OO_SDK_URE_LIB_DIR
</td>
368 <td class=
"cell80">The path within the chosen
369 LibreOffice URE installation where dynamic
370 libraries are located.
</td>
373 <td class=
"cell20">OO_SDK_URE_JAVA_DIR
</td>
374 <td class=
"cell80">The path within the chosen
375 LibreOffice URE installation where Java JARs
379 <td class=
"cell20">CLASSPATH
</td>
380 <td class=
"cell80">=
<i>$OO_SDK_URE_JAVA_DIR/juh.jar;
381 $OO_SDK_URE_JAVA_DIR/jurt.jar;
382 $OO_SDK_URE_JAVA_DIR/ridl.jar;
383 $OO_SDK_URE_JAVA_DIR/unoloader.jar;
384 $OO_SDK_URE_JAVA_DIR/unoil.jar;
386 <p>The classpath will be set or extended to
387 the necessary jar files of the specified
388 LibreOffice installation.
</p>
392 <td class=
"cell20">OFFICE_PROGRAM_PATH
</td>
393 <td class=
"cell80">=
<i>$OFFICE_HOME/program
</i><br/>
394 <p>This variable is used to find, for example,
395 the office type library and the UNO package
400 <td class=
"cell20">UNO_PATH
</td>
401 <td class=
"cell80">=
<i>$OFFICE_PROGRAM_PATH
</i><br/>
402 <p>This variable is used to ensure that the
403 new C++ UNO bootstrap mechanism uses the
404 configured LibreOffice installation of the
405 SDK. Normally the bootstrap mechanism finds
406 the default office installation for the user
407 on the system. This variable is optional but
408 is set from the scripts to ensure a
409 homogeneous environment. Especially useful
410 during development where you might have more
411 than one office installation installed.
</p>
415 <p class=
"head3">Environment Variables for UNIX
</p>
416 <p class=
"head4">Solaris
</p>
417 <table class=
"table4">
419 <td class=
"cell20">LD_LIBRARY_PATH
</td>
420 <td class=
"cell80">=
<i>$OO_SDK_URE_LIB_DIR:
421 $OO_SDK_HOME/(solsparc|solintel)/lib:
422 $LD_LIBRARY_PATH
</i><br/>
423 <p>The LD_LIBRARY_PATH will be set or will be
424 extended by the office/URE library path, the
425 platform dependent lib directory for several
426 additional libraries.
</p>
430 <td class=
"cell20">PATH
</td>
431 <td class=
"cell80">=
<i>$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME:
432 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
433 [$OO_SDK_JAVA_HOME/bin:]
434 $OO_SDK_URE_BIN_DIR: $PATH
</i><br/>
435 <p>The PATH variable will be extended by the
436 paths for the SDK development tools, the
437 compiler, the JDK, GNU make, the zip tool
438 and the OO_SDK_URE_BIN_DIR, where the
439 compiler or the JDK are optional.
</p>
443 <td colspan=
"2" class=
"cell80">The script
444 additionally creates symbolic links to the
445 public dynamic libraries of the URE in
446 <i>$OO_SDK_HOME/(solsparc|solintel)/lib
</i>,
447 which are needed for linking.
</td>
450 <p class=
"head4">Linux
</p>
451 <table class=
"table4">
453 <td class=
"cell20">LD_LIBRARY_PATH
</td>
454 <td class=
"cell80">=
<i>$OO_SDK_URE_LIB_DIR:
456 $LD_LIBRARY_PATH
</i><br/>
457 <p>The LD_LIBRARY_PATH will be set or will be
458 extended by the office/URE library path, the
459 platform dependent lib directory for some
460 additional libraries.
</p>
464 <td class=
"cell20">PATH
</td>
465 <td class=
"cell80">=
<i>$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME:
466 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
467 [$OO_SDK_JAVA_HOME/bin:]
468 $OO_SDK_URE_BIN_DIR: $PATH
</i><br/>
469 <p>The PATH variable will be extended by the
470 paths for the SDK development tools, the
471 compiler, the JDK, GNU make, the zip tool
472 and the OO_SDK_URE_BIN_DIR, where the
473 compiler and the JDK are optional.
</p>
477 <td colspan=
"2" class=
"cell80">The script
478 additionally creates symbolic links to the
479 public dynamic libraries of the URE in
480 <i>$OO_SDK_HOME/linux/lib
</i>, which are
481 needed for linking.
</td>
484 <p class=
"head3">Environment Variables for Windows
</p>
485 <table class=
"table4">
487 <td class=
"cell20">PATH
</td>
488 <td class=
"cell80">=
<i>%OO_SDK_HOME%\windows\bin;
489 %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%;
490 [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;]
491 [%OO_SDK_JAVA_HOME%\bin;]
492 %OO_SDK_URE_BIN_DIR%; %PATH%
</i><br/>
493 <p>The PATH variable will be extended by the
494 paths for the SDK development tools, the
495 compiler, the JDK, GNU make, the zip tool
496 and the OO_SDK_URE_BIN_DIR.
</p>
500 <td class=
"cell20">LIB
</td>
501 <td class=
"cell80">=
<i>%OO_SDK_HOME%\windows\lib;
503 <p>The LIB variable will be extended by the
504 path to the import libraries that are
505 necessary for Windows.
</p>
509 <td colspan=
"2" class=
"cell80">In addition to
510 setting these environment variables, the
512 "<i>vcvar32.bat
</i>" batch file
513 which is provided by the Microsoft Developer
514 Studio to set the necessary environment
515 variables for the compiler.
</td>
529 <div id=
"FooterText">
530 <p>Copyright ©
2000–
2019 LibreOffice contributors. All rights
532 LibreOffice was created by The Document Foundation, based on
533 Apache OpenOffice, which is Copyright
2011 The Apache Software
535 The Document Foundation acknowledges all community members, please
537 <a href=
"https://www.libreoffice.org/about-us/credits/" target=
"_blank">at our website
</a>.
</p>
539 <p><a href=
"http://www.documentfoundation.org/privacy" target=
"_blank">Privacy Policy
</a>
541 <a href=
"http://www.documentfoundation.org/imprint" target=
"_blank">Impressum (Legal Info)
</a>
542 | Copyright information: The source code of LibreOffice is
543 licensed under the Mozilla Public License v2.0
544 (
<a href=
"http://www.libreoffice.org/download/license/" target=
"_blank">MPLv2
</a>).
545 "LibreOffice" and
"The Document Foundation" are registered
546 trademarks of their corresponding registered owners or are in
547 actual use as trademarks in one or more countries. Their
548 respective logos and icons are also subject to international
549 copyright laws. Use thereof is explained in our
550 <a href=
"http://wiki.documentfoundation.org/TradeMark_Policy" target=
"_blank">trademark policy
</a>.
</p>