Kaydet (Commit) 18828273 authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#115405, tdf#119910: don't check if UCRT is already installed

There appears to be common situation that a system has *some* UCRT libraries
in System32, that were installed improperly (presumably by some applications
using simple copy).In these cases, our installer would detect the presence of
ucrtbase.dll, and not try to install UCRT on the system.

Unfortunately, it seems that oftentimes such improper UCRT installations miss
some parts of UCRT, which leads to LibreOffice failing to start with messages
like "The program can't start because api-ms-win-crt-string-l1-1-0.dll is
missing from your computer. Try reinstalling the program to fix this problem."
(the missing component varies).

This patch removes the check for UCRT presence. Installer will try to install
UCRT on applicable systems unconditionally. Since the proper outcomes in case
of already present UCRT are either WU_S_ALREADY_INSTALLED or WU_E_NOT_APPLICABLE
and both are treated as success in inst_msu action (see InstallMSU in
setup_native/source/win32/customactions/inst_msu/inst_msu.cxx), this should
only make this part more robust, and not bring new problems (yes, I know that
actually there will be new problems, as usual).

Change-Id: I22a3d357014d31a8e492ff8a15bcb477eeb79735
Reviewed-on: https://gerrit.libreoffice.org/60789
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst c138a262
......@@ -6,5 +6,3 @@ INSTALLLOCATION installuser_
INSTALLLOCATION installmachine
INSTALLLOCATION installmachine_
WIN81S14 win81s14
UCRT_DETECTED ucrt_detected
UCRT_DETECTED ucrt_on_win10
......@@ -2,5 +2,3 @@ Signature_ Parent Path Depth
s72 S72 S255 I2
DrLocator Signature_ Parent Path
win81s14 [SystemFolder]
ucrt_detected [SystemFolder]
ucrt_on_win10 [SystemFolder]
......@@ -43,7 +43,7 @@ ProgressType3 installs
Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE
RebootYesNo Yes
ReinstallModeText omus
SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14;UCRT_DETECTED
SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;WIN81S14
SetupType Typical
SELECT_WORD 0
SELECT_EXCEL 0
......
......@@ -5,12 +5,3 @@ Signature Signature
# language, and we need language-independent comparison, we use a value that is at
# least 1 less (see note at https://msdn.microsoft.com/en-us/library/aa371853).
win81s14 kernel32.dll 6.3.9600.17030
ucrt_detected ucrtbase.dll 10.0.10240.0
# The great feature of all recent Windows is that they make it incredibly hard to find their
# actual versions. Win 10 makes the next step in that direction: not only it tells you that
# its version is 6.3 (VersionNT is 603), but also it disallows you to get real version of a
# file during installation, if the version is greater than 6.3. So, for ucrt DLLs versioned
# by MS as 10.0.x.y, it returns 6.3.x.y, pretending to have a lower version than on Win8.1.
# Here we check for this, knowing that we get a version below 7.0 for UCRT that never had a
# version below 10.0, then it's Win10+ that is lying to us.
ucrt_on_win10 ucrtbase.dll 7.0.0.0
......@@ -91,7 +91,7 @@ WindowsCustomAction gid_Customaction_check_win7x64_ucrt
Source = "InstMSUBinary";
Target = "Windows61-KB2999226-x64msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 601 And VersionNT64 And Not UCRT_DETECTED", "FileCost");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 601 And VersionNT64", "FileCost");
Styles = "NO_FILE";
End
......@@ -101,7 +101,7 @@ WindowsCustomAction gid_Customaction_check_win8x64_ucrt
Source = "InstMSUBinary";
Target = "Windows8-RT-KB2999226-x64msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 602 And VersionNT64 And Not UCRT_DETECTED", "check_win7x64_ucrt");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 602 And VersionNT64", "check_win7x64_ucrt");
Styles = "NO_FILE";
End
......@@ -111,7 +111,7 @@ WindowsCustomAction gid_Customaction_check_win81x64_ucrt
Source = "InstMSUBinary";
Target = "Windows81-KB2999226-x64msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And VersionNT64 And Not UCRT_DETECTED", "check_win8x64_ucrt");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And VersionNT64", "check_win8x64_ucrt");
Styles = "NO_FILE";
End
......@@ -127,7 +127,7 @@ WindowsCustomAction gid_Customaction_check_win7x32_ucrt
Source = "InstMSUBinary";
Target = "Windows61-KB2999226-x86msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 601 And Not VersionNT64 And Not UCRT_DETECTED", "check_win81x64_ucrt");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 601 And Not VersionNT64", "check_win81x64_ucrt");
Styles = "NO_FILE";
End
......@@ -137,7 +137,7 @@ WindowsCustomAction gid_Customaction_check_win8x32_ucrt
Source = "InstMSUBinary";
Target = "Windows8-RT-KB2999226-x86msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 602 And Not VersionNT64 And Not UCRT_DETECTED", "check_win7x32_ucrt");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 602 And Not VersionNT64", "check_win7x32_ucrt");
Styles = "NO_FILE";
End
......@@ -147,7 +147,7 @@ WindowsCustomAction gid_Customaction_check_win81x32_ucrt
Source = "InstMSUBinary";
Target = "Windows81-KB2999226-x86msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And Not VersionNT64 And Not UCRT_DETECTED", "check_win8x32_ucrt");
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And Not VersionNT64", "check_win8x32_ucrt");
Styles = "NO_FILE";
End
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment