diff options
author | Andras Timar <atimar@suse.com> | 2012-06-07 17:39:56 +0200 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-06-07 17:39:56 +0200 |
commit | 51b091da5445b219e04a01950a141c9a64aaf36d (patch) | |
tree | e5252029335bca6597ccf21a08cb767684f17b2f /solenv | |
parent | 743e3176244691f5d437ef38cf4eeba3d89a0af5 (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.
Backported from 6d9be05a6fb251ed0cbcbcefd55ed174b1e8e39d
Change-Id: I753612e32c56cd4101f1257d4f635b525cf09cf0
Signed-off-by: Fridrich Strba <fridrich.strba@suse.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/bin/modules/installer/windows/component.pm | 19 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/idtglobal.pm | 10 | ||||
-rw-r--r-- | solenv/bin/modules/installer/windows/registry.pm | 14 |
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 da11997e5f83..145266f8fe7c 100644 --- a/solenv/bin/modules/installer/windows/component.pm +++ b/solenv/bin/modules/installer/windows/component.pm @@ -193,7 +193,6 @@ sub get_registry_component_directory ############################################################## # Returning the attributes for a file component. -# Always 8 in this first try? ############################################################## sub get_file_component_attributes @@ -245,10 +244,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; } ############################################################## @@ -265,12 +264,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 94b5dcc62399..703cd545557b 100644 --- a/solenv/bin/modules/installer/windows/idtglobal.pm +++ b/solenv/bin/modules/installer/windows/idtglobal.pm @@ -495,16 +495,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 ba9f7a8e6488..ba00400a83b0 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); } } |