summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-04-12 15:18:58 +0300
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-08-30 23:32:16 +0200
commit60c90fa40caa83948cdab72595935e565693b005 (patch)
tree1ef7defe5c898193e8f01bb963a865c98cd1b71e
parenta5cd307a84d4d390462c7ee53d436efc2459c92d (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. Reviewed-on: https://gerrit.libreoffice.org/52794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit 1f8a3657216e44796cb94087450552aa977ebdae) Conflicts: instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt Change-Id: I864dfc09cf1bdc775501729fa2a27dc98295588c
-rw-r--r--solenv/bin/modules/installer/windows/upgrade.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/solenv/bin/modules/installer/windows/upgrade.pm b/solenv/bin/modules/installer/windows/upgrade.pm
index 54838212404c..9e0d7ea79fb7 100644
--- a/solenv/bin/modules/installer/windows/upgrade.pm
+++ b/solenv/bin/modules/installer/windows/upgrade.pm
@@ -45,6 +45,18 @@ sub create_upgrade_table
$newline = $installer::globals::upgradecode . "\t" . $installer::globals::msiproductversion . "\t" . "\t" . "\t" . "2" . "\t" . "\t" . "NEWPRODUCTS" . "\n";
push(@upgradetable, $newline);
+ # Detecting if VC Runtime is installed on system
+ $newline = "VCRUNTIME_UPGRADE_CODE" . "\t" . "14.0.24215" . "\t" . "15.0.0" . "\t" . "" . "\t" . "258" . "\t" . "" . "\t" . "VCRUNTIME_DETECTED";
+ if ( $installer::globals::cpuname eq 'X86_64' )
+ {
+ $newline =~ s/VCRUNTIME_UPGRADE_CODE/{36F68A90-239C-34DF-B58C-64B30153CE35}/;
+ }
+ else
+ {
+ $newline =~ s/VCRUNTIME_UPGRADE_CODE/{65E5BD06-6392-3027-8C26-853107D3CF1A}/;
+ }
+ push(@upgradetable, $newline);
+
# Saving the file
my $upgradetablename = $basedir . $installer::globals::separator . "Upgrade.idt";