Install UCRT from MSUs, not using nested VC Redist install

Desktop / LibreOffice - Mike Kaganski [collabora.com] - 25 April 2018 04:57 EDT

Using nested install is bad because (1) MS advises against it (though it most possibly doesn't relate to our specific case, when we install the
vc redist exe package in UI part, so actually only a single MSI session is active at any time); (2) because it adds some extra interactions (user sees something "unrelated" being installed, which raises concerns; additional admin authentication required); and (3) because it runs in InstallUISequence, thus only installing the UCRT when doing interactive installation (unattended installs, including GPO, need to install UCRT separately).

This patch aims to incorporate the original UCRT MSU (Windows Update) packages (https://support.microsoft.com/en-us/help/2999226) available as a zip archive from https://www.microsoft.com/en-us/download/details.aspx?id=48234- the same as used in VC redists for VS 2015 and 2017. This obsoletes the separate installation of the redist; since we also have the redist as merge module in our MSI, that is enough (and removes redundancy). The MSUs are installed using wusa.exe in a custom action (deferred, non-impersonating).

As a small bonus, embedding MSUs instead of redist EXE allows us to shrink the size of installer a little (~10 MB).

As deferred custom actions cannot access current installer database, we workaround this by using initial immediate impersonating action to extract the binaries into a temporary location. To ensure that the file gets removed upon completion (both successful and failed), we use an additional cleanup action.

Commit 61b1d631331551b43bc7d619be33bfbfeff7cad6 is effectively reverted.

Change-Id: I1529356fdcc67ff24b232c01ddf8bb3a31bb00bd Reviewed-on: https://gerrit.libreoffice.org/52923

b84244378d41 Install UCRT from MSUs, not using nested VC Redist install
Repository.mk | 1 +
RepositoryExternal.mk | 4 +-
config_host.mk.in | 3 +-
configure.ac | 44 +-
external/msc-externals/Module_msc-externals.mk | 6 +-
.../{Package_vcredist_exe.mk => Package_ucrt.mk} | 11 +-
.../windows/msi_templates/Property.idt | 2 +-
postprocess/signing/no_signing.txt | 8 +-
scp2/InstallModule_windows.mk | 9 +-
scp2/source/ooo/ucrt.scp | 154 ++++++
scp2/source/ooo/vc_redist.scp | 23 -
setup_native/Library_inst_msu_msi.mk | 40 ++
setup_native/Module_setup_native.mk | 1 +
.../win32/customactions/inst_msu/inst_msu.cxx | 515 +++++++++++++++++++++
.../win32/customactions/inst_msu/inst_msu_msi.def | 5 +
solenv/bin/modules/installer/windows/idtglobal.pm | 11 +-
solenv/bin/modules/installer/windows/upgrade.pm | 12 -
17 files changed, 768 insertions(+), 81 deletions(-)

Upstream: cgit.freedesktop.org


  • Share