RepositoryFixes.mk                                  |    4 ----
 instsetoo_native/CustomTarget_emscripten-install.mk |    3 +--
 solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk      |    4 +---
 solenv/gbuild/platform/unxgcc.mk                    |    4 ++--
 4 files changed, 4 insertions(+), 11 deletions(-)

New commits:
commit ce8ac330eb4d995f29be4a4e12ef5f63481dcd03
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Oct 9 16:18:35 2024 +0200
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Oct 10 10:21:42 2024 +0200

    Emscripten: For executables, only build .js files, not .html files
    
    ...as for the by-default --enable-qt5 case we generate an additional
    qt_soffice.html anyway (and for a --disable-gui --disable-qt5 build, client 
code
    probably wants to embed the results into its own HTML document and wouldn't 
rely
    on an soffice.html); this simplifies the build infrastructure a little
    
    Change-Id: Ib50799b5dd2fcfeb680f257f46ff65775dcddd71
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174725
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index 2139b2f823ff..4cacbbce35b9 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -35,12 +35,8 @@ ifeq ($(OS),MACOSX)
 gb_Executable_FILENAMES := $(patsubst 
soffice_bin:soffice_bin,soffice_bin:soffice,$(gb_Executable_FILENAMES))
 else
 ifeq ($(OS),EMSCRIPTEN)
-ifeq ($(ENABLE_QT6),TRUE)
 gb_Executable_FILENAMES := $(patsubst 
soffice_bin:soffice_bin%,soffice_bin:soffice.js,$(gb_Executable_FILENAMES))
 else
-gb_Executable_FILENAMES := $(patsubst 
soffice_bin:soffice_bin%,soffice_bin:soffice.html,$(gb_Executable_FILENAMES))
-endif
-else
 gb_Executable_FILENAMES := $(patsubst 
soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
 endif
 endif
diff --git a/instsetoo_native/CustomTarget_emscripten-install.mk 
b/instsetoo_native/CustomTarget_emscripten-install.mk
index f4e63f729ab6..b81d510523a7 100644
--- a/instsetoo_native/CustomTarget_emscripten-install.mk
+++ b/instsetoo_native/CustomTarget_emscripten-install.mk
@@ -20,8 +20,7 @@ emscripten_install_files := \
     soffice.wasm \
     soffice.worker.js \
     $(if $(ENABLE_SYMBOLS_FOR),soffice.wasm.dwp) \
-    $(if $(DISABLE_GUI), \
-        soffice.html, \
+    $(if $(DISABLE_GUI),, \
         qt_soffice.html \
         qtloader.js \
         qtlogo.svg) \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk 
b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 227ef83990de..2b55b4ba1218 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -30,7 +30,7 @@ ifeq ($(ENABLE_EMSCRIPTEN_PROXY_POSIX_SOCKETS),TRUE)
 gb_EMSCRIPTEN_LDFLAGS += -sPROXY_POSIX_SOCKETS -lwebsocket.js
 endif
 
-gb_Executable_EXT := .html
+gb_Executable_EXT := .js
 gb_EMSCRIPTEN_EXCEPT = -fwasm-exceptions -s SUPPORT_LONGJMP=wasm
 
 gb_CXXFLAGS += $(gb_EMSCRIPTEN_CPPFLAGS)
@@ -77,7 +77,6 @@ define gb_Executable_Executable_platform
 $(call gb_LinkTarget_add_auxtargets,$(2),\
         $(patsubst %.lib,%.linkdeps,$(3)) \
         $(patsubst %.lib,%.wasm,$(3)) \
-        $(patsubst %.lib,%.js,$(3)) \
         $(patsubst %.lib,%.worker.js,$(3)) \
         $(patsubst %.lib,%.wasm.dwp,$(3)) \
 )
@@ -88,7 +87,6 @@ define gb_CppunitTest_CppunitTest_platform
 $(call gb_LinkTarget_add_auxtargets,$(2),\
         $(patsubst %.lib,%.linkdeps,$(3)) \
         $(patsubst %.lib,%.wasm,$(3)) \
-        $(patsubst %.lib,%.js,$(3)) \
         $(patsubst %.lib,%.worker.js,$(3)) \
         $(patsubst %.lib,%.wasm.dwp,$(3)) \
 )
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 0e4f01b4249e..1c289b193d4e 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -171,7 +171,7 @@ $(call gb_Helper_abbreviate_dirs,\
                 ) \
                -o $(1) \
        $(if $(SOVERSIONSCRIPT),&& ln -sf ../../program/$(notdir $(1)) 
$(ILIBTARGET)) \
-       $(if $(filter EMSCRIPTEN,$(OS)),$(if $(filter 
TRUE,$(HAVE_EXTERNAL_DWARF)),&& emdwp -e $(patsubst %.html,%.wasm,$(1)) -o 
$(patsubst %.html,%.wasm.dwp,$(1)))) \
+       $(if $(filter EMSCRIPTEN,$(OS)),$(if $(filter 
TRUE,$(HAVE_EXTERNAL_DWARF)),&& emdwp -e $(patsubst 
%$(gb_Executable_EXT),%.wasm,$(1)) -o $(patsubst 
%$(gb_Executable_EXT),%.wasm.dwp,$(1)))) \
        $(if $(call gb_LinkTarget__WantLock,$(2)),; RC=$$? ; rm -f 
$(gb_LinkTarget__Lock); if test $$RC -ne 0; then exit $$RC; fi))
 
 $(if $(filter Library,$(TARGETTYPE)), $(call gb_Helper_abbreviate_dirs,\
@@ -182,7 +182,7 @@ $(if $(filter Library,$(TARGETTYPE)), $(call 
gb_Helper_abbreviate_dirs,\
         $(WORKDIR)/LinkTarget/$(2).exports,$(1))))
 $(if $(and $(filter CppunitTest Executable,$(TARGETTYPE)),$(filter 
EMSCRIPTEN,$(OS))), \
 $(if $(filter TRUE,$(ENABLE_QT5)), \
-    sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' 
$(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(notdir $(1)) && \
+    sed -e 's/@APPNAME@/$(subst $(gb_Executable_EXT),,$(notdir $(1)))/' 
$(QT5_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(basename $(notdir 
$(1))).html && \
     cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js 
$(dir $(1)) && \
 ,$(if $(filter TRUE,$(ENABLE_QT6)), \
     sed -e 's/@APPNAME@/$(basename $(notdir $(1)))/g' -e 
's/@APPEXPORTNAME@/$(basename $(notdir $(1)))_entry/g' -e 's/@PRELOAD@//g' -e 
's/}$(CLOSE_PAREN);$$/}$(CLOSE_PAREN); window.Module = instance;/' 
$(QT6_PLATFORMS_SRCDIR)/wasm_shell.html > $(dir $(1))qt_$(basename $(notdir 
$(1))).html && \

Reply via email to