summaryrefslogtreecommitdiff
path: root/instsetoo_native
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-04-15 23:24:42 +0300
committerAndras Timar <andras.timar@collabora.com>2018-04-26 11:44:47 +0200
commit47ed8614dc44eb0df3a805d4e2894dfed49aba5b (patch)
treed91a2a7ce39f12e65d6de96cd080f3095430655f /instsetoo_native
parentcd683ace64e8024fb59d97c439f408b3550e3fce (diff)
Install UCRT from MSUs, not using nested VC Redist install
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. This commit also includes changes from commits from master: 8faa1bc61fa8f09365d483364aea2b1c2751b587 1f8a3657216e44796cb94087450552aa977ebdae 378c1576d2890625ebbd18ec9ccff560eeb1619f Change-Id: I1529356fdcc67ff24b232c01ddf8bb3a31bb00bd Reviewed-on: https://gerrit.libreoffice.org/53332 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'instsetoo_native')
-rw-r--r--instsetoo_native/inc_ooohelppack/windows/msi_templates/Control.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf3
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf4
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt5
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt6
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/InstallU.idt1
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/RegLocat.idt2
-rw-r--r--instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt13
-rw-r--r--instsetoo_native/inc_sdkoo/windows/msi_templates/Control.idt2
13 files changed, 31 insertions, 13 deletions
diff --git a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Control.idt b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Control.idt
index 55f1fcfe6b20..24c02f85f7b8 100644
--- a/instsetoo_native/inc_ooohelppack/windows/msi_templates/Control.idt
+++ b/instsetoo_native/inc_ooohelppack/windows/msi_templates/Control.idt
@@ -249,7 +249,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207
SetupError N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210
-SetupError WarningIcon Icon 15 15 24 24 5242881 CautionIco
+SetupError ErrorIcon Icon 15 15 24 24 5242881 CautionIco
SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539
diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
index 742cb8cbfb84..1038d6ca5679 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
+++ b/instsetoo_native/inc_openoffice/windows/msi_languages/CustomAc.ulf
@@ -21,6 +21,3 @@ en-US = "A newer version of [ProductName] was found. To install an older versio
[OOO_CUSTOMACTION_2]
en-US = "The same version of this product is already installed."
-
-[OOO_CUSTOMACTION_5]
-en-US = "[ProductName] cannot be installed on this Windows version. [WindowsMinVersionText] or newer is required."
diff --git a/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf b/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf
index e3f6f7fa8f53..5e57eb1c3c0e 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf
+++ b/instsetoo_native/inc_openoffice/windows/msi_languages/LaunchCo.ulf
@@ -1,2 +1,6 @@
[OOO_LAUNCH_1]
en-US = "The Installation Wizard cannot be run properly because you are logged in as a user without sufficient administrator rights for this system."
+[OOO_LAUNCH_2]
+en-US = "[ProductName] cannot be installed on this Windows version. [WindowsMinVersionText] or newer is required."
+[OOO_LAUNCH_3]
+en-US = "To install [ProductName] on Windows 8.1, at least April 2014 update rollup (MS KB 2919355) must be installed."
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
index 095cf907bf46..23c2a77c9f5d 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/AppSearc.idt
@@ -5,5 +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/Control.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
index f90d76f5717b..9871b7d3b8cd 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Control.idt
@@ -253,7 +253,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207
SetupError N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210
-SetupError WarningIcon Icon 15 15 24 24 5242881 CautionIco
+SetupError ErrorIcon Icon 15 15 24 24 5242881 CautionIco
SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
index 8aa06a155b46..d010a0bd2279 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/CustomAc.idt
@@ -7,7 +7,6 @@ setUserProfile 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2
-WrongWindowsVersion 19 OOO_CUSTOMACTION_5
SetLanguageSelected 51 LANG_SELECTED 1
ResetLanguageSelected 51 LANG_SELECTED 0
SetApplicationSelected 51 APP_SELECTED 1
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt
new file mode 100644
index 000000000000..399011e166ca
--- /dev/null
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/DrLocato.idt
@@ -0,0 +1,6 @@
+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/InstallE.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
index 722bb463629d..336d322052e7 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallE.idt
@@ -69,4 +69,3 @@ ValidateProductID 300
WriteEnvironmentStrings 2500
WriteIniValues 2450
WriteRegistryValues 2400
-WrongWindowsVersion (VersionNT < WindowsMinVersionNumber) OR ((VersionNT = WindowsMinVersionNumber) AND (ServicePackLevel < WindowsMinSPNumber)) 10
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallU.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallU.idt
index 3bb2a5191d20..642eac064bee 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/InstallU.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/InstallU.idt
@@ -28,4 +28,3 @@ SetupProgress 800
SetupResume Installed And (RESUME Or Preselected) And Not PATCH 700
setUserProfile 510
ValidateProductID 350
-WrongWindowsVersion (VersionNT < WindowsMinVersionNumber) OR ((VersionNT = WindowsMinVersionNumber) AND (ServicePackLevel < WindowsMinSPNumber)) 10
diff --git a/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt b/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt
index e4d3f330b006..629c3c5582e1 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/LaunchCo.idt
@@ -2,3 +2,5 @@ Condition Description
s255 l255
65001 LaunchCondition Condition
Privileged OOO_LAUNCH_1
+Installed Or VersionNT > WindowsMinVersionNumber Or (VersionNT = WindowsMinVersionNumber And ServicePackLevel >= WindowsMinSPNumber) OOO_LAUNCH_2
+Installed Or VersionNT <> 603 Or WIN81S14 OOO_LAUNCH_3
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 5004a55863ba..53615298dc6d 100644
--- a/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt
+++ b/instsetoo_native/inc_openoffice/windows/msi_templates/Signatur.idt
@@ -1,3 +1,16 @@
Signature FileName MinVersion MaxVersion MinSize MaxSize MinDate MaxDate Languages
s72 s255 S20 S20 I4 I4 I4 I4 S255
Signature Signature
+# Since it's impossible to match minimal version in Signature table independent of
+# 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
diff --git a/instsetoo_native/inc_sdkoo/windows/msi_templates/Control.idt b/instsetoo_native/inc_sdkoo/windows/msi_templates/Control.idt
index 9bc37a8ed840..d9ac9d1a550a 100644
--- a/instsetoo_native/inc_sdkoo/windows/msi_templates/Control.idt
+++ b/instsetoo_native/inc_sdkoo/windows/msi_templates/Control.idt
@@ -236,7 +236,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207
SetupError N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210
-SetupError WarningIcon Icon 15 15 24 24 5242881 CautionIco
+SetupError ErrorIcon Icon 15 15 24 24 5242881 CautionIco
SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539