summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac13
-rw-r--r--instsetoo_native/CustomTarget_emscripten-install.mk2
-rw-r--r--solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk4
-rw-r--r--static/README.wasm.md2
5 files changed, 18 insertions, 4 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index d759bc2d9ce5..20c027405df2 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -148,6 +148,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 f622d1eb8a7b..b1bdb7ef6030 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1440,6 +1440,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
@@ -1490,9 +1491,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 b80471427940..4426deba0d02 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 23e1d92db207..76a956219c71 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