[Libreoffice-commits] core.git: Branch 'feature/wasm' - 1839 commits - accessibility/inc accessibility/Library_acc.mk accessibility/source android/Bootstrap android/source avmedia/inc avmedia/Library_avmedia.mk avmedia/Module_avmedia.mk avmedia/source basctl/inc basctl/Library_basctl.mk basctl/source basegfx/source basegfx/test basic/inc basic/Library_sb.mk basic/qa basic/source binaryurp/source bin/check-elf-dynamic-objects bin/find-can-be-private-symbols.classes.results bin/find-undocumented-classes bin/find-unused-defines.py bin/fixincludeguards.sh bin/gen-boost-headers bin/gen-iwyu-dummy-lib bin/merge-app-bundles bin/moveglobalheaders.sh bin/oss-fuzz-build.sh bin/run bin/sanitize-excludelist.txt bin/sanitize-image-links bin/symstore.sh bin/ui-rules-enforcer.py bin/ui-translatable.sh bin/update bin/update_pch bridges/Library_cpp_uno.mk bridges/source canvas/inc canvas/Module_canvas.mk canvas/source canvas/workben chart2/CppunitTest_chart2_dump.mk chart2/CppunitTest_chart2_geometry.mk chart2/Cp punitTest_chart2_pivot_chart_test.mk chart2/CppunitTest_chart2_trendcalculators.mk chart2/CppunitTest_chart2_xshape.mk chart2/export_setup.mk chart2/import_setup.mk chart2/inc chart2/Library_chartcontroller.mk chart2/qa chart2/source chart2/uiconfig comphelper/qa comphelper/source compilerplugins/clang config_host/config_oauth2.h.in config_host/config_skia.h.in config_host/config_wasm_strip.h.in config_host.mk.in configmgr/source configure.ac connectivity/CppunitTest_connectivity_sharedresources.mk connectivity/inc connectivity/Library_ado.mk connectivity/Library_mysql_jdbc.mk connectivity/Library_odbc.mk connectivity/Library_postgresql-sdbc-impl.mk connectivity/source cppcanvas/source cppuhelper/source cppu/source cpputools/Module_cpputools.mk cpputools/source cui/inc cui/Library_cui.mk cui/source cui/uiconfig cui/UIConfig_cui.mk cui/util dbaccess/inc dbaccess/Module_dbaccess.mk dbaccess/source dbaccess/uiconfig desktop/CustomTarget_soffice.mk desktop/Executable_soffice_bin.mk desk top/inc desktop/Library_deployment.mk desktop/Module_desktop.mk desktop/Package_scripts.mk desktop/Pagein_common.mk desktop/qa desktop/scripts desktop/source dictionaries distro-configs/Jenkins distro-configs/LibreOfficeCoverity.conf distro-configs/LibreOfficeFlatpak.conf distro-configs/LibreOfficeiOS.conf distro-configs/LibreOfficeiOS_Sim.conf distro-configs/LibreOfficeOssFuzz.conf distro-configs/LibreOfficeVanillaMacAppStore.conf distro-configs/LibreOfficeWASM32.conf download.lst drawinglayer/inc drawinglayer/Library_drawinglayer.mk drawinglayer/qa drawinglayer/source editeng/inc editeng/Library_editeng.mk editeng/source embeddedobj/source embedserv/source emfio/inc emfio/qa emfio/source eventattacher/source extensions/CppunitTest_extensions_bibliography.mk extensions/inc extensions/Library_oleautobridge.mk extensions/Module_extensions.mk extensions/qa extensions/source extensions/uiconfig external/boost external/cairo external/clucene external/cuckoo external/firebird external/fo ntconfig external/freetype external/harfbuzz external/hunspell external/hyphen external/libcmis external/libmwaw external/libnumbertext external/libodfgen external/libxml2 external/Module_external.mk external/nss external/python3 external/redland external/skia external/xmlsec extras/CustomTarget_autotextshare.mk extras/Module_extras.mk extras/source filter/inc filter/Library_icg.mk filter/source filter/uiconfig forms/inc forms/source formula/inc formula/source fpicker/inc fpicker/source framework/inc framework/Library_fwk.mk framework/source framework/util .gitignore hardened_runtime.xcent.in helpcompiler/Module_helpcompiler.mk helpcontent2 hwpfilter/source i18nlangtag/CppunitTest_i18nlangtag_test_languagetag.mk i18nlangtag/qa i18nlangtag/source i18npool/CustomTarget_breakiterator.mk i18npool/inc i18npool/Library_collator_data.mk i18npool/Library_dict_ja.mk i18npool/Library_dict_zh.mk i18npool/Library_i18npool.mk i18npool/Library_index_data.mk i18npool/Library_localedata_en.mk i18np ool/Library_localedata_es.mk i18npool/Library_localedata_euro.mk i18npool/Library_localedata_others.mk i18npool/Library_textconv_dict.mk i18npool/qa i18npool/source i18npool/util icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_dark_svg icon-themes/breeze_svg icon-themes/colibre icon-themes/colibre_svg icon-themes/elementary icon-themes/elementary_svg icon-themes/karasa_jaga icon-themes/karasa_jaga_svg icon-themes/README.md icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_dark_svg icon-themes/sifr_svg icon-themes/sukapura icon-themes/sukapura_svg idlc/Executable_idlc.mk idlc/source idl/source include/avmedia include/basegfx include/basic include/comphelper include/drawinglayer include/editeng include/filter include/formula include/fpicker include/framework include/i18nlangtag include/i18nutil include/LibreOfficeKit include/o3tl include/oox include/osl include/sfx2 include/svl include/svtools include/svx include/systools include/toolkit include/tools include/uno i nclude/unotools include/vcl include/xmloff install_deps.sh instsetoo_native/inc_openoffice io/Library_io.mk io/source jvmfwk/plugins jvmfwk/source l10ntools/source libreofficekit/source lingucomponent/Library_guesslang.mk lingucomponent/Module_lingucomponent.mk lingucomponent/source linguistic/source lotuswordpro/inc lotuswordpro/Library_lwpft.mk lotuswordpro/qa lotuswordpro/source lo.xcent m4/libo_externals.m4 Makefile.fetch Makefile.gbuild Makefile.in nlpsolver/src nlpsolver/ThirdParty o3tl/qa odk/examples odk/Package_examples.mk offapi/com offapi/type_reference offapi/UnoApi_offapi.mk offapi/util officecfg/registry oox/CppunitTest_oox_tokenmap.mk oox/inc oox/Library_oox.mk oox/qa oox/README.md oox/source opencl/source package/inc package/source pch/inc postprocess/CustomTarget_components.mk postprocess/Module_postprocess.mk postprocess/qa postprocess/Rdb_services.mk pyuno/source qadevOOo/tests readlicense_oo/docs readlicense_oo/license README.wasm registry/Module_registry.mk repo rtdesign/inc reportdesign/Library_rpt.mk reportdesign/Library_rptxml.mk reportdesign/source RepositoryExternal.mk RepositoryFixes.mk Repository.mk RepositoryModule_host.mk ridljar/com sal/cppunittester sal/Executable_cppunittester.mk salhelper/source sal/Library_cppunitmain.mk sal/Library_sal.mk sal/Library_sal_textenc.mk sal/Module_sal.mk sal/osl sal/qa sal/rtl sal/textenc sax/source scaddins/inc scaddins/source sccomp/CppunitTest_sccomp_swarmsolvertest.mk sccomp/inc sccomp/Module_sccomp.mk sccomp/source sc/CppunitTest_sc_anchor_test.mk sc/CppunitTest_sc_bugfix_test.mk sc/CppunitTest_sc_cache_test.mk sc/CppunitTest_sc_chart2dataprovider.mk sc/CppunitTest_sc_chart_regression_test.mk sc/CppunitTest_sc_cond_format_merge.mk sc/CppunitTest_sc_copypaste.mk sc/CppunitTest_sc_datapilotitemobj.mk sc/CppunitTest_sc_datapilottablesobj.mk sc/CppunitTest_sc_dataprovider.mk sc/CppunitTest_sc_datatransformation.mk sc/CppunitTest_sc_macros_test.mk sc/CppunitTest_sc_mark_test.mk sc/CppunitTest_sc_n amedrangeobj.mk sc/CppunitTest_sc_new_cond_format_api.mk sc/CppunitTest_sc_parallelism.mk sc/CppunitTest_sc_perfobj.mk sc/CppunitTest_sc_rangelst_test.mk sc/CppunitTest_sc_range_test.mk sc/CppunitTest_sc_subsequent_export-test2.mk sc/CppunitTest_sc_subsequent_export_test2.mk sc/CppunitTest_sc_subsequent_export-test.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subsequent_filters-test2.mk sc/CppunitTest_sc_subsequent_filters_test2.mk sc/CppunitTest_sc_subsequent_filters-test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_tiledrendering.mk schema/libreoffice sc/inc sc/Library_sc.mk sc/Library_scui.mk sc/Module_sc.mk scp2/source sc/qa scripting/Format_java_code.sh scripting/Library_dlgprov.mk scripting/Module_scripting.mk scripting/source sc/sdi sc/source sc/ucalc_setup.mk sc/uiconfig sc/UIConfig_scalc.mk sdext/source sd/inc sd/Library_sd.mk sd/Library_sdui.mk sd/qa sd/sdi sd/source sd/uiconfig setup_native/Package_packinfo.mk setup_native/scripts setup_native/source sfx2/inc sfx2/Library_sfx.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig sfx2/util shell/inc shell/Module_shell.mk shell/qa shell/source slideshow/source solenv/bin solenv/clang-format solenv/CompilerTest_compilerplugins_clang.mk solenv/Executable_lockfile.mk solenv/flatpak-manifest.in solenv/gbuild solenv/gcc-wrappers solenv/gdb solenv/lockfile solenv/Module_solenv.mk solenv/sanitizers solenv/vs sot/inc sot/source starmath/inc starmath/Library_sm.mk starmath/source static/CustomTarget_components.mk static/CustomTarget_wasm_fs_image.mk static/environment.js static/Library_components.mk static/Makefile static/Module_static.mk static/Package_wasm_fs_image.mk static/README stoc/source store/source svgio/inc svgio/source svl/Library_svl.mk svl/qa svl/source svtools/inc svtools/Library_svt.mk svtools/source svx/CppunitTest_svx_unit.mk svx/inc svx/Library_svxcore.mk svx/Library_svx.mk svx/Module_svx.mk svx/qa svx/source svx/uiconfig svx/UIConfig_svx.mk svx/util sw/Cppun itTest_sw_apitests.mk sw/CppunitTest_sw_core_edit.mk sw/CppunitTest_sw_indexingexport.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_ooxmlexport17.mk sw/CppunitTest_sw_ooxmllinks.mk sw/CppunitTest_sw_uwriter.mk sw/inc sw/Library_sw.mk sw/Library_swui.mk sw/Library_vbaswobj.mk sw/Module_sw.mk sw/qa sw/sdi sw/source sw/uiconfig sw/UITest_sw_findSimilarity.mk sw/util sysui/desktop test/source testtools/com testtools/source test/user-template toolkit/inc toolkit/source tools/qa tools/source translations tsan-suppress.txt ucbhelper/source ucb/source uitest/libreoffice UnoControls/inc UnoControls/source unotest/source unotools/Library_utl.mk unotools/source unoxml/source ure/Package_install.mk ure/source uui/inc uui/source vbahelper/inc vbahelper/source vcl/backendtest vcl/commonfuzzer.mk vcl/CppunitTest_vcl_drawmode.mk vcl/CppunitTest_vcl_text.mk vcl/headless vcl/inc vcl/ios vcl/jsdialog vcl/Library_vcl.mk vcl/Library_vclplug_gen.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vcl plug_gtk3.mk vcl/Library_vclplug_gtk4.mk vcl/Library_vclplug_kf5.mk vcl/Library_vclplug_osx.mk vcl/Library_vclplug_qt5.mk vcl/Library_vclplug_win.mk vcl/Module_vcl.mk vcl/osx vcl/qa vcl/qt5 vcl/quartz vcl/README.lifecycle vcl/README.vars vcl/skia vcl/source vcl/uiconfig vcl/UIConfig_vcl.mk vcl/unx vcl/win vcl/workben wasm-qt/Module_wasm-qt.mk winaccessibility/Library_uacccom.mk winaccessibility/source wizards/com wizards/Package_sfdocuments.mk wizards/source writerfilter/inc writerfilter/qa writerfilter/source writerperfect/inc writerperfect/Library_wpftwriter.mk writerperfect/Module_writerperfect.mk writerperfect/qa writerperfect/source xmlhelp/source xmloff/CppunitTest_xmloff_text.mk xmloff/inc xmloff/Library_xof.mk xmloff/Library_xo.mk xmloff/qa xmloff/source xmloff/util xmlscript/source xmlsecurity/inc xmlsecurity/Library_xmlsecurity.mk xmlsecurity/Library_xsec_xmlsec.mk xmlsecurity/Module_xmlsecurity.mk xmlsecurity/qa xmlsecurity/source xmlsecurity/util
Jan-Marek Glogowski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 12 12:54:09 UTC 2021
Rebased ref, commits from common ancestor:
commit 0c739bfa550b160e8dea37efa23eb2b4ac31c071
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun Sep 12 14:39:03 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 14:51:52 2021 +0200
catchall
Change-Id: I1be34ad0b858345ee657f8118b74a4a3ccdfa092
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 039cefd37c53..79b0cc29a6cc 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -140,11 +140,11 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach extraobjectlist,$(EXTRAOBJECTLISTS),`cat $(extraobjectlist)`) \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)), \
-Wl$(COMMA)--start-group \
- -Wl$(COMMA)-Bstatic \
+ $(if $(filter-out EMSCRIPTEN,$(OS)),-Wl$(COMMA)-Bstatic) \
$(patsubst lib%.a,-l%,$(patsubst lib%.so,-l%,$(patsubst %.$(gb_Library_UDK_MAJORVER),%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))))) \
$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
$(T_LIBS) \
- -Wl$(COMMA)-Bdynamic \
+ $(if $(filter-out EMSCRIPTEN,$(OS)),-Wl$(COMMA)-Bdynamic) \
$(if $(call gb_LinkTarget__NeedsCxxLinker),$(T_STDLIBS_CXX)) \
-Wl$(COMMA)--end-group \
, \
diff --git a/vcl/qt5/Qt5Widget.cxx b/vcl/qt5/Qt5Widget.cxx
index ca23138b5739..ed80dd0033d6 100644
--- a/vcl/qt5/Qt5Widget.cxx
+++ b/vcl/qt5/Qt5Widget.cxx
@@ -534,8 +534,10 @@ bool Qt5Widget::handleKeyEvent(Qt5Frame& rFrame, const QWidget& rWidget, QKeyEve
return false;
}
+#if QT5_USING_X11
// prevent interference of writing direction switch (Ctrl + L/R-Shift) with "normal" shortcuts
rFrame.m_nKeyModifiers = ModKeyFlags::NONE;
+#endif
SalKeyEvent aEvent;
aEvent.mnCharCode = (pEvent->text().isEmpty() ? 0 : pEvent->text().at(0).unicode());
@@ -610,7 +612,9 @@ void Qt5Widget::closePopup()
void Qt5Widget::focusOutEvent(QFocusEvent*)
{
+#if QT5_USING_X11
m_rFrame.m_nKeyModifiers = ModKeyFlags::NONE;
+#endif
endExtTextInput();
m_rFrame.CallCallback(SalEvent::LoseFocus, nullptr);
closePopup();
commit d33549d9b120adcdd274754d672a1cd76d8f82a6
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sat Aug 28 13:24:14 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 14:51:50 2021 +0200
Remove linker flags from CPPFLAGS
Current emscripten (2.0.29) spills a lot of warnings about unused
linker flags for compilation, so move them.
Change-Id: I45fe13c63572c88a74742bfad7bcb26b2bf6dedc
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 36814b9b87da..bdb615d0dee9 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -13,11 +13,11 @@ include $(GBUILDDIR)/platform/unxgcc.mk
gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
# avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
-gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4
+gb_EMSCRIPTEN_CPPFLAGS := -pthread -s USE_PTHREADS=1
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link --pre-js $(SRCDIR)/static/environment.js
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s TOTAL_MEMORY=1GB -s PTHREAD_POOL_SIZE=4 -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link --pre-js $(SRCDIR)/static/environment.js
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit 09bdc693ca5d0e47be46502be4e5027de4fc5918
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Mon Aug 2 00:37:54 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 14:51:11 2021 +0200
Amend documentation
Change-Id: I2f1d82de577acfbec01dfba807ac8c7fa72c9e9b
diff --git a/README.wasm b/README.wasm
index a592a34628ca..0ba9eb6aa5c7 100644
--- a/README.wasm
+++ b/README.wasm
@@ -1,7 +1,12 @@
= Status =
$ make
-$ emrun --serve_after_close instdir/program/qt_vcldemo.html
+$ emrun --serve_after_close workdir/LinkTarget/Executable/qt_vcldemo.html
+
+or
+
+$ make
+$ emrun --serve_after_close instdir/program/qt_soffice.html
The ui-previewer "binary" will "crash" with memory alignment problems.
commit caaeac2b8090623c9bc200a6f298e2ec5e015b8f
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sun Aug 1 19:56:35 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 14:51:09 2021 +0200
Fix -Wdeprecated warning
Change-Id: Ibd28f4c6ee39d395c37bd0cdb713942de92fe54c
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 326fdd78f5ec..36814b9b87da 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,7 +17,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHR
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link --pre-js $(SRCDIR)/static/environment.js
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link --pre-js $(SRCDIR)/static/environment.js
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit 8100a1976697c60459ec0965c539fb865a29483c
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 23 15:21:36 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:25 2021 +0200
Update docs for 0.0.0.0 => 127.0.0.1
Change-Id: I0a78f30d6843d1fef5eb2222157cfb3159aa846d
diff --git a/README.wasm b/README.wasm
index 3c9863da0e26..a592a34628ca 100644
--- a/README.wasm
+++ b/README.wasm
@@ -1,15 +1,16 @@
= Status =
$ make
-$ emrun --serve_after_close instdir/program/ui-previewer.html
+$ emrun --serve_after_close instdir/program/qt_vcldemo.html
The ui-previewer "binary" will "crash" with memory alignment problems.
You can run the WASM mandelbrot Qt example:
-$ emrun --serve_after_close workdir/LinkTarget/Executable/qt_mandelbrot.html
+$ emrun --serve_after_close workdir/LinkTarget/Executable/qt_wasm-qt5-mandelbrot.html
REMINDER: always start new tabs in the browser, reload might fail / cache!
+INFO: latest browser won't work anymore with 0.0.0.0 and need 127.0.0.1.
= Setup for the LO WASM build (with Qt) =
commit 41d6462fbc8d6dcab88ed33f049cc1cfdfb399b0
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 23 14:17:26 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:25 2021 +0200
Create WASM FS image via gbuild
README.wasm has a summary how to add files.
Also renames static/debug.js to static/environment.js.
Change-Id: If6804e282a37a37ffae1d291d2af8430e60b59d1
diff --git a/README.wasm b/README.wasm
index abe7c2af6f4e..3c9863da0e26 100644
--- a/README.wasm
+++ b/README.wasm
@@ -1,23 +1,3 @@
-= Manually updating the WASM FS image =
-
-.../git_emsdk/upstream/emscripten/tools/file_packager instdir/program/soffice.data --use-preload-plugins --preload instdir/program/*rc instdir/program/*.rdb instdir/program/services/services.rdb instdir/program/resource/* instdir/program/types/* instdir/presets/ --js-output=instdir/program/soffice.data.js --separate-metadata
-
-Anything can be added to the list. I just kept the normal instdir layout.
-
-This generates the reqired image files. --separate-metadata is used, so
-regenerating the image doesn't require re-linking.
-
-The environment settings are in static/debug.js. This unfortunatly needs re-
-linking. It could probably use some mechanism equal to the FS metadata, but
-I didn't find anything.
-
-There is a stub of the generation CustomTarget in static/CustomTarget_data.mk.
-
-The actual data should probably just be generated in workdir/CustomTarget/static
-and then linked to instdir/program and workdir/LinkTarget/Executable/.
-
-
-
= Status =
$ make
@@ -133,6 +113,10 @@ https://developer.chrome.com/blog/wasm-debugging-2020/
This way you don't need source maps (much faster linking!) and can resolve local WASM
variables to C++ names!
+== Updating the WASM FS image ==
+
+All files included in the image are listened in static/CustomTarget_wasm_fs_image.mk,
+$(gb_wasm_image_filelist). Read its comment for further info and restrictions.
== Using Docker to cross-build with emscripten ==
diff --git a/Repository.mk b/Repository.mk
index d40833516c05..75f7dd74c8f1 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -1048,6 +1048,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
) \
resource_fonts \
cui \
+ static/wasm_fs_image \
))
$(eval $(call gb_Helper_register_packages_for_install,ooo_fonts,\
diff --git a/solenv/gbuild/Executable.mk b/solenv/gbuild/Executable.mk
index ef393cb33949..d9be2f5c3b5c 100644
--- a/solenv/gbuild/Executable.mk
+++ b/solenv/gbuild/Executable.mk
@@ -75,6 +75,9 @@ $(call gb_Executable_get_runtime_target,$(1)) : $(call gb_Executable_get_target_
$(call gb_Executable_get_clean_target,$(1)) : $(call gb_LinkTarget_get_clean_target,$(2))
$(call gb_Executable_get_clean_target,$(1)) : AUXTARGETS :=
$(call gb_Executable_Executable_platform,$(1),$(2),$(gb_Executable_BINDIR)/$(1).lib)
+ifeq ($(OS),EMSCRIPTEN)
+$(call gb_LinkTarget_get_target,$(call gb_Executable_get_linktarget,$(1))) : $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link
+endif
$$(eval $$(call gb_Module_register_target,$(call gb_Executable_get_target,$(1)),$(call gb_Executable_get_clean_target,$(1))))
$(call gb_Helper_make_userfriendly_targets,$(1),Executable)
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 2eb8e6be197a..326fdd78f5ec 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,7 +17,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHR
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(INSTDIR)/program/soffice.data.js --pre-js $(SRCDIR)/static/debug.js
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.link --pre-js $(SRCDIR)/static/environment.js
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index fa28087b5195..039cefd37c53 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -168,7 +168,10 @@ $(if $(filter Library,$(TARGETTYPE)), $(call gb_Helper_abbreviate_dirs,\
$(WORKDIR)/LinkTarget/$(2).exports,$(1))))
$(if $(and $(filter CppunitTest Executable,$(TARGETTYPE)),$(filter EMSCRIPTEN,$(OS)),$(filter TRUE,$(ENABLE_QT5))), \
cp $(QT5_PLATFORMS_SRCDIR)/qtlogo.svg $(QT5_PLATFORMS_SRCDIR)/qtloader.js $(dir $(1)) ; \
- 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_$(notdir $(1)) ; \
+ ln -sf $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data $(dir $(1))/soffice.data ; \
+ ln -sf $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)/soffice.data.js.metadata $(dir $(1))/soffice.data.js.metadata ; \
+)
endef
define gb_LinkTarget__command_staticlink
diff --git a/static/CustomTarget_data.mk b/static/CustomTarget_data.mk
deleted file mode 100644
index 52344b6c35cc..000000000000
--- a/static/CustomTarget_data.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-# vim: set noet sw=4 ts=4:
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-
-$(eval $(call gb_CustomTarget_CustomTarget,static/data))
-
-/home/jmg/Development/libreoffice/git_emsdk/upstream/emscripten/tools/file_packager instdir/program/soffice.data --use-preload-plugins --preload instdir/program/*rc instdir/program/*.rdb instdir/program/services/services.rdb instdir/program/resource/* instdir/program/types/* instdir/presets/ --js-output=instdir/program/soffice.data.js --separate-metadata
-
-gb_objcopy_bfdname := $(shell objdump -a $(call gb_GenCxxObject_get_target,CustomTarget/static/component_maps) | sed -ne 's/^.*format //p')
-
-static_WORKDIR := $(call gb_CustomTarget_get_workdir,static)
-postprocess_WORKDIR := $(call gb_CustomTarget_get_workdir,postprocess)
-
-$(call gb_CustomTarget_get_target,static/components): \
- $(static_WORKDIR)/component_maps.cxx \
-
-gb_GenCxxObject_get_target
-static_WORKDIR := $(call gb_CustomTarget_get_workdir,static)
-postprocess_WORKDIR := $(call gb_CustomTarget_get_workdir,postprocess)
-
-gb_GenCxxObject_get_target
-gb_GenCxxObject_get_dwo_target
-CustomTarget/static/component_maps
-
-define gb_static_components_create_component_map
-TEMPFILE=`$(gb_MKTEMP)` && \
-$(call gb_Helper_abbreviate_dirs, \
- $(call gb_ExternalExecutable_get_command,python) $(1) \
- $(if $(ENABLE_SERVICES_RDB_FROM_BUILD), \
- -c $(postprocess_WORKDIR)/services_constructors.list, \
- -g core -g writer -g desktop \
- ) \
-) > $$TEMPFILE && \
-$(call gb_Helper_replace_if_different_and_touch,$${TEMPFILE},$(2))
-
-endef
-
-
-
-$(call gb_CustomTarget_get_target,static/data): \
- $(static_WORKDIR)/soffice.data.js.metadata \
- $(static_WORKDIR)/soffice.data \
-
-$(static_WORKDIR)/component_maps.cxx: \
- $(SRCDIR)/solenv/bin/native-code.py \
- | $(static_WORKDIR)/.dir
- $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2)
- objcopy -I binary -B i386 -O elf64-x86-64 \
- --rename-section .data=.mydata,readonly,contents src dst.o
- objdump -a $(call gb_GenCxxObject_get_target,CustomTarget/static/component_maps) | sed -ne 's/^.*format //p'
- $(call gb_static_components_create_component_map,$<,$@)
-
-# vim: set noet sw=4:
diff --git a/static/CustomTarget_wasm_fs_image.mk b/static/CustomTarget_wasm_fs_image.mk
new file mode 100644
index 000000000000..bf89c7540f75
--- /dev/null
+++ b/static/CustomTarget_wasm_fs_image.mk
@@ -0,0 +1,52 @@
+# vim: set noet sw=4 ts=4:
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,static/wasm_fs_image))
+
+# WASM assumes the image has the same layout then instdir, so everything you want
+# to include must be "installed" somewhere in it, as there is no mechanism to easily
+# change paths or rename them (you could hack soffice.data.js.metadata).
+# We make them relative paths as input for the file_packager.py!
+gb_wasm_image_filelist := \
+ $(call gb_UnoApi_get_target,offapi) \
+ $(call gb_UnoApi_get_target,udkapi) \
+ $(INSTROOT)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,fundamental) \
+ $(INSTROOT)/$(LIBO_ETC_FOLDER)/$(call gb_Helper_get_rcfile,louno) \
+ $(INSTROOT)/$(LIBO_ETC_FOLDER)/services/services.rdb \
+ $(INSTROOT)/$(LIBO_URE_ETC_FOLDER)/$(call gb_Helper_get_rcfile,uno) \
+ $(INSTROOT)/$(LIBO_URE_MISC_FOLDER)/services.rdb \
+
+wasm_fs_image_WORKDIR := $(call gb_CustomTarget_get_workdir,static/wasm_fs_image)
+
+# we just need data.js.link at link time, which is equal to soffice.data.js
+$(call gb_CustomTarget_get_target,static/wasm_fs_image): \
+ $(wasm_fs_image_WORKDIR)/soffice.data \
+ $(wasm_fs_image_WORKDIR)/soffice.data.js.link \
+ $(wasm_fs_image_WORKDIR)/soffice.data.js.metadata \
+
+$(wasm_fs_image_WORKDIR)/soffice.data $(wasm_fs_image_WORKDIR)/soffice.data.js : $(wasm_fs_image_WORKDIR)/soffice.data.js.metadata
+
+$(wasm_fs_image_WORKDIR)/soffice.data.js.link: $(wasm_fs_image_WORKDIR)/soffice.data.js
+ cp $^ $^.tmp
+ $(call gb_Helper_replace_if_different_and_touch,$^.tmp,$@)
+
+$(wasm_fs_image_WORKDIR)/soffice.data.filelist: $(gb_wasm_image_filelist) | $(wasm_fs_image_WORKDIR)/.dir
+ TEMPFILE=$(call var2file,$(shell $(gb_MKTEMP)),1,$(subst $(BUILDDIR)/,,$^)) && \
+ mv $$TEMPFILE $@.tmp
+ $(call gb_Helper_replace_if_different_and_touch,$@.tmp,$@)
+
+# Unfortunatly the file packager just allows a cmdline file list, but all paths are
+# relative to $(BUILDDIR), so we won't run out of cmdline space that fast...
+$(wasm_fs_image_WORKDIR)/soffice.data.js.metadata: $(wasm_fs_image_WORKDIR)/soffice.data.filelist \
+ $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$(wasm_fs_image_WORKDIR)/soffice.data),$(true),GEN,2)
+ $(EMSDK_FILE_PACKAGER) $(wasm_fs_image_WORKDIR)/soffice.data --preload $(shell cat $^) --js-output=$(wasm_fs_image_WORKDIR)/soffice.data.js --separate-metadata \
+ || rm -f $(wasm_fs_image_WORKDIR)/soffice.data.js $(wasm_fs_image_WORKDIR)/soffice.data $(wasm_fs_image_WORKDIR)/soffice.data.js.metadata
+
+# vim: set noet sw=4:
diff --git a/static/Module_static.mk b/static/Module_static.mk
index f8909994ab7b..0c8b4e6e1f29 100644
--- a/static/Module_static.mk
+++ b/static/Module_static.mk
@@ -12,7 +12,9 @@ ifeq ($(DISABLE_DYNLOADING),TRUE)
$(eval $(call gb_Module_add_targets,static,\
CustomTarget_components \
+ CustomTarget_wasm_fs_image \
Library_components \
+ Package_wasm_fs_image \
))
endif
diff --git a/static/Package_wasm_fs_image.mk b/static/Package_wasm_fs_image.mk
new file mode 100644
index 000000000000..cd1855b322b2
--- /dev/null
+++ b/static/Package_wasm_fs_image.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,static/wasm_fs_image,$(call gb_CustomTarget_get_workdir,static/wasm_fs_image)))
+
+ifeq (EMSCRIPTEN,$(OS))
+$(eval $(call gb_Package_add_file,static/wasm_fs_image,$(LIBO_BIN_FOLDER)/soffice.data,soffice.data))
+$(eval $(call gb_Package_add_file,static/wasm_fs_image,$(LIBO_BIN_FOLDER)/soffice.data.js.metadata,soffice.data.js.metadata))
+endif
+
+# vim: set ts=4 sw=4 noet:
diff --git a/static/debug.js b/static/environment.js
similarity index 100%
rename from static/debug.js
rename to static/environment.js
commit 94480666436ad5d48b5808f47856ab2da57248ab
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Tue Jul 20 22:25:28 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:24 2021 +0200
Use proper absolute paths on linker lines
Change-Id: Ic09d2074144ebc58142f55a105d22540561628df
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index e8b090516633..2eb8e6be197a 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,7 +17,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHR
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js instdir/program/soffice.data.js --pre-js static/debug.js
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js $(INSTDIR)/program/soffice.data.js --pre-js $(SRCDIR)/static/debug.js
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit fad230215a626c850e43ea22915043792e08fbe5
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Fri Jul 2 11:49:37 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:24 2021 +0200
Build vcldemo + link image + image instructions
Change-Id: Iaf6fbdaee0f8842fdde25de81f1345f1458cfcbb
diff --git a/README.wasm b/README.wasm
index 21a81d6684a4..abe7c2af6f4e 100644
--- a/README.wasm
+++ b/README.wasm
@@ -1,3 +1,23 @@
+= Manually updating the WASM FS image =
+
+.../git_emsdk/upstream/emscripten/tools/file_packager instdir/program/soffice.data --use-preload-plugins --preload instdir/program/*rc instdir/program/*.rdb instdir/program/services/services.rdb instdir/program/resource/* instdir/program/types/* instdir/presets/ --js-output=instdir/program/soffice.data.js --separate-metadata
+
+Anything can be added to the list. I just kept the normal instdir layout.
+
+This generates the reqired image files. --separate-metadata is used, so
+regenerating the image doesn't require re-linking.
+
+The environment settings are in static/debug.js. This unfortunatly needs re-
+linking. It could probably use some mechanism equal to the FS metadata, but
+I didn't find anything.
+
+There is a stub of the generation CustomTarget in static/CustomTarget_data.mk.
+
+The actual data should probably just be generated in workdir/CustomTarget/static
+and then linked to instdir/program and workdir/LinkTarget/Executable/.
+
+
+
= Status =
$ make
diff --git a/config_host.mk.in b/config_host.mk.in
index 2d722d3e1fcf..7bbca7fc4386 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -133,6 +133,7 @@ export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@
export DPKG=@DPKG@
export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@
export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
+export EMSDK_FILE_PACKAGER=@EMSDK_FILE_PACKAGER@
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 417a5be2c9ee..80993ad76aee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1346,10 +1346,16 @@ if test "$_os" = "Emscripten"; then
AC_MSG_WARN(["\$EMMAKEN_JUST_CONFIGURE wasn't set by emconfigure. Prefix configure or use autogen.sh])
EMSCRIPTEN_ERROR=1
fi
+ EMSDK_FILE_PACKAGER="$(em-config EMSCRIPTEN_ROOT)"/tools/file_packager
+ if ! test -x "$EMSDK_FILE_PACKAGER"; then
+ AC_MSG_WARN([No file_packager found in $(em-config EMSCRIPTEN_ROOT)/tools/file_packager.])
+ EMSCRIPTEN_ERROR=1
+ fi
if test $EMSCRIPTEN_ERROR -ne 0; then
AC_MSG_ERROR(["Please fix your EMSDK setup to build with Emscripten!"])
fi
fi
+AC_SUBST(EMSDK_FILE_PACKAGER)
###############################################################################
# Extensions switches --enable/--disable
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 41dd609e584c..0996321fb7ae 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -62,7 +62,11 @@ OUString cppu::getUnoIniUri() {
// defaultBootstrap_InitialComponentContext
// and since rtlBootstrapHandle is not ref-counted doing anything
// clean here is hardish.
+#if defined ANDROID
OUString uri("file:///assets/program");
+#else
+ OUString uri("file:///instdir/program");
+#endif
#else
OUString uri;
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index 917476d7ab03..e301c54b34a0 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -214,14 +214,22 @@ template<> OUString fromOString(OString const & s)
template<typename T> bool realpath_(const T& pstrFileName, T& ppstrResolvedName)
{
OString fn = toOString(pstrFileName);
-#ifdef ANDROID
+#if defined ANDROID || defined EMSCRIPTEN
+#if defined ANDROID
if (fn == "/assets" || fn.startsWith("/assets/"))
+#else
+ if (fn == "/instdir" || fn.startsWith("/instdir/"))
+#endif
{
if (osl::access(fn, F_OK) == -1)
+ {
+ SAL_INFO("sal.file", "realpath(" << fn << "): FAILED");
return false;
+ }
ppstrResolvedName = pstrFileName;
+ SAL_INFO("sal.file", "realpath(" << fn << "): OK");
return true;
}
#endif
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index da6169e9459c..e8b090516633 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,7 +17,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHR
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"] --pre-js instdir/program/soffice.data.js --pre-js static/debug.js
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
@@ -32,7 +32,7 @@ gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
# This maps to g3, no source maps, but DWARF with current emscripten!
# https://developer.chrome.com/blog/wasm-debugging-2020/
-gb_DEBUGINFO_FLAGS = -g3
+gb_DEBUGINFO_FLAGS = -g
#gb_DEBUGINFO_FLAGS = -gsource-map --source-map-base=file://$(WORKDIR)/LinkTarget/Executable
# We need at least code elimination, otherwise linking OOMs even with 64GB.
# So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure.
diff --git a/static/CustomTarget_data.mk b/static/CustomTarget_data.mk
new file mode 100644
index 000000000000..52344b6c35cc
--- /dev/null
+++ b/static/CustomTarget_data.mk
@@ -0,0 +1,59 @@
+# vim: set noet sw=4 ts=4:
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,static/data))
+
+/home/jmg/Development/libreoffice/git_emsdk/upstream/emscripten/tools/file_packager instdir/program/soffice.data --use-preload-plugins --preload instdir/program/*rc instdir/program/*.rdb instdir/program/services/services.rdb instdir/program/resource/* instdir/program/types/* instdir/presets/ --js-output=instdir/program/soffice.data.js --separate-metadata
+
+gb_objcopy_bfdname := $(shell objdump -a $(call gb_GenCxxObject_get_target,CustomTarget/static/component_maps) | sed -ne 's/^.*format //p')
+
+static_WORKDIR := $(call gb_CustomTarget_get_workdir,static)
+postprocess_WORKDIR := $(call gb_CustomTarget_get_workdir,postprocess)
+
+$(call gb_CustomTarget_get_target,static/components): \
+ $(static_WORKDIR)/component_maps.cxx \
+
+gb_GenCxxObject_get_target
+static_WORKDIR := $(call gb_CustomTarget_get_workdir,static)
+postprocess_WORKDIR := $(call gb_CustomTarget_get_workdir,postprocess)
+
+gb_GenCxxObject_get_target
+gb_GenCxxObject_get_dwo_target
+CustomTarget/static/component_maps
+
+define gb_static_components_create_component_map
+TEMPFILE=`$(gb_MKTEMP)` && \
+$(call gb_Helper_abbreviate_dirs, \
+ $(call gb_ExternalExecutable_get_command,python) $(1) \
+ $(if $(ENABLE_SERVICES_RDB_FROM_BUILD), \
+ -c $(postprocess_WORKDIR)/services_constructors.list, \
+ -g core -g writer -g desktop \
+ ) \
+) > $$TEMPFILE && \
+$(call gb_Helper_replace_if_different_and_touch,$${TEMPFILE},$(2))
+
+endef
+
+
+
+$(call gb_CustomTarget_get_target,static/data): \
+ $(static_WORKDIR)/soffice.data.js.metadata \
+ $(static_WORKDIR)/soffice.data \
+
+$(static_WORKDIR)/component_maps.cxx: \
+ $(SRCDIR)/solenv/bin/native-code.py \
+ | $(static_WORKDIR)/.dir
+ $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,2)
+ objcopy -I binary -B i386 -O elf64-x86-64 \
+ --rename-section .data=.mydata,readonly,contents src dst.o
+ objdump -a $(call gb_GenCxxObject_get_target,CustomTarget/static/component_maps) | sed -ne 's/^.*format //p'
+ $(call gb_static_components_create_component_map,$<,$@)
+
+# vim: set noet sw=4:
diff --git a/static/debug.js b/static/debug.js
new file mode 100644
index 000000000000..9e4e263f3c73
--- /dev/null
+++ b/static/debug.js
@@ -0,0 +1,3 @@
+Module.preRun.push(function() {
+ ENV.SAL_LOG = "+INFO+WARN"
+});
diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk
index 5470aa73cba5..9fc651ef5bb8 100644
--- a/vcl/Module_vcl.mk
+++ b/vcl/Module_vcl.mk
@@ -36,7 +36,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
Package_skia_denylist ) \
$(if $(filter DESKTOP,$(BUILD_TYPE)), \
StaticLibrary_vclmain \
- $(if $(or $(DISABLE_GUI),$(DISABLE_DYNLOADING)),, \
+ $(if $(or $(DISABLE_GUI),$(DISABLE_DYNLOADING)),Executable_vcldemo, \
$(if $(ENABLE_MACOSX_SANDBOX),, \
Executable_ui-previewer) \
$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)), \
commit 2ac3dcd64c72f674f5903f774643e4e2fad3fe02
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Tue Jun 22 18:35:17 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:24 2021 +0200
Hack-fix missing hunspell (which mythes need)
Change-Id: I84178e6551904b34932b1eaf8c2d88d807439039
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index c16e30ecec33..47875a1a6b58 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -556,7 +556,6 @@ endef
gb_ExternalProject__use_hunspell :=
else # !SYSTEM_HUNSPELL
-ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
define gb_LinkTarget__use_hunspell
$(call gb_LinkTarget_add_defs,$(1),\
@@ -584,7 +583,6 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell)
endef
-endif # ENABLE_WASM_STRIP_HUNSPELL
endif # SYSTEM_HUNSPELL
diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk
index 6a1e9b14e882..298607f0aa73 100644
--- a/external/mythes/ExternalProject_mythes.mk
+++ b/external/mythes/ExternalProject_mythes.mk
@@ -9,9 +9,7 @@
$(eval $(call gb_ExternalProject_ExternalProject,mythes))
-ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_ExternalProject_use_external,mythes,hunspell))
-endif
$(eval $(call gb_ExternalProject_register_targets,mythes,\
build \
commit a4b8f51369d198983e4f08a5171357a9cf9e6fe8
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 22 17:15:12 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:23 2021 +0200
wasm UNO: use fixed path as on Android
Change-Id: Ic51641338a6c85bfc67771e141ed76c7ccddba27
diff --git a/cppuhelper/source/paths.cxx b/cppuhelper/source/paths.cxx
index 79bb929183e4..41dd609e584c 100644
--- a/cppuhelper/source/paths.cxx
+++ b/cppuhelper/source/paths.cxx
@@ -35,7 +35,7 @@
namespace {
-#ifndef ANDROID
+#if !(defined ANDROID || defined EMSCRIPTEN)
OUString get_this_libpath() {
static OUString s_uri = []() {
OUString uri;
@@ -54,7 +54,7 @@ OUString get_this_libpath() {
}
OUString cppu::getUnoIniUri() {
-#if defined ANDROID
+#if defined ANDROID || defined EMSCRIPTEN
// Wouldn't it be lovely to avoid this ugly hard-coding.
// The problem is that the 'create_bootstrap_macro_expander_factory()'
// required for bootstrapping services, calls cppu::get_unorc directly
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 0c4c33bd6241..da6169e9459c 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -17,7 +17,7 @@ gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHR
# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
# See emscrypten.py, finalize_wasm, modify_wasm = True
# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s FORCE_FILESYSTEM=1 -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
commit 29d5fd5c990627f9ffa920d7bcb9fc20a0d40864
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 22 15:01:45 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:23 2021 +0200
wasm: rename soffice.bin to soffice.html
Change-Id: Ia957fae6edff4583f3d01dc5c6c7c215fab3879f
diff --git a/RepositoryFixes.mk b/RepositoryFixes.mk
index db78722ce545..0cbb5ad93e6c 100644
--- a/RepositoryFixes.mk
+++ b/RepositoryFixes.mk
@@ -34,8 +34,12 @@ endif
ifeq ($(OS),MACOSX)
gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin,soffice_bin:soffice,$(gb_Executable_FILENAMES))
else
+ifeq ($(OS),EMSCRIPTEN)
+gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.html,$(gb_Executable_FILENAMES))
+else
gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
endif
+endif
gb_Executable_FILENAMES := $(patsubst soffice_exe:soffice_exe%,soffice_exe:soffice.exe,$(gb_Executable_FILENAMES))
gb_Executable_FILENAMES := $(patsubst soffice_com:soffice_com%,soffice_com:soffice.com,$(gb_Executable_FILENAMES))
commit 42b9a25a31ce0aea7887057e55c6561e8efbe2fa
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Tue Jun 22 14:40:11 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:22 2021 +0200
Workaround: missing i18npool.component dependency
Fixes: No LIBFILENAME set at component target:
<workdir>/ComponentTarget/i18npool/util/i18npool.component: Stop.
Change-Id: I54b9fa6b4ed6bb1fd5f85da6c8962fc88258e487
diff --git a/distro-configs/LibreOfficeWASM32.conf b/distro-configs/LibreOfficeWASM32.conf
index 4d5062ff8958..962b76a55302 100644
--- a/distro-configs/LibreOfficeWASM32.conf
+++ b/distro-configs/LibreOfficeWASM32.conf
@@ -1,4 +1,5 @@
--host=wasm32-local-emscripten
+--enable-services-rdb-from-build
--enable-wasm-strip
--disable-gtk3
--enable-qt5
commit 10d9106d4885f5759a6b1f405ddbfea321295805
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Jun 22 14:19:48 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:22 2021 +0200
wasm: test for Qt5 and non-system Freetype
Change-Id: I91a99f5bb58ae6caad020f8159313413dfa0ab6a
diff --git a/configure.ac b/configure.ac
index 42bd1b2fd6af..417a5be2c9ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1106,6 +1106,8 @@ emscripten)
using_freetype_fontconfig=yes
using_x11=no
test_openldap=no
+ test_qt5=yes
+ test_system_freetype=no
enable_compiler_plugins=no
enable_wasm_strip=yes
with_system_zlib=no
commit a926918971bfac1df0dfd40659f112fce03866ba
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Sun May 30 13:23:16 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:22 2021 +0200
libxml2: Use xml2-config dummy for internal
When building a static LO with --disable-dynloading on Linux,
--without-system-libs failed for me. And it left me really puzzled:
raptor configure failed and claimed it couldn't link libxml2.
config.log showed missing math functions. xml2-config of LO's
build is patched and it includes a -lm. The xml2-config in my
chroot doesn't. But we explicitly pass the xml2-config for
non-system-libxml2 build. Reading the configure from raptor didn't
reveal a way, that it could somehow pick up the xml2-config from
the chroot, but that code is autoconf-complex...
When running "sh -x configure", it turned out the configure script
actually picks up the LIBXML_* flags from the environment, which
are set by LO's config_host.mk. These just add -lm for Android.
So this adds a xml2-config.in "dummy", which overwrites the one
from the libxml2 source and just echos LO's LIBXML_* values.
And it adds -lm for all DISABLE_DYNLOADING targets. And drops the
atexit xmlCleanupParser test, which fails with duplicate symbols
for a static build.
Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87
diff --git a/configure.ac b/configure.ac
index 60f480b14477..42bd1b2fd6af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9644,7 +9644,7 @@ else
LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
else
LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
- if test "$_os" = Android; then
+ if test "$DISABLE_DYNLOADING" = TRUE; then
LIBXML_LIBS="$LIBXML_LIBS -lm"
fi
fi
diff --git a/desktop/Executable_soffice_bin.mk b/desktop/Executable_soffice_bin.mk
index 9c08a28361df..14a72ab6c055 100644
--- a/desktop/Executable_soffice_bin.mk
+++ b/desktop/Executable_soffice_bin.mk
@@ -14,6 +14,10 @@ $(eval $(call gb_Executable_set_include,soffice_bin,\
-I$(SRCDIR)/desktop/source/inc \
))
+$(eval $(call gb_Executable_add_defs,soffice_bin,\
+ $(if $(DISABLE_DYNLOADING),$(if $(SYSTEM_LIBXML),,-DNOTEST_xmlCleanupParser)) \
+))
+
$(eval $(call gb_Executable_use_libraries,soffice_bin,\
sal \
sofficeapp \
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
index 6631c3ceb337..fdd2eb3505dc 100644
--- a/desktop/source/app/main.c
+++ b/desktop/source/app/main.c
@@ -21,6 +21,7 @@
#include "sofficemain.h"
+#ifndef NOTEST_xmlCleanupParser
#ifdef DBG_UTIL
#ifdef __gnu_linux__
#include <stdio.h>
@@ -43,14 +44,17 @@ __attribute__((visibility("default"))) void xmlCleanupParser(void)
}
#endif
#endif
+#endif // NOTEST_xmlCleanupParser
SAL_IMPLEMENT_MAIN()
{
int ret = soffice_main();
+#ifndef NOTEST_xmlCleanupParser
#ifdef DBG_UTIL
#ifdef __gnu_linux__
g_Exiting = 1;
#endif
+#endif
#endif
return ret;
}
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk b/external/libxml2/UnpackedTarball_libxml2.mk
index 83df02849cb3..8c81c3d26e4c 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -14,7 +14,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,libxml2,$(LIBXML_TARBALL),,libxml2)
$(eval $(call gb_UnpackedTarball_update_autoconf_configs,libxml2))
$(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
- external/libxml2/libxml2-config.patch.1 \
external/libxml2/libxml2-global-symbols.patch \
external/libxml2/libxml2-vc10.patch \
$(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
@@ -23,4 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
external/libxml2/libxml2-icu.patch.0) \
))
+$(eval $(call gb_UnpackedTarball_add_file,libxml2,xml2-config.in,external/libxml2/xml2-config.in))
+
# vim: set noet sw=4 ts=4:
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
deleted file mode 100644
index 5a2ef1485e92..000000000000
--- a/external/libxml2/libxml2-config.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-Hack the xml2-config to return paths into WORKDIR.
-
---- a/xml2-config.in 2009-12-17 11:45:20.000000000 +0000
-+++ b/xml2-config.in 2009-12-17 11:45:36.000000000 +0000
-@@ -1,9 +1,14 @@
- #! /bin/sh
-
--prefix=@prefix@
--exec_prefix=@exec_prefix@
--includedir=@includedir@
--libdir=@libdir@
-+#prefix=@prefix@
-+#exec_prefix=@exec_prefix@
-+#includedir=@includedir@
-+#libdir=@libdir@
-+
-+prefix=${WORKDIR}/UnpackedTarball/libxml2
-+exec_prefix=${WORKDIR}/UnpackedTarball/libxml2
-+includedir=${WORKDIR}/UnpackedTarball/libxml2/include
-+libdir=${WORKDIR}/UnpackedTarball/libxml2/.libs
- cflags=
- libs=
-
-@@ -67,7 +72,8 @@
- ;;
-
- --cflags)
-- cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
-+ cflags="-I${includedir}"
- ;;
-
- --libtool-libs)
-@@ -91,7 +96,8 @@
- libs="@XML_LIBDIR@ $libs"
- fi
-
-- libs="$libs @WIN32_EXTRA_LIBADD@"
-+ #libs="$libs @WIN32_EXTRA_LIBADD@"
-+ libs="-L${libdir} -lxml2 -lm"
- ;;
-
- *)
diff --git a/external/libxml2/xml2-config.in b/external/libxml2/xml2-config.in
new file mode 100644
index 000000000000..164508e47e67
--- /dev/null
+++ b/external/libxml2/xml2-config.in
@@ -0,0 +1,28 @@
+#! /bin/sh
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case "$1" in
+ --version)
+ echo @VERSION@
+ exit 0
+ ;;
+ --cflags)
+ cflags="$LIBXML_CFLAGS"
+ ;;
+ --libs)
+ libs="$LIBXML_LIBS"
+ ;;
+ esac
+ shift
+done
+
+if test -n "$cflags$libs"; then
+ echo $cflags $libs
+fi
+
+exit 0
diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk
index c5ff226168d8..fbdc8b6f5510 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,7 +30,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 \
external/redland/raptor/libtool.patch \
- external/redland/raptor/libxml-override.patch \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/libxml-override.patch b/external/redland/raptor/libxml-override.patch
deleted file mode 100644
index edc2d0d497a4..000000000000
--- a/external/redland/raptor/libxml-override.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- configure
-+++ configure
-@@ -14387,8 +14387,8 @@
-
- libxml_source=no
- if test "X$XML_CONFIG" != "X"; then
-- LIBXML_CFLAGS=`$XML_CONFIG --cflags`
-- LIBXML_LIBS=`$XML_CONFIG --libs`
-+ : ${LIBXML_CFLAGS=`$XML_CONFIG --cflags`}
-+ : ${LIBXML_LIBS=`$XML_CONFIG --libs`}
-
- CPPFLAGS="$LIBXML_CFLAGS $CPPFLAGS"
- LIBS="$LIBS $LIBXML_LIBS"
commit d14e5251b6cc2ac54ebfbd7c12157255564e45a0
Author: Thorsten Behrens <thorsten.behrens at allotropia.de>
AuthorDate: Sat May 22 14:20:59 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:21 2021 +0200
wasm: Fix linking for clang build
Change-Id: I593ab41a4602cedb6586e428773ed41d7e21f1f4
diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk
index 801365f72f9e..141eb3318445 100644
--- a/solenv/gbuild/platform/linux.mk
+++ b/solenv/gbuild/platform/linux.mk
@@ -17,6 +17,10 @@ gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs)
include $(GBUILDDIR)/platform/unxgcc.mk
+ifeq ($(DISABLE_DYNLOADING),TRUE)
+gb_STDLIBS += -pthread -lpthread
+endif
+
ifneq ($(ATOMIC_LIB),)
gb_STDLIBS_CXX += $(ATOMIC_LIB)
endif
commit 43ebbd54aa92468a6ec457d3094f2f2dc76330c8
Author: Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu May 27 12:15:53 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:21 2021 +0200
wasm: catchall of small fixes and updated README
A bunch of smalll fixes to make the WASM build work.
* Enable the Qt5 WASM mandelbrot example
* Use non-multiuser DESKTOP build
* Remove leftover artifacts from configure
* Disable UNO bridge code
* Fix numbertext CXXFLAGS
* Adapt link flags to prevent WASM rewriting
and use DWARF debug info
* Include the correct poll.h
Change-Id: If8dcf7646ee57669fec3ab0c222d09782a79ca2c
diff --git a/README.wasm b/README.wasm
index 926f6565452c..21a81d6684a4 100644
--- a/README.wasm
+++ b/README.wasm
@@ -5,31 +5,27 @@ $ emrun --serve_after_close instdir/program/ui-previewer.html
The ui-previewer "binary" will "crash" with memory alignment problems.
-You can run the WASM mandelbrot Qt example, if you copy its HTML
-and the qtloader.js from the Qt's example folder after build with:
+You can run the WASM mandelbrot Qt example:
-$ emrun --serve_after_close workdir/LinkTarget/Executable/mandelbrot.html
+$ emrun --serve_after_close workdir/LinkTarget/Executable/qt_mandelbrot.html
REMINDER: always start new tabs in the browser, reload might fail / cache!
= Setup for the LO WASM build (with Qt) =
-We're using Qt 5.15 with the officially supported emscripten v1.39.8.
-But there are several potential problems with threads and exceptions, so this will likely
-change later to a newer emscripten.
+We're using Qt 5.15 with current upstream emscripten, currently 2.0.23.
-Qt WASM is not yet used with LO, just if you're wondering!
+++ See below under Docker build for another build option ++
- ++ See below under Docker build for another build option ++
== Setup emscripten ==
https://emscripten.org/docs/getting_started/index.html
git clone https://github.com/emscripten-core/emsdk.git
-./emsdk install 1.39.8
-./emsdk activate --embedded 1.39.8
+./emsdk install 2.0.23
+./emsdk activate --embedded 2.0.23
Example bashrc scriptlet:
@@ -49,10 +45,21 @@ git clone https://github.com/qt/qt5.git
cd qt5
git checkout v5.15.2
./init-repository
-./configure -xplatform wasm-emscripten -feature-thread -compile-examples -prefix $PWD/qtbase
-make -j<CORES> module-qtbase module-qtdeclarative
-Building with examples will break with some of them, but at that point Qt already works.
+./configure -xplatform wasm-emscripten -feature-thread -prefix $PWD/qtbase
+
+Optionally you can add the configure flag "-compile-examples". But then you also have to
+patch at least mkspecs/wasm-emscripten/qmake.conf with EXIT_RUNTIME=0, otherwise they will
+fail to run. In addition, building with examples will break with some of them, but at that
+point Qt already works and also most examples.
+
+Linking takes quite a long time, because emscripten-finalize rewrites the whole WASM files
+with some options. This way the LO WASM needs at least 64GB RAM. For faster link times add
+"-s WASM_BIGINT=1", change to ASSERTIONS=1 nd use -g3 to prevent rewriting the WASM file
+and generating source maps (see emscripten.py, finalize_wasm, and avoid modify_wasm = True).
+This is just needed for Qt examples, as LO already uses the correct flags!
+
+make -j<CORES> module-qtbase module-qtdeclarative
At some point Qt configure failed for me with:
"Checking for target architecture... Project ERROR: target architecture detection binary not found."
@@ -74,10 +81,6 @@ autogen.sh is patched to use emconfigure. That basically sets various environmen
especially EMMAKEN_JUST_CONFIGURE, which will create the correct output file names, checked by
configure (a.out).
-There's a distro config for WASM (work in progress), that gets your
-defaults right (and currently disables a ton of 3rd party stuff which
-is not essential).
-
Recommended configure setup is thusly:
# grab defaults
@@ -88,7 +91,27 @@ QT5DIR=/dir/of/git_qt5/qtbase
# if you want to use ccache on both sides of the build
--with-build-platform-configure-options=--enable-ccache
---enable-ccache
+
+# Include all build components, not just the manual list
+#--enable-services-rdb-from-build
+
+-----------
+
+FWIW: it's also possible to build an almost static Linux LibreOffice by just using
+--disable-dynloading. System externals are still linked dynamically, but everything
+else is static. Then there is --enable-wasm-strip for a smaller feature set.
+
+
+== Debugging setup ==
+
+Since a few months you can use DWARF information embedded by LLVM into the WASM to
+debug WASM in Chrome. You need to enable an experimental feature and install an
+additional extension. The whole setup is described in:
+
+https://developer.chrome.com/blog/wasm-debugging-2020/
+
+This way you don't need source maps (much faster linking!) and can resolve local WASM
+variables to C++ names!
== Using Docker to cross-build with emscripten ==
diff --git a/Repository.mk b/Repository.mk
index ad0adef42346..d40833516c05 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -82,6 +82,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
mtfdemo \
visualbackendtest \
$(if $(and $(ENABLE_GTK3), $(filter LINUX %BSD SOLARIS,$(OS))), gtktiledviewer) \
+ $(if $(filter EMSCRIPTEN,$(OS)),wasm-qt5-mandelbrot) \
))
$(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 7fdfb2974a83..c16e30ecec33 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3093,7 +3093,7 @@ $(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,postgresql)/src/interfaces/libpq/libpq$(gb_StaticLibrary_PLAINEXT) \
$(call gb_UnpackedTarball_get_dir,postgresql)/src/common/libpgcommon$(gb_StaticLibrary_PLAINEXT) \
$(call gb_UnpackedTarball_get_dir,postgresql)/src/port/libpgport$(gb_StaticLibrary_PLAINEXT) \
- $(if $(WITH_GSSAPI),$(GSSAPI_LIBS)) \
+ $(if $(and $(DISABLE_DYNLOADING),$(WITH_GSSAPI)),$(GSSAPI_LIBS)) \
)
endif # !WNT
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 9aaedfd66ee8..b26979a4b225 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -184,6 +184,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
uui \
vbahelper \
vcl \
+ $(if $(filter EMSCRIPTEN,$(OS)),wasm-qt) \
wizards \
writerfilter \
writerperfect \
diff --git a/configure.ac b/configure.ac
index 82ae9e5b2da0..60f480b14477 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2961,10 +2961,12 @@ dnl "desktop" one but a "mobile" one, we are always cross-compiling.
dnl Note the direction of the implication; there is no assumption that
dnl cross-compiling would imply a non-desktop OS.
-if test $_os != iOS -a $_os != Android -a $_os != Emscripten -a "$enable_fuzzers" != "yes"; then
+if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
BUILD_TYPE="$BUILD_TYPE DESKTOP"
AC_DEFINE(HAVE_FEATURE_DESKTOP)
- AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+ if test "$_os" != Emscripten; then
+ AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+ fi
fi
# explicitly doesn't include enable_gtk3=no and enable_qt5=yes, so it should
@@ -2999,6 +3001,7 @@ if test "$enable_wasm_strip" = "yes"; then
enable_xmlhelp=no
enable_zxing=no
test_libepubgen=no
+# with_system_libxml=no
with_galleries=no
with_webdav=no
with_x=no
@@ -14673,4 +14676,7 @@ if test -s "$WARNINGS_FILE"; then
cat "$WARNINGS_FILE"
fi
+# Remove unneeded emconfigure artifacts
+rm -f a.out a.wasm a.out.js a.out.wasm
+
dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index c9a2d89933d5..01d5a2bab1df 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1002,6 +1002,7 @@ void EnvironmentsData::getRegisteredEnvironments(
bool loadEnv(OUString const & cLibStem,
uno_Environment * pEnv)
{
+#ifndef __EMSCRIPTEN__
#ifdef DISABLE_DYNLOADING
uno_initEnvironmentFunc fpInit;
@@ -1041,6 +1042,11 @@ bool loadEnv(OUString const & cLibStem,
(*fpInit)( pEnv ); // init of environment
return true;
+#else
+ (void)cLibStem;
+ (void)pEnv;
+ return false;
+#endif
}
}
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index a88259627b2c..850633817048 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -329,8 +329,10 @@ static void setNegativeBridge( const OUString & rBridgeName )
static uno_ext_getMappingFunc selectMapFunc( const OUString & rBridgeName )
{
+#ifndef EMSCRIPTEN
if (rBridgeName.equalsAscii( CPPU_CURRENT_LANGUAGE_BINDING_NAME "_uno" ))
return CPPU_ENV_uno_ext_getMapping;
+#endif
#if HAVE_FEATURE_JAVA
if (rBridgeName.equalsAscii( "java" "_uno" ))
return java_uno_ext_getMapping;
diff --git a/external/libnumbertext/ExternalProject_libnumbertext.mk b/external/libnumbertext/ExternalProject_libnumbertext.mk
index 3094351aebf2..eae3f34dc412 100644
--- a/external/libnumbertext/ExternalProject_libnumbertext.mk
+++ b/external/libnumbertext/ExternalProject_libnumbertext.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_ExternalProject_register_targets,libnumbertext,\
build \
))
-libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11)
+libnumbertext_CXXFLAGS=$(CXXFLAGS) $(CXXFLAGS_CXX11) $(gb_EMSCRIPTEN_CPPFLAGS)
ifneq (,$(filter ANDROID DRAGONFLY FREEBSD iOS LINUX NETBSD OPENBSD,$(OS)))
ifneq (,$(gb_ENABLE_DBGUTIL))
diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk
index 193c46f3d75d..cb373f99982a 100644
--- a/shell/Module_shell.mk
+++ b/shell/Module_shell.mk
@@ -104,6 +104,7 @@ $(eval $(call gb_Module_add_targets,shell,\
))
endif
+ifeq (,$(filter EMSCRIPTEN,$(OS)))
ifeq ($(filter DESKTOP,$(BUILD_TYPE)),DESKTOP)
$(eval $(call gb_Module_add_targets,shell,\
@@ -111,17 +112,16 @@ $(eval $(call gb_Module_add_targets,shell,\
))
ifneq ($(OS),WNT)
-
$(eval $(call gb_Module_add_targets,shell,\
StaticLibrary_xmlparser \
Executable_uri_encode \
Library_cmdmail \
$(if $(ENABLE_MACOSX_SANDBOX),,Package_senddoc) \
))
-
endif
-endif
+endif # DESKTOP
+endif # !EMSCRIPTEN
$(eval $(call gb_Module_add_l10n_targets,shell,\
AllLangMoTarget_shell \
diff --git a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
index 3a7441454f0d..0c4c33bd6241 100644
--- a/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/EMSCRIPTEN_INTEL_GCC.mk
@@ -14,7 +14,10 @@ include $(GBUILDDIR)/platform/unxgcc.mk
gb_RUN_CONFIGURE := $(SRCDIR)/solenv/bin/run-configure
# avoid -s SAFE_HEAP=1 - c.f. gh#8584 this breaks source maps
gb_EMSCRIPTEN_CPPFLAGS := -pthread -s TOTAL_MEMORY=1GB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=4
-gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=2 -s EXIT_RUNTIME=1 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
+# To keep the link time (and memory) down, prevent all rewriting options from wasm-emscripten-finalize
+# See emscrypten.py, finalize_wasm, modify_wasm = True
+# So we need WASM_BIGINT=1 and ASSERTIONS=1 (2 implies STACK_OVERFLOW_CHECK)
+gb_EMSCRIPTEN_LDFLAGS := $(gb_EMSCRIPTEN_CPPFLAGS) --bind -s WASM_BIGINT=1 -s ERROR_ON_UNDEFINED_SYMBOLS=1 -s FETCH=1 -s ASSERTIONS=1 -s EXIT_RUNTIME=0 -s EXTRA_EXPORTED_RUNTIME_METHODS=["UTF16ToString","stringToUTF16"]
gb_EMSCRIPTEN_QTDEFS := -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
gb_Executable_EXT := .html
@@ -27,8 +30,10 @@ gb_LinkTarget_LDFLAGS += $(gb_EMSCRIPTEN_LDFLAGS) $(gb_EMSCRIPTEN_CPPFLAGS) $(gb
# Linker and compiler optimize + debug flags are handled in LinkTarget.mk
gb_LINKEROPTFLAGS :=
gb_LINKERSTRIPDEBUGFLAGS :=
-# This maps to g4, AKA source maps. The LO default would otherwise be g2!
-gb_DEBUGINFO_FLAGS = -g
+# This maps to g3, no source maps, but DWARF with current emscripten!
+# https://developer.chrome.com/blog/wasm-debugging-2020/
+gb_DEBUGINFO_FLAGS = -g3
+#gb_DEBUGINFO_FLAGS = -gsource-map --source-map-base=file://$(WORKDIR)/LinkTarget/Executable
# We need at least code elimination, otherwise linking OOMs even with 64GB.
# So we "fake" -Og support to mean -O1 for Emscripten and always enable it for debug in configure.
gb_COMPILERDEBUGOPTFLAGS := -O1
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index b573f756f411..c89aefb4ced8 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -27,7 +27,11 @@
#include <fcntl.h>
#include <pthread.h>
#include <sys/time.h>
+#ifdef EMSCRIPTEN
+#include <poll.h>
+#else
#include <sys/poll.h>
+#endif
#include <sal/types.h>
#include <sal/log.hxx>
diff --git a/vcl/source/gdi/impglyphitem.cxx b/vcl/source/gdi/impglyphitem.cxx
index 06dbaf6c5f32..5464754bab56 100644
--- a/vcl/source/gdi/impglyphitem.cxx
+++ b/vcl/source/gdi/impglyphitem.cxx
@@ -19,10 +19,6 @@
#include <impglyphitem.hxx>
-#if (defined UNX && !defined MACOSX && !defined IOS)
-#include <unx/freetype_glyphcache.hxx>
-#endif
-
SalLayoutGlyphs::SalLayoutGlyphs() {}
SalLayoutGlyphs::~SalLayoutGlyphs() {}
diff --git a/wasm-qt/Module_wasm-qt.mk b/wasm-qt/Module_wasm-qt.mk
index 8e86df4e8baa..72da667363aa 100644
--- a/wasm-qt/Module_wasm-qt.mk
+++ b/wasm-qt/Module_wasm-qt.mk
@@ -8,13 +8,9 @@
$(eval $(call gb_Module_Module,wasm-qt))
-ifeq ($(OS),EMSCRIPTEN)
-
$(eval $(call gb_Module_add_targets,wasm-qt,\
CustomTarget_wasm-qt5-mandelbrot_moc \
Executable_wasm-qt5-mandelbrot \
))
-endif
-
# vim: set noet sw=4 ts=4:
commit 57975568f5e09f2a9d5afac2eace886ed0eed0b8
Author: Armin Le Grand (Allotropia) <Armin.Le.Grand at me.com>
AuthorDate: Fri Apr 30 17:26:41 2021 +0200
Commit: Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Sun Sep 12 10:55:21 2021 +0200
wasm strip: squashed patches from Armin + fixes
In addition to the squashed patches, this patch
* drops the global compiler defines in favour of a config header
file, for better ccache usage
* revers almost all header changes in favour for empty function
calls (just keeüs the premultiply table drop)
* some additional changes for unused function calls
* adapts more component files, so building the services.db and
the component_mao.cxx from the build still works
Currently crashs with anything different then soffice --writer.
Closing the document also crashes.
bfee2970a79e Wasm strip some SW exports & corrections
fac2aeca4010 Wasm optional premultiply table replace
ec9e2c81b4ec Wasm remove hunspell/hyphen optionally
302a6f6f777a Wasm LanguageGuess optional removal
55404a55984c Wasm oprtional autorecovery remove additions
640d53e1e7c1 Wasm optional EPUB removal
4a09f57c132c Wasm strip: remove UcpHelp
eeebc1383df7 Wasm optional accessibility removal
b95eaa630273 Additions/corrections to dbaccess wasm removal
d8c11d72aa5a Wasm: Removed dbaccess optional
f7d462b61c08 WASM Removal of clucene
a1c508fc1c41 Stripped canvas/cppcanvas and related
ebfb45f46319 Use more expressive ENABLE_WASM_STRIP markers
a3519b1a41c8 Disable wpftcalc for wasm reduction
fa86c5bc36f7 Chart wasm optional removal
90d9a8dee35a BackingWindow (RecentDocsView) optional removal
68e5f972b1a6 Deeper TipOfTheDay optional removal
4ed18d09ce07 Optional removal of more startup-modules
ab8d809b6ab7 Remove RecoveryCore
f82517838840 Remove RecoveryUI, correct spl stuff
f38dca150d58 SplashScreen and Startup
Not included:
34243e3acfe8 Wasm correct unresolved CreateMediaTempFile
10963e79ac7d Wasm optional reduce created locales
Change-Id: Ib9c0f9452815910c0a2aceaf142ba1ad4a9cb0d7
diff --git a/Repository.mk b/Repository.mk
index 95061c869c05..ad0adef42346 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -17,13 +17,18 @@
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
#
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_executables,NONE, \
+ canvasdemo \
+))
+endif
+
$(eval $(call gb_Helper_register_executables,NONE, \
$(call gb_Helper_optional,HELPTOOLS, \
HelpIndexer \
HelpLinker \
) \
bestreversemap \
- canvasdemo \
cfgex \
concat-deps \
cpp \
@@ -90,6 +95,12 @@ $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \
$(if $(filter ODK,$(BUILD_TYPE)),uno-skeletonmaker) \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
+ $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
+))
+endif
+
$(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(if $(ENABLE_ONLINE_UPDATE_MAR),\
mar \
@@ -143,7 +154,6 @@ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \
$(call gb_Helper_optional,FUZZERS,mtpfuzzer) \
$(call gb_Helper_optional,FUZZERS,htmlfuzzer) \
$(call gb_Helper_optional,FUZZERS,sftfuzzer) \
- $(if $(filter-out ANDROID HAIKU iOS MACOSX WNT,$(OS)),oosplash) \
soffice_bin \
$(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \
$(if $(filter WNT,$(OS)), \
@@ -329,6 +339,43 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
OGLTrans \
))
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ canvastools \
+ $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
+ canvasfactory \
+ cppcanvas \
+ $(if $(filter WNT,$(OS)),directx9canvas) \
+ $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
+ $(if $(filter WNT,$(OS)),gdipluscanvas) \
+ simplecanvas \
+ vclcanvas \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_GUESSLANG),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ guesslang \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+ hyphen \
+ lnth \
+ spell \
+ $(if $(filter iOS MACOSX,$(OS)), \
+ MacOSXSpell \
+ ) \
+))
+endif
+
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
avmedia \
$(call gb_Helper_optional,AVMEDIA, \
@@ -342,14 +389,10 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
) \
basegfx \
bib \
- $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
- canvasfactory \
- canvastools \
chartcore \
chartcontroller \
$(call gb_Helper_optional,OPENCL,clew) \
$(if $(filter $(OS),WNT),,cmdmail) \
- cppcanvas \
configmgr \
ctl \
dba \
@@ -362,8 +405,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
$(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
$(if $(USING_X11),desktop_detector) \
$(call gb_Helper_optional,SCRIPTING,dlgprov) \
- $(if $(filter WNT,$(OS)),directx9canvas) \
- $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
drawinglayer \
editeng \
$(if $(filter WNT,$(OS)),emser) \
@@ -379,19 +420,14 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
frm \
fsstorage \
fwk \
- $(if $(filter WNT,$(OS)),gdipluscanvas) \
- guesslang \
- $(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helplinker) \
i18npool \
i18nsearch \
- hyphen \
$(if $(ENABLE_JAVA),jdbc) \
$(if $(ENABLE_LDAP),ldapbe2) \
$(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
log \
lng \
- lnth \
$(if $(filter $(OS),MACOSX),macbe1) \
$(if $(MERGELIBS),merged) \
migrationoo2 \
@@ -420,11 +456,9 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
sdd \
sdfilt \
sfx \
- simplecanvas \
slideshow \
sot \
- spell \
- $(if $(DISABLE_GUI),,spl) \
+ $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,spl) \
storagefd \
$(call gb_Helper_optional,SCRIPTING,stringresource) \
svgio \
@@ -454,7 +488,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
vbahelper \
) \
vcl \
- vclcanvas \
writerperfect \
xmlscript \
xmlfa \
@@ -475,9 +508,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
) \
fps_aqua \
) \
- $(if $(filter iOS MACOSX,$(OS)), \
- MacOSXSpell \
- ) \
))
$(eval $(call gb_Helper_register_plugins_for_install,OOOLIBS,ooo, \
@@ -614,6 +644,14 @@ $(eval $(call gb_Helper_register_plugins_for_install,PRIVATELIBS_URE,ure, \
sal_textenc \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
+ $(if $(filter WNT,$(OS)), \
+ winaccessibility \
+ ) \
+))
+endif
+
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
$(call gb_Helper_optional,AVMEDIA, \
$(if $(ENABLE_GSTREAMER_1_0),avmediagst) \
@@ -658,7 +696,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooo, \
fps \
inprocserv \
UAccCOM \
- winaccessibility \
) \
))
@@ -891,6 +928,18 @@ $(eval $(call gb_Helper_register_packages_for_install,sdk,\
) \
))
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+ tipoftheday_images \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+ $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
+))
+endif
+
$(eval $(call gb_Helper_register_packages_for_install,ooo,\
$(if $(SYSTEM_LIBEXTTEXTCAT),,libexttextcat_fingerprint) \
officecfg_misc \
@@ -974,13 +1023,11 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
wizards_basicusr \
wizards_properties \
wizards_wizardshare \
- tipoftheday_images \
toolbarmode_images \
vcl_theme_definitions \
$(if $(filter WNT,$(OS)), \
vcl_opengl_denylist \
) \
- $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
$(if $(filter SKIA,$(BUILD_TYPE)), \
vcl_skia_denylist ) \
$(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \
@@ -1170,9 +1217,14 @@ $(eval $(call gb_Helper_register_mos,\
))
# UI configuration
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
$(eval $(call gb_Helper_register_uiconfigs,\
- cui \
$(call gb_Helper_optional,DBCONNECTIVITY,dbaccess) \
+))
+endif
+
+$(eval $(call gb_Helper_register_uiconfigs,\
+ cui \
desktop \
editeng \
filter \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2cfa0a9f4e2a..7fdfb2974a83 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -556,6 +556,7 @@ endef
gb_ExternalProject__use_hunspell :=
else # !SYSTEM_HUNSPELL
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
define gb_LinkTarget__use_hunspell
$(call gb_LinkTarget_add_defs,$(1),\
@@ -583,6 +584,7 @@ $(call gb_ExternalProject_use_external_project,$(1),hunspell)
endef
+endif # ENABLE_WASM_STRIP_HUNSPELL
endif # SYSTEM_HUNSPELL
@@ -1889,6 +1891,7 @@ endef
gb_ExternalProject__use_epubgen :=
else # !SYSTEM_EPUBGEN
+ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
define gb_LinkTarget__use_epubgen
$(call gb_LinkTarget_set_include,$(1),\
@@ -1906,6 +1909,7 @@ $(call gb_ExternalProject_use_external_project,$(1),libepubgen)
endef
+endif # ENABLE_WASM_STRIP_EPUB
endif # SYSTEM_EPUBGEN
ifneq ($(SYSTEM_REVENGE),)
@@ -2847,7 +2851,6 @@ endif # SYSTEM_POPPLER
endif # ENABLE_POPPLER
-
ifneq ($(SYSTEM_CLUCENE),)
define gb_LinkTarget__use_clucene
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 64d9788b59e4..9aaedfd66ee8 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -20,8 +20,35 @@ $(eval $(call gb_Module_add_targets,libreoffice,\
))
endif
+# WASM_CHART change
+ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+ chart2 \
+))
+endif
+
+# WASM_CANVAS change
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+ canvas \
+ cppcanvas \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+ dbaccess \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
accessibility \
+ winaccessibility \
+))
+endif
+
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
android \
$(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
animations \
@@ -36,19 +63,15 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
bean \
binaryurp \
bridges \
- canvas \
- chart2 \
cli_ure \
$(call gb_Helper_optional,DESKTOP,codemaker) \
comphelper \
configmgr \
connectivity \
- cppcanvas \
cppu \
cppuhelper \
cpputools \
cui \
- dbaccess \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
drawinglayer \
@@ -121,7 +144,9 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
+ $(if $(ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS),, \
slideshow \
+ ) \
smoketest \
solenv \
soltools \
@@ -159,7 +184,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
uui \
vbahelper \
vcl \
- winaccessibility \
wizards \
writerfilter \
writerperfect \
diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk
index f874dfe9cc54..122ae4a909a3 100644
--- a/basctl/Library_basctl.mk
+++ b/basctl/Library_basctl.mk
@@ -62,9 +62,14 @@ $(eval $(call gb_Library_use_libraries,basctl,\
xmlscript \
))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/accessibility/accessibledialogcontrolshape \
basctl/source/accessibility/accessibledialogwindow \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,basctl,\
basctl/source/basicide/basdoc \
basctl/source/basicide/IDEComboBox \
basctl/source/basicide/basicrenderable \
diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk
index 05f031415213..7eddba17f348 100644
--- a/chart2/Library_chartcontroller.mk
+++ b/chart2/Library_chartcontroller.mk
@@ -52,6 +52,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\
$(eval $(call gb_Library_set_componentfile,chartcontroller,chart2/source/controller/chartcontroller))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/accessibility/AccessibleBase \
chart2/source/controller/accessibility/AccessibleChartElement \
@@ -60,6 +61,10 @@ $(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/accessibility/AccessibleTextHelper \
chart2/source/controller/accessibility/AccessibleViewForwarder \
chart2/source/controller/accessibility/ChartElementFactory \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,chartcontroller,\
chart2/source/controller/chartapiwrapper/AreaWrapper \
chart2/source/controller/chartapiwrapper/AxisWrapper \
chart2/source/controller/chartapiwrapper/Chart2ModelContact \
diff --git a/config_host.mk.in b/config_host.mk.in
index c6dfa007597d..2d722d3e1fcf 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -207,7 +207,23 @@ export ENABLE_SKIA_DEBUG=@ENABLE_SKIA_DEBUG@
export ENABLE_SYMBOLS_FOR=@ENABLE_SYMBOLS_FOR@
export ENABLE_VALGRIND=@ENABLE_VALGRIND@
export ENABLE_WASM_STRIP=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_ACCESSIBILITY=@ENABLE_WASM_STRIP@
export ENABLE_WASM_STRIP_BASIC_CALC_DRAW_MATH_IMPRESS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CHART=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CLUCENE=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_DBACCESS=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_EPUB=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_EXTRA=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_GUESSLANG=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_HUNSPELL=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_LOCALES=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_PREMULTIPLY=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SPLASH=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_SWEXPORTS=@ENABLE_WASM_STRIP@
export ENABLE_WERROR=@ENABLE_WERROR@
export ENDIANNESS=@ENDIANNESS@
export EPM=@EPM@
diff --git a/config_host/config_wasm_strip.h.in b/config_host/config_wasm_strip.h.in
new file mode 100644
index 000000000000..864fa4dc29ea
--- /dev/null
+++ b/config_host/config_wasm_strip.h.in
@@ -0,0 +1,24 @@
+#ifndef CONFIG_FEATURE_WASM_STRIP_H
+#define CONFIG_FEATURE_WASM_STRIP_H
+
+#define HAVE_FEATURE_WASM_STRIP 0
+
+#if HAVE_FEATURE_WASM_STRIP
+#define ENABLE_WASM_STRIP_ACCESSIBILITY
+#define ENABLE_WASM_STRIP_CANVAS
+#define ENABLE_WASM_STRIP_CHART
+#define ENABLE_WASM_STRIP_CLUCENE
+#define ENABLE_WASM_STRIP_DBACCESS
+#define ENABLE_WASM_STRIP_EPUB
+#define ENABLE_WASM_STRIP_EXTRA
+#define ENABLE_WASM_STRIP_GUESSLANG
+#define ENABLE_WASM_STRIP_HUNSPELL
+#define ENABLE_WASM_STRIP_PINGUSER
+#define ENABLE_WASM_STRIP_PREMULTIPLY
+#define ENABLE_WASM_STRIP_RECENT
+#define ENABLE_WASM_STRIP_RECOVERYUI
+#define ENABLE_WASM_STRIP_SPLASH
+#define ENABLE_WASM_STRIP_SWEXPORTS
+#endif
+
+#endif
diff --git a/configure.ac b/configure.ac
index cdcbd4275039..82ae9e5b2da0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3005,6 +3005,8 @@ if test "$enable_wasm_strip" = "yes"; then
test "${with_fonts+set}" = set || with_fonts=yes
test "${with_locales+set}" = set || with_locales=en
+
+ AC_DEFINE(HAVE_FEATURE_WASM_STRIP)
fi
ENABLE_SERVICES_RDB_FROM_BUILD=
@@ -14561,6 +14563,7 @@ AC_CONFIG_HEADERS([config_host/config_oauth2.h])
AC_CONFIG_HEADERS([config_host/config_poppler.h])
AC_CONFIG_HEADERS([config_host/config_python.h])
AC_CONFIG_HEADERS([config_host/config_writerperfect.h])
+AC_CONFIG_HEADERS([config_host/config_wasm_strip.h])
AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h])
AC_OUTPUT
diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk
index 686bd039f251..5813ebe10ba3 100644
--- a/cui/Library_cui.mk
+++ b/cui/Library_cui.mk
@@ -93,6 +93,18 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_Library_add_exception_objects,cui,\
+ cui/source/dialogs/tipofthedaydlg \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_Library_add_exception_objects,cui,\
+ cui/source/dialogs/hyphen \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/customize/acccfg \
cui/source/customize/cfg \
@@ -126,9 +138,7 @@ $(eval $(call gb_Library_add_exception_objects,cui,\
cui/source/dialogs/hlmailtp \
cui/source/dialogs/hlmarkwn \
cui/source/dialogs/hltpbase \
- cui/source/dialogs/hyphen \
cui/source/dialogs/iconcdlg \
- cui/source/dialogs/tipofthedaydlg \
cui/source/dialogs/insdlg \
cui/source/dialogs/insrc \
cui/source/dialogs/linkdlg \
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index daa8a1e3d55d..301d29303981 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -15,6 +15,12 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
))
endif
+ifneq ($(ENABLE_WASM_STRIP_PINGUSER),TRUE)
+$(eval $(call gb_UIConfig_add_uifiles,cui,\
+ cui/uiconfig/ui/tipofthedaydialog \
+))
+endif
+
$(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/aboutdialog \
cui/uiconfig/ui/aboutconfigdialog\
@@ -99,7 +105,6 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/hyphenate \
cui/uiconfig/ui/iconchangedialog \
cui/uiconfig/ui/iconselectordialog \
- cui/uiconfig/ui/tipofthedaydialog \
cui/uiconfig/ui/insertfloatingframe \
cui/uiconfig/ui/insertoleobject \
cui/uiconfig/ui/insertrowcolumn \
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 75fb59b7fe29..d45be7cb5023 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -18,6 +18,7 @@
*/
#include <config_extensions.h>
+#include <config_wasm_strip.h>
#include <align.hxx>
#include "dlgfact.hxx"
@@ -134,7 +135,11 @@ short AbstractFmShowColsDialog_Impl::Execute()
short AbstractHyphenWordDialog_Impl::Execute()
{
+#ifndef ENABLE_WASM_STRIP_HUNSPELL
return m_xDlg->run();
+#else
+ return 0;
+#endif
}
short AbstractThesaurusDialog_Impl::Execute()
@@ -1095,7 +1100,16 @@ VclPtr<AbstractHyphenWordDialog> AbstractDialogFactory_Impl::CreateHyphenWordDia
css::uno::Reference< css::linguistic2::XHyphenator > &xHyphen,
SvxSpellWrapper* pWrapper)
{
+#ifndef ENABLE_WASM_STRIP_EXTRA
return VclPtr<AbstractHyphenWordDialog_Impl>::Create(std::make_unique<SvxHyphenWordDialog>(rWord, nLang, pParent, xHyphen, pWrapper));
+#else
+ (void) pParent;
+ (void) rWord;
+ (void) nLang;
+ (void) xHyphen;
+ (void) pWrapper;
+ return nullptr;
+#endif
}
VclPtr<AbstractFmShowColsDialog> AbstractDialogFactory_Impl::CreateFmShowColsDialog(weld::Window* pParent)
@@ -1683,7 +1697,7 @@ VclPtr<AbstractAdditionsDialog> AbstractDialogFactory_Impl::CreateAdditionsDialo
#else
(void) pParent;
(void) sAdditionsTag;
- return VclPtr<AbstractAdditionsDialog>(nullptr);
+ return nullptr;
#endif
}
@@ -1697,8 +1711,13 @@ AbstractDialogFactory_Impl::CreateAboutDialog(weld::Window* pParent)
VclPtr<VclAbstractDialog>
AbstractDialogFactory_Impl::CreateTipOfTheDayDialog(weld::Window* pParent)
{
+#ifndef ENABLE_WASM_STRIP_PINGUSER
return VclPtr<CuiAbstractTipController_Impl>::Create(
std::make_shared<TipOfTheDayDialog>(pParent));
+#else
+ (void) pParent;
+ return nullptr;
+#endif
}
VclPtr<VclAbstractDialog>
diff --git a/desktop/Library_deployment.mk b/desktop/Library_deployment.mk
index 57fe1c55a0b6..dc36691b63b1 100644
--- a/desktop/Library_deployment.mk
+++ b/desktop/Library_deployment.mk
@@ -39,6 +39,15 @@ $(eval $(call gb_Library_use_libraries,deployment,\
$(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment))
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Library_set_componentfile,deployment,desktop/source/deployment/deployment.extended))
+
+$(eval $(call gb_Library_add_exception_objects,deployment,\
+ desktop/source/deployment/registry/help/dp_help \
+ desktop/source/deployment/registry/component/dp_component \
+))
+endif
+
$(eval $(call gb_Library_add_exception_objects,deployment,\
desktop/source/deployment/dp_log \
desktop/source/deployment/dp_persmap \
@@ -51,7 +60,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
desktop/source/deployment/manager/dp_managerfac \
desktop/source/deployment/manager/dp_properties \
desktop/source/deployment/registry/component/dp_compbackenddb \
- desktop/source/deployment/registry/component/dp_component \
desktop/source/deployment/registry/configuration/dp_configuration \
desktop/source/deployment/registry/configuration/dp_configurationbackenddb \
desktop/source/deployment/registry/dp_backend \
@@ -59,7 +67,6 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
desktop/source/deployment/registry/dp_registry \
desktop/source/deployment/registry/executable/dp_executable \
desktop/source/deployment/registry/executable/dp_executablebackenddb \
- desktop/source/deployment/registry/help/dp_help \
desktop/source/deployment/registry/help/dp_helpbackenddb \
desktop/source/deployment/registry/package/dp_extbackenddb \
desktop/source/deployment/registry/package/dp_package \
@@ -71,11 +78,9 @@ $(eval $(call gb_Library_add_exception_objects,deployment,\
))
ifneq (,$(filter XMLHELP,$(BUILD_TYPE)))
-
$(eval $(call gb_Library_use_libraries,deployment,\
helplinker \
))
-
endif
# vim: set ts=4 sw=4 et:
diff --git a/desktop/Module_desktop.mk b/desktop/Module_desktop.mk
index 3be81056aad9..265f0248534e 100644
--- a/desktop/Module_desktop.mk
+++ b/desktop/Module_desktop.mk
@@ -20,7 +20,7 @@ $(eval $(call gb_Module_add_targets,desktop,\
$(if $(ENABLE_BREAKPAD), \
Library_crashreport \
) \
- $(if $(DISABLE_GUI),,Library_spl) \
+ $(if $(or $(DISABLE_GUI),$(ENABLE_WASM_STRIP_SPLASH)),,Library_spl) \
Package_branding \
$(if $(CUSTOM_BRAND_DIR),Package_branding_custom) \
UIConfig_deployment \
@@ -107,9 +107,11 @@ $(eval $(call gb_Module_add_targets,desktop,\
else ifeq (,$(filter MACOSX ANDROID iOS HAIKU,$(OS)))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Module_add_targets,desktop,\
$(if $(DISABLE_DYNLOADING),,Executable_oosplash) \
))
+endif # ENABLE_WASM_STRIP_ACCESSIBILITY
endif
diff --git a/desktop/Pagein_common.mk b/desktop/Pagein_common.mk
index d0a0e689c2d2..96d5fe49f919 100644
--- a/desktop/Pagein_common.mk
+++ b/desktop/Pagein_common.mk
@@ -9,6 +9,12 @@
$(eval $(call gb_Pagein_Pagein,common))
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Pagein_add_objects,common,\
+ helplinker \
+))
+endif
+
# sorted in approx. reverse load order (ld.so.1)
$(eval $(call gb_Pagein_add_objects,common,\
$(if $(MERGELIBS),merged) \
@@ -56,7 +62,6 @@ $(eval $(call gb_Pagein_add_objects,common,\
svt \
spl \
avmedia \
- helplinker \
sax \
fsstorage \
desktopbe1 \
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index f65f93d63f80..f1cb4c29ec09 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -24,6 +24,7 @@
#include <config_java.h>
#include <config_folders.h>
#include <config_extensions.h>
+#include <config_wasm_strip.h>
#include <sal/config.h>
@@ -969,6 +970,7 @@ struct RefClearGuard
@param bEmergencySave
differs between EMERGENCY_SAVE and RECOVERY
*/
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
bool impl_callRecoveryUI(bool bEmergencySave ,
bool bExistsRecoveryData)
{
@@ -1000,6 +1002,7 @@ bool impl_callRecoveryUI(bool bEmergencySave ,
aRet >>= bRet;
return bRet;
}
+#endif
bool impl_bringToFrontRecoveryUI()
{
@@ -1149,9 +1152,11 @@ void Desktop::Exception(ExceptionCategory nCategory)
// Save all open documents so they will be reopened
// the next time the application is started
// returns true if at least one document could be saved...
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
bRestart = impl_callRecoveryUI(
true , // force emergency save
false);
+#endif
}
FlushConfiguration();
@@ -1165,8 +1170,10 @@ void Desktop::Exception(ExceptionCategory nCategory)
osl_removeSignalHandler( pSignalHandler );
restartOnMac(false);
+#ifndef ENABLE_WASM_STRIP_SPLASH
if ( m_rSplashScreen.is() )
m_rSplashScreen->reset();
+#endif
_exit( EXITHELPER_CRASH_WITH_RESTART );
}
@@ -1269,7 +1276,9 @@ int Desktop::Main()
Translate::SetReadStringHook(ReplaceStringHookProc);
// Startup screen
+#ifndef ENABLE_WASM_STRIP_SPLASH
OpenSplashScreen();
+#endif
SetSplashScreenProgress(10);
@@ -1712,8 +1721,10 @@ int Desktop::doShutdown()
if ( bRR )
{
restartOnMac(true);
+#ifndef ENABLE_WASM_STRIP_SPLASH
if ( m_rSplashScreen.is() )
m_rSplashScreen->reset();
+#endif
return EXITHELPER_NORMAL_RESTART;
}
@@ -2009,8 +2020,9 @@ void Desktop::OpenClients()
}
else
{
- bool bCrashed = false;
bool bExistsRecoveryData = false;
+#ifndef ENABLE_WASM_STRIP_RECOVERYUI
+ bool bCrashed = false;
bool bExistsSessionData = false;
bool const bDisableRecovery
= getenv("OOO_DISABLE_RECOVERY") != nullptr
@@ -2036,6 +2048,7 @@ void Desktop::OpenClients()
TOOLS_WARN_EXCEPTION( "desktop.app", "Error during recovery");
}
}
+#endif
Reference< XSessionManagerListener2 > xSessionListener;
try
@@ -2394,6 +2407,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
}
+#ifndef ENABLE_WASM_STRIP_SPLASH
void Desktop::OpenSplashScreen()
{
const CommandLineArgs &rCmdLine = GetCommandLineArgs();
@@ -2443,33 +2457,43 @@ void Desktop::OpenSplashScreen()
if(m_rSplashScreen.is())
m_rSplashScreen->start("SplashScreen", 100);
-
}
+#endif
void Desktop::SetSplashScreenProgress(sal_Int32 iProgress)
{
+#ifdef ENABLE_WASM_STRIP_SPLASH
+ (void) iProgress;
+#else
if(m_rSplashScreen.is())
{
m_rSplashScreen->setValue(iProgress);
}
+#endif
}
void Desktop::SetSplashScreenText( const OUString& rText )
{
+#ifdef ENABLE_WASM_STRIP_SPLASH
+ (void) rText;
+#else
if( m_rSplashScreen.is() )
{
m_rSplashScreen->setText( rText );
}
+#endif
}
void Desktop::CloseSplashScreen()
{
+#ifndef ENABLE_WASM_STRIP_SPLASH
if(m_rSplashScreen.is())
{
SolarMutexGuard ensureSolarMutex;
m_rSplashScreen->end();
m_rSplashScreen = nullptr;
}
+#endif
}
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 4d5a3bb78396..6c64502e9d38 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -275,6 +275,26 @@ CommandLineArgs::CommandLineArgs( Supplier& supplier )
void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
+#ifdef ENABLE_WASM_STRIP
+ // use hard-coded init-params for wasm '-nolockcheck -norestore -nologo -writer'
+ // no restore tries
+ m_norestore = true;
+ // no logo needed
+ m_nologo = true;
+#if HAVE_FEATURE_MULTIUSER_ENVIRONMENT
+ // no lock-checks needed
+ m_nolockcheck = true;
+#endif
+ // start with writer only
+ m_writer = true;
+ m_bDocumentArgs = true;
+
+ m_bEmpty = false;
+
+ // return to avoid #elif
+ return;
+#endif
+
m_cwdUrl = supplier.getCwdUrl();
CommandLineEvent eCurrentEvent = CommandLineEvent::Open;
diff --git a/desktop/source/deployment/deployment.component b/desktop/source/deployment/deployment.component
index f7a481bf43c9..79c966deadc0 100644
--- a/desktop/source/deployment/deployment.component
+++ b/desktop/source/deployment/deployment.component
@@ -38,10 +38,6 @@
constructor="com_sun_star_comp_deployment_ProgressLog_get_implementation">
<service name="com.sun.star.comp.deployment.ProgressLog"/>
</implementation>
- <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend"
- constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation">
- <service name="com.sun.star.deployment.PackageRegistryBackend"/>
- </implementation>
<implementation name="com.sun.star.comp.deployment.configuration.PackageRegistryBackend"
constructor="com_sun_star_comp_deployment_configuration_PackageRegistryBackend_get_implementation">
<service name="com.sun.star.deployment.PackageRegistryBackend"/>
@@ -50,10 +46,6 @@
constructor="com_sun_star_comp_deployment_executable_PackageRegistryBackend_get_implementation">
<service name="com.sun.star.deployment.PackageRegistryBackend"/>
</implementation>
- <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend"
- constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation">
- <service name="com.sun.star.deployment.PackageRegistryBackend"/>
- </implementation>
<implementation name="com.sun.star.comp.deployment.script.PackageRegistryBackend"
constructor="com_sun_star_comp_deployment_script_PackageRegistryBackend_get_implementation">
<service name="com.sun.star.deployment.PackageRegistryBackend"/>
diff --git a/desktop/source/deployment/deployment.extended.component b/desktop/source/deployment/deployment.extended.component
new file mode 100644
index 000000000000..8d0b70a9c028
--- /dev/null
+++ b/desktop/source/deployment/deployment.extended.component
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.deployment.component.PackageRegistryBackend"
+ constructor="com_sun_star_comp_deployment_component_PackageRegistryBackend_get_implementation">
+ <service name="com.sun.star.deployment.PackageRegistryBackend"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.deployment.help.PackageRegistryBackend"
+ constructor="com_sun_star_comp_deployment_help_PackageRegistryBackend_get_implementation">
+ <service name="com.sun.star.deployment.PackageRegistryBackend"/>
+ </implementation>
+</component>
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index 158ea62be0ac..703d1960a618 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -29,11 +29,16 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\
libxml2 \
))
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
$(eval $(call gb_Library_use_libraries,drawinglayer,\
- basegfx \
canvastools \
- comphelper \
cppcanvas \
+))
+endif
+
+$(eval $(call gb_Library_use_libraries,drawinglayer,\
+ basegfx \
+ comphelper \
cppu \
cppuhelper \
i18nlangtag \
diff --git a/editeng/Library_editeng.mk b/editeng/Library_editeng.mk
index 1237954ad6e9..6602793e3e02 100644
--- a/editeng/Library_editeng.mk
+++ b/editeng/Library_editeng.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_Library_add_defs,editeng,\
$(eval $(call gb_Library_use_sdk_api,editeng))
+ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Library_add_exception_objects,editeng,\
editeng/source/accessibility/AccessibleComponentBase \
editeng/source/accessibility/AccessibleContextBase \
@@ -45,6 +46,10 @@ $(eval $(call gb_Library_add_exception_objects,editeng,\
editeng/source/accessibility/AccessibleSelectionBase \
editeng/source/accessibility/AccessibleStaticTextBase \
editeng/source/accessibility/AccessibleStringWrap \
+))
+endif
+
+$(eval $(call gb_Library_add_exception_objects,editeng,\
editeng/source/editeng/editattr \
editeng/source/editeng/editdata \
editeng/source/editeng/editdbg \
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 669546a8e5cb..654b993db427 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_wasm_strip.h>
+
#include <rtl/ustring.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <vcl/svapp.hxx>
@@ -249,6 +251,9 @@ void SvxSpellWrapper::InsertHyphen( const sal_Int32 )
// Testing of the document areas in the order specified by the flags
void SvxSpellWrapper::SpellDocument( )
{
+#ifdef ENABLE_WASM_STRIP_HUNSPELL
+ return;
+#else
if ( bOtherCntnt )
{
bReverse = false;
@@ -275,6 +280,7 @@ void SvxSpellWrapper::SpellDocument( )
xHyph, this ));
pDlg->Execute();
}
+#endif
}
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 3de6f9cdd63f..a9e5bde7dedf 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -13,6 +13,18 @@ ifeq ($(COM),MSC)
$(eval $(call gb_Module_add_moduledir,external,msc-externals))
endif
+ifneq ($(ENABLE_WASM_STRIP_CLUCENE),TRUE)
+$(eval $(call gb_Module_add_moduledirs,external,\
+ $(call gb_Helper_optional,CLUCENE,clucene) \
+))
+endif
+
+ifneq ($(ENABLE_WASM_STRIP_EPUB),TRUE)
+$(eval $(call gb_Module_add_moduledirs,external,\
+ $(call gb_Helper_optional,EPUBGEN,libepubgen) \
+))
+endif
+
$(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,XMLSEC,xmlsec) \
$(call gb_Helper_optional,ABW,libabw) \
@@ -25,7 +37,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,CAIRO,cairo) \
$(call gb_Helper_optional,CDR,libcdr) \
$(call gb_Helper_optional,OPENCL,clew) \
- $(call gb_Helper_optional,CLUCENE,clucene) \
$(call gb_Helper_optional,LIBCMIS,libcmis) \
$(call gb_Helper_optional,COINMP,coinmp) \
$(call gb_Helper_optional,CPPUNIT,cppunit) \
@@ -35,7 +46,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,EBOOK,libebook) \
$(call gb_Helper_optional,EPM,epm) \
$(call gb_Helper_optional,EPOXY,epoxy) \
- $(call gb_Helper_optional,EPUBGEN,libepubgen) \
$(call gb_Helper_optional,ETONYEK,libetonyek) \
$(call gb_Helper_optional,EXPAT,expat) \
$(call gb_Helper_optional,FIREBIRD,firebird) \
diff --git a/external/hunspell/StaticLibrary_hunspell.mk b/external/hunspell/StaticLibrary_hunspell.mk
index 02d534f69169..3a2eccafb0aa 100644
--- a/external/hunspell/StaticLibrary_hunspell.mk
+++ b/external/hunspell/StaticLibrary_hunspell.mk
@@ -20,6 +20,12 @@ $(eval $(call gb_StaticLibrary_add_defs,hunspell,\
-DOPENOFFICEORG \
))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
+ UnpackedTarball/hunspell/src/hunspell/hunspell \
+))
+endif
+
$(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
UnpackedTarball/hunspell/src/hunspell/affentry \
UnpackedTarball/hunspell/src/hunspell/affixmgr \
@@ -30,7 +36,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,hunspell,\
UnpackedTarball/hunspell/src/hunspell/hunzip \
UnpackedTarball/hunspell/src/hunspell/filemgr \
UnpackedTarball/hunspell/src/hunspell/replist \
- UnpackedTarball/hunspell/src/hunspell/hunspell \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/hyphen/ExternalProject_hyphen.mk b/external/hyphen/ExternalProject_hyphen.mk
index 63d167f7804b..1419c9b02890 100644
--- a/external/hyphen/ExternalProject_hyphen.mk
+++ b/external/hyphen/ExternalProject_hyphen.mk
@@ -9,7 +9,9 @@
$(eval $(call gb_ExternalProject_ExternalProject,hyphen))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_ExternalProject_use_external,hyphen,hunspell))
+endif
$(eval $(call gb_ExternalProject_register_targets,hyphen,\
build \
diff --git a/external/mythes/ExternalProject_mythes.mk b/external/mythes/ExternalProject_mythes.mk
index 298607f0aa73..6a1e9b14e882 100644
--- a/external/mythes/ExternalProject_mythes.mk
+++ b/external/mythes/ExternalProject_mythes.mk
@@ -9,7 +9,9 @@
$(eval $(call gb_ExternalProject_ExternalProject,mythes))
+ifneq ($(ENABLE_WASM_STRIP_HUNSPELL),TRUE)
$(eval $(call gb_ExternalProject_use_external,mythes,hunspell))
+endif
$(eval $(call gb_ExternalProject_register_targets,mythes,\
build \
diff --git a/extras/Module_extras.mk b/extras/Module_extras.mk
index cf7177c21180..516209c5df49 100644
--- a/extras/Module_extras.mk
+++ b/extras/Module_extras.mk
@@ -61,7 +61,7 @@ $(eval $(call gb_Module_add_l10n_targets,extras,\
ifneq ($(WITH_GALLERY_BUILD),)
$(eval $(call gb_Module_add_targets,extras,\
Gallery_backgrounds \
- Gallery_sound \
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list