diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-04-12 15:18:58 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-04-12 22:51:40 +0200 |
commit | 1f8a3657216e44796cb94087450552aa977ebdae (patch) | |
tree | e49575bc45ddf7c9f7a449b34174b1fe7c52895d /instsetoo_native | |
parent | 915533369ed5eec66b641fb961616cc76151ad8d (diff) |
tdf#108580 related: improve existing redist detection
This uses VC Runtime upgrade code (checked using Upgrade table) to
find installed redist, instead of checking registry keys that change
between versions (while the runtime is still compatible, as with 2015
and 2017).
Also, it checks if UCRT is present. Now, if either VC Runtime or UCRT
is absent, we try to install the redist. This would allow to install
UCRT in scenarios when first install was attempted on a system not
suitable for UCRT (like Win7 w/o SP1, or Win8.1 w/o April 2014 update
rollup), where VC Runtime gets installed, but UCRT is still missing.
We use the ucrtbase.dll version to check that; and as the expected
version is 10.x, we take into account that Win10 lies about versions.
Change-Id: I864dfc09cf1bdc775501729fa2a27dc98295588c
Reviewed-on: https://gerrit.libreoffice.org/52794
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'instsetoo_native')
5 files changed, 14 insertions, 5 deletions
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt index 60793dd69ded..23c2a77c9f5d 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt @@ -5,6 +5,6 @@ INSTALLLOCATION installuser INSTALLLOCATION installuser_ INSTALLLOCATION installmachine INSTALLLOCATION installmachine_ -VCREDISTINSTALLED_X86 VCREDISTINSTALLED_X86 -VCREDISTINSTALLED_X64 VCREDISTINSTALLED_X64 WIN81S14 win81s14 +UCRT_DETECTED ucrt_detected +UCRT_DETECTED ucrt_on_win10 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt index 589ab7c52806..399011e166ca 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt @@ -2,3 +2,5 @@ Signature_ Parent Path Depth s72 S72 S255 I2 DrLocator Signature_ Parent Path win81s14 [SystemFolder] +ucrt_detected [SystemFolder] +ucrt_on_win10 [SystemFolder] diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt index f8eeaf25c105..2b633b8eb37a 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Property.idt @@ -44,7 +44,7 @@ ProgressType3 installs Quickstarterlinkname QUICKSTARTERLINKNAMETEMPLATE RebootYesNo Yes ReinstallModeText omus -SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS +SecureCustomProperties NEWPRODUCTS;OLDPRODUCTS;VCRUNTIME_DETECTED SetupType Typical SELECT_WORD 0 SELECT_EXCEL 0 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt index 7e59ef3c6663..c082322086ad 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt @@ -5,5 +5,3 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installmachine 2 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 installmachine_ 2 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 -VCREDISTINSTALLED_X86 2 Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x86 Version 2 -VCREDISTINSTALLED_X64 2 Software\Microsoft\VisualStudio\14.0\VC\Runtimes\x64 Version 2 diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt index d5abd9769125..53615298dc6d 100644 --- a/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt +++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt @@ -5,3 +5,12 @@ 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 |