2017-04-23

18: To Understand the Sample UNO Extension (LibreOffice Extension or Apache OpenOffice Extension), Part Five

<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 Happens in the Build Process?

-Hypothesizer

Now, we have created all the artifacts that we create by hands.

-Rebutter

So, all the other artifacts are created from those artifacts in the build process?

-Hypothesizer

Yes. I will explain what happens in the build process.

The 'intermediate' directory, which contains intermediate artifacts, is created in the project directory. For example, Java class files are intermediate artifacts because we don't need naked Java class files at the end although we need the UNO extension file that contains the Jar file that contains those Java class files.

-Rebutter

Ah-ha.

-Hypothesizer

Then, each UNOIDL file is compiled into a UNO data type unmerged registry file, which is stored under the directory, 'intermediate/registry'.

-Rebutter

All right.

-Hypothesizer

Then, the 'target' directory, which contains target artifacts, is created in the project directory.

Then, UNO data type unmerged registry files are merged into a UNO data types merged registry file, which is stored under the directory, 'target'.

-Rebutter

Is the UNO data types merged registry file a target artifact? Isn't it just included in the UNO extension file?

-Hypothesizer

In fact, it's just included in the UNO extension file in this sample UNO extension. However, it can be also directly registered into LibreOffice, and in future, we intend to create a single project that builds a single UNO data types merged registry file that contains all of our UNO data types, and register the single UNO data types merged registry file into LibreOffice.

-Rebutter

So, in future, we will collect all the UNOIDL files in the single project?

-Hypothesizer

Yes. That's because we want to make our UNO data types accessible from any of our UNO extensions.

-Rebutter

I see.

-Hypothesizer

Then, Java class files are created from the UNO data types merged registry file. They are stored under the directory, 'intermediate/classes'.

-Rebutter

They are the UNO interface and the the 'global UNO service' instances factory, I presume?

-Hypothesizer

Yes.

Then, we compile Java source files. The class files are stored under the directory, 'intermediate/classes'.

-Rebutter

I see.

-Hypothesizer

Then, the Java class files are archived into the Jar file with the manifest file filled with the contents of 'MANIFEST.MF.addition'. The Jar file is stored under the directory, 'target'.

In this sample UNO extension, the Jar file isn't a target file, but a file included in the UNO extension file, but it's stored under the target directory because in the aforementioned UNO data types project, the Jar file will be directly registered into LibreOffice, and in non-'UNO extension' projects, Jar files are usually target files.

-Rebutter

Hmm, so, as the build systems are common among projects, things that can be target files in some projects are treated as target files in every project.

-Hypothesizer

Yes.

Then, the Jar file, the UNO data types merged registry file, the manifest file of the UNO extension file, and the UNO components setting file are archived into the UNO extension file, which is stored under the directory, 'target'.

-Rebutter

Ah-ha.

-Hypothesizer

Then, the UNO extension file is registered into LibreOffice.

-Rebutter

I see.

Main body END

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