office-gobmx/desktop
Stephan Bergmann e952204b40 Emscripten: Establish a channel between browser and LO main threads
...to be used by external code, to mitigate the issue mentioned in the commit
message of cccc983eb3 "Emscripten: Run external
code on LO's main thread":  "Alternatively, running external code on the
browser's main thread rather than on LO's main thread could be more ideal in the
sense that the external code would then have access to the browser's document
object."

On the browser main thread, external JS code can now await a Module.uno_main
Promise that provides one port of a MessageChannel.  And on the LO main thread,
external JS code has access to the other port of that MessageChannel as
Module.uno_mainPort.  (And the external code is completely free in what
onmessage handlers to set up and what form of postMessage calls to use on those
two MessagePorts.)

Change-Id: Iab6bc7676c744eacb70ddd9f3f80f64e9efd1cf1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171907
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Tested-by: Jenkins
2024-08-15 17:16:27 +02:00
..
inc tdf#161048 Revert "move opencl check at startup inside its own thread" 2024-05-28 18:02:22 +02:00
qa Related: cool#9735 vcl lok: add an AnyInput() callback 2024-08-14 11:17:33 +02:00
scripts valgrind: dhat is no longer experimental 2024-07-09 10:53:31 +02:00
source Emscripten: Establish a channel between browser and LO main threads 2024-08-15 17:16:27 +02:00
test/deployment cui, dbaccess, desktop, external, filter, librelogo: fix issues found by 2024-07-27 12:51:55 +02:00
uiconfig/ui Resave with newer Glade version 2024-06-24 15:37:25 +02:00
unx/source -Werror,-Wgnu-folding-constant 2024-07-15 23:10:07 +02:00
util Properly implement cppu::throwException for Emscripten 2024-07-10 12:32:15 +02:00
win32/source
AllLangMoTarget_dkt.mk
CppunitTest_desktop_app.mk
CppunitTest_desktop_dialogs_test.mk
CppunitTest_desktop_lib.mk
CppunitTest_desktop_lokinit.mk
CppunitTest_desktop_version.mk
CustomTarget_desktop_unopackages_install.mk
CustomTarget_soffice.mk
CustomTarget_soffice_bin-emscripten-exports.mk Properly implement cppu::throwException for Emscripten 2024-07-10 12:32:15 +02:00
Executable_minidump_upload.mk
Executable_oosplash.mk
Executable_quickstart.mk
Executable_sbase.mk
Executable_scalc.mk
Executable_sdraw.mk
Executable_simpress.mk
Executable_smath.mk
Executable_soffice_bin.mk Emscripten: Move the Qt event loop off the JS main thread 2024-08-12 16:31:35 +02:00
Executable_soffice_com.mk
Executable_soffice_exe.mk
Executable_soffice_safe.mk
Executable_sweb.mk
Executable_swriter.mk
Executable_unoinfo.mk
Executable_unopkg.mk
Executable_unopkg_bin.mk
Executable_unopkg_com.mk
Extension_test-active.mk
Extension_test-crashextension.mk
Extension_test-passive.mk
GeneratedPackage_desktop_unopackages_install.mk
IwyuFilter_desktop.yaml
Jar_active_java.mk
Jar_passive_java.mk
Library_active_native.mk
Library_crashextension.mk
Library_crashreport.mk
Library_deployment.mk
Library_deploymentgui.mk
Library_deploymentmisc.mk
Library_migrationoo2.mk
Library_migrationoo3.mk
Library_offacc.mk
Library_passive_native.mk
Library_sofficeapp.mk
Library_spl.mk
Library_unopkgapp.mk
lokclipboard.component
Makefile
Module_desktop.mk Properly implement cppu::throwException for Emscripten 2024-07-10 12:32:15 +02:00
Package_branding.mk
Package_branding_custom.mk
Package_sbase_sh.mk
Package_scalc_sh.mk
Package_scripts.mk
Package_sdraw_sh.mk
Package_simpress_sh.mk
Package_smath_sh.mk
Package_soffice_sh.mk
Package_swriter_sh.mk
Pagein_calc.mk
Pagein_common.mk
Pagein_draw.mk
Pagein_impress.mk
Pagein_writer.mk
Pyuno_passive_python.mk
Rdb_crashextension.mk
Rdb_passive_generic.mk
Rdb_passive_platform.mk
README.md
README.vars
StaticLibrary_winlauncher.mk
StaticLibrary_winloader.mk
UIConfig_deployment.mk
WinResTarget_quickstart.mk
WinResTarget_sbase.mk
WinResTarget_scalc.mk
WinResTarget_sdraw.mk
WinResTarget_simpress.mk
WinResTarget_smath.mk
WinResTarget_soffice.mk
WinResTarget_sofficebin.mk
WinResTarget_sweb.mk
WinResTarget_swriter.mk

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
  • 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
  • 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