5 Concepts
Emiliano Vavassori edited this page 2024-03-09 18:22:06 +01:00

Core concepts of the script

This page describes some core concepts behind the options of loaih.

Manual builds versus bulk/batch builds

The loaih script can be used to produce a single, personal release of LibreOffice packaged as AppImage (that will hardly be shared with everyone else), as well as a full set of AppImages that can be shared with other people for ease of consumption.

The single manual build is implemented with the build verb, while the batch/bulk builds is supported with the batch verb of the loaih command. Since the two use cases are largely different, when developing loaih we chose to distinguish the default behavior of the options of the command based on the verb.

The concepts behind the options available to both build and batch verbs are explained in the rest of this page; the actual use of the two verbs is explained in the relative pages: Usage - manual build and Usage - batch build.

Language support

The loaih script can include in your AppImage the language support you prefer, by the use of the --languages option, or in short -l.

You can specify a single translation of LibreOffice, in addition to the standard English, to be included in your build like:

loaih build daily -l 'zh-CN'

Or, you can provide a set of languages to include in a similar way:

loaih build daily -l 'pt,pt-BR'

The command recognizes, also, three different sets of languages:

  • basic, which includes just English and British English;
  • standard, which includes English, Arabic, German, British English, Spanish, French, Japanese, Korean, Portuguese, Brazilian Portuguese, Russian, Standard Chinese and Taiwanese Chinese;
  • full, which includes all the languages supported by LibreOffice at the time of the specific release.

They can be used like:

loaih build daily -l standard

The default value, both for build and batch verbs, for the --languages option is basic.

Offline help

The loaih script will not include, by default, the offline help pages for the chosen release, for both the build and batch verbs.

However, you can change the behavior of the build verb using the --offline-help option, or in short -o: when used, this option will honor the value of the --languages option and include the help pages for all the languages that have been selected by the user.

Updatability

Updatability for an AppImage means to provide support to use the zsync2 utility to update a previously downloaded AppImage. This tool permits to avoid re-downloading the entire AppImage file, but to leverage the web server to send only the different chunks of the AppImage file from the local version.

Since the size of the AppImages are different based on language support, offline help pages inclusion and so on, using zsync2 to download a newly built image is not always beneficial.

For an AppImage to be updatable means that the newly built AppImage has to be publicly available on a web server that supports downloads in chunks, the presence in the same folder of the AppImage file of a specific .zsync file and the usage, by the final user, of the zsync2 tool.

By default, the loaih script does not build an updatable AppImage when using the build verb (manual build), however it does when using the batch verb instead.

To revert the default behavior of the build verb, you can use the --updatable option (in short, -u), which forces loaih to build also the .zsync file required to update a previous AppImage.

Portability

The loaih command can produce an AppImage that uses a different profile path than the default LibreOffice one --- this is generally known as "portable" AppImage.

Portable versions greatly help when debugging an issue in a specific version of LibreOffice and the debuggers want to be sure to exclude their own personal settings of LibreOffice when doing so.

The loaih command builds, for both the build and batch verbs, an AppImage that is not considered "portable": which means it uses the default profile folder (which, for documentation purposes, is ~/.config/libreoffice/4/user).

If you want to build a "portable" version of an AppImage, be sure to include with the build verb the option --portable (in short, -p): this will change the profile path of the user settings of the LibreOffice AppImage to ~/.config/libreoffice/<major-version>/user folder.

Signing

When releasing an AppImage, the developer can choose to sign the AppImage with his own GPG signature.

loaih can obviously sign your AppImage using your default GPG key, however it does not do it by default with both the build or the batch verbs: we assume not everyone would have the necessity to sign the AppImage, nor everyone possesses a valid GPG key.

If you want to sign your AppImage with your default GPG key, be sure to add the option --sign (or in short -s).

Checksums

When releasing a large file (like the LibreOffice AppImages are), developers usually choose to provide a checksum of the file produced by commonly known hashing algorithms. Of course, this is not needed when you are building an AppImage on your own machine for your own use.

As such, the batch verb produces checksums for each of the file produced by the build process; instead, the build verb does not by default.

If you want your AppImage to be accompanied with its own checksums, you can provide the command with the --checksums option (in short, -e): loaih will build your AppImage and produce an .md5 file of each of the output file, which contains the checksum for the file with MD5 algorithms.

You can then check your built AppImage for example with:

md5sum -c LibreOffice-24.2.0.3.basic-x86_64.AppImage.md5

Keeping downloads

When releasing a great number of similar AppImages, all starting from the same sources, as in the case of batch builds, keeping the downloads between single builds will allow a great deal of bandwidth saving and, in general, optimize the release process.

This is however a very different approach than when building a single version for your own purposes: you just need the built AppImage, and you don't care about the sources once the build process is finished.

This is reflected in the behavior of the two verbs of loaih, where:

  • the batch verb will retain all the downloaded files;
  • the build verb instead will remove the download folder as soon as it is finished building your version.

If you want to keep your downloads when manually building your AppImage, you can pass the option --keep-downloads (or -k in short) to preserve the sources once your AppImage has been built: this is especially useful if you want two slightly different versions of the same LibreOffice version as AppImage (for example, if you want a version with the help pages and one without).

If you want to customize the position inside your filesystem of the download folder, you can also use the option --download-path (in short -d). This is honored in any case, even if you don't want to keep your downloads after the build.


HomePrerequisitesInstallationUsage - versionsUsage - manual buildUsage - batch build