summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-06-05 13:37:30 +0200
committerAndras Timar <atimar@suse.com>2012-06-05 13:42:14 +0200
commit6d9be05a6fb251ed0cbcbcefd55ed174b1e8e39d (patch)
treef48806ee5c7fdf3c770ec7429d2de7b7ffe9ec32 /solenv
parent22a29c2060355626ff0cba6c6d0ae70b8e2bbad3 (diff)
fdo#47805 rework handling of 64-bit registry entries
64-bit registry entries were entered via a custom action, which did not always work. By default the custom action ran with user privileges, which were not sufficient to write the registry. It is not necessary to use custom actions for this task. Windows installer supports it well. Change-Id: Id65458c363c2b90b3e7d166b4c836bfb1ff19bf4
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer/windows/component.pm19
-rw-r--r--solenv/bin/modules/installer/windows/idtglobal.pm10
-rw-r--r--solenv/bin/modules/installer/windows/registry.pm14
3 files changed, 12 insertions, 31 deletions
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 72382607e508..cd872091dc41 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -192,7 +192,6 @@ sub get_registry_component_directory
##############################################################
# Returning the attributes for a file component.
-# Always 8 in this first try?
##############################################################
sub get_file_component_attributes
@@ -244,10 +243,10 @@ 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; }
+ # Setting msidbComponentAttributes64bit, if this is a 64 bit installation set.
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes |= 256; }
- return $attributes
+ return $attributes;
}
##############################################################
@@ -264,12 +263,16 @@ sub get_registry_component_attributes
$attributes = 4;
- # Adding 256, if this is a 64 bit installation set.
- if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes = $attributes + 256; }
+ # Setting msidbComponentAttributes64bit, if this is a 64 bit installation set.
+ if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes |= 256; }
- if ( exists($installer::globals::dontdeletecomponents{$componentname}) ) { $attributes = $attributes + 16; }
+ # Setting msidbComponentAttributes64bit for 64 bit shell extension in 32 bit installer, too
+ if ( $componentname =~ m/winexplorerext_x64/ ) { $attributes |= 256; }
- return $attributes
+ # Setting msidbComponentAttributesPermanent
+ if ( exists($installer::globals::dontdeletecomponents{$componentname}) ) { $attributes |= 16; }
+
+ return $attributes;
}
##############################################################
diff --git a/solenv/bin/modules/installer/windows/idtglobal.pm b/solenv/bin/modules/installer/windows/idtglobal.pm
index 176e8352e7f1..6b75dec03b04 100644
--- a/solenv/bin/modules/installer/windows/idtglobal.pm
+++ b/solenv/bin/modules/installer/windows/idtglobal.pm
@@ -494,16 +494,6 @@ sub write_idt_header
push(@{$idtref}, $oneline);
}
- if ( $definestring eq "reg64" )
- {
- $oneline = "Registry\tRoot\tKey\tName\tValue\tComponent_\n";
- push(@{$idtref}, $oneline);
- $oneline = "s72\ti2\tl255\tL255\tL0\ts72\n";
- push(@{$idtref}, $oneline);
- $oneline = "Reg64\tRegistry\n";
- push(@{$idtref}, $oneline);
- }
-
if ( $definestring eq "createfolder" )
{
$oneline = "Directory_\tComponent_\n";
diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm
index 8312e56beefe..ab0371b1ab32 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -375,10 +375,8 @@ sub create_registry_table
my $onelanguage = ${$languagesarrayref}[$m];
my @registrytable = ();
- my @reg64table = ();
installer::windows::idtglobal::write_idt_header(\@registrytable, "registry");
- installer::windows::idtglobal::write_idt_header(\@reg64table, "reg64");
for ( my $i = 0; $i <= $#{$registryref}; $i++ )
{
@@ -397,7 +395,6 @@ sub create_registry_table
$registry{'Key'} = get_registry_key($oneregistry, $allvariableshashref);
$registry{'Name'} = get_registry_name($oneregistry, $allvariableshashref);
$registry{'Value'} = get_registry_value($oneregistry, $allvariableshashref);
- $registry{'Val64'} = get_registry_val64($oneregistry, $allvariableshashref);
$registry{'Component_'} = get_registry_component($oneregistry, $allvariableshashref);
# Collecting all components
@@ -432,11 +429,7 @@ sub create_registry_table
my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t"
. $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n";
- my $oneline64 = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t"
- . $registry{'Name'} . "\t" . $registry{'Val64'} . "\t" . $registry{'Component_'} . "\n";
-
- if ( ! ( $style =~ /\bX64_ONLY\b/ )) { push(@registrytable, $oneline); } # standard registry table for 32 Bit
- if (( $style =~ /\bX64\b/ ) || ( $style =~ /\bX64_ONLY\b/ )) { push(@reg64table , $oneline64); }
+ push(@registrytable, $oneline);
}
# If there are added user registry keys for files collected in
@@ -453,11 +446,6 @@ sub create_registry_table
installer::files::save_file($registrytablename ,\@registrytable);
my $infoline = "Created idt file: $registrytablename\n";
push(@installer::globals::logfileinfo, $infoline);
-
- $registrytablename = $basedir . $installer::globals::separator . "Reg64.idt" . "." . $onelanguage;
- installer::files::save_file($registrytablename ,\@reg64table );
- $infoline = "Created idt file: $registrytablename\n";
- push(@installer::globals::logfileinfo, $infoline);
}
}