We want that only the ForKit process needs to have access to new font files added to a Collabora Online instance dynamically by downloading from a server. There are however many locations in the Kit process, in core and in external libraries like harfbuzz, where the code wants to open a font file. Handle this so that the ForKit process opens such a downloaded font file and doesn't close it. The file descriptor is thus inherited by Kit processes. The font file pathname passed on to other code is a fake on in the format "/:FD:/%d" where the %d is the file descriptor of the opened font file. Add checks in all places where font files are opened, look for this special pathname format, and modify the code to just dup() the already open file descriptor in that case. All this is relevant for Linux only, as Collabora Online runs on Linux. Do the above for harfbuzz, cairo, fontconfig, and freetype. In addition make sure that these libraries (except harfbuzz which needs to be a static library and freetype) when bundled, on Linux, are built as shared libraries, and won't be confused with the corresponding system libraries by making sure their sonames are different. Change-Id: Ib059cb27e1637d07bb709249abd0d984f948caa9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140714 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146341 Tested-by: Jenkins
LibreOffice Binary
Code for the LibreOffice main binary (soffice) resides here. The soffice_main
function for the soffice binary can be found here.
Stable Interface
Some of the artifacts built here are part of a LibreOffice installation set's stable interface, which (programmatic) clients can depend on. Among them are:
soffice
In the program directory (program/ on Linux and Windows, Contents/MacOS/
on macOS).
unoinfo
In the program directory (program/ on Linux and Windows, Contents/MacOS/
on macOS).
When called with a sole argument of c++, it prints to stdout an absolute
pathname denoting the directory where the public URE libraries are found.
When called with a sole argument of java, it prints to stdout a marker
character (either an ASCII '0' or '1') followed by a sequence of zero or more
absolute pathnames denoting jars or directories that need to be included in a
class loader's search locations.
If the marker character is '0' (on Linux and macOS), the pathnames are encoded as bytes, and any two pathnames in the sequence are separated from each other by NUL bytes.
If the marker character is '1' (on Windows), the pathnames are encoded as
UTF-16-LE two-byte code units, and any two pathnames in the sequence are
separated from each other by two-byte NUL code units.
Other Binaries
oosplash
Splash screen for the LibreOffice soffice binary.
Extensions
The directory test/deployment contains some extensions to be used for testing:
test/deployment/crashextension: C++ extension to make LibreOffice crash. Useful for testing Crashreporter.- Build with
Extension_test-crashextension. - Extension can be found in
workdir/Extension/test-crashextension.oxt
- Build with
test/deployment/passive: C++, Java and Python extension samples with passive registration.- Build with
make Extension_test-passive. - Extension can be found in
workdir/Extension/test-passive.oxt
- Build with
test/deployment/active: C++, Java and Python extension samples with active registration.- Build with
make Extension_test-active. - Extension can be found in
workdir/Extension/test-active.oxt
- Build with