summaryrefslogtreecommitdiff
path: root/solenv
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 /solenv
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 'solenv')
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm11
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm29
2 files changed, 31 insertions, 9 deletions
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index 8e81a0469717..a98b4acb619e 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -1084,9 +1084,8 @@ sub add_custom_action_to_install_table
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; }
+ if ( $position =~ /^\s*\d+\s*$/ ) { $actionposition = $position; } # setting the position directly, number defined in scp2
+ else { $actionposition = "POSITIONTEMPLATE_" . $position; }
my $line = $actionname . "\t" . $actioncondition . "\t" . $actionposition . "\n";
push(@{$installtable}, $line);
@@ -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
-# 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 = "";
if ( $position =~ /^\s*\d+\s*$/ ) { $positiontemplate = $position; } # setting the position directly, number defined in scp2
else { $positiontemplate = "POSITIONTEMPLATE_" . $position; }
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index 383f7f3599cc..d0ddb8920d3d 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1009,6 +1009,7 @@ sub set_uuid_into_component_table
# Adding final 64 properties into msi database, if required.
# RegLocator : +16 in type column to search in 64 bit registry.
# All conditions: "VersionNT" -> "VersionNT64" (several tables).
+# DrLocator: "SystemFolder" -> "System64Folder"
# Already done: "+256" in Attributes column of table "Component".
# Still following: Setting "x64" instead of "Intel" in Summary
# Information Stream of msi database in "get_template_for_sis".
@@ -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);
+ }
+ }
}
}