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">macOS
</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 a
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> -
>
218 for Unix-like systems
</li>
219 <li><b>C:\Documents and Settings\
<username
>\Application Data\%OO_SDK_NAME%\setsdkenv_windows.bat
</b> -
>
222 <p>To start the configure script, change into the SDK root directory and
225 <li><b>./setsdkenv_unix
</b> -
>
226 for Unix-like systems
</li>
227 <li><b>setsdkenv_windows.bat
</b> -
>
230 <p>The configure script
231 requests relevant information
232 and directories (SDK, LibreOffice, GNU make, Java,
233 C++), in order to prepare a working SDK
234 environment. (On Unix-like systems, the configure script recursively
235 starts a new interactive shell with the relevant environment variables
236 set; this is not needed on Windows.)
237 After completing the configure script
238 once, the newly created script is always used to
239 set the necessary environment variables for using
240 the SDK and the required tools.
</p>
241 <p>On Unix-like systems, the configure script
242 uses Perl. Linux systems should have installed a
243 working Perl version, and on Solaris you can find
244 a working Perl version under
245 <a target=
"_blank" href=
"http://www.sunfreeware.com/" title=
"link to www.sunfreeware.com (online)">http://www.sunfreeware.com/
</a>
246 if necessary. On Windows, the configure script
247 uses Windows Script and a JScript. If you have
248 problems with Windows Script, you can download a
250 <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>
251 <p>If you use the template batch file, edit and set
252 the following variables:
</p>
253 <table class=
"table4">
255 <td class=
"cell20"><b>OFFICE_HOME
</b></td>
256 <td class=
"cell80">Path to an existing
257 LibreOffice installation, e.g.
258 "/opt/libreoffice8
".
</td>
261 <td class=
"cell20"><a name=
"oosdkname"/><b>OO_SDK_NAME
</b></td>
262 <td class=
"cell80">The configuration uses the
263 directory name of the SDK, but you can use
264 another name as well. It is important that the
265 name does not contain spaces, because of a
266 limitation of gnu make which cannot handle
267 spaces correctly. This name is, for example,
268 used to create an output directory in the
269 users home directory for any generated output
270 when you use the SDK build environment.
</td>
273 <td class=
"cell20"><b>OO_SDK_HOME
</b></td>
274 <td class=
"cell80">Path to the SDK root
276 "/opt/libreoffice/sdk
"</td>
279 <td class=
"cell20"><b>OO_SDK_JAVA_HOME
</b></td>
280 <td class=
"cell80">Path to a JDK root directory.
281 The JDK is
<b>optional
</b> and only necessary
282 if you like to run the Java examples or if you
283 like to use the SDK environment to develop
284 your own Java solution.
</td>
287 <td class=
"cell20"><b>OO_SDK_CPP_HOME
</b></td>
288 <td class=
"cell80">Path to the C++ compiler (on
289 Windows, the directory where the
290 "<i>vcvar32.bat
</i>" file can be
291 found). The C++ compiler is
<b>optional
</b>
292 and only necessary for building the C++
296 <td class=
"cell20"><b>OO_SDK_CLI_HOME
</b></td>
297 <td class=
"cell80">Path to the C# compiler and
298 VB.NET compiler (on Windows, this directory
299 can be found under the system directory (e.g.
300 c:\WINXP\Microsoft.NET\Framework\v1.0
.3705).
301 The compilers are
<b>optional
</b> and only
302 necessary for building the CLI examples.
<br/>
303 <b>Note: Windows only!
</b></td>
306 <td class=
"cell20"><b>OO_SDK_MAKE_HOME
</b></td>
307 <td class=
"cell80">Path to GNU make.
</td>
310 <td class=
"cell20"><b>OO_SDK_ZIP_HOME
</b></td>
311 <td class=
"cell80">Path to the 'zip' tool.
</td>
314 <td class=
"cell20"><b>OO_SDK_CAT_HOME
</b></td>
315 <td class=
"cell80">Path to the 'cat' tool.
</td>
318 <td class=
"cell20"><b>OO_SDK_SED_HOME
</b></td>
319 <td class=
"cell80">Path to the 'sed' tool.
</td>
322 <td class=
"cell20"><b>OO_SDK_OUTPUT_DIR
</b></td>
323 <td class=
"cell80">Path to an existing directory
324 where the example output is generated. The
325 output directory is
<b>optional
</b>, by
326 default the output is generated in the SDK
327 directory itself. If an output directory is
328 specified, the output is generated in an SDK
329 dependent subdirectory in this directory (e.g.
330 <OO_SDK_OUTPUT_DIR
> /LibreOffice
331 %PRODUCT_RELEASE%/LINUXExample.out)
</td>
334 <td class=
"cell20"><b>SDK_AUTO_DEPLOYMENT
</b></td>
335 <td class=
"cell80">If this variable is set, the
336 component examples are automatically deployed
337 into the LibreOffice installation referenced
338 by OFFICE_HOME. See also section
339 <a href=
"https://wiki.documentfoundation.org/Documentation/DevGuide/Extensions#unopkg" title=
"link to the "Extension Manager - unopkg" section in the Developer's Guide">"Extension Manager - unopkg
"</a>
340 from the Developer's Guide.
</td>
343 <p>You must run the
<b>setsdkenv_XXX
</b> script
344 every time you want to use the configured SDK
345 environment. The settings are local for the
346 current shell on Windows or the new started shell
347 on Unix-like systems. On Unix-like systems you can now source the prepared
348 environment script file
349 (
"setsdkenv_unix.sh
") to prepare your
350 current shell instead of starting a new shell.
</p>
354 <td colspan=
"2"><img class=
"line" src=
"images/sdk_line-1.gif"/></td>
358 <p class=
"head2">Manual Setting
</p>
359 <p>If you do not want to use the script to set your
360 working environment, you must set the appropriate
361 environment variables yourself. The script sets
362 the following environment variables:
</p>
363 <p class=
"head3">Common Environment Variables
</p>
364 <table class=
"table4">
366 <td class=
"cell20">OO_SDK_NAME
</td>
367 <td class=
"cell80">See description
368 <a href=
"#oosdkname" title=
"link to the description of the environment variable OO_SDK_NAME">above
</a>.
</td>
371 <td class=
"cell20">OO_SDK_URE_BIN_DIR
</td>
372 <td class=
"cell80">The path within the chosen
373 LibreOffice URE installation where binary
374 executables are located.
</td>
377 <td class=
"cell20">OO_SDK_URE_LIB_DIR
</td>
378 <td class=
"cell80">The path within the chosen
379 LibreOffice URE installation where dynamic
380 libraries are located.
</td>
383 <td class=
"cell20">OO_SDK_URE_JAVA_DIR
</td>
384 <td class=
"cell80">The path within the chosen
385 LibreOffice URE installation where Java JARs
389 <td class=
"cell20">CLASSPATH
</td>
390 <td class=
"cell80">=
<i>$OO_SDK_URE_JAVA_DIR/libreoffice.jar;
391 $OO_SDK_URE_JAVA_DIR/unoloader.jar;
393 <p>The classpath will be set or extended to
394 the necessary jar files of the specified
395 LibreOffice installation.
</p>
399 <td class=
"cell20">OFFICE_PROGRAM_PATH
</td>
400 <td class=
"cell80">=
<i>$OFFICE_HOME/program
</i><br/>
401 <p>This variable is used to find, for example,
402 the office type library and the UNO package
407 <td class=
"cell20">UNO_PATH
</td>
408 <td class=
"cell80">=
<i>$OFFICE_PROGRAM_PATH
</i><br/>
409 <p>This variable is used to ensure that the
410 new C++ UNO bootstrap mechanism uses the
411 configured LibreOffice installation of the
412 SDK. Normally the bootstrap mechanism finds
413 the default office installation for the user
414 on the system. This variable is optional but
415 is set from the scripts to ensure a
416 homogeneous environment. Especially useful
417 during development where you might have more
418 than one office installation installed.
</p>
422 <p class=
"head3">Environment Variables for Unix-like systems
</p>
423 <p class=
"head4">Solaris
</p>
424 <table class=
"table4">
426 <td class=
"cell20">LD_LIBRARY_PATH
</td>
427 <td class=
"cell80">=
<i>$OO_SDK_URE_LIB_DIR:
428 $OO_SDK_HOME/(solsparc|solintel)/lib:
429 $LD_LIBRARY_PATH
</i><br/>
430 <p>The LD_LIBRARY_PATH will be set or will be
431 extended by the office/URE library path, the
432 platform dependent lib directory for several
433 additional libraries.
</p>
437 <td class=
"cell20">PATH
</td>
438 <td class=
"cell80">=
<i>$OO_SDK_HOME/(solsparc|solintel)/bin:$OO_SDK_MAKE_HOME:
439 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
440 [$OO_SDK_JAVA_HOME/bin:]
441 $OO_SDK_URE_BIN_DIR: $PATH
</i><br/>
442 <p>The PATH variable will be extended by the
443 paths for the SDK development tools, the
444 compiler, the JDK, GNU make, the zip tool
445 and the OO_SDK_URE_BIN_DIR, where the
446 compiler or the JDK are optional.
</p>
450 <td colspan=
"2" class=
"cell80">The script
451 additionally creates symbolic links to the
452 public dynamic libraries of the URE in
453 <i>$OO_SDK_HOME/(solsparc|solintel)/lib
</i>,
454 which are needed for linking.
</td>
457 <p class=
"head4">Linux
</p>
458 <table class=
"table4">
460 <td class=
"cell20">LD_LIBRARY_PATH
</td>
461 <td class=
"cell80">=
<i>$OO_SDK_URE_LIB_DIR:
463 $LD_LIBRARY_PATH
</i><br/>
464 <p>The LD_LIBRARY_PATH will be set or will be
465 extended by the office/URE library path, the
466 platform dependent lib directory for some
467 additional libraries.
</p>
471 <td class=
"cell20">PATH
</td>
472 <td class=
"cell80">=
<i>$OO_SDK_HOME/linux/bin:$OO_SDK_MAKE_HOME:
473 $OO_SDK_ZIP_HOME: [$OO_SDK_CPP_HOME:]
474 [$OO_SDK_JAVA_HOME/bin:]
475 $OO_SDK_URE_BIN_DIR: $PATH
</i><br/>
476 <p>The PATH variable will be extended by the
477 paths for the SDK development tools, the
478 compiler, the JDK, GNU make, the zip tool
479 and the OO_SDK_URE_BIN_DIR, where the
480 compiler and the JDK are optional.
</p>
484 <td colspan=
"2" class=
"cell80">The script
485 additionally creates symbolic links to the
486 public dynamic libraries of the URE in
487 <i>$OO_SDK_HOME/linux/lib
</i>, which are
488 needed for linking.
</td>
491 <p class=
"head3">Environment Variables for Windows
</p>
492 <table class=
"table4">
494 <td class=
"cell20">PATH
</td>
495 <td class=
"cell80">=
<i>%OO_SDK_HOME%\windows\bin;
496 %OO_SDK_MAKE_HOME%; %OO_SDK_ZIP_HOME%;
497 [%OO_SDK_CLI_HOME%;] [%OO_SDK_CPP_HOME%;]
498 [%OO_SDK_JAVA_HOME%\bin;]
499 %OO_SDK_URE_BIN_DIR%; %PATH%
</i><br/>
500 <p>The PATH variable will be extended by the
501 paths for the SDK development tools, the
502 compiler, the JDK, GNU make, the zip tool
503 and the OO_SDK_URE_BIN_DIR.
</p>
507 <td class=
"cell20">LIB
</td>
508 <td class=
"cell80">=
<i>%OO_SDK_HOME%\windows\lib;
510 <p>The LIB variable will be extended by the
511 path to the import libraries that are
512 necessary for Windows.
</p>
516 <td colspan=
"2" class=
"cell80">In addition to
517 setting these environment variables, the
519 "<i>vcvar32.bat
</i>" batch file
520 which is provided by the Microsoft Developer
521 Studio to set the necessary environment
522 variables for the compiler.
</td>
536 <div id=
"FooterText">
537 <p>Copyright ©
2000–
2023 LibreOffice contributors. All rights
539 LibreOffice was created by The Document Foundation, based on OpenOffice.org.
<br/>
540 The Document Foundation acknowledges all community members, please
542 <a href=
"https://www.libreoffice.org/about-us/credits/" target=
"_blank">at our website
</a>.
</p>
544 <p><a href=
"http://www.documentfoundation.org/privacy" target=
"_blank">Privacy Policy
</a>
546 <a href=
"http://www.documentfoundation.org/imprint" target=
"_blank">Impressum (Legal Info)
</a>
547 | Copyright information: The source code of LibreOffice is
548 licensed under the Mozilla Public License v2.0
549 (
<a href=
"http://www.libreoffice.org/download/license/" target=
"_blank">MPLv2
</a>).
550 "LibreOffice" and
"The Document Foundation" are registered
551 trademarks of their corresponding registered owners or are in
552 actual use as trademarks in one or more countries. Their
553 respective logos and icons are also subject to international
554 copyright laws. Use thereof is explained in our
555 <a href=
"http://wiki.documentfoundation.org/TradeMark_Policy" target=
"_blank">trademark policy
</a>.
</p>