https://bugs.documentfoundation.org/show_bug.cgi?id=108580
--- Comment #60 from Mike Kaganski <[email protected]> ---
A bit too long explanation of the problem's timeline to this already a bit too
long thread; writing this here to be able to refer to when clarifications
needed in the future.
After LibreOffice 5.3 was branched off, in the early 2017, the development
branch toward 5.4 had switched to Visual Studio 2015 as baseline compiler for
Windows [1]. This was needed to switch to the next CRT and C++ standard support
(which in turn allows to write more efficient and less error-prone code, and
thus, improve development for a huge codebase that LibreOffice is), and the
switches to the new C Runtime library have happened before each time we
upgraded compiler requirements; previously, these switches did not give much
headaches, because we have always bundled the C Runtime redistributable in form
of merge modules provided by Visual Studio itself [2].
This time, however, it turned out that we had overlooked that Microsoft had
changed the redistributable and its installation since 2015 version. Now the
redistributable consists of two independent parts (VCRT and UCRT), and the
latter is the system component (included in the base installation of Windows
10, but required to be installed separately to Windows XP to 8.1). And what's
important, MS own redist merge module used in LO installer *does* include the
UCRT bits as well as VCRT, but it only installs the former to Windows XP, while
for Windows Vista+, it does not do that (for purpose - see comment by James
McNellis from 2016-03-11 at [3]).
So, having missed that at the 5.4 testing phase somehow (possibly because those
who tested on Win 7-8.1 all had VCRedist 2015 installed separately), users
started to complain about this bug when installing onto Windows 7 through 8.1
*without* VCRedist 2015. Those using Windows XP or Windows 10 were unaffected.
To solve the problem, we had implemented the App-local deployment of the
Universal CRT (see #6 at the bottom of the article [3]) since version 5.4.3 [4]
- see comment 21 and the two below for commit notifications. This meant that we
put the required UCRT libraries into the LibreOffice installation directory,
and thus not rely upon system UCRT. As mentioned, while this works, this is not
a recommended option, and may create security concerns. So, at the time of
those commits, Christian already mentioned that it's a workaround, not the
proper solution.
So, we kept working to find a way to use the correct MS-advised UCRT install
method in LibreOffice installer, and for 6.0, we included [5] the installer
from Microsoft [6] (see comment 7) into the MSI so that it was launched at the
end of installation process, asked to authorise second time, and then did
whatever it was needed to install both VCRT and UCRT. So, we were pretty sure
that now everything should work as it should, because the MS installer would of
course do it properly.
And of course, it didn't. It turned out that it worked only partially on those
systems that didn't match the minimal requirements for the UCRT [7] - those are
April 2014 rollup for Windows 8.1, Service Pack 1 for Windows 7, and Service
Pack 2 for Windows Vista (the latter being irrelevant for LO 6.0+). The MS
installer only installed VCRT component, and reported success, while UCRT
remained missing on the system. And at the 6.0, we started to receive the new
wave of the same error reports from users attempted to install LibreOffice on
those systems not matching the UCRT (and LO [8]) minimal requirements.
So the next part of the solution was to fix out installer to properly detect
those OS versions, and prevent LO from installing there (because, naturally,
the vital UCRT system component would be missing there, and LO wouldn't run
anyway), issuing proper message. That was done in the commits notified by
comment 38, comment 44, comment 46 and below. Since then, the only remaining
issue (which cannot be solved on the LibreOffice installer side) is when user's
system is broken in a way, so that it either cannot install UCRT (being
eligible for it), or reports that it's already installed, but actually it's
not. The broken OS (which might be caused by e.g. third-party software playing
dirty tricks with ucrt - see bug 115405 for example) is outside of the scope of
this bug.
And last (at the time of writing this) is the commits that have changed the
UCRT installation procedure for 6.1 [9]: we now don't bundle the EXE from
comment 7, but instead, UCRT packages from [10], which are installed (using
proper MS tooling [11] for Windows Updates) in the course of main installation
process, instead of launching separate second installation after LO
installation has finished. This allows us to avoid the second authorization
step, making installation experience more smooth; and also allows to install
UCRT in unattended scenarios (which were unsupported in 6.0, and required
separate UCRT installation by those who use unattended LO installations, like
corporate deployments). As with 6.0, this still checks the pre-requisite OS
level, and refuses to install when it doesn't fit the minimal requirements; and
of course, this won't work in cases of broken OSes.
That's all the story thus far; the unfortunate decision of Microsoft to split
the redistributable had brought a lot of trouble, of course; but hopefully, we
now do it The Right Way (TM).
[1]
https://cgit.freedesktop.org/libreoffice/core/commit/?id=84b36c704d73362d4d86dc9e9c0efa0625958347
[2] https://msdn.microsoft.com/en-us/library/ms235290
[3]
https://blogs.msdn.microsoft.com/vcblog/2015/03/03/introducing-the-universal-crt/
[4]
http://cgit.freedesktop.org/libreoffice/core/commit/?id=71d9a61302e65fe091cf70c13fa72b3df09b7e3a
[5]
http://cgit.freedesktop.org/libreoffice/core/commit/?id=61b1d631331551b43bc7d619be33bfbfeff7cad6
[6] https://www.microsoft.com/en-us/download/details.aspx?id=53840
[7] https://support.microsoft.com/en-us/help/2999226
[8] https://www.libreoffice.org/get-help/system-requirements/#windows
[9]
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b84244378d411b83355b8763d3505031dd5ec324
[10] https://www.microsoft.com/en-us/download/details.aspx?id=48234
[11] https://support.microsoft.com/en-us/help/934307
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs