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>
2023-12-08 09:39:43 -06:00
|
|
|
# -*- 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,\
|
2024-05-05 12:20:33 -05:00
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/onlineupdate/inc \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/onlineupdate/source/libmar/src/ \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/onlineupdate/source/libmar/verify/ \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/onlineupdate/source/libmar/sign/ \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/onlineupdate/source/update/common/ \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/include/onlineupdate \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/include \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/toolkit/mozapps/update/common \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/toolkit/xre \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/xpcom/base \
|
|
|
|
-I$(gb_UnpackedTarball_workdir)/onlineupdate/xpcom/string \
|
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>
2023-12-08 09:39:43 -06:00
|
|
|
$$(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))
|
|
|
|
|
Improve --enable-online-update-mar Windows MOZ_MAINTENANCE_SERVICE feature
To get the MOZ_MAINTENANCE_SERVICE mode going at all, update.status needs to
contain a "pending-service" token. For Mozilla, code in its
toolkit/mozapps/update/UpdateService.sys.mjs takes care of writing that. For
us, lets always write that in update_checker() (even on Linux, where it's
apparently harmless).
Then, the MOZ_MAINTENANCE_SERVICE code is rather picky with its various sanity
checks: Among other things, it expects argv[0] to be a full path to the updater
executable, and it expects the update.mar (and its status and log files) to be
in a directory hierarchy named updates/0/ rather than patch/. So get all that
fixed in desktop/source/app/updater.cxx. And patch in
external/onlineupdate/lo.patch where it expects to find the updater executable
(just updater.exe vs. our program/updater.exe).
And we shouldn't interfere with the upstream Mozilla maintenance service, so
also rename that in external/onlineupdate/lo.patch.
And `update_service install` wants to read version resources from the
update_service.exe, so provide that (via gb_Executable_add_default_nativeres).
Also, `update_service install` wants to read a MozillaMaintenanceDescription
value from an updater.ini, so provide one (with contents of that value inspired
by Mozilla's browser/locales/en-US/updater/updater.ini).
As we now have an updater.ini anyway (and which apparently works fine with Unix
line ends on both Linux and Windows), also use it on Linux and drop the
onlineupdate/source/update/updater/progressui_gtk.cpp again from
external/onlineupdate/lo.patch. And update external/onlineupdate/README.md how
to manually execute that test against an updater.ini.
Change-Id: I0e3e5e5311be61e1224cda700af2e5d751113a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160996
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-19 09:50:42 -06:00
|
|
|
$(eval $(call gb_Executable_add_default_nativeres,update_service))
|
|
|
|
|
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>
2023-12-08 09:39:43 -06:00
|
|
|
# vim:set shiftwidth=4 tabstop=4 noexpandtab: */
|