summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-08 16:39:43 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2023-12-15 13:04:12 +0100
commite34e4640823dd729bb9d530cbe1d187d991f8532 (patch)
treeaad02fc5c0baf546dfafa018254156dcbf628fb2 /external
parent1a3ddbbe39f77aa59b8b266d748595dc2637197b (diff)
Turn onlineupdate into external/onlineupdate
...and update to latest Mozilla sources. Originally, this was a non-external onlineupdate module (plus correspsonding top-level include/onlineupdate/ directory) that apparently contained sources originally copied from Mozilla and subsequently modified in-place (plus, mixed in, presumably some sources that were not copied from Mozilla but were our own inventions). To clean up this mess, this has been turned into a proper external/onlineupdate module with a tarball containing the pristine external Mozilla sources. The sources for the onlineupdate-c003be8b9727672e7d30972983b375f4c200233f.tar.xz tarball are taken, somewhat arbitrarily, from a recent <https://github.com/mozilla/gecko-dev/commit/c003be8b9727672e7d30972983b375f4c200233f> ("Bug 1867784 - Force reflow all kids in the last column balancing reflow. r=layout-reviewers,dholbert") trunk state, by running `external/onlineupdate/generate-sources.sh ~/github.com/mozilla/gecko-dev` on a Fedora 39 machine. The layout of the tarball still mostly follows the old onlineupdate/ layout, even if that deviates heavily from the actual source layout at <https://github.com/mozilla/gecko-dev/>. (And some files, which apparently are not needed, anyway, lacked sources, see the "Missing source for" in external/onlineupdate/generate-sources.sh. And win_dirent.h/.cpp has meanwhile been superseded by updateutils_win.h/.cpp.) Merely newly included source files are laid out in the tarball according to the actual source layout. Any LO-specific modifications are made via patch files (rather than modifying the sources inline, as was done in the past): external/onlineupdate/lo.patch contains whatever modifications are needed to adapt the functionality, while external/onlineupdate/gtk3deprecated.patch fixes > workdir/UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/progressui_gtk.cpp:97:21: error: use of undeclared identifier 'gtk_vbox_new'; did you mean 'gtk_box_new'? > 97 | GtkWidget* vbox = gtk_vbox_new(TRUE, 6); > | ^~~~~~~~~~~~ > | gtk_box_new to not use the deprecated gtk_vbox_new, which is hidden because we include -DGTK_DISABLE_DEPRECATED in our GTK3_CFLAGS as per our configure.ac. On Windows, the definition of __BYTE_ORDER__ etc. is needed because workdir/UnpackedTarball/onlineupdate/include/mozilla/ says "Our supported compilers provide architecture-independent macros for this", but MSVC doesn't actually, so define here what would implicitly be defined by GCC. Similarly, on Windows -U_WIN32_WINNT is needed to undo -D_WIN32_WINNT=0x0601 in solenv/gbuild/platform/windows.mk, which would cause > workdir\UnpackedTarball\onlineupdate\include\mozilla/WinHeaderOnlyUtils.h(537): error C2065: 'FILE_ID_INFO': undeclared identifier etc., despite the #include <windws.h> there. Curiously, the original gb_CustomTarget_CustomTarget,onlineupdate/generated from onlineupdate/CustomTarget_generated.mk had to be renamed to gb_CustomTarget_CustomTarget,external/onlineupdate/generated when the file was moved to external/onlineupdate/CustomTarget_generated.mk, as otherwise a top-level `make CustomTarget_onlineupdate/generated` would have failed with "No rule to make target..." Also, as there is no gb_CustomTarget_use_unpacked, its effect has been poorly mimicked for now in external/onlineupdate/CustomTarget_generated.mk. Similarly, as there is no gb_WinResTarget_use_unpacked, its effect has been poorly mimicked for now in external/onlineupdate/WinResTarget_updater.mk. The original onlineupdate/workben/test_dialog.cxx, which is actually code written by us, has been moved to external/onlineupdate/workben/test_dialog.cxx. The original onlineupdate/qa/ sources (which were apparently not used during the build) have been preserved for now as external/onlineupdate/qa/, for documentation purposes. The original onlineupdate/astyle.options (which was apparently not used during the build) has been removed. Change-Id: I5ea606202e7837269e7b128e45af2f0b8c277f9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160492 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de> (cherry picked from commit 90255d8931af23e3b81a0d921699632bf323af29) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160804
Diffstat (limited to 'external')
-rw-r--r--external/Module_external.mk1
-rw-r--r--external/onlineupdate/CustomTarget_generated.mk42
-rw-r--r--external/onlineupdate/Executable_mar.mk63
-rw-r--r--external/onlineupdate/Executable_mbsdiff.mk43
-rw-r--r--external/onlineupdate/Executable_test_updater_dialog.mk80
-rw-r--r--external/onlineupdate/Executable_update_service.mk81
-rw-r--r--external/onlineupdate/Executable_updater.mk140
-rw-r--r--external/onlineupdate/Makefile14
-rw-r--r--external/onlineupdate/Module_onlineupdate.mk30
-rw-r--r--external/onlineupdate/README.md35
-rw-r--r--external/onlineupdate/StaticLibrary_libmar.mk45
-rw-r--r--external/onlineupdate/StaticLibrary_libmarverify.mk45
-rw-r--r--external/onlineupdate/StaticLibrary_updatehelper.mk70
-rw-r--r--external/onlineupdate/UnpackedTarball_onlineupdate.mk21
-rw-r--r--external/onlineupdate/WinResTarget_updater.mk15
-rwxr-xr-xexternal/onlineupdate/generate-sources.sh196
-rw-r--r--external/onlineupdate/gtk3deprecated.patch11
-rw-r--r--external/onlineupdate/lo.patch21
-rw-r--r--external/onlineupdate/qa/lang_packs/Makefile21
-rw-r--r--external/onlineupdate/qa/lang_packs/update_en_signed.marbin0 -> 667 bytes
-rw-r--r--external/onlineupdate/qa/lang_packs/update_signed.marbin0 -> 650 bytes
-rw-r--r--external/onlineupdate/qa/lang_packs/updater_lang.zipbin0 -> 899 bytes
-rw-r--r--external/onlineupdate/qa/replace_request/Makefile17
-rw-r--r--external/onlineupdate/qa/replace_request/README3
-rw-r--r--external/onlineupdate/qa/replace_request/updater.zipbin0 -> 1519 bytes
-rw-r--r--external/onlineupdate/qa/single_step/Makefile27
-rw-r--r--external/onlineupdate/qa/single_step/complete_signed.marbin0 -> 2025 bytes
-rw-r--r--external/onlineupdate/qa/single_step/incremental_signed.marbin0 -> 730 bytes
-rw-r--r--external/onlineupdate/qa/single_step/single_step.zipbin0 -> 1271 bytes
-rw-r--r--external/onlineupdate/workben/test_dialog.cxx39
30 files changed, 1060 insertions, 0 deletions
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 11588c51dcf0..4d505991822a 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -85,6 +85,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,OPENSSL,openssl) \
$(call gb_Helper_optional,ORCUS,liborcus) \
$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
+ $(if $(ENABLE_ONLINE_UPDATE_MAR),onlineupdate) \
$(call gb_Helper_optional,PDFIUM,pdfium) \
$(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
diff --git a/external/onlineupdate/CustomTarget_generated.mk b/external/onlineupdate/CustomTarget_generated.mk
new file mode 100644
index 000000000000..dba8274497e6
--- /dev/null
+++ b/external/onlineupdate/CustomTarget_generated.mk
@@ -0,0 +1,42 @@
+# -*- 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,external/onlineupdate/generated))
+
+onlineupdate_INC := $(call gb_CustomTarget_get_workdir,external/onlineupdate/generated)/onlineupdate
+
+# For debug purposes, ONLINEUPDATE_MAR_CERTIFICATEDER can be empty, but gen_cert_header.py always
+# expects an existing certificate-der=... pathname, so as a hack fall back to the generated
+# update.ini itself as the pathname of the certificate DER file (though that will cause
+# gen_cert_header.py to generate nonsense data, of course):
+$(call gb_CustomTarget_get_workdir,onlineupdate/generated)/update.ini: | \
+ $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/.dir
+ printf '[Updater]\ncertificate-der=%s\n' '$(or $(ONLINEUPDATE_MAR_CERTIFICATEDER),$@)' > $@
+
+$(onlineupdate_INC)/primaryCert.h : \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/update.ini \
+ | $(call gb_UnpackedTarball_get_target,onlineupdate)
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
+ mkdir -p $(dir $@)
+ $(call gb_ExternalExecutable_get_command,python) $(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/gen_cert_header.py "primaryCertData" $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/update.ini > $(onlineupdate_INC)/primaryCert.h
+
+$(onlineupdate_INC)/secondaryCert.h : \
+ $(call gb_ExternalExecutable_get_dependencies,python) \
+ $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/update.ini \
+ | $(call gb_UnpackedTarball_get_target,onlineupdate)
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),build,,1)
+ mkdir -p $(dir $@)
+ $(call gb_ExternalExecutable_get_command,python) $(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/gen_cert_header.py "secondaryCertData" $(call gb_CustomTarget_get_workdir,onlineupdate/generated)/update.ini > $(onlineupdate_INC)/secondaryCert.h
+
+$(call gb_CustomTarget_get_target,external/onlineupdate/generated) : \
+ $(onlineupdate_INC)/primaryCert.h \
+ $(onlineupdate_INC)/secondaryCert.h \
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/onlineupdate/Executable_mar.mk b/external/onlineupdate/Executable_mar.mk
new file mode 100644
index 000000000000..bcfd2f4a7f97
--- /dev/null
+++ b/external/onlineupdate/Executable_mar.mk
@@ -0,0 +1,63 @@
+# -*- 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_Executable_Executable,mar))
+
+$(eval $(call gb_Executable_use_unpacked,mar,onlineupdate))
+
+$(eval $(call gb_Executable_set_include,mar,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/src/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/verify/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/sign/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_use_static_libraries,mar,\
+ libmar \
+ libmarverify \
+))
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Executable_add_defs,mar,\
+ -DXP_WIN \
+))
+
+$(eval $(call gb_Executable_add_libs,mar,\
+ ws2_32.lib \
+ Crypt32.lib \
+))
+
+endif
+
+$(eval $(call gb_Executable_use_externals,mar,\
+ nss3 \
+))
+
+$(eval $(call gb_Executable_add_defs,mar,\
+ -DMAR_NSS \
+))
+
+$(eval $(call gb_Executable_add_defs,mar,\
+ -DMOZ_APP_VERSION=\"$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)\" \
+ -DMAR_CHANNEL_ID=\"LOOnlineUpdater\" \
+))
+
+$(eval $(call gb_Executable_add_generated_cobjects,mar,\
+ UnpackedTarball/onlineupdate/nsprpub/lib/libc/src/strdup \
+ UnpackedTarball/onlineupdate/nsprpub/lib/libc/src/strlen \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/sign/nss_secutil \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/sign/mar_sign \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/tool/mar \
+))
+
+$(eval $(call gb_Executable_set_warnings_disabled,mar))
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/Executable_mbsdiff.mk b/external/onlineupdate/Executable_mbsdiff.mk
new file mode 100644
index 000000000000..a41729909586
--- /dev/null
+++ b/external/onlineupdate/Executable_mbsdiff.mk
@@ -0,0 +1,43 @@
+# -*- 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_Executable_Executable,mbsdiff))
+
+$(eval $(call gb_Executable_use_unpacked,mbsdiff,onlineupdate))
+
+$(eval $(call gb_Executable_set_include,mbsdiff,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/inc \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/updater \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_use_externals,mbsdiff,\
+ bzip2 \
+))
+
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Executable_add_defs,mbsdiff, \
+ -DXP_WIN \
+))
+
+$(eval $(call gb_Executable_add_libs,mbsdiff,\
+ ws2_32.lib \
+))
+
+endif
+
+$(eval $(call gb_Executable_add_generated_cobjects,mbsdiff,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/mbsdiff/bsdiff \
+))
+
+$(eval $(call gb_Executable_set_warnings_disabled,mbsdiff))
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/Executable_test_updater_dialog.mk b/external/onlineupdate/Executable_test_updater_dialog.mk
new file mode 100644
index 000000000000..9c9c0038c8da
--- /dev/null
+++ b/external/onlineupdate/Executable_test_updater_dialog.mk
@@ -0,0 +1,80 @@
+# -*- 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_Executable_Executable,test_updater_dialog))
+
+$(eval $(call gb_Executable_use_unpacked,test_updater_dialog,onlineupdate))
+
+$(eval $(call gb_Executable_set_include,test_updater_dialog,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/inc \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/xpcom/glue \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/common \
+ $$(INCLUDE) \
+ $(if $(filter-out WNT,$(OS)),$$(GTK3_CFLAGS) ) \
+))
+
+$(eval $(call gb_Executable_use_static_libraries,test_updater_dialog,\
+ updatehelper \
+))
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Executable_add_defs,test_updater_dialog, \
+ -DXP_WIN \
+))
+
+$(eval $(call gb_Executable_add_libs,test_updater_dialog,\
+ Ws2_32.lib \
+ Gdi32.lib \
+ Comctl32.lib \
+ Shell32.lib \
+ Shlwapi.lib \
+ Crypt32.lib \
+))
+
+$(eval $(call gb_Executable_set_targettype_gui,test_updater_dialog,YES))
+
+$(eval $(call gb_Executable_add_nativeres,test_updater_dialog,updaterres))
+
+$(eval $(call gb_Executable_add_ldflags,test_updater_dialog,\
+ /ENTRY:wmainCRTStartup \
+))
+
+else
+
+$(eval $(call gb_Executable_add_defs,test_updater_dialog,\
+ -DVERIFY_MAR_SIGNATURE \
+ -DNSS3 \
+))
+
+$(eval $(call gb_Executable_use_externals,test_updater_dialog,\
+ nss3 \
+))
+
+$(eval $(call gb_Executable_add_libs,test_updater_dialog,\
+ $(GTK3_LIBS) \
+))
+endif
+
+$(eval $(call gb_Executable_add_exception_objects,test_updater_dialog,\
+ external/onlineupdate/workben/test_dialog \
+))
+
+# external/onlineupdate/workben/test_dialog.cxx #include's lots of external .cpp code:
+$(eval $(call gb_Executable_set_warnings_not_errors,test_updater_dialog))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Executable_add_defs,test_updater_dialog,-DUNICODE))
+endif
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/Executable_update_service.mk b/external/onlineupdate/Executable_update_service.mk
new file mode 100644
index 000000000000..2fe188bbc024
--- /dev/null
+++ b/external/onlineupdate/Executable_update_service.mk
@@ -0,0 +1,81 @@
+# -*- 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_Executable_Executable,update_service))
+
+$(eval $(call gb_Executable_use_unpacked,update_service,onlineupdate))
+
+$(eval $(call gb_Executable_set_targettype_gui,update_service,YES))
+
+$(eval $(call gb_Executable_set_include,update_service,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/inc \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/src/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/verify/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/sign/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/common/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/xre \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/xpcom/base \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/xpcom/string \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_Executable_use_static_libraries,update_service,\
+ updatehelper \
+ windows_process \
+))
+
+$(eval $(call gb_Executable_add_libs,update_service,\
+ ws2_32.lib \
+ Crypt32.lib \
+ shell32.lib \
+ wintrust.lib \
+ version.lib \
+ wtsapi32.lib \
+ userenv.lib \
+ shlwapi.lib \
+ ole32.lib \
+ rpcrt4.lib \
+ comctl32.lib \
+ shlwapi.lib \
+ kernel32.lib \
+ advapi32.lib \
+))
+
+$(eval $(call gb_Executable_add_ldflags,update_service,\
+ /ENTRY:wmainCRTStartup \
+))
+
+$(eval $(call gb_Executable_set_generated_cxx_suffix,update_service,cpp))
+
+$(eval $(call gb_Executable_add_generated_exception_objects,update_service,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/maintenanceservice \
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/servicebase \
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/serviceinstall \
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/workmonitor \
+))
+
+$(eval $(call gb_Executable_add_cxxflags,update_service,-Zc:strictStrings-))
+
+$(eval $(call gb_Executable_add_defs,update_service, \
+ -DMOZ_MAINTENANCE_SERVICE \
+ -DNS_NO_XPCOM \
+ -DUNICODE \
+ -DXP_WIN \
+ $(if $(filter AARCH64 INTEL X86_64,$(CPUNAME)),-D__BYTE_ORDER__=1234) \
+ -D__ORDER_BIG_ENDIAN__=4321 \
+ -D__ORDER_LITTLE_ENDIAN__=1234 \
+ -U_WIN32_WINNT \
+))
+
+$(eval $(call gb_Executable_set_warnings_disabled,update_service))
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/Executable_updater.mk b/external/onlineupdate/Executable_updater.mk
new file mode 100644
index 000000000000..0aa0bbe2c9b3
--- /dev/null
+++ b/external/onlineupdate/Executable_updater.mk
@@ -0,0 +1,140 @@
+# -*- 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_Executable_Executable,updater))
+
+$(eval $(call gb_Executable_use_unpacked,updater,onlineupdate))
+
+$(eval $(call gb_Executable_set_include,updater,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/inc \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/xpcom/glue \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/service \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/modules/xz-embedded/src \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/updater \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/xre \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/xpcom/base \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/xpcom/string \
+ $$(INCLUDE) \
+ $(if $(filter-out WNT,$(OS)),$$(GTK3_CFLAGS) ) \
+))
+
+$(eval $(call gb_Executable_use_custom_headers,updater,external/onlineupdate/generated))
+
+$(eval $(call gb_Executable_use_static_libraries,updater,\
+ libmar \
+ libmarverify \
+ updatehelper \
+ $(if $(filter WNT,$(OS)), \
+ windows_process )\
+))
+
+$(eval $(call gb_Executable_use_externals,updater,\
+ bzip2 \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Executable_add_libs,updater,\
+ Ws2_32.lib \
+ Gdi32.lib \
+ Comctl32.lib \
+ Shell32.lib \
+ Shlwapi.lib \
+ Crypt32.lib \
+ Ole32.lib \
+ Rpcrt4.lib \
+ wintrust.lib \
+))
+
+$(eval $(call gb_Executable_set_targettype_gui,updater,YES))
+
+$(eval $(call gb_Executable_add_nativeres,updater,updaterres))
+
+$(eval $(call gb_Executable_add_ldflags,updater,\
+ /ENTRY:wmainCRTStartup \
+))
+
+$(eval $(call gb_Executable_add_defs,updater,\
+ -DVERIFY_MAR_SIGNATURE \
+ -DNS_NO_XPCOM \
+ -DMOZ_MAINTENANCE_SERVICE \
+ -DXP_WIN \
+ -DXZ_USE_CRC64 \
+ -DXZ_DEC_X86 \
+ -DXZ_DEC_POWERPC \
+ -DXZ_DEC_IA64 \
+ -DXZ_DEC_ARM \
+ -DXZ_DEC_ARMTHUMB \
+ -DXZ_DEC_SPARC \
+ $(if $(filter AARCH64 INTEL X86_64,$(CPUNAME)),-D__BYTE_ORDER__=1234) \
+ -D__ORDER_BIG_ENDIAN__=4321 \
+ -D__ORDER_LITTLE_ENDIAN__=1234 \
+ -U_WIN32_WINNT \
+))
+
+else
+
+$(eval $(call gb_Executable_add_defs,updater,\
+ -DVERIFY_MAR_SIGNATURE \
+ -DNSS3 \
+ -DNS_NO_XPCOM \
+ -DXP_UNIX \
+ -DXZ_USE_CRC64 \
+ -DXZ_DEC_X86 \
+ -DXZ_DEC_POWERPC \
+ -DXZ_DEC_IA64 \
+ -DXZ_DEC_ARM \
+ -DXZ_DEC_ARMTHUMB \
+ -DXZ_DEC_SPARC \
+))
+
+$(eval $(call gb_Executable_use_externals,updater,\
+ nss3 \
+))
+
+$(eval $(call gb_Executable_add_libs,updater,\
+ $(GTK3_LIBS) \
+))
+
+endif
+
+$(eval $(call gb_Executable_set_generated_cxx_suffix,updater,cpp))
+
+$(eval $(call gb_Executable_add_generated_exception_objects,updater,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/archivereader \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/bspatch \
+ $(if $(filter-out WNT,$(OS)),UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/progressui_gtk) \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/updater \
+ $(if $(filter WNT,$(OS)),\
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/loaddlls \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/progressui_win )\
+))
+
+$(eval $(call gb_Executable_add_generated_cobjects,updater, \
+ UnpackedTarball/onlineupdate/modules/xz-embedded/src/xz_crc32 \
+ UnpackedTarball/onlineupdate/modules/xz-embedded/src/xz_crc64 \
+ UnpackedTarball/onlineupdate/modules/xz-embedded/src/xz_dec_bcj \
+ UnpackedTarball/onlineupdate/modules/xz-embedded/src/xz_dec_lzma2 \
+ UnpackedTarball/onlineupdate/modules/xz-embedded/src/xz_dec_stream \
+))
+
+$(eval $(call gb_Executable_set_warnings_disabled,updater))
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Executable_add_cxxflags,updater,-Zc:strictStrings-))
+
+$(eval $(call gb_Executable_add_defs,updater,-DUNICODE))
+
+endif
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/Makefile b/external/onlineupdate/Makefile
new file mode 100644
index 000000000000..569ad8a0ba7a
--- /dev/null
+++ b/external/onlineupdate/Makefile
@@ -0,0 +1,14 @@
+# -*- 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/.
+#
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/onlineupdate/Module_onlineupdate.mk b/external/onlineupdate/Module_onlineupdate.mk
new file mode 100644
index 000000000000..8b5a09efc0ae
--- /dev/null
+++ b/external/onlineupdate/Module_onlineupdate.mk
@@ -0,0 +1,30 @@
+# -*- 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_Module_Module,onlineupdate))
+
+ifneq ($(ENABLE_ONLINE_UPDATE_MAR),)
+$(eval $(call gb_Module_add_targets,onlineupdate,\
+ UnpackedTarball_onlineupdate \
+ StaticLibrary_libmar \
+ StaticLibrary_libmarverify \
+ StaticLibrary_updatehelper \
+ $(if $(filter WNT,$(OS)),\
+ Executable_update_service \
+ WinResTarget_updater )\
+ Executable_test_updater_dialog \
+ Executable_mar \
+ Executable_updater \
+ Executable_mbsdiff \
+ CustomTarget_generated \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/onlineupdate/README.md b/external/onlineupdate/README.md
new file mode 100644
index 000000000000..ac4a7e65ba3d
--- /dev/null
+++ b/external/onlineupdate/README.md
@@ -0,0 +1,35 @@
+# Online Update
+
+Online update implementation based on Mozilla's MAR format + update mechanism
+
+The source code has been extracted from <https://github.com/mozilla/gecko-dev> with
+external/onlineupdate/generate-sources.sh.
+
+The source/service directory contains the code for the silent windows updater that avoids the
+repeated administrator check for an update.
+
+## Note
+
+The updater executable should not depend on any other dynamic library in the LibreOffice
+installation as we would need to copy that one also to a temporary directory during update. We can't
+update any library or executable that is currently in use. For the updater executable we solve this
+problem by copying the updater before using it to a temporary directory.
+
+On Windows we use the system to provide us with a crypto library whereas on Linux we use NSS.
+
+## Update Procedure
+
+The updater executable is run two times. In a first run, the current installation is copied to an
+`update` directory and the update is applied in this `update` directory. During the next run, a
+replacement request is executed. The replacement request removes the old installation directory and
+replaces it with the content of the `update` directory.
+
+### User Profile in the Installation Directory
+
+The archive based installations have the user profile by default inside of the installation
+directory. During the update process this causes some problems that need special handling in the
+updater.
+
+* The `update` directory is inside of the user profile resulting in recursive copying.
+* During the replacement request the updater log is in the user profile, which changes location from
+the actual location to a backup location.
diff --git a/external/onlineupdate/StaticLibrary_libmar.mk b/external/onlineupdate/StaticLibrary_libmar.mk
new file mode 100644
index 000000000000..836b50038784
--- /dev/null
+++ b/external/onlineupdate/StaticLibrary_libmar.mk
@@ -0,0 +1,45 @@
+# -*- 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_StaticLibrary_StaticLibrary,libmar))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,libmar,onlineupdate))
+
+$(eval $(call gb_StaticLibrary_set_include,libmar,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/src/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/other-licenses/nsis/Contrib/CityHash/cityhash \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,libmar,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,libmar,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/src/mar_create \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/src/mar_extract \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/src/mar_read \
+))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,libmar, \
+ UnpackedTarball/onlineupdate/other-licenses/nsis/Contrib/CityHash/cityhash/city \
+))
+
+$(eval $(call gb_StaticLibrary_use_static_libraries,\
+ libmarverify \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,libmar))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_defs,libmar, \
+ -DXP_WIN \
+))
+endif
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/StaticLibrary_libmarverify.mk b/external/onlineupdate/StaticLibrary_libmarverify.mk
new file mode 100644
index 000000000000..9915fcb66256
--- /dev/null
+++ b/external/onlineupdate/StaticLibrary_libmarverify.mk
@@ -0,0 +1,45 @@
+# -*- 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_StaticLibrary_StaticLibrary,libmarverify))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,libmarverify,onlineupdate))
+
+$(eval $(call gb_StaticLibrary_set_include,libmarverify,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/libmar/src/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ $$(INCLUDE) \
+))
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_StaticLibrary_add_defs,libmarverify, \
+ -DXP_WIN \
+))
+
+else
+
+$(eval $(call gb_StaticLibrary_add_defs,libmarverify,\
+ -DMAR_NSS \
+))
+
+$(eval $(call gb_StaticLibrary_use_externals,libmarverify,\
+ nss3 \
+))
+
+endif
+
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,libmarverify,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/verify/mar_verify \
+ UnpackedTarball/onlineupdate/onlineupdate/source/libmar/verify/cryptox \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,libmarverify))
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/StaticLibrary_updatehelper.mk b/external/onlineupdate/StaticLibrary_updatehelper.mk
new file mode 100644
index 000000000000..742d4d1c648d
--- /dev/null
+++ b/external/onlineupdate/StaticLibrary_updatehelper.mk
@@ -0,0 +1,70 @@
+# -*- 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_StaticLibrary_StaticLibrary,updatehelper))
+
+$(eval $(call gb_StaticLibrary_use_unpacked,updatehelper,onlineupdate))
+
+$(eval $(call gb_StaticLibrary_set_include,updatehelper,\
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/inc/ \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/service \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include/onlineupdate \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/include \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/mfbt/double-conversion \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/toolkit/mozapps/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/xpcom/base \
+ $$(INCLUDE) \
+))
+
+$(eval $(call gb_StaticLibrary_add_defs,updatehelper,\
+ -DMOZ_MAINTENANCE_SERVICE \
+ -DNSS3 \
+ -DVERIFY_MAR_SIGNATURE \
+ -DXP_$(if $(filter WNT,$(OS)),WIN,UNIX) \
+ $(if $(filter WNT,$(OS)),-U_WIN32_WINNT) \
+))
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,updatehelper,cpp))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,updatehelper,\
+ UnpackedTarball/onlineupdate/mozglue/misc/Printf \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/common/readstrings \
+ UnpackedTarball/onlineupdate/toolkit/mozapps/update/common/updatecommon \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,updatehelper,\
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/common/pathhash \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/common/uachelper \
+ UnpackedTarball/onlineupdate/onlineupdate/source/update/common/updatehelper \
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/certificatecheck \
+ UnpackedTarball/onlineupdate/onlineupdate/source/service/registrycertificates \
+ UnpackedTarball/onlineupdate/toolkit/mozapps/update/common/updateutils_win \
+))
+endif
+
+$(eval $(call gb_StaticLibrary_set_generated_cxx_suffix,updatehelper,cc))
+
+$(eval $(call gb_StaticLibrary_add_generated_exception_objects,updatehelper, \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/bignum \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/bignum-dtoa \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/cached-powers \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/double-to-string \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/fast-dtoa \
+ UnpackedTarball/onlineupdate/mfbt/double-conversion/double-conversion/fixed-dtoa \
+))
+
+$(eval $(call gb_StaticLibrary_set_warnings_disabled,updatehelper))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_StaticLibrary_add_cxxflags,updatehelper,-Zc:strictStrings-))
+endif
+
+# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
diff --git a/external/onlineupdate/UnpackedTarball_onlineupdate.mk b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
new file mode 100644
index 000000000000..e7f9a0cb76f9
--- /dev/null
+++ b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
@@ -0,0 +1,21 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
+#
+# 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_UnpackedTarball_UnpackedTarball,onlineupdate))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,onlineupdate,$(ONLINEUPDATE_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,onlineupdate,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \
+ external/onlineupdate/gtk3deprecated.patch \
+ external/onlineupdate/lo.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/onlineupdate/WinResTarget_updater.mk b/external/onlineupdate/WinResTarget_updater.mk
new file mode 100644
index 000000000000..edb2db7483e6
--- /dev/null
+++ b/external/onlineupdate/WinResTarget_updater.mk
@@ -0,0 +1,15 @@
+$(eval $(call gb_WinResTarget_WinResTarget,updaterres))
+
+$(call gb_WinResTarget_get_target,updaterres,updaterres): | \
+ $(call gb_UnpackedTarball_get_target,onlineupdate)
+
+$(eval $(call gb_WinResTarget_set_include,updaterres,\
+ $$(INCLUDE) \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/common \
+ -I$(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater \
+))
+
+$(call gb_WinResTarget_get_clean_target,updaterres): \
+ RCFILE := $(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/updater.rc
+$(call gb_WinResTarget_get_target,updaterres): \
+ RCFILE := $(call gb_UnpackedTarball_get_dir,onlineupdate)/onlineupdate/source/update/updater/updater.rc
diff --git a/external/onlineupdate/generate-sources.sh b/external/onlineupdate/generate-sources.sh
new file mode 100755
index 000000000000..bc39603c156b
--- /dev/null
+++ b/external/onlineupdate/generate-sources.sh
@@ -0,0 +1,196 @@
+#!/bin/sh
+set -ex
+
+source=${1?}
+tag=${2-$(git -C "${source?}" describe --abbrev=40 --always)}
+
+tmpdir=$(mktemp -d)
+
+copyto() {
+ (cd "${tmpdir?}" && mkdir -p $(dirname "${1?}"))
+ cp "${source?}"/"${2?}" "${tmpdir?}"/"${1?}"
+}
+
+# Copy sources according to the old onlineupdate/ target layout:
+
+copyto include/onlineupdate/mar.h modules/libmar/src/mar.h
+copyto include/onlineupdate/mar_cmdline.h modules/libmar/src/mar_cmdline.h
+copyto include/onlineupdate/mar_private.h modules/libmar/src/mar_private.h
+copyto include/onlineupdate/mozilla/Assertions.h mfbt/Assertions.h
+copyto include/onlineupdate/mozilla/Attributes.h mfbt/Attributes.h
+copyto include/onlineupdate/mozilla/Compiler.h mfbt/Compiler.h
+copyto include/onlineupdate/mozilla/Likely.h mfbt/Likely.h
+copyto include/onlineupdate/mozilla/MacroArgs.h mfbt/MacroArgs.h
+copyto include/onlineupdate/mozilla/Types.h mfbt/Types.h
+copyto include/onlineupdate/mozilla/nsTraceRefcnt.h xpcom/base/nsTraceRefcnt.h
+copyto include/mozilla/Char16.h mfbt/Char16.h
+copyto onlineupdate/inc/bspatch.h toolkit/mozapps/update/updater/bspatch/bspatch.h
+copyto onlineupdate/source/libmar/README modules/libmar/README
+copyto onlineupdate/source/libmar/sign/mar_sign.c modules/libmar/sign/mar_sign.c
+copyto onlineupdate/source/libmar/sign/nss_secutil.c modules/libmar/sign/nss_secutil.c
+copyto onlineupdate/source/libmar/sign/nss_secutil.h modules/libmar/sign/nss_secutil.h
+copyto onlineupdate/source/libmar/src/mar_create.c modules/libmar/src/mar_create.c
+copyto onlineupdate/source/libmar/src/mar_extract.c modules/libmar/src/mar_extract.c
+copyto onlineupdate/source/libmar/src/mar_read.c modules/libmar/src/mar_read.c
+copyto onlineupdate/source/libmar/tool/mar.c modules/libmar/tool/mar.c
+copyto onlineupdate/source/libmar/verify/MacVerifyCrypto.cpp modules/libmar/verify/MacVerifyCrypto.cpp
+copyto onlineupdate/source/libmar/verify/cryptox.c modules/libmar/verify/cryptox.c
+copyto onlineupdate/source/libmar/verify/cryptox.h modules/libmar/verify/cryptox.h
+copyto onlineupdate/source/libmar/verify/mar_verify.c modules/libmar/verify/mar_verify.c
+copyto onlineupdate/source/mbsdiff/bsdiff.c other-licenses/bsdiff/bsdiff.c
+copyto onlineupdate/source/service/certificatecheck.cpp toolkit/mozapps/update/common/certificatecheck.cpp
+copyto onlineupdate/source/service/certificatecheck.h toolkit/mozapps/update/common/certificatecheck.h
+copyto onlineupdate/source/service/maintenanceservice.cpp toolkit/components/maintenanceservice/maintenanceservice.cpp
+copyto onlineupdate/source/service/maintenanceservice.h toolkit/components/maintenanceservice/maintenanceservice.h
+copyto onlineupdate/source/service/registrycertificates.cpp toolkit/mozapps/update/common/registrycertificates.cpp
+copyto onlineupdate/source/service/registrycertificates.h toolkit/mozapps/update/common/registrycertificates.h
+copyto onlineupdate/source/service/resource.h toolkit/components/maintenanceservice/resource.h
+copyto onlineupdate/source/service/servicebase.cpp toolkit/components/maintenanceservice/servicebase.cpp
+copyto onlineupdate/source/service/servicebase.h toolkit/components/maintenanceservice/servicebase.h
+copyto onlineupdate/source/service/serviceinstall.cpp toolkit/components/maintenanceservice/serviceinstall.cpp
+copyto onlineupdate/source/service/serviceinstall.h toolkit/components/maintenanceservice/serviceinstall.h
+copyto onlineupdate/source/service/workmonitor.cpp toolkit/components/maintenanceservice/workmonitor.cpp
+copyto onlineupdate/source/service/workmonitor.h toolkit/components/maintenanceservice/workmonitor.h
+# Renamed target from onlineupdate/source/update/common/errors.h:
+copyto onlineupdate/source/update/common/updatererrors.h toolkit/mozapps/update/common/updatererrors.h
+copyto onlineupdate/source/update/common/pathhash.cpp toolkit/mozapps/update/common/pathhash.cpp
+copyto onlineupdate/source/update/common/pathhash.h toolkit/mozapps/update/common/pathhash.h
+copyto onlineupdate/source/update/common/readstrings.cpp toolkit/mozapps/update/common/readstrings.cpp
+copyto onlineupdate/source/update/common/readstrings.h toolkit/mozapps/update/common/readstrings.h
+copyto onlineupdate/source/update/common/uachelper.cpp toolkit/mozapps/update/common/uachelper.cpp
+copyto onlineupdate/source/update/common/uachelper.h toolkit/mozapps/update/common/uachelper.h
+copyto onlineupdate/source/update/common/updatedefines.h toolkit/mozapps/update/common/updatedefines.h
+copyto onlineupdate/source/update/common/updatehelper.cpp toolkit/mozapps/update/common/updatehelper.cpp
+copyto onlineupdate/source/update/common/updatehelper.h toolkit/mozapps/update/common/updatehelper.h
+copyto onlineupdate/source/update/updater/Makefile.in toolkit/mozapps/update/updater/Makefile.in
+copyto onlineupdate/source/update/updater/archivereader.cpp toolkit/mozapps/update/updater/archivereader.cpp
+copyto onlineupdate/source/update/updater/archivereader.h toolkit/mozapps/update/updater/archivereader.h
+copyto onlineupdate/source/update/updater/bspatch.cpp toolkit/mozapps/update/updater/bspatch/bspatch.cpp
+copyto onlineupdate/source/update/updater/gen_cert_header.py toolkit/mozapps/update/updater/gen_cert_header.py
+copyto onlineupdate/source/update/updater/launchchild_osx.mm toolkit/mozapps/update/updater/launchchild_osx.mm
+copyto onlineupdate/source/update/updater/loaddlls.cpp toolkit/mozapps/update/updater/loaddlls.cpp
+# Renamed target from onlineupdate/source/update/updater/macbuild/Contents/Info.plist:
+copyto onlineupdate/source/update/updater/macbuild/Contents/Info.plist.in toolkit/mozapps/update/updater/macbuild/Contents/Info.plist.in
+copyto onlineupdate/source/update/updater/macbuild/Contents/PkgInfo toolkit/mozapps/update/updater/macbuild/Contents/PkgInfo
+copyto onlineupdate/source/update/updater/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in toolkit/mozapps/update/updater/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
+copyto onlineupdate/source/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/classes.nib toolkit/mozapps/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/classes.nib
+copyto onlineupdate/source/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/info.nib toolkit/mozapps/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/info.nib
+copyto onlineupdate/source/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib toolkit/mozapps/update/updater/macbuild/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
+copyto onlineupdate/source/update/updater/macbuild/Contents/Resources/updater.icns toolkit/mozapps/update/updater/macbuild/Contents/Resources/updater.icns
+copyto onlineupdate/source/update/updater/progressui-unused/progressui_osx.mm toolkit/mozapps/update/updater/progressui_osx.mm
+copyto onlineupdate/source/update/updater/progressui.h toolkit/mozapps/update/updater/progressui.h
+copyto onlineupdate/source/update/updater/progressui_gtk.cpp toolkit/mozapps/update/updater/progressui_gtk.cpp
+copyto onlineupdate/source/update/updater/progressui_null.cpp toolkit/mozapps/update/updater/progressui_null.cpp
+copyto onlineupdate/source/update/updater/progressui_win.cpp toolkit/mozapps/update/updater/progressui_win.cpp
+copyto onlineupdate/source/update/updater/resource.h toolkit/mozapps/update/updater/resource.h
+copyto onlineupdate/source/update/updater/updater-common.build toolkit/mozapps/update/updater/updater-common.build
+copyto onlineupdate/source/update/updater/updater-xpcshell/Makefile.in toolkit/mozapps/update/updater/updater-xpcshell/Makefile.in
+copyto onlineupdate/source/update/updater/updater-xpcshell/moz.build toolkit/mozapps/update/updater/updater-xpcshell/moz.build
+copyto onlineupdate/source/update/updater/updater.cpp toolkit/mozapps/update/updater/updater.cpp
+copyto onlineupdate/source/update/updater/updater.exe.comctl32.manifest toolkit/mozapps/update/updater/updater.exe.comctl32.manifest
+copyto onlineupdate/source/update/updater/updater.exe.manifest toolkit/mozapps/update/updater/updater.exe.manifest
+copyto onlineupdate/source/update/updater/updater.ico toolkit/mozapps/update/updater/updater.ico
+copyto onlineupdate/source/update/updater/updater.png toolkit/mozapps/update/updater/updater.png
+copyto onlineupdate/source/update/updater/updater.rc toolkit/mozapps/update/updater/updater.rc
+copyto onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.cpp xpcom/base/nsVersionComparator.cpp
+copyto onlineupdate/source/update/updater/xpcom/glue/nsVersionComparator.h xpcom/base/nsVersionComparator.h
+
+# Missing source for include/onlineupdate/mozilla/TypeTraits.h
+# Missing source for onlineupdate/source/libmar/sign/Makefile.in
+# Missing source for onlineupdate/source/libmar/src/Makefile.in
+# Missing source for onlineupdate/source/libmar/tool/Makefile.in
+# Missing source for onlineupdate/source/service/windowsHelper.hxx
+# Missing source for onlineupdate/source/update/common/sources.mozbuild
+# Missing source for onlineupdate/source/update/common/updatelogging.cxx
+# Missing source for onlineupdate/source/update/common/updatelogging.h
+# Missing source for onlineupdate/source/update/updater/progressui-unused/progressui_gonk.cxx
+# Missing source for onlineupdate/source/update/updater/progressui_gtk_icon.h
+# Missing source for onlineupdate/source/update/updater/updater.svg
+
+# Copy additional sources according to the actual source layout:
+
+copyto include/mozilla/Alignment.h mfbt/Alignment.h
+copyto include/mozilla/AllocPolicy.h mfbt/AllocPolicy.h
+copyto include/mozilla/ArrayUtils.h mfbt/ArrayUtils.h
+copyto include/mozilla/Atomics.h mfbt/Atomics.h
+copyto include/mozilla/Casting.h mfbt/Casting.h
+copyto include/mozilla/CheckedInt.h mfbt/CheckedInt.h
+copyto include/mozilla/CmdLineAndEnvUtils.h toolkit/xre/CmdLineAndEnvUtils.h
+copyto include/mozilla/CompactPair.h mfbt/CompactPair.h
+copyto include/mozilla/DebugOnly.h mfbt/DebugOnly.h
+copyto include/mozilla/DynamicallyLinkedFunctionPtr.h mozglue/misc/DynamicallyLinkedFunctionPtr.h
+copyto include/mozilla/EndianUtils.h mfbt/EndianUtils.h
+copyto include/mozilla/Fuzzing.h mfbt/Fuzzing.h
+copyto include/mozilla/HashFunctions.h mfbt/HashFunctions.h
+copyto include/mozilla/IntegerPrintfMacros.h mozglue/misc/IntegerPrintfMacros.h
+copyto include/mozilla/IntegerTypeTraits.h mfbt/IntegerTypeTraits.h
+copyto include/mozilla/MathAlgorithms.h mfbt/MathAlgorithms.h
+copyto include/mozilla/Maybe.h mfbt/Maybe.h
+copyto include/mozilla/MaybeStorageBase.h mfbt/MaybeStorageBase.h
+copyto include/mozilla/MemoryChecking.h mfbt/MemoryChecking.h
+copyto include/mozilla/MemoryReporting.h mfbt/MemoryReporting.h
+copyto include/mozilla/OperatorNewExtensions.h mfbt/OperatorNewExtensions.h
+copyto include/mozilla/Poison.h mfbt/Poison.h
+copyto include/mozilla/Printf.h mozglue/misc/Printf.h
+copyto include/mozilla/ReentrancyGuard.h mfbt/ReentrancyGuard.h
+copyto include/mozilla/Result.h mfbt/Result.h
+copyto include/mozilla/ResultVariant.h mfbt/ResultVariant.h
+copyto include/mozilla/Span.h mfbt/Span.h
+copyto include/mozilla/Sprintf.h mozglue/misc/Sprintf.h
+copyto include/mozilla/StaticAnalysisFunctions.h mfbt/StaticAnalysisFunctions.h
+copyto include/mozilla/TemplateLib.h mfbt/TemplateLib.h
+copyto include/mozilla/ThreadSafety.h mfbt/ThreadSafety.h
+copyto include/mozilla/TypedEnumBits.h mfbt/TypedEnumBits.h
+copyto include/mozilla/UniquePtr.h mfbt/UniquePtr.h
+copyto include/mozilla/UniquePtrExtensions.h mfbt/UniquePtrExtensions.h
+copyto include/mozilla/Variant.h mfbt/Variant.h
+copyto include/mozilla/Vector.h mfbt/Vector.h
+copyto include/mozilla/WinHeaderOnlyUtils.h widget/windows/WinHeaderOnlyUtils.h
+copyto include/mozilla/WrappingOperations.h mfbt/WrappingOperations.h
+copyto include/mozilla/fallible.h mfbt/fallible.h
+copyto mfbt/double-conversion/double-conversion/bignum-dtoa.cc mfbt/double-conversion/double-conversion/bignum-dtoa.cc
+copyto mfbt/double-conversion/double-conversion/bignum-dtoa.h mfbt/double-conversion/double-conversion/bignum-dtoa.h
+copyto mfbt/double-conversion/double-conversion/bignum.cc mfbt/double-conversion/double-conversion/bignum.cc
+copyto mfbt/double-conversion/double-conversion/bignum.h mfbt/double-conversion/double-conversion/bignum.h
+copyto mfbt/double-conversion/double-conversion/cached-powers.cc mfbt/double-conversion/double-conversion/cached-powers.cc
+copyto mfbt/double-conversion/double-conversion/cached-powers.h mfbt/double-conversion/double-conversion/cached-powers.h
+copyto mfbt/double-conversion/double-conversion/diy-fp.h mfbt/double-conversion/double-conversion/diy-fp.h
+copyto mfbt/double-conversion/double-conversion/double-to-string.cc mfbt/double-conversion/double-conversion/double-to-string.cc
+copyto mfbt/double-conversion/double-conversion/double-to-string.h mfbt/double-conversion/double-conversion/double-to-string.h
+copyto mfbt/double-conversion/double-conversion/fast-dtoa.cc mfbt/double-conversion/double-conversion/fast-dtoa.cc
+copyto mfbt/double-conversion/double-conversion/fast-dtoa.h mfbt/double-conversion/double-conversion/fast-dtoa.h
+copyto mfbt/double-conversion/double-conversion/fixed-dtoa.cc mfbt/double-conversion/double-conversion/fixed-dtoa.cc
+copyto mfbt/double-conversion/double-conversion/fixed-dtoa.h mfbt/double-conversion/double-conversion/fixed-dtoa.h
+copyto mfbt/double-conversion/double-conversion/ieee.h mfbt/double-conversion/double-conversion/ieee.h
+copyto mfbt/double-conversion/double-conversion/utils.h mfbt/double-conversion/double-conversion/utils.h
+copyto modules/xz-embedded/src/xz.h modules/xz-embedded/src/xz.h
+copyto modules/xz-embedded/src/xz_config.h modules/xz-embedded/src/xz_config.h
+copyto modules/xz-embedded/src/xz_crc32.c modules/xz-embedded/src/xz_crc32.c
+copyto modules/xz-embedded/src/xz_crc64.c modules/xz-embedded/src/xz_crc64.c
+copyto modules/xz-embedded/src/xz_dec_bcj.c modules/xz-embedded/src/xz_dec_bcj.c
+copyto modules/xz-embedded/src/xz_dec_lzma2.c modules/xz-embedded/src/xz_dec_lzma2.c
+copyto modules/xz-embedded/src/xz_dec_stream.c modules/xz-embedded/src/xz_dec_stream.c
+copyto modules/xz-embedded/src/xz_lzma2.h modules/xz-embedded/src/xz_lzma2.h
+copyto modules/xz-embedded/src/xz_private.h modules/xz-embedded/src/xz_private.h
+copyto modules/xz-embedded/src/xz_stream.h modules/xz-embedded/src/xz_stream.h
+copyto mozglue/misc/Printf.cpp mozglue/misc/Printf.cpp
+copyto nsprpub/lib/libc/src/strdup.c nsprpub/lib/libc/src/strdup.c
+copyto nsprpub/lib/libc/src/strlen.c nsprpub/lib/libc/src/strlen.c
+copyto other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp other-licenses/nsis/Contrib/CityHash/cityhash/city.cpp
+copyto other-licenses/nsis/Contrib/CityHash/cityhash/city.h other-licenses/nsis/Contrib/CityHash/cityhash/city.h
+copyto toolkit/mozapps/update/common/commonupdatedir.h toolkit/mozapps/update/common/commonupdatedir.h
+copyto toolkit/mozapps/update/common/updatecommon.cpp toolkit/mozapps/update/common/updatecommon.cpp
+copyto toolkit/mozapps/update/common/updatecommon.h toolkit/mozapps/update/common/updatecommon.h
+copyto toolkit/mozapps/update/common/updateutils_win.cpp toolkit/mozapps/update/common/updateutils_win.cpp
+copyto toolkit/mozapps/update/common/updateutils_win.h toolkit/mozapps/update/common/updateutils_win.h
+copyto toolkit/mozapps/update/updater/crctable.h toolkit/mozapps/update/updater/crctable.h
+copyto toolkit/xre/nsWindowsRestart.cpp toolkit/xre/nsWindowsRestart.cpp
+copyto xpcom/base/nsAlgorithm.h xpcom/base/nsAlgorithm.h
+copyto xpcom/base/nsAutoRef.h xpcom/base/nsAutoRef.h
+copyto xpcom/base/nsWindowsHelpers.h xpcom/base/nsWindowsHelpers.h
+copyto xpcom/string/nsCharTraits.h xpcom/string/nsCharTraits.h
+copyto xpcom/string/nsUTF8Utils.h xpcom/string/nsUTF8Utils.h
+
+LC_ALL=C tar -c --format=gnu --sort=name --owner=0 --group=0 --mode=go=rX,u=rwX \
+ --mtime '2023-12-11 00:00:00+0' --xz -f onlineupdate-"${tag?}".tar.xz -C "${tmpdir?}" .
+rm -r "${tmpdir?}"
diff --git a/external/onlineupdate/gtk3deprecated.patch b/external/onlineupdate/gtk3deprecated.patch
new file mode 100644
index 000000000000..fb73634d50b0
--- /dev/null
+++ b/external/onlineupdate/gtk3deprecated.patch
@@ -0,0 +1,11 @@
+--- onlineupdate/source/update/updater/progressui_gtk.cpp
++++ onlineupdate/source/update/updater/progressui_gtk.cpp
+@@ -94,7 +94,7 @@
+ gtk_window_set_icon(GTK_WINDOW(sWin), sPixbuf);
+ g_object_unref(sPixbuf);
+
+- GtkWidget* vbox = gtk_vbox_new(TRUE, 6);
++ GtkWidget* vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 6);
+ sLabel = gtk_label_new(sStrings.info.get());
+ gtk_misc_set_alignment(GTK_MISC(sLabel), 0.0f, 0.0f);
+ sProgressBar = gtk_progress_bar_new();
diff --git a/external/onlineupdate/lo.patch b/external/onlineupdate/lo.patch
new file mode 100644
index 000000000000..bad31b0aacfc
--- /dev/null
+++ b/external/onlineupdate/lo.patch
@@ -0,0 +1,21 @@
+--- onlineupdate/source/update/updater/progressui_gtk.cpp
++++ onlineupdate/source/update/updater/progressui_gtk.cpp
+@@ -5,6 +5,7 @@
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+ #include <gtk/gtk.h>
++#include <string.h>
+ #include <unistd.h>
+ #include "mozilla/Sprintf.h"
+ #include "mozilla/Atomics.h"
+@@ -52,8 +53,8 @@
+ char ini_path[PATH_MAX];
+ SprintfLiteral(ini_path, "%s.ini", (*pargv)[0]);
+ if (ReadStrings(ini_path, &sStrings) != OK) {
+- sEnableUI = false;
+- return -1;
++ sStrings.title.reset(strdup("LibreOffice Update"));
++ sStrings.info.reset(strdup("Please wait while we update your installation."));
+ }
+
+ char icon_path[PATH_MAX];
diff --git a/external/onlineupdate/qa/lang_packs/Makefile b/external/onlineupdate/qa/lang_packs/Makefile
new file mode 100644
index 000000000000..d328472f53bf
--- /dev/null
+++ b/external/onlineupdate/qa/lang_packs/Makefile
@@ -0,0 +1,21 @@
+gb_Side := host
+include ../../../config_host.mk
+
+UPDATER_DIR := $(WORKDIR)/updater/lang_pack
+
+all : call
+
+unpack:
+ @echo "Unpacking the updater test project"
+ @rm -r $(UPDATER_DIR) || true
+ @mkdir -p $(WORKDIR)/updater/
+ @unzip updater_lang.zip -d $(WORKDIR)/updater > /dev/null
+ @cp update_signed.mar $(UPDATER_DIR)/user/patch/update.mar
+ @cp update_en_signed.mar $(UPDATER_DIR)/user/patch/update_en_signed.mar
+
+call: unpack
+ @echo "Update the test project"
+ @$(INSTDIR)/program/updater $(UPDATER_DIR)/user/patch $(UPDATER_DIR) $(UPDATER_DIR)/user/update -1
+
+call-gdb: unpack
+ gdb --args $(INSTDIR)/program/updater $(UPDATER_DIR)/user/patch $(UPDATER_DIR) $(UPDATER_DIR)/user/update -1
diff --git a/external/onlineupdate/qa/lang_packs/update_en_signed.mar b/external/onlineupdate/qa/lang_packs/update_en_signed.mar
new file mode 100644
index 000000000000..b72d1c5df637
--- /dev/null
+++ b/external/onlineupdate/qa/lang_packs/update_en_signed.mar
Binary files differ
diff --git a/external/onlineupdate/qa/lang_packs/update_signed.mar b/external/onlineupdate/qa/lang_packs/update_signed.mar
new file mode 100644
index 000000000000..a145d6325c65
--- /dev/null
+++ b/external/onlineupdate/qa/lang_packs/update_signed.mar
Binary files differ
diff --git a/external/onlineupdate/qa/lang_packs/updater_lang.zip b/external/onlineupdate/qa/lang_packs/updater_lang.zip
new file mode 100644
index 000000000000..05b206bc8905
--- /dev/null
+++ b/external/onlineupdate/qa/lang_packs/updater_lang.zip
Binary files differ
diff --git a/external/onlineupdate/qa/replace_request/Makefile b/external/onlineupdate/qa/replace_request/Makefile
new file mode 100644
index 000000000000..476e93213cca
--- /dev/null
+++ b/external/onlineupdate/qa/replace_request/Makefile
@@ -0,0 +1,17 @@
+gb_Side := host
+include ../../../config_host.mk
+
+UPDATER_DIR := $(WORKDIR)/updater/replace_request
+
+unpack:
+ @echo "Unpacking the updater test project"
+ @rm -r $(UPDATER_DIR) || true
+ @mkdir -p $(WORKDIR)/updater
+ @unzip updater.zip -d $(WORKDIR)/updater > /dev/null
+
+call: unpack
+ @echo "Update the test project"
+ @$(INSTDIR)/program/updater $(UPDATER_DIR)/user/patch $(UPDATER_DIR) $(UPDATER_DIR)/user/update /replace
+
+call-gdb: unpack
+ gdb --args $(INSTDIR)/program/updater $(UPDATER_DIR)/user/patch $(UPDATER_DIR) $(UPDATER_DIR)/user/update /replace
diff --git a/external/onlineupdate/qa/replace_request/README b/external/onlineupdate/qa/replace_request/README
new file mode 100644
index 000000000000..f50c692fd692
--- /dev/null
+++ b/external/onlineupdate/qa/replace_request/README
@@ -0,0 +1,3 @@
+Tests the replacement request done by the automatic updater
+
+After calling 'make call' the content in workdir/updater/program/datei.txt should say "new".
diff --git a/external/onlineupdate/qa/replace_request/updater.zip b/external/onlineupdate/qa/replace_request/updater.zip
new file mode 100644
index 000000000000..dc5e26b0f258
--- /dev/null
+++ b/external/onlineupdate/qa/replace_request/updater.zip
Binary files differ
diff --git a/external/onlineupdate/qa/single_step/Makefile b/external/onlineupdate/qa/single_step/Makefile
new file mode 100644
index 000000000000..f303992baa0f
--- /dev/null
+++ b/external/onlineupdate/qa/single_step/Makefile
@@ -0,0 +1,27 @@
+gb_Side := host
+include ../../../config_host.mk
+
+UPDATER_DIR := $(WORKDIR)/updater/single_step
+
+all : call
+
+unpack:
+ @echo "Unpacking the updater test project"
+ @rm -r $(UPDATER_DIR) || true
+ @mkdir -p $(UPDATER_DIR)
+ @unzip single_step.zip -d $(WORKDIR)/updater > /dev/null
+ @mkdir -p $(UPDATER_DIR)/patch
+
+call-complete: unpack
+ @echo "Update the test project"
+ @cp complete_signed.mar $(UPDATER_DIR)/patch/update.mar
+ @$(INSTDIR)/program/updater $(UPDATER_DIR)/patch $(UPDATER_DIR) $(UPDATER_DIR) 0
+
+call-incremental: unpack
+ @echo "Update the test project"
+ @cp incremental_signed.mar $(UPDATER_DIR)/patch/update.mar
+ @$(INSTDIR)/program/updater $(UPDATER_DIR)/patch $(UPDATER_DIR) $(UPDATER_DIR) 0
+
+call-gdb: unpack
+ @cp incremental_signed.mar $(UPDATER_DIR)/patch/update.mar
+ gdb --args $(INSTDIR)/program/updater $(UPDATER_DIR)/patch $(UPDATER_DIR) $(UPDATER_DIR) 0
diff --git a/external/onlineupdate/qa/single_step/complete_signed.mar b/external/onlineupdate/qa/single_step/complete_signed.mar
new file mode 100644
index 000000000000..7b0631dd338a
--- /dev/null
+++ b/external/onlineupdate/qa/single_step/complete_signed.mar
Binary files differ
diff --git a/external/onlineupdate/qa/single_step/incremental_signed.mar b/external/onlineupdate/qa/single_step/incremental_signed.mar
new file mode 100644
index 000000000000..6ec6e7a1a919
--- /dev/null
+++ b/external/onlineupdate/qa/single_step/incremental_signed.mar
Binary files differ
diff --git a/external/onlineupdate/qa/single_step/single_step.zip b/external/onlineupdate/qa/single_step/single_step.zip
new file mode 100644
index 000000000000..823a590e08b4
--- /dev/null
+++ b/external/onlineupdate/qa/single_step/single_step.zip
Binary files differ
diff --git a/external/onlineupdate/workben/test_dialog.cxx b/external/onlineupdate/workben/test_dialog.cxx
new file mode 100644
index 000000000000..4c956410d8c0
--- /dev/null
+++ b/external/onlineupdate/workben/test_dialog.cxx
@@ -0,0 +1,39 @@
+#include "progressui.h"
+
+#if defined(_WIN32)
+#include "progressui_win.cpp"
+#else
+#include "progressui_gtk.cpp"
+#endif
+
+#include <thread>
+#include <chrono>
+#include <iostream>
+
+void func()
+{
+ for (int i = 0; i <= 100; ++i)
+ {
+ std::this_thread::sleep_for(std::chrono::milliseconds(200));
+ UpdateProgressUI(i);
+ }
+ QuitProgressUI();
+}
+
+int NS_main(int argc, NS_tchar** argv)
+{
+ InitProgressUI(&argc, &argv);
+ std::thread a(func);
+ /*
+ volatile bool b = false;
+ do
+ {
+ std::this_thread::sleep_for(std::chrono::seconds(1));
+ }
+ while (!b);
+ */
+ int result = ShowProgressUI();
+ std::cout << result << std::endl;
+ a.join();
+ return 0;
+}