2017-02-05

4: To Build the Environment for Developing UNO Extensions (LibreOffice Extensions or Apache OpenOffice Extensions), for Linux, Part One

<The previous article in this series | The table of contents of this series | The next article in this series>

Main body START

To Know How to Handle (Read or Write) LibreOffice or Apache OpenOffice Writer or Calc Documents via Extensions from Java or Macro Programs

What Are Our Target Platforms?

-Hypothesizer

To begin from learning basic concepts is ideal, but honestly, I'm uncomfortable until I see things work in front of my eyes. . . . So, theories aside, why don't we first learn how to build the environment for developing UNO extensions, create a first UNO extension, and test it?

-Rebutter

I don't mind.

-Hypothesizer

Naturally, how to build environments depends on platforms. As we have these two platforms, we will build environments on the two platforms.

  • Linux: Lubuntu 16.04
  • Windows: Windows 10
-Rebutter

Ah-ha.

-Hypothesizer

In this article, we will describe how to build the environment on Lubuntu 16.04.

-Rebutter

OK.

To Build the Environment for Developing UNO Extensions, for Linux, Part One

-Hypothesizer

Lubuntu is a variant of Ubuntu (a Linux distribution), that uses a more lightweight desktop environment than Ubuntu's. Its base system is the same with Ubuntu's, and descriptions here should apply to Ubuntu too.

-Rebutter

I see.

-Hypothesizer

On Lubuntu 16.04, this environment will be built.

  • LibreOffice 5.1.4
  • LibreOffice SDK 5.1.4
  • Oracle JDK 1.8.0
  • Ant 1.9.6
  • Gradle 3.1
-Rebutter

I understand that Ant and Gradle are both a build tool. Do we need both?

-Hypothesizer

No. Actually, I tried Ant first, and it worked fine, but Gradle seemed better because it's globally regarded as more up-to-date. So, I tried Gradle too. Basically, we use Gradle, but we will also record about Ant because we have already built the environment.

-Rebutter

I see.

-Hypothesizer

Let's clarify prerequisites. OS is supposed to have already been installed. We won't use directory names or file names with spaces. Directory names and file names with spaces may work fine, but as we test only with directory names and file names without spaces, we don't know what would happen with directory names and file names with spaces.

-Rebutter

All right.

-Hypothesizer

First, LibreOffice will be installed. . . . For Lubuntu 16.04, LibreOffice is included in the OS packages repositories. So, it can be installed using the apt-get command, like this.

sudo apt-get install libreoffice
-Rebutter

Ah-ha . . .. How can we install it on other Linux distributions?

-Hypothesizer

For most distributions, LibreOffice and its SDK packages should be included in their packages repositories. Besides, LibreOffice and its SDK packages (deb or RPM) can be downloaded from the LibreOffice download Web page, and we can install them using those packages. Or we can even download source codes and build applications from the source codes.

-Rebutter

Just out of curiosity, how can we install Apache OpenOffice and its SDK?

-Hypothesizer

The packages can be downloaded from the Apache OpenOffice download Web page, and we can install them using the packages.

-Rebutter

I see.

-Hypothesizer

Second, LibreOffice SDK will be installed. Again, for Lubuntu 16.04, LibreOffice SDK is included in the OS packages repositories. So, it can be installed using the apt-get command, like this.

sudo apt-get install libreoffice-dev
sudo apt-get install libreoffice-dev-doc
-Rebutter

Ah-ha.

Main body END

References

  • The Document Foundation. (n/a). LibreOffice Fresh. Retrieved from https://www.libreoffice.org/download/libreoffice-fresh/
  • The Apache Software Foundation. (n/a). Apache OpenOffice - Downloads. Retrieved from http://openoffice.apache.org/downloads.html

<The previous article in this series | The table of contents of this series | The next article in this series>