summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2013-02-11 14:26:34 +0100
committerAndras Timar <atimar@suse.com>2013-02-11 14:32:19 +0100
commitaa2450cb51cfc3805c7a596b6b89d70bb133821e (patch)
treebd5ef838f984ce38df9607f1996f7cb1b43c715a /solenv
parentd52dbb974deca85f1e388c306a1302c49f2b57ee (diff)
advertised shotrcuts
The main goal of this patch was to simplify things. The LibreOffice version that goes to Intel AppUp use advertsied shourtcuts, because it is what Intel AppUp Center requires. We can reduce complexity a bit, if we use advertised shortcuts in normal builds, too. Change-Id: Ia35a753c83cb592137232428ab897a640e7ccc1f
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/installer.pm2
-rw-r--r--solenv/bin/modules/installer/globals.pm2
-rw-r--r--solenv/bin/modules/installer/setupscript.pm31
-rw-r--r--solenv/bin/modules/installer/windows/component.pm7
-rw-r--r--solenv/bin/modules/installer/windows/file.pm24
-rw-r--r--solenv/bin/modules/installer/windows/registry.pm38
-rw-r--r--solenv/bin/modules/installer/windows/shortcut.pm69
-rw-r--r--solenv/bin/modules/t/installer-setupscript.t1
8 files changed, 1 insertions, 173 deletions
diff --git a/solenv/bin/modules/installer.pm b/solenv/bin/modules/installer.pm
index 91b3ef0c5eed..94e37919d066 100644
--- a/solenv/bin/modules/installer.pm
+++ b/solenv/bin/modules/installer.pm
@@ -369,8 +369,6 @@ sub run {
installer::setupscript::add_predefined_folder($folderitemsinproductarrayref, $folderinproductarrayref);
- installer::setupscript::prepare_non_advertised_files($folderitemsinproductarrayref, $filesinproductarrayref);
-
installer::logger::print_message( "... analyzing registryitems ... \n" );
$registryitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "RegistryItem");
diff --git a/solenv/bin/modules/installer/globals.pm b/solenv/bin/modules/installer/globals.pm
index 45aa11bab4b7..2d7c649282b2 100644
--- a/solenv/bin/modules/installer/globals.pm
+++ b/solenv/bin/modules/installer/globals.pm
@@ -195,8 +195,6 @@ BEGIN
$refresh_includepaths = 0;
$include_paths_read = 0;
@patchfilecollector = ();
- @userregistrycollector = ();
- $addeduserregitrykeys = 0;
$desktoplinkexists = 0;
$analyze_spellcheckerlanguage = 0;
%spellcheckerlanguagehash = ();
diff --git a/solenv/bin/modules/installer/setupscript.pm b/solenv/bin/modules/installer/setupscript.pm
index 08d20cf4c3b6..e178d3db4b17 100644
--- a/solenv/bin/modules/installer/setupscript.pm
+++ b/solenv/bin/modules/installer/setupscript.pm
@@ -42,7 +42,6 @@ our @EXPORT_OK = qw(
add_predefined_folder
get_all_items_from_script
get_all_scriptvariables_from_installation_object
- prepare_non_advertised_files
replace_all_setupscriptvariables_in_script
replace_preset_properties
resolve_lowercase_productname_setupscriptvariable
@@ -405,36 +404,6 @@ sub add_predefined_folder
}
#####################################################################################
-# If folderitems are non-advertised, the component needs to have a registry key
-# below HKCU as key path. Therefore it is required, to mark the file belonging
-# to a non-advertised shortcut, that a special userreg_xxx registry key can be
-# created during packing process.
-#####################################################################################
-
-sub prepare_non_advertised_files
-{
- my ( $folderitemref, $filesref ) = @_;
-
- for ( my $i = 0; $i <= $#{$folderitemref}; $i++ )
- {
- my $folderitem = ${$folderitemref}[$i];
- my $styles = "";
- if ( $folderitem->{'Styles'} ) { $styles = $folderitem->{'Styles'}; }
-
- if ( $styles =~ /\bNON_ADVERTISED\b/ )
- {
- my $fileid = $folderitem->{'FileID'};
- if ( $folderitem->{'ComponentIDFile'} ) { $fileid = $folderitem->{'ComponentIDFile'}; }
- my $onefile = installer::worker::find_file_by_id($filesref, $fileid);
-
- # Attention: If $onefile with "FileID" is not found, this is not always an error.
- # FileID can also contain an executable file, for example msiexec.exe.
- if ( $onefile ne "" ) { $onefile->{'needs_user_registry_key'} = 1; }
- }
- }
-}
-
-#####################################################################################
# Adding all variables defined in the installation object into the hash
# of all variables from the zip list file.
# This is needed if variables are defined in the installation object,
diff --git a/solenv/bin/modules/installer/windows/component.pm b/solenv/bin/modules/installer/windows/component.pm
index 4d52b9036103..630d406279a9 100644
--- a/solenv/bin/modules/installer/windows/component.pm
+++ b/solenv/bin/modules/installer/windows/component.pm
@@ -227,11 +227,6 @@ sub get_file_component_attributes
$attributes = 0; # Assembly files cannot run from source
}
- if ( $onefile->{'needs_user_registry_key'} )
- {
- $attributes = 4; # Files in non advertised startmenu entries must have user registry key as KeyPath
- }
-
# Setting msidbComponentAttributes64bit, if this is a 64 bit installation set.
if (( $allvariables->{'64BITPRODUCT'} ) && ( $allvariables->{'64BITPRODUCT'} == 1 )) { $attributes |= 256; }
@@ -365,8 +360,6 @@ sub get_component_keypath
}
}
- if ( $oneitem->{'userregkeypath'} ) { $keypath = $oneitem->{'userregkeypath'}; }
-
# saving it in the file and registry collection
$oneitem->{'keypath'} = $keypath;
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index b62b9a5feb2b..301eee2840f0 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -681,22 +681,6 @@ sub get_language_for_file
}
####################################################################
-# Creating a new KeyPath for components in TemplatesFolder.
-####################################################################
-
-sub generate_registry_keypath
-{
- my ($onefile) = @_;
-
- my $keypath = $onefile->{'Name'};
- $keypath =~ s/\.//g;
- $keypath = lc($keypath);
- $keypath = "userreg_" . $keypath;
-
- return $keypath;
-}
-
-####################################################################
# Check, if in an update process files are missing. No removal
# of files allowed for Windows Patch creation.
# Also logging all new files, that have to be included in extra
@@ -1014,14 +998,6 @@ sub create_files_table
my $destdir = "";
if ( $onefile->{'Dir'} ) { $destdir = $onefile->{'Dir'}; }
-
- if ( $onefile->{'needs_user_registry_key'} )
- {
- my $keypath = generate_registry_keypath($onefile);
- $onefile->{'userregkeypath'} = $keypath;
- push(@installer::globals::userregistrycollector, $onefile);
- $installer::globals::addeduserregitrykeys = 1;
- }
}
# putting content from %allfilecomponents to $allfilecomponentsref for later usage
diff --git a/solenv/bin/modules/installer/windows/registry.pm b/solenv/bin/modules/installer/windows/registry.pm
index 2580d541a070..edeb868d70fd 100644
--- a/solenv/bin/modules/installer/windows/registry.pm
+++ b/solenv/bin/modules/installer/windows/registry.pm
@@ -306,38 +306,6 @@ sub get_registry_component
}
######################################################
-# Adding the content of
-# @installer::globals::userregistrycollector
-# to the registry table. The content was collected
-# in create_files_table() in file.pm.
-######################################################
-
-sub add_userregs_to_registry_table
-{
- my ( $registrytable, $allvariables ) = @_;
-
- for ( my $i = 0; $i <= $#installer::globals::userregistrycollector; $i++ )
- {
- my $onefile = $installer::globals::userregistrycollector[$i];
-
- my %registry = ();
-
- $registry{'Registry'} = $onefile->{'userregkeypath'};
- $registry{'Root'} = "1"; # always HKCU
- $registry{'Key'} = "Software\\$allvariables->{'MANUFACTURER'}\\$allvariables->{'PRODUCTNAME'} $allvariables->{'PRODUCTVERSION'}\\";
- if ( $onefile->{'needs_user_registry_key'} ) { $registry{'Key'} = $registry{'Key'} . "StartMenu"; }
- $registry{'Name'} = $onefile->{'Name'};
- $registry{'Value'} = "1";
- $registry{'Component_'} = $onefile->{'componentname'};
-
- my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t"
- . $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n";
-
- push(@{$registrytable}, $oneline);
- }
-}
-
-######################################################
# Creating the file Registry.idt dynamically
# Content:
# Registry Root Key Name Value Component_
@@ -409,12 +377,6 @@ sub create_registry_table
push(@registrytable, $oneline);
}
- # If there are added user registry keys for files collected in
- # @installer::globals::userregistrycollector (file.pm), then
- # this registry keys have to be added now.
-
- if ( $installer::globals::addeduserregitrykeys ) { add_userregs_to_registry_table(\@registrytable, $allvariableshashref); }
-
# Saving the file
my $registrytablename = $basedir . $installer::globals::separator . "Registry.idt" . "." . $onelanguage;
diff --git a/solenv/bin/modules/installer/windows/shortcut.pm b/solenv/bin/modules/installer/windows/shortcut.pm
index 966c4aa0aa7f..250383a2e261 100644
--- a/solenv/bin/modules/installer/windows/shortcut.pm
+++ b/solenv/bin/modules/installer/windows/shortcut.pm
@@ -121,14 +121,6 @@ sub get_shortcut_component
my $found = 0;
my $shortcut_fileid = $shortcut->{'FileID'};
- my $absolute_filename = 0;
- if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
- if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
- if ( $styles =~ /\bUSE_HELPER_FILENAME\b/ ) { $absolute_filename = 1; } # ComponentIDFile contains id of a helper file
-
- # if the FileID contains an absolute filename, therefore the entry for "ComponentIDFile" has to be used.
- if ( $absolute_filename ) { $shortcut_fileid = $shortcut->{'ComponentIDFile'}; }
-
for ( my $i = 0; $i <= $#{$filesref}; $i++ )
{
$onefile = ${$filesref}[$i];
@@ -358,71 +350,18 @@ sub get_folderitem_directory
########################################################################
# Returning the target (feature) for a folderitem for shortcut table.
-# For non-advertised shortcuts this is a formatted string.
########################################################################
sub get_folderitem_target
{
my ($shortcut, $filesref) = @_;
- my $onefile;
- my $target = "";
- my $found = 0;
- my $shortcut_fileid = $shortcut->{'FileID'};
-
- my $styles = "";
- my $nonadvertised = 0;
- my $absolute_filename = 0;
- if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
- if ( $styles =~ /\bNON_ADVERTISED\b/ ) { $nonadvertised = 1; } # this is a non-advertised shortcut
- if ( $styles =~ /\bABSOLUTE_FILENAME\b/ ) { $absolute_filename = 1; } # FileID contains an absolute filename
-
- # if the FileID contains an absolute filename this can simply be returned as target for the shortcut table.
- if ( $absolute_filename )
- {
- $shortcut->{'target'} = $shortcut_fileid;
- return $shortcut_fileid;
- }
-
- for ( my $i = 0; $i <= $#{$filesref}; $i++ )
- {
- $onefile = ${$filesref}[$i];
- my $filegid = $onefile->{'gid'};
-
- if ( $filegid eq $shortcut_fileid )
- {
- $found = 1;
- last;
- }
- }
-
- if (!($found))
- {
- installer::exiter::exit_program("ERROR: Did not find FileID $shortcut_fileid in file collection for folderitem", "get_folderitem_target");
- }
-
- # Non advertised shortcuts do not return the feature, but the path to the file
- if ( $nonadvertised )
- {
- $target = "\[" . $onefile->{'uniquedirname'} . "\]" . "\\" . $onefile->{'Name'};
- $shortcut->{'target'} = $target;
- return $target;
- }
-
- # the rest only for advertised shortcuts, which contain the feature in the shortcut table.
-
- if ( $onefile->{'modules'} ) { $target = $onefile->{'modules'}; }
-
- # If modules contains a list of modules, only taking the first one.
- # But this should never be needed
-
- if ( $target =~ /^\s*(.*?)\,/ ) { $target = $1; }
+ my $target = $shortcut->{'ModuleID'};
# Attention: Maximum feature length is 38!
installer::windows::idtglobal::shorten_feature_gid(\$target);
# and finally saving the target in the folderitems collector
-
$shortcut->{'target'} = $target;
return $target;
@@ -454,7 +393,6 @@ sub get_folderitem_icon
my $styles = "";
if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
- if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no icon for non-advertised shortcuts
my $iconfilegid = "";
@@ -502,11 +440,6 @@ sub get_folderitem_icon
sub get_folderitem_iconindex
{
my ($shortcut) = @_;
-
- my $styles = "";
- if ( $shortcut->{'Styles'} ) { $styles = $shortcut->{'Styles'}; }
- if ( $styles =~ /\bNON_ADVERTISED\b/ ) { return ""; } # no iconindex for non-advertised shortcuts
-
my $iconid = 0;
if ( $shortcut->{'IconID'} ) { $iconid = $shortcut->{'IconID'}; }
diff --git a/solenv/bin/modules/t/installer-setupscript.t b/solenv/bin/modules/t/installer-setupscript.t
index 2079efea6aff..4b166ad20f8f 100644
--- a/solenv/bin/modules/t/installer-setupscript.t
+++ b/solenv/bin/modules/t/installer-setupscript.t
@@ -37,7 +37,6 @@ BEGIN {
add_predefined_folder
get_all_items_from_script
get_all_scriptvariables_from_installation_object
- prepare_non_advertised_files
replace_all_setupscriptvariables_in_script
replace_preset_properties
resolve_lowercase_productname_setupscriptvariable