Kaydet (Commit) 47ed8614 authored tarafından Mike Kaganski's avatar Mike Kaganski Kaydeden (comit) Andras Timar

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 61b1d631 is effectively reverted.

This commit also includes changes from commits from master:
8faa1bc6
1f8a3657
378c1576

Change-Id: I1529356fdcc67ff24b232c01ddf8bb3a31bb00bd
Reviewed-on: https://gerrit.libreoffice.org/53332Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
Tested-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst cd683ace
...@@ -660,6 +660,7 @@ endif ...@@ -660,6 +660,7 @@ endif
$(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooobinarytable, \ $(eval $(call gb_Helper_register_libraries_for_install,PLAINLIBS_OOO,ooobinarytable, \
$(if $(WINDOWS_SDK_HOME),\ $(if $(WINDOWS_SDK_HOME),\
instooofiltmsi \ instooofiltmsi \
inst_msu_msi \
qslnkmsi \ qslnkmsi \
reg4allmsdoc \ reg4allmsdoc \
sdqsmsi \ sdqsmsi \
......
...@@ -4126,8 +4126,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ ...@@ -4126,8 +4126,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\
)) ))
endif endif
$(eval $(call gb_Helper_register_packages_for_install,vcredist_exe_binarytable,\ $(eval $(call gb_Helper_register_packages_for_install,ucrt_binarytable,\
$(if $(VCREDIST_DIR),vcredist_exe) \ $(if $(UCRT_REDISTDIR),ucrt) \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:
...@@ -582,8 +582,7 @@ export TMPDIR=@TEMP_DIRECTORY@ ...@@ -582,8 +582,7 @@ export TMPDIR=@TEMP_DIRECTORY@
export TOUCH=@TOUCH@ export TOUCH=@TOUCH@
export UCRTSDKDIR=@UCRTSDKDIR@ export UCRTSDKDIR=@UCRTSDKDIR@
export UCRTVERSION=@UCRTVERSION@ export UCRTVERSION=@UCRTVERSION@
export VCREDIST_DIR=@VCREDIST_DIR@ export UCRT_REDISTDIR=@UCRT_REDISTDIR@
export VCREDIST_EXE=@VCREDIST_EXE@
export UNOWINREG_DLL=@UNOWINREG_DLL@ export UNOWINREG_DLL=@UNOWINREG_DLL@
export USE_LIBRARY_BIN_TAR=@USE_LIBRARY_BIN_TAR@ export USE_LIBRARY_BIN_TAR=@USE_LIBRARY_BIN_TAR@
export USE_XINERAMA=@USE_XINERAMA@ export USE_XINERAMA=@USE_XINERAMA@
......
...@@ -6486,13 +6486,21 @@ fi ...@@ -6486,13 +6486,21 @@ fi
AC_SUBST([JITC_PROCESSOR_TYPE]) AC_SUBST([JITC_PROCESSOR_TYPE])
# Misc Windows Stuff # Misc Windows Stuff
AC_ARG_WITH(vcredist-dir, AC_ARG_WITH(ucrt-dir,
AS_HELP_STRING([--with-vcredist-dir], AS_HELP_STRING([--with-ucrt-dir],
[path to the directory with the arch-specific executables (vc_redist.x64.exe, vc_redist.x86.exe) [path to the directory with the arch-specific MSU packages of the Windows Universal CRT redistributables
for packaging into the installsets (without those the target system needs to install (MS KB 2999226) for packaging into the installsets (without those the target system needs to install
the Visual C++ Runtimes manually)]), the UCRT or Visual C++ Runtimes manually). The directory must contain the following 6 files:
Windows6.1-KB2999226-x64.msu
Windows6.1-KB2999226-x86.msu
Windows8.1-KB2999226-x64.msu
Windows8.1-KB2999226-x86.msu
Windows8-RT-KB2999226-x64.msu
Windows8-RT-KB2999226-x86.msu
A zip archive including those files is available from Microsoft site:
https://www.microsoft.com/en-us/download/details.aspx?id=48234]),
,) ,)
VCREDIST_DIR="$with_vcredist_dir" UCRT_REDISTDIR="$with_ucrt_dir"
if test $_os = "WINNT"; then if test $_os = "WINNT"; then
find_msvc_x64_dlls find_msvc_x64_dlls
find_msms find_msms
...@@ -6505,20 +6513,23 @@ if test $_os = "WINNT"; then ...@@ -6505,20 +6513,23 @@ if test $_os = "WINNT"; then
else else
SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST" SCPDEFS="$SCPDEFS -DWITH_VC${VCVER}_REDIST"
fi fi
if test "$VCREDIST_DIR" = "no"; then if test "$UCRT_REDISTDIR" = "no"; then
dnl explicitly disabled dnl explicitly disabled
VCREDIST_DIR="" UCRT_REDISTDIR=""
else else
if test -f "$VCREDIST_DIR/vc_redist.$WINDOWS_SDK_ARCH.exe"; then if ! test -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x64.msu" -a \
VCREDIST_EXE="vc_redist.$WINDOWS_SDK_ARCH.exe" -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x86.msu" -a \
else -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x64.msu" -a \
VCREDIST_DIR="" -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x86.msu" -a \
-f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x64.msu" -a \
-f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x86.msu"; then
UCRT_REDISTDIR=""
if test -n "$PKGFORMAT"; then if test -n "$PKGFORMAT"; then
for i in "$PKGFORMAT"; do for i in "$PKGFORMAT"; do
case "$i" in case "$i" in
msi) msi)
AC_MSG_WARN([--without-vcredist-dir not specified or exe not found - installer will have runtime dependency]) AC_MSG_WARN([--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency])
add_warning "--without-vcredist-dir not specified or exe not found - installer will have runtime dependency" add_warning "--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency"
;; ;;
esac esac
done done
...@@ -6527,8 +6538,7 @@ if test $_os = "WINNT"; then ...@@ -6527,8 +6538,7 @@ if test $_os = "WINNT"; then
fi fi
fi fi
AC_SUBST(VCREDIST_DIR) AC_SUBST(UCRT_REDISTDIR)
AC_SUBST(VCREDIST_EXE)
AC_SUBST(MSVC_DLL_PATH) AC_SUBST(MSVC_DLL_PATH)
AC_SUBST(MSVC_DLLS) AC_SUBST(MSVC_DLLS)
AC_SUBST(MSM_PATH) AC_SUBST(MSM_PATH)
......
...@@ -17,11 +17,11 @@ $(eval $(call gb_Module_add_targets,msc-externals,\ ...@@ -17,11 +17,11 @@ $(eval $(call gb_Module_add_targets,msc-externals,\
endif endif
# Install the universal crts and VC runtimes (tdf#108580) # Install the universal crts (tdf#108580)
ifneq ($(VCREDIST_DIR),) ifneq ($(UCRT_REDISTDIR),)
$(eval $(call gb_Module_add_targets,msc-externals,\ $(eval $(call gb_Module_add_targets,msc-externals,\
Package_vcredist_exe \ Package_ucrt \
)) ))
endif endif
......
...@@ -7,10 +7,15 @@ ...@@ -7,10 +7,15 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# #
$(eval $(call gb_Package_Package,vcredist_exe,$(VCREDIST_DIR))) $(eval $(call gb_Package_Package,ucrt,$(UCRT_REDISTDIR)))
$(eval $(call gb_Package_add_files,vcredist_exe,$(LIBO_ETC_FOLDER),\ $(eval $(call gb_Package_add_files,ucrt,$(LIBO_ETC_FOLDER),\
$(VCREDIST_EXE) \ Windows6.1-KB2999226-x64.msu \
Windows6.1-KB2999226-x86.msu \
Windows8.1-KB2999226-x64.msu \
Windows8.1-KB2999226-x86.msu \
Windows8-RT-KB2999226-x64.msu \
Windows8-RT-KB2999226-x86.msu \
)) ))
# vim:set shiftwidth=4 tabstop=4 noexpandtab: # vim:set shiftwidth=4 tabstop=4 noexpandtab:
...@@ -249,7 +249,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207 ...@@ -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 N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209 SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210 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 SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539 SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539 SetupInitialization ActionText Text 135 109 220 36 65539
......
...@@ -21,6 +21,3 @@ en-US = "A newer version of [ProductName] was found. To install an older versio ...@@ -21,6 +21,3 @@ en-US = "A newer version of [ProductName] was found. To install an older versio
[OOO_CUSTOMACTION_2] [OOO_CUSTOMACTION_2]
en-US = "The same version of this product is already installed." 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."
[OOO_LAUNCH_1] [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." 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."
...@@ -5,5 +5,6 @@ INSTALLLOCATION installuser ...@@ -5,5 +5,6 @@ INSTALLLOCATION installuser
INSTALLLOCATION installuser_ INSTALLLOCATION installuser_
INSTALLLOCATION installmachine INSTALLLOCATION installmachine
INSTALLLOCATION installmachine_ INSTALLLOCATION installmachine_
VCREDISTINSTALLED_X86 VCREDISTINSTALLED_X86 WIN81S14 win81s14
VCREDISTINSTALLED_X64 VCREDISTINSTALLED_X64 UCRT_DETECTED ucrt_detected
UCRT_DETECTED ucrt_on_win10
...@@ -253,7 +253,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207 ...@@ -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 N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209 SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210 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 SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539 SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539 SetupInitialization ActionText Text 135 109 220 36 65539
......
...@@ -7,7 +7,6 @@ setUserProfile 51 USERPROFILE [%USERPROFILE] ...@@ -7,7 +7,6 @@ setUserProfile 51 USERPROFILE [%USERPROFILE]
SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION] SetARPInstallLocation 51 ARPINSTALLLOCATION [INSTALLLOCATION]
NewProductFound 19 OOO_CUSTOMACTION_1 NewProductFound 19 OOO_CUSTOMACTION_1
SameProductFound 19 OOO_CUSTOMACTION_2 SameProductFound 19 OOO_CUSTOMACTION_2
WrongWindowsVersion 19 OOO_CUSTOMACTION_5
SetLanguageSelected 51 LANG_SELECTED 1 SetLanguageSelected 51 LANG_SELECTED 1
ResetLanguageSelected 51 LANG_SELECTED 0 ResetLanguageSelected 51 LANG_SELECTED 0
SetApplicationSelected 51 APP_SELECTED 1 SetApplicationSelected 51 APP_SELECTED 1
......
Signature_ Parent Path Depth
s72 S72 S255 I2
DrLocator Signature_ Parent Path
win81s14 [SystemFolder]
ucrt_detected [SystemFolder]
ucrt_on_win10 [SystemFolder]
...@@ -69,4 +69,3 @@ ValidateProductID 300 ...@@ -69,4 +69,3 @@ ValidateProductID 300
WriteEnvironmentStrings 2500 WriteEnvironmentStrings 2500
WriteIniValues 2450 WriteIniValues 2450
WriteRegistryValues 2400 WriteRegistryValues 2400
WrongWindowsVersion (VersionNT < WindowsMinVersionNumber) OR ((VersionNT = WindowsMinVersionNumber) AND (ServicePackLevel < WindowsMinSPNumber)) 10
...@@ -28,4 +28,3 @@ SetupProgress 800 ...@@ -28,4 +28,3 @@ SetupProgress 800
SetupResume Installed And (RESUME Or Preselected) And Not PATCH 700 SetupResume Installed And (RESUME Or Preselected) And Not PATCH 700
setUserProfile 510 setUserProfile 510
ValidateProductID 350 ValidateProductID 350
WrongWindowsVersion (VersionNT < WindowsMinVersionNumber) OR ((VersionNT = WindowsMinVersionNumber) AND (ServicePackLevel < WindowsMinSPNumber)) 10
...@@ -2,3 +2,5 @@ Condition Description ...@@ -2,3 +2,5 @@ Condition Description
s255 l255 s255 l255
65001 LaunchCondition Condition 65001 LaunchCondition Condition
Privileged OOO_LAUNCH_1 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
...@@ -5,5 +5,3 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] ...@@ -5,5 +5,3 @@ installuser 1 Software\LibreOffice\Layers\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION]
installuser_ 1 Software\LibreOffice\Layers_\[DEFINEDPRODUCT]\[BRANDPACKAGEVERSION] INSTALLLOCATION 2 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
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
Signature FileName MinVersion MaxVersion MinSize MaxSize MinDate MaxDate Languages Signature FileName MinVersion MaxVersion MinSize MaxSize MinDate MaxDate Languages
s72 s255 S20 S20 I4 I4 I4 I4 S255 s72 s255 S20 S20 I4 I4 I4 I4 S255
Signature Signature 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
...@@ -236,7 +236,7 @@ SetupError I PushButton 192 80 66 17 3 OOO_CONTROL_207 ...@@ -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 N PushButton 192 80 66 17 3 OOO_CONTROL_208
SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209 SetupError O PushButton 192 80 66 17 3 OOO_CONTROL_209
SetupError R PushButton 192 80 66 17 3 OOO_CONTROL_210 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 SetupError Y PushButton 192 80 66 17 3 OOO_CONTROL_211
SetupInitialization ActionData Text 135 125 228 12 65539 SetupInitialization ActionData Text 135 125 228 12 65539
SetupInitialization ActionText Text 135 109 220 36 65539 SetupInitialization ActionText Text 135 109 220 36 65539
......
...@@ -8,5 +8,9 @@ policy.1.0.cli_oootypes.dll ...@@ -8,5 +8,9 @@ policy.1.0.cli_oootypes.dll
policy.1.0.cli_ure.dll policy.1.0.cli_ure.dll
policy.1.0.cli_cppuhelper.dll policy.1.0.cli_cppuhelper.dll
policy.1.0.cli_basetypes.dll policy.1.0.cli_basetypes.dll
vc_redist.x64.exe Windows6.1-KB2999226-x64.msu
vc_redist.x86.exe Windows6.1-KB2999226-x86.msu
Windows8.1-KB2999226-x64.msu
Windows8.1-KB2999226-x86.msu
Windows8-RT-KB2999226-x64.msu
Windows8-RT-KB2999226-x86.msu
...@@ -17,17 +17,12 @@ $(eval $(call gb_InstallModule_add_defs,scp2/windows,\ ...@@ -17,17 +17,12 @@ $(eval $(call gb_InstallModule_add_defs,scp2/windows,\
$(if $(WINDOWS_SDK_HOME),\ $(if $(WINDOWS_SDK_HOME),\
-DHAVE_WINDOWS_SDK \ -DHAVE_WINDOWS_SDK \
) \ ) \
$(if $(MSM_PATH),\
-DMSM_PATH \
) \
$(if $(VCREDIST_DIR),\
-DVCREDIST_EXE_NAME="$(VCREDIST_EXE)" \
) \
)) ))
$(eval $(call gb_InstallModule_add_scpfiles,scp2/windows,\ $(eval $(call gb_InstallModule_add_scpfiles,scp2/windows,\
scp2/source/ooo/folder_ooo \ scp2/source/ooo/folder_ooo \
scp2/source/ooo/vc_redist \ $(if $(MSM_PATH),scp2/source/ooo/vc_redist) \
$(if $(UCRT_REDISTDIR),scp2/source/ooo/ucrt) \
scp2/source/ooo/windowscustomaction_ooo \ scp2/source/ooo/windowscustomaction_ooo \
)) ))
......
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "macros.inc"
File gid_File_Windows6_1_KB2999226_x64_msu
Name = "Windows6.1-KB2999226-x64.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
File gid_File_Windows8_RT_KB2999226_x64_msu
Name = "Windows8-RT-KB2999226-x64.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
File gid_File_Windows8_1_KB2999226_x64_msu
Name = "Windows8.1-KB2999226-x64.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
#ifndef WINDOWS_X64
File gid_File_Windows6_1_KB2999226_x86_msu
Name = "Windows6.1-KB2999226-x86.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
File gid_File_Windows8_RT_KB2999226_x86_msu
Name = "Windows8-RT-KB2999226-x86.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
File gid_File_Windows8_1_KB2999226_x86_msu
Name = "Windows8.1-KB2999226-x86.msu";
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
#endif /* WINDOWS_X64 */
/* A deferred not-impersonated action that will call wusa.exe to actually install
msu. Since deferred actions don't have access to current DB, the action depends
on immediate-executed action inst_ucrt (see below) that precedes it, unpacks
the binary to a temp file, and sets this action's CustomActionData property.
*/
WindowsCustomAction gid_Customaction_inst_msu
Name = "inst_msu";
Typ = "3073";
Source = "inst_msu_msi.dll";
Target = "InstallMSU";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "Not Installed And inst_msu", "InstallFiles");
End
/* An immediately-executed action that will unpack a binary, which name in binary table is set
in "InstMSUBinary" property, to a temporary file, and sets "inst_msu" and "cleanup_msu" props.
*/
WindowsCustomAction gid_Customaction_unpack_msu
Name = "unpack_msu";
Typ = "1";
Source = "inst_msu_msi.dll";
Target = "UnpackMSUForInstall";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "Not Installed And InstMSUBinary", "cleanup_msu");
End
/* A rollback action that removes temp file. It must precede inst_msu.
*/
WindowsCustomAction gid_Customaction_cleanup_msu
Name = "cleanup_msu";
Typ = "1345";
Source = "inst_msu_msi.dll";
Target = "CleanupMSU";
Inbinarytable = 1;
Assignment1 = ("InstallExecuteSequence", "Not Installed And cleanup_msu", "inst_msu");
End
WindowsCustomAction gid_Customaction_check_win7x64_ucrt
Name = "check_win7x64_ucrt";
Typ = "51";
Source = "InstMSUBinary";
Target = "Windows61-KB2999226-x64msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 601 And VersionNT64 And Not UCRT_DETECTED", "FileCost");
Styles = "NO_FILE";
End
WindowsCustomAction gid_Customaction_check_win8x64_ucrt
Name = "check_win8x64_ucrt";
Typ = "51";
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");
Styles = "NO_FILE";
End
WindowsCustomAction gid_Customaction_check_win81x64_ucrt
Name = "check_win81x64_ucrt";
Typ = "51";
Source = "InstMSUBinary";
Target = "Windows81-KB2999226-x64msu";
Inbinarytable = 0;
Assignment1 = ("InstallExecuteSequence", "Not Installed And VersionNT = 603 And VersionNT64 And Not UCRT_DETECTED", "check_win8x64_ucrt");
Styles = "NO_FILE";
End
#ifndef WINDOWS_X64
/* 32-bit installer must be prepared to run on both 32- and 64-bit Windows. So, it might need to
install either 32-bit or 64-bit UCRT package, depending on OS bitness.
*/
WindowsCustomAction gid_Customaction_check_win7x32_ucrt
Name = "check_win7x32_ucrt";
Typ = "51";
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");
Styles = "NO_FILE";
End
WindowsCustomAction gid_Customaction_check_win8x32_ucrt
Name = "check_win8x32_ucrt";
Typ = "51";
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");
Styles = "NO_FILE";
End
WindowsCustomAction gid_Customaction_check_win81x32_ucrt
Name = "check_win81x32_ucrt";
Typ = "51";
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");
Styles = "NO_FILE";
End
#endif /* WINDOWS_X64 */
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
#include "macros.inc" #include "macros.inc"
#if defined(MSM_PATH)
#if defined(WITH_VC140_REDIST) #if defined(WITH_VC140_REDIST)
#if defined WINDOWS_X64 #if defined WINDOWS_X64
...@@ -76,28 +74,3 @@ MergeModule gid_MergeModule_Microsoft_VC141_CRT_x86 ...@@ -76,28 +74,3 @@ MergeModule gid_MergeModule_Microsoft_VC141_CRT_x86
End End
#endif #endif
#endif // MSM_PATH
#if defined(VCREDIST_EXE_NAME)
File gid_File_Vcredist_Exe
Name = VCREDIST_EXE_NAME;
Dir = gid_Brand_Dir_Program;
Styles = (PACKED, BINARYTABLE, BINARYTABLE_ONLY);
End
WindowsCustomAction gid_Customaction_InstallVCRedist
Name = "InstallVCRedist";
Typ = "66"; /* 0x02 = exe in a binary table stream; 0x40 = ignore exit code and continue */
Source = VCREDIST_EXE_NAME;
Target = "/repair /norestart /passive";
Inbinarytable = 1;
#if defined WINDOWS_X64
Assignment1 = ("InstallUISequence", "Not Installed And ( Not VCREDISTINSTALLED_X64 Or VCREDISTINSTALLED_X64 < \"v14.0.24215.0\" )", "behind_ExecuteAction");
#else
Assignment1 = ("InstallUISequence", "Not Installed And ( Not VCREDISTINSTALLED_X86 Or VCREDISTINSTALLED_X86 < \"v14.0.24215.0\" )", "behind_ExecuteAction");
#endif
End
#endif
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,inst_msu_msi))
$(eval $(call gb_Library_add_defs,inst_msu_msi,\
-U_DLL \
))
$(eval $(call gb_Library_add_cxxflags,inst_msu_msi,\
$(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \
))
$(eval $(call gb_Library_add_ldflags,inst_msu_msi,\
/DEF:$(SRCDIR)/setup_native/source/win32/customactions/inst_msu/inst_msu_msi.def \
/NODEFAULTLIB \
))
$(eval $(call gb_Library_add_exception_objects,inst_msu_msi,\
setup_native/source/win32/customactions/inst_msu/inst_msu \
))
$(eval $(call gb_Library_use_system_win32_libs,inst_msu_msi,\
libcmt \
libcpmt \
libucrt \
libvcruntime \
kernel32 \
Ole32 \
Shell32 \
Msi \
))
# vim: set noet sw=4 ts=4:
...@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,setup_native,\ ...@@ -24,6 +24,7 @@ $(eval $(call gb_Module_add_targets,setup_native,\
ifeq ($(OS),WNT) ifeq ($(OS),WNT)
$(eval $(call gb_Module_add_targets,setup_native,\ $(eval $(call gb_Module_add_targets,setup_native,\
Library_instooofiltmsi \ Library_instooofiltmsi \
Library_inst_msu_msi \
Library_qslnkmsi \ Library_qslnkmsi \
Library_reg4allmsdoc \ Library_reg4allmsdoc \
Library_regactivex \ Library_regactivex \
......
LIBRARY "inst_msu_msi.dll"
EXPORTS
UnpackMSUForInstall
InstallMSU
CleanupMSU
\ No newline at end of file
...@@ -1084,9 +1084,8 @@ sub add_custom_action_to_install_table ...@@ -1084,9 +1084,8 @@ sub add_custom_action_to_install_table
my $actionposition = 0; my $actionposition = 0;
if ( $position eq "end" ) { $actionposition = get_last_position_in_sequencetable($installtable) + 25; } if ( $position =~ /^\s*\d+\s*$/ ) { $actionposition = $position; } # setting the position directly, number defined in scp2
elsif ( $position =~ /^\s*behind_/ ) { $actionposition = get_position_in_sequencetable($position, $installtable) + 2; } else { $actionposition = "POSITIONTEMPLATE_" . $position; }
else { $actionposition = get_position_in_sequencetable($position, $installtable) - 2; }
my $line = $actionname . "\t" . $actioncondition . "\t" . $actionposition . "\n"; my $line = $actionname . "\t" . $actioncondition . "\t" . $actionposition . "\n";
push(@{$installtable}, $line); push(@{$installtable}, $line);
...@@ -1129,12 +1128,6 @@ sub add_custom_action_to_install_table ...@@ -1129,12 +1128,6 @@ sub add_custom_action_to_install_table
$actioncondition =~ s/FEATURETEMPLATE/$feature/g; # only execute Custom Action, if feature of the file is installed $actioncondition =~ s/FEATURETEMPLATE/$feature/g; # only execute Custom Action, if feature of the file is installed
# my $actionposition = 0;
# if ( $position eq "end" ) { $actionposition = get_last_position_in_sequencetable($installtable) + 25; }
# elsif ( $position =~ /^\s*behind_/ ) { $actionposition = get_position_in_sequencetable($position, $installtable) + 2; }
# else { $actionposition = get_position_in_sequencetable($position, $installtable) - 2; }
# my $line = $actionname . "\t" . $actioncondition . "\t" . $actionposition . "\n";
my $positiontemplate = ""; my $positiontemplate = "";
if ( $position =~ /^\s*\d+\s*$/ ) { $positiontemplate = $position; } # setting the position directly, number defined in scp2 if ( $position =~ /^\s*\d+\s*$/ ) { $positiontemplate = $position; } # setting the position directly, number defined in scp2
else { $positiontemplate = "POSITIONTEMPLATE_" . $position; } else { $positiontemplate = "POSITIONTEMPLATE_" . $position; }
......
...@@ -1009,6 +1009,7 @@ sub set_uuid_into_component_table ...@@ -1009,6 +1009,7 @@ sub set_uuid_into_component_table
# Adding final 64 properties into msi database, if required. # Adding final 64 properties into msi database, if required.
# RegLocator : +16 in type column to search in 64 bit registry. # RegLocator : +16 in type column to search in 64 bit registry.
# All conditions: "VersionNT" -> "VersionNT64" (several tables). # All conditions: "VersionNT" -> "VersionNT64" (several tables).
# DrLocator: "SystemFolder" -> "System64Folder"
# Already done: "+256" in Attributes column of table "Component". # Already done: "+256" in Attributes column of table "Component".
# Still following: Setting "x64" instead of "Intel" in Summary # Still following: Setting "x64" instead of "Intel" in Summary
# Information Stream of msi database in "get_template_for_sis". # Information Stream of msi database in "get_template_for_sis".
...@@ -1099,6 +1100,34 @@ sub prepare_64bit_database ...@@ -1099,6 +1100,34 @@ sub prepare_64bit_database
} }
} }
} }
# 3. Replacing all occurrences of "SystemFolder" by "System64Folder" in "DrLocato.idt"
my $drlocatofilename = $basedir . $installer::globals::separator . "DrLocato.idt";
if ( -f $drlocatofilename )
{
my $saving_required = 0;
my $drlocatofile = installer::files::read_file($drlocatofilename);
for ( my $i = 3; $i <= $#{$drlocatofile}; $i++ ) # ignoring the first three lines
{
my $oneline = ${$drlocatofile}[$i];
if ( $oneline =~ /\bSystemFolder\b/ )
{
${$drlocatofile}[$i] =~ s/\bSystemFolder\b/System64Folder/g;
$saving_required = 1;
}
}
if ( $saving_required )
{
# Saving the files
installer::files::save_file($drlocatofilename ,$drlocatofile);
$infoline = "Making idt file 64 bit conform: $drlocatofilename\n";
push(@installer::globals::logfileinfo, $infoline);
}
}
} }
} }
......
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