<The previous article in this series | The table of contents of this series | The next article in this series>
To Know How to Handle (Read or Write) LibreOffice or Apache OpenOffice Writer or Calc Documents via Extensions from Java or Macro Programs
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?
I don't mind.
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
Ah-ha.
In this article, we will describe how to build the environment on Lubuntu 16.04.
OK.
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.
I see.
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
I understand that Ant and Gradle are both a build tool. Do we need both?
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.
I see.
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.
All right.
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
Ah-ha . . .. How can we install it on other Linux distributions?
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.
Just out of curiosity, how can we install Apache OpenOffice and its SDK?
The packages can be downloaded from the Apache OpenOffice download Web page, and we can install them using the packages.
I see.
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
Ah-ha.
- 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>