summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-02-15 18:14:02 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2011-02-15 18:14:02 +0100
commit27ed5fe89d1fcae7c64b5d12043cec90e1bc44f6 (patch)
tree19b0a2cde5bd613c901da787bb0c16f4931c9163 /solenv
parentf47df855cfc094176ed229448fcdf88fd6096bd8 (diff)
parentb7732d00097dff81c76bbb445d652cb53496987e (diff)
CWS-TOOLING: integrate CWS spc01_DEV300
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/make_installer.pl3
-rw-r--r--solenv/bin/modules/installer/windows/component.pm16
-rw-r--r--solenv/bin/modules/installer/windows/msiglobal.pm109
3 files changed, 119 insertions, 9 deletions
diff --git a/solenv/bin/make_installer.pl b/solenv/bin/make_installer.pl
index d28a2e7e3fa0..c85aaffcde07 100644
--- a/solenv/bin/make_installer.pl
+++ b/solenv/bin/make_installer.pl
@@ -1955,7 +1955,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems4.log", $registryitemsinproductlanguageresolvedarrayref); }
- installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath);
+ installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $componentid, $componentidkeypath, $allvariableshashref);
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productfiles19.log", $filesinproductlanguageresolvedarrayref); }
if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "registryitems5.log", $registryitemsinproductlanguageresolvedarrayref); }
@@ -2166,6 +2166,7 @@ for ( my $n = 0; $n <= $#installer::globals::languageproducts; $n++ )
installer::logger::print_message( "... creating msi database (language $onelanguage) ... \n" );
installer::windows::msiglobal::set_uuid_into_component_table($languageidtdir, $allvariableshashref); # setting new GUID for the components using the tool uuidgen.exe
+ installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref); # making last 64 bit changes
installer::windows::msiglobal::create_msi_database($languageidtdir ,$msifilename);
# validating the database # ToDo
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 38989858a4b6..4ab5aac68954 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -193,7 +193,7 @@ sub get_registry_component_directory
sub get_file_component_attributes
{
- my ($componentname, $filesref) = @_;
+ my ($componentname, $filesref, $allvariables) = @_;
my $attributes;
@@ -240,6 +240,9 @@ sub get_file_component_attributes
$attributes = 4; # Files in shellnew dir and in non advertised startmenu entries must have user registry key as KeyPath
}
+ # Adding 256, if this is a 64 bit installation set.
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes = $attributes + 256; }
+
return $attributes
}
@@ -251,12 +254,15 @@ sub get_file_component_attributes
sub get_registry_component_attributes
{
- my ($componentname) = @_;
+ my ($componentname, $allvariables) = @_;
my $attributes;
$attributes = 4;
+ # Adding 256, if this is a 64 bit installation set.
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes = $attributes + 256; }
+
if ( exists($installer::globals::dontdeletecomponents{$componentname}) ) { $attributes = $attributes + 16; }
return $attributes
@@ -381,7 +387,7 @@ sub get_component_keypath
sub create_component_table
{
- my ($filesref, $registryref, $dirref, $allfilecomponentsref, $allregistrycomponents, $basedir, $componentidhashref, $componentidkeypathhashref) = @_;
+ my ($filesref, $registryref, $dirref, $allfilecomponentsref, $allregistrycomponents, $basedir, $componentidhashref, $componentidkeypathhashref, $allvariables) = @_;
my @componenttable = ();
@@ -402,7 +408,7 @@ sub create_component_table
$onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref);
$onecomponent{'directory'} = get_file_component_directory($onecomponent{'name'}, $filesref, $dirref);
if ( $onecomponent{'directory'} eq "IGNORE_COMP" ) { next; }
- $onecomponent{'attributes'} = get_file_component_attributes($onecomponent{'name'}, $filesref);
+ $onecomponent{'attributes'} = get_file_component_attributes($onecomponent{'name'}, $filesref, $allvariables);
$onecomponent{'condition'} = get_file_component_condition($onecomponent{'name'}, $filesref);
$onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $filesref, $componentidkeypathhashref);
@@ -421,7 +427,7 @@ sub create_component_table
$onecomponent{'name'} = ${$allregistrycomponents}[$i];
$onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref);
$onecomponent{'directory'} = get_registry_component_directory();
- $onecomponent{'attributes'} = get_registry_component_attributes($onecomponent{'name'});
+ $onecomponent{'attributes'} = get_registry_component_attributes($onecomponent{'name'}, $allvariables);
$onecomponent{'condition'} = get_component_condition($onecomponent{'name'});
$onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $registryref, $componentidkeypathhashref);
diff --git a/solenv/bin/modules/installer/windows/msiglobal.pm b/solenv/bin/modules/installer/windows/msiglobal.pm
index 716f63499a02..dbb6e051aa29 100644
--- a/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -785,11 +785,16 @@ sub get_codepage_for_sis
sub get_template_for_sis
{
- my ( $language ) = @_;
+ my ( $language, $allvariables ) = @_;
my $windowslanguage = installer::windows::language::get_windows_language($language);
- my $value = "\"Intel;" . $windowslanguage; # adding the Windows language
+ my $architecture = "Intel";
+
+ # Adding 256, if this is a 64 bit installation set.
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $architecture = "x64"; }
+
+ my $value = "\"" . $architecture . ";" . $windowslanguage; # adding the Windows language
$value = $value . "\""; # adding ending '"'
@@ -927,7 +932,7 @@ sub write_summary_into_msi_database
my $msiversion = get_msiversion_for_sis();
my $codepage = get_codepage_for_sis($language);
- my $template = get_template_for_sis($language);
+ my $template = get_template_for_sis($language, $allvariableshashref);
my $guid = get_packagecode_for_sis();
my $title = get_title_for_sis($sislanguage,$languagefile, "OOO_SIS_TITLE");
my $author = get_author_for_sis();
@@ -1669,6 +1674,104 @@ 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).
+# 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".
+#########################################################################
+
+sub prepare_64bit_database
+{
+ my ($basedir, $allvariables) = @_;
+
+ my $infoline = "";
+
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 ))
+ {
+ # 1. Beginning with table "RegLocat.idt". Adding "16" to the type.
+
+ my $reglocatfile = "";
+ my $reglocatfilename = $basedir . $installer::globals::separator . "RegLocat.idt";
+
+ if ( -f $reglocatfilename )
+ {
+ my $saving_required = 0;
+ $reglocatfile = installer::files::read_file($reglocatfilename);
+
+ for ( my $i = 3; $i <= $#{$reglocatfile}; $i++ ) # ignoring the first three lines
+ {
+ my $oneline = ${$reglocatfile}[$i];
+
+ if ( $oneline =~ /^\s*\#/ ) { next; } # this is a comment line
+ if ( $oneline =~ /^\s*$/ ) { next; }
+
+ if ( $oneline =~ /^\s*(.*?)\t(.*?)\t(.*?)\t(.*?)\t(\d+)\s*$/ )
+ {
+ # Syntax: Signature_ Root Key Name Type
+ my $sig = $1;
+ my $root = $2;
+ my $key = $3;
+ my $name = $4;
+ my $type = $5;
+
+ $type = $type + 16;
+
+ my $newline = $sig . "\t" . $root . "\t" . $key . "\t" . $name . "\t" . $type . "\n";
+ ${$reglocatfile}[$i] = $newline;
+
+ $saving_required = 1;
+ }
+ }
+
+ if ( $saving_required )
+ {
+ # Saving the files
+ installer::files::save_file($reglocatfilename ,$reglocatfile);
+ $infoline = "Making idt file 64 bit conform: $reglocatfilename\n";
+ push(@installer::globals::logfileinfo, $infoline);
+ }
+ }
+
+ # 2. Replacing all occurences of "VersionNT" by "VersionNT64"
+
+ my @versionnt_files = ("Componen.idt", "InstallE.idt", "InstallU.idt", "LaunchCo.idt");
+
+ foreach my $onefile ( @versionnt_files )
+ {
+ my $fullfilename = $basedir . $installer::globals::separator . $onefile;
+
+ if ( -f $fullfilename )
+ {
+ my $saving_required = 0;
+ $filecontent = installer::files::read_file($fullfilename);
+
+ for ( my $i = 3; $i <= $#{$filecontent}; $i++ ) # ignoring the first three lines
+ {
+ my $oneline = ${$filecontent}[$i];
+
+ if ( $oneline =~ /\bVersionNT\b/ )
+ {
+ ${$filecontent}[$i] =~ s/\bVersionNT\b/VersionNT64/g;
+ $saving_required = 1;
+ }
+ }
+
+ if ( $saving_required )
+ {
+ # Saving the files
+ installer::files::save_file($fullfilename ,$filecontent);
+ $infoline = "Making idt file 64 bit conform: $fullfilename\n";
+ push(@installer::globals::logfileinfo, $infoline);
+ }
+ }
+ }
+ }
+
+}
+
#################################################################
# Include all cab files into the msi database.
# This works only on Windows