config_host.mk.in                                   |    1 +
 configure.ac                                        |   13 +++++++++++++
 instsetoo_native/CustomTarget_emscripten-install.mk |    2 +-
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk      |    4 ++--
 static/README.wasm.md                               |    2 +-
 5 files changed, 18 insertions(+), 4 deletions(-)

New commits:
commit 148111ac484a18e3783914dcf76a5a57c85d6936
Author:     Stephan Bergmann <stephan.bergm...@allotropia.de>
AuthorDate: Wed Oct 30 11:00:58 2024 +0100
Commit:     Moritz Duge <moritz.d...@allotropia.de>
CommitDate: Thu Mar 13 12:19:00 2025 +0100

    Adapt to generation of .worker.js files gone from 3.1.68
    
    ...and just unused dummies since 3.1.58, so don't install them for >= 
3.1.58,
    even if the dummies would still be available for < 3.1.68
    
    Change-Id: Ida55be2fa3b75982bfd764b7b2676e63c092fe79
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175822
    Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit 9416bafc23bf2b9a3c6730a6c5add4a61c461ff1)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177460
    Reviewed-by: Moritz Duge <moritz.d...@allotropia.de>
    Tested-by: allotropia jenkins <jenk...@allotropia.de>

diff --git a/config_host.mk.in b/config_host.mk.in
index 242628511744..7ff53fe30b23 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -143,6 +143,7 @@ export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@
 export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
 export EMSDK_FILE_PACKAGER=@EMSDK_FILE_PACKAGER@
 export EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS=@EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS@
+export EMSCRIPTEN_WORKERJS=@EMSCRIPTEN_WORKERJS@
 export ENABLE_ANDROID_LOK=@ENABLE_ANDROID_LOK@
 export ENABLE_ANDROID_EDITING=@ENABLE_ANDROID_EDITING@
 export ENABLE_AVAHI=@ENABLE_AVAHI@
diff --git a/configure.ac b/configure.ac
index b2a434db2713..306ffa1f97e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1437,6 +1437,7 @@ EMSCRIPTEN_MIN_MINOR=1
 EMSCRIPTEN_MIN_TINY=46
 
EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}"
 
+EMSCRIPTEN_WORKERJS=
 if test "$_os" = "Emscripten"; then
     AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION])
     if test -z "$EMSCRIPTEN_VERSION_H"; then
@@ -1487,9 +1488,21 @@ if test "$_os" = "Emscripten"; then
 
     dnl Some build-side things are conditional on "EMSCRIPTEN in 
BUILD_TYPE_FOR_HOST":
     BUILD_TYPE="$BUILD_TYPE EMSCRIPTEN"
+
+    dnl Generation of .worker.js files has been dropped completely from 
Emscripten 3.1.68, and the
+    dnl generated files were just unused dummies since Emscripten 3.1.58:
+    AC_MSG_CHECKING([if Emscripten still depends on a separate .worker.js 
file])
+    check_semantic_version_three 3 1 58 "$EMSCRIPTEN_MAJOR" 
"$EMSCRIPTEN_MINOR" "$EMSCRIPTEN_TINY"
+    if test $? -ne 0; then
+        AC_MSG_RESULT([yes])
+        EMSCRIPTEN_WORKERJS=TRUE
+    else
+        AC_MSG_RESULT([no])
+    fi
 fi
 AC_SUBST(EMSDK_FILE_PACKAGER)
 AC_SUBST(EMSCRIPTEN_EXTRA_SOFFICE_PRE_JS)
+AC_SUBST(EMSCRIPTEN_WORKERJS)
 
 ###############################################################################
 # Extensions switches --enable/--disable
diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
index b81d510523a7..6f89d5e37fe4 100644
--- a/instsetoo_native/CustomTarget_emscripten-install.mk
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -18,7 +18,7 @@ emscripten_install_files := \
     soffice.data.js.metadata \
     soffice.js \
     soffice.wasm \
-    soffice.worker.js \
+    $(if $(EMSCRIPTEN_WORKERJS),soffice.worker.js) \
     $(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
     $(if $(DISABLE_GUI),, \
         qt_soffice.html \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 5da8f8c145ac..16646fac35ee 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -81,7 +81,7 @@ define gb_Executable_Executable_platform
 $(call gb_LinkTarget_add_auxtargets,$(2),\
         $(patsubst %.lib,%.linkdeps,$(3)) \
         $(patsubst %.lib,%.wasm,$(3)) \
-        $(patsubst %.lib,%.worker.js,$(3)) \
+        $(if $(EMSCRIPTEN_WORKERJS),$(patsubst %.lib,%.worker.js,$(3))) \
         $(patsubst %.lib,%.wasm.dwp,$(3)) \
 )
 
@@ -91,7 +91,7 @@ define gb_CppunitTest_CppunitTest_platform
 $(call gb_LinkTarget_add_auxtargets,$(2),\
         $(patsubst %.lib,%.linkdeps,$(3)) \
         $(patsubst %.lib,%.wasm,$(3)) \
-        $(patsubst %.lib,%.worker.js,$(3)) \
+        $(if $(EMSCRIPTEN_WORKERJS),$(patsubst %.lib,%.worker.js,$(3))) \
         $(patsubst %.lib,%.wasm.dwp,$(3)) \
 )
 
diff --git a/static/README.wasm.md b/static/README.wasm.md
index 3ad252ad3f6a..4cab873c7a0c 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -252,7 +252,7 @@ Module.uno_init.then(function() {
 ```
 
 If you enter the above examples into the browser console, you need to enter 
them into the console of
-the first soffice.worker.js thread, which is the LO main thread since we use 
-sPROXY_TO_PTHREAD, not
+the first web worker thread, which is the LO main thread since we use 
-sPROXY_TO_PTHREAD, not
 into the console of the browser's main thread.
 
 Alternatively, you can do the following:  Put an example into some file like 
`example.js` that you

Reply via email to