Modified: openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm?rev=1546562&r1=1546561&r2=1546562&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm (original) +++ openoffice/trunk/main/solenv/bin/modules/installer/scpzipfiles.pm Fri Nov 29 13:55:17 2013 @@ -61,39 +61,26 @@ sub replace_all_ziplistvariables_in_file # the brackets are masked. ######################################################################################## -sub replace_all_ziplistvariables_in_rtffile +sub replace_all_ziplistvariables_in_rtffile ($$) { - my ( $fileref, $variablesref, $onelanguage, $loggingdir ) = @_; + my ($lines, $variablesref) = @_; - # installer::files::save_file($loggingdir . "license_" . $onelanguage . "_before.rtf", $fileref); - - for ( my $i = 0; $i <= $#{$fileref}; $i++ ) + my $line_count = scalar @$lines; + for (my $i=0; $i<=$line_count; ++$i) { - my $line = ${$fileref}[$i]; + my $line = $lines->[$i]; - if ( $line =~ /^.*\$\\\{\w+\\\}.*$/ ) # only occurence of $\{abc\} - { - for ( my $j = 0; $j <= $#{$variablesref}; $j++ ) + if ($line =~ /\$\\\{/) # early rejection of lines without variable references + { + while (my ($key, $value) = each (%$variables)) { - my $variableline = ${$variablesref}[$j]; - - my ($key, $value); - - if ( $variableline =~ /^\s*([\w-]+?)\s+(.*?)\s*$/ ) - { - $key = $1; - $value = $2; - $key = '$\{' . $key . '\}'; - } - + my $pattern = '$\{' . $key . '\}'; $line =~ s/\Q$key\E/$value/g; - ${$fileref}[$i] = $line; } + $lines->[$i] = $line; } } - - # installer::files::save_file($loggingdir . "license_" . $onelanguage . "_after.rtf", $fileref); } #########################################################
Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm?rev=1546562&r1=1546561&r2=1546562&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm (original) +++ openoffice/trunk/main/solenv/bin/modules/installer/windows/component.pm Fri Nov 29 13:55:17 2013 @@ -39,9 +39,9 @@ use installer::windows::language; # Sample for a guid: {B68FD953-3CEF-4489-8269-8726848056E8} ############################################################## -sub get_component_guid +sub get_component_guid ($) { - my ( $componentname, $componentidhashref ) = @_; + my ($componentname) = @_; # At this time only a template my $returnvalue = "\{COMPONENTGUID\}"; @@ -320,9 +320,9 @@ sub get_component_condition # real filename! #################################################################### -sub get_component_keypath +sub get_component_keypath ($$) { - my ($componentname, $itemsref, $componentidkeypathhashref) = @_; + my ($componentname, $itemsref) = @_; my $oneitem; my $found = 0; @@ -347,19 +347,6 @@ sub get_component_keypath my $keypath = $oneitem->{'uniquename'}; # "uniquename", not "Name" - # Special handling for updates from existing databases, because KeyPath must not change - if (( $installer::globals::updatedatabase ) && ( exists($componentidkeypathhashref->{$componentname}) )) - { - $keypath = $componentidkeypathhashref->{$componentname}; - # -> check, if this is a valid key path?! - if ( $keypath ne $oneitem->{'uniquename'} ) - { - # Warning: This keypath was changed because of info from old database - $infoline = "WARNING: The KeyPath for component \"$componentname\" was changed from \"$oneitem->{'uniquename'}\" to \"$keypath\" because of information from update database"; - $installer::logger::Lang->print($infoline); - } - } - # Special handling for components in PREDEFINED_OSSHELLNEWDIR. These components # need as KeyPath a RegistryItem in HKCU if ( $oneitem->{'userregkeypath'} ) { $keypath = $oneitem->{'userregkeypath'}; } @@ -376,9 +363,16 @@ sub get_component_keypath # Component ComponentId Directory_ Attributes Condition KeyPath ################################################################### -sub create_component_table +sub create_component_table ($$$$$$$) { - my ($filesref, $registryref, $dirref, $allfilecomponentsref, $allregistrycomponents, $basedir, $componentidhashref, $componentidkeypathhashref, $allvariables) = @_; + my ($filesref, + $registryref, + $dirref, + $allfilecomponentsref, + $allregistrycomponents, + $basedir, + $allvariables) + = @_; my @componenttable = (); @@ -396,12 +390,12 @@ sub create_component_table my %onecomponent = (); $onecomponent{'name'} = ${$allfilecomponentsref}[$i]; - $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref); + $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}); $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, $allvariables); $onecomponent{'condition'} = get_file_component_condition($onecomponent{'name'}, $filesref); - $onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $filesref, $componentidkeypathhashref); + $onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $filesref); $oneline = $onecomponent{'name'} . "\t" . $onecomponent{'guid'} . "\t" . $onecomponent{'directory'} . "\t" . $onecomponent{'attributes'} . "\t" . $onecomponent{'condition'} . "\t" . $onecomponent{'keypath'} . "\n"; @@ -416,11 +410,11 @@ sub create_component_table my %onecomponent = (); $onecomponent{'name'} = ${$allregistrycomponents}[$i]; - $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}, $componentidhashref); + $onecomponent{'guid'} = get_component_guid($onecomponent{'name'}); $onecomponent{'directory'} = get_registry_component_directory(); $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); + $onecomponent{'keypath'} = get_component_keypath($onecomponent{'name'}, $registryref); $oneline = $onecomponent{'name'} . "\t" . $onecomponent{'guid'} . "\t" . $onecomponent{'directory'} . "\t" . $onecomponent{'attributes'} . "\t" . $onecomponent{'condition'} . "\t" . $onecomponent{'keypath'} . "\n"; Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm?rev=1546562&r1=1546561&r2=1546562&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm (original) +++ openoffice/trunk/main/solenv/bin/modules/installer/windows/directory.pm Fri Nov 29 13:55:17 2013 @@ -352,9 +352,9 @@ sub get_last_directory_name # Creating the defaultdir for the file Director.idt ##################################################### -sub create_defaultdir_directorynames +sub create_defaultdir_directorynames ($) { - my ($directoryref, $shortdirnamehashref) = @_; + my ($directoryref) = @_; my @shortnames = (); if ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); } @@ -540,9 +540,9 @@ sub add_root_directories # Creating the file Director.idt dynamically ############################################### -sub create_directory_table +sub create_directory_table ($$$$) { - my ($directoryref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_; + my ($directoryref, $basedir, $allvariableshashref, $loggingdir) = @_; # Structure of the directory table: # Directory Directory_Parent DefaultDir @@ -561,7 +561,7 @@ sub create_directory_table if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1.log", $directoryref); } create_unique_directorynames($directoryref, $allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_1a.log", $directoryref); } - create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir! + create_defaultdir_directorynames($directoryref); # only destdir! if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_2.log", $directoryref); } set_installlocation_directory($directoryref, $allvariableshashref); if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforidt_local_3.log", $directoryref); } Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/file.pm URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/file.pm?rev=1546562&r1=1546561&r2=1546562&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/modules/installer/windows/file.pm (original) +++ openoffice/trunk/main/solenv/bin/modules/installer/windows/file.pm Fri Nov 29 13:55:17 2013 @@ -360,9 +360,9 @@ sub get_component_from_assigned_file # In most cases this is simply the filename. #################################################################### -sub generate_unique_filename_for_filetable +sub generate_unique_filename_for_filetable ($$) { - my ($fileref, $component, $uniquefilenamehashref) = @_; + my ($fileref, $component) = @_; # This new filename has to be saved into $fileref, because this is needed to find the source. # The filename sbasic.idx/OFFSETS is changed to OFFSETS, but OFFSETS is not unique. @@ -451,9 +451,9 @@ sub generate_unique_filename_for_filetab # The first part has to be 8.3 conform. #################################################################### -sub generate_filename_for_filetable +sub generate_filename_for_filetable ($$) { - my ($fileref, $shortnamesref, $uniquefilenamehashref) = @_; + my ($fileref, $shortnamesref) = @_; my $returnstring = ""; @@ -659,9 +659,9 @@ sub collect_shortnames_from_old_database # Creating the file File.idt dynamically ############################################ -sub create_files_table +sub create_files_table ($$$$) { - my ($filesref, $allfilecomponentsref, $basedir, $allvariables, $uniquefilenamehashref) = @_; + my ($filesref, $allfilecomponentsref, $basedir, $allvariables) = @_; $installer::logger::Lang->add_timestamp("Performance Info: File Table start"); @@ -700,7 +700,7 @@ sub create_files_table if (( $styles =~ /\bJAVAFILE\b/ ) && ( ! ($allvariables->{'JAVAPRODUCT'} ))) { next; } $file{'Component_'} = get_file_component_name($onefile, $filesref); - $file{'File'} = generate_unique_filename_for_filetable($onefile, $file{'Component_'}, $uniquefilenamehashref); + $file{'File'} = generate_unique_filename_for_filetable($onefile, $file{'Component_'}); $onefile->{'uniquename'} = $file{'File'}; $onefile->{'componentname'} = $file{'Component_'}; @@ -710,7 +710,7 @@ sub create_files_table if ( ! exists($allfilecomponents{$file{'Component_'}}) ) { $allfilecomponents{$file{'Component_'}} = 1; } - $file{'FileName'} = generate_filename_for_filetable($onefile, \%shortnames, $uniquefilenamehashref); + $file{'FileName'} = generate_filename_for_filetable($onefile, \%shortnames); $file{'FileSize'} = get_filesize($onefile); Modified: openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm URL: http://svn.apache.org/viewvc/openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm?rev=1546562&r1=1546561&r2=1546562&view=diff ============================================================================== --- openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm (original) +++ openoffice/trunk/main/solenv/bin/modules/installer/windows/msiglobal.pm Fri Nov 29 13:55:17 2013 @@ -1694,9 +1694,9 @@ sub execute_packaging # Setting the global variables ProductCode and the UpgradeCode ############################################################### -sub set_global_code_variables +sub set_global_code_variables ($$) { - my ( $languagesref, $languagestringref, $allvariableshashref, $alloldproperties ) = @_; + my ($languagesref, $allvariableshashref) = @_; # In the msi template directory a files "codes.txt" has to exist, in which the ProductCode # and the UpgradeCode for the product are defined.
