← Index
NYTProf Performance Profile   « block view • line view • sub view »
For C:/lo/libo-master/solenv/bin/make_installer.pl
  Run on Mon Sep 24 00:52:54 2012
Reported on Mon Sep 24 07:34:51 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/ziplist.pm
StatementsExecuted 18938 statements in 74.1ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
22131.5ms39.9msinstaller::ziplist::::remove_multiples_from_ziplistinstaller::ziplist::remove_multiples_from_ziplist
4419.12ms11.5msinstaller::ziplist::::getproductblockinstaller::ziplist::getproductblock
5635818.17ms8.17msinstaller::ziplist::::CORE:regcompinstaller::ziplist::CORE:regcomp (opcode)
72672315.97ms5.97msinstaller::ziplist::::CORE:matchinstaller::ziplist::CORE:match (opcode)
1113.58ms4.20msinstaller::ziplist::::BEGIN@30installer::ziplist::BEGIN@30
2212.64ms3.51msinstaller::ziplist::::analyze_settings_blockinstaller::ziplist::analyze_settings_block
1111.68ms4.22msinstaller::ziplist::::replace_all_variables_in_pathsinstaller::ziplist::replace_all_variables_in_paths
2211.47ms2.60msinstaller::ziplist::::get_variables_from_ziplistinstaller::ziplist::get_variables_from_ziplist
2211.40ms2.05msinstaller::ziplist::::get_settings_from_ziplistinstaller::ziplist::get_settings_from_ziplist
1111.25ms1.41msinstaller::ziplist::::replace_variables_in_ziplist_variablesinstaller::ziplist::replace_variables_in_ziplist_variables
554131669µs669µsinstaller::ziplist::::CORE:substinstaller::ziplist::CORE:subst (opcode)
1411198µs308µsinstaller::ziplist::::simplify_pathinstaller::ziplist::simplify_path
332187µs418µsinstaller::ziplist::::getinfofromziplistinstaller::ziplist::getinfofromziplist
111166µs477µsinstaller::ziplist::::remove_ending_separatorinstaller::ziplist::remove_ending_separator
111153µs2.31msinstaller::ziplist::::resolve_relative_pathsinstaller::ziplist::resolve_relative_paths
111137µs182µsinstaller::ziplist::::replace_minor_in_pathsinstaller::ziplist::replace_minor_in_paths
111132µs342µsinstaller::ziplist::::list_all_files_from_include_pathinstaller::ziplist::list_all_files_from_include_path
1411126µs126µsinstaller::ziplist::::CORE:sortinstaller::ziplist::CORE:sort (opcode)
111120µs221µsinstaller::ziplist::::replace_languages_in_pathsinstaller::ziplist::replace_languages_in_paths
11188µs101µsinstaller::ziplist::::replace_packagetype_in_pathsinstaller::ziplist::replace_packagetype_in_paths
11143µs50µsinstaller::ziplist::::add_variables_to_allvariableshashrefinstaller::ziplist::add_variables_to_allvariableshashref
11119µs21µsinstaller::ziplist::::BEGIN@32installer::ziplist::BEGIN@32
11117µs43µsinstaller::ziplist::::BEGIN@34installer::ziplist::BEGIN@34
11115µs15µsinstaller::ziplist::::overwrite_brandinginstaller::ziplist::overwrite_branding
11114µs16µsinstaller::ziplist::::BEGIN@36installer::ziplist::BEGIN@36
11113µs16µsinstaller::ziplist::::BEGIN@35installer::ziplist::BEGIN@35
11113µs15µsinstaller::ziplist::::BEGIN@33installer::ziplist::BEGIN@33
11112µs12µsinstaller::ziplist::::set_manufacturerinstaller::ziplist::set_manufacturer
1116µs6µsinstaller::ziplist::::set_default_productversion_if_requiredinstaller::ziplist::set_default_productversion_if_required
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1#*************************************************************************
2#
3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4#
5# Copyright 2000, 2010 Oracle and/or its affiliates.
6#
7# OpenOffice.org - a multi-platform office productivity suite
8#
9# This file is part of OpenOffice.org.
10#
11# OpenOffice.org is free software: you can redistribute it and/or modify
12# it under the terms of the GNU Lesser General Public License version 3
13# only, as published by the Free Software Foundation.
14#
15# OpenOffice.org is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU Lesser General Public License version 3 for more details
19# (a copy is included in the LICENSE file that accompanied this code).
20#
21# You should have received a copy of the GNU Lesser General Public License
22# version 3 along with OpenOffice.org. If not, see
23# <http://www.openoffice.org/license.html>
24# for a copy of the LGPLv3 License.
25#
26#*************************************************************************
27
28package installer::ziplist;
29
3022.57ms24.32ms
# spent 4.20ms (3.58+623µs) within installer::ziplist::BEGIN@30 which was called: # once (3.58ms+623µs) by installer::languages::BEGIN@34 at line 30
use File::Spec::Functions qw(rel2abs);
# spent 4.20ms making 1 call to installer::ziplist::BEGIN@30 # spent 116µs making 1 call to Exporter::import
31
32253µs223µs
# spent 21µs (19+2) within installer::ziplist::BEGIN@32 which was called: # once (19µs+2µs) by installer::languages::BEGIN@34 at line 32
use installer::exiter;
# spent 21µs making 1 call to installer::ziplist::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
33251µs217µs
# spent 15µs (13+2) within installer::ziplist::BEGIN@33 which was called: # once (13µs+2µs) by installer::languages::BEGIN@34 at line 33
use installer::globals;
# spent 15µs making 1 call to installer::ziplist::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
34257µs269µs
# spent 43µs (17+26) within installer::ziplist::BEGIN@34 which was called: # once (17µs+26µs) by installer::languages::BEGIN@34 at line 34
use installer::logger;
# spent 43µs making 1 call to installer::ziplist::BEGIN@34 # spent 26µs making 1 call to Exporter::import
352111µs218µs
# spent 16µs (13+3) within installer::ziplist::BEGIN@35 which was called: # once (13µs+3µs) by installer::languages::BEGIN@34 at line 35
use installer::remover;
# spent 16µs making 1 call to installer::ziplist::BEGIN@35 # spent 3µs making 1 call to UNIVERSAL::import
3626.16ms218µs
# spent 16µs (14+2) within installer::ziplist::BEGIN@36 which was called: # once (14µs+2µs) by installer::languages::BEGIN@34 at line 36
use installer::systemactions;
# spent 16µs making 1 call to installer::ziplist::BEGIN@36 # spent 2µs making 1 call to UNIVERSAL::import
37
38#################################################
39# Getting data from path file and zip list file
40#################################################
41
42sub getproductblock
43{
4446µs my ($fileref, $search, $inheritance) = @_;
45
4642µs my @searchblock = ();
4742µs my $searchexists = 0;
4841µs my $record = 0;
4942µs my $count = 0;
5042µs my $line;
5143µs my $inh = $inheritance ? '(?::\s*(\S+)\s*)?' : "";
5242µs my $parent;
53
5441.09ms for ( my $i = 0; $i <= $#{$fileref}; $i++ )
55 {
56934547µs $line = ${$fileref}[$i];
57
589346.77ms18682.06ms if ( $line =~ /^\s*\Q$search\E\s*$inh$/i ) # case insensitive
# spent 1.12ms making 934 calls to installer::ziplist::CORE:match, avg 1µs/call # spent 940µs making 934 calls to installer::ziplist::CORE:regcomp, avg 1µs/call
59 {
6042µs $record = 1;
6142µs $searchexists = 1;
6245µs $parent = $1 if $inheritance;
63 }
64
65934452µs if ($record)
66 {
67 push(@searchblock, $line);
68 }
69
70934839µs178129µs if ( ($record) && ($line =~ /\{/) )
# spent 129µs making 178 calls to installer::ziplist::CORE:match, avg 726ns/call
71 {
72 $count++;
73 }
74
75934794µs178119µs if ( ($record) && ($line =~ /\}/) )
# spent 119µs making 178 calls to installer::ziplist::CORE:match, avg 670ns/call
76 {
77 $count--;
78 }
79
809341.01ms178115µs if ( ($record) && ($line =~ /\}/) && ( $count == 0 ) )
# spent 115µs making 178 calls to installer::ziplist::CORE:match, avg 645ns/call
81 {
82 $record = 0;
83 }
84 }
85
8643µs if (( ! $searchexists ) && ( $search ne $installer::globals::globalblock ))
87 {
88 if ($search eq $installer::globals::product )
89 {
90 installer::exiter::exit_program("ERROR: Product $installer::globals::product not defined in $installer::globals::ziplistname", "getproductblock");
91 }
92 elsif ($search eq $installer::globals::compiler )
93 {
94 installer::exiter::exit_program("ERROR: Compiler $installer::globals::compiler not defined in $installer::globals::pathfilename", "getproductblock");
95 }
96 else # this is not possible
97 {
98 installer::exiter::exit_program("ERROR: Unknown value for $search in getproductblock()", "getproductblock");
99 }
100 }
101
102427µs return (\@searchblock, $parent);
103}
104
105###############################################
106# Analyzing the settings in the zip list file
107###############################################
108
109sub analyze_settings_block
110
# spent 3.51ms (2.64+868µs) within installer::ziplist::analyze_settings_block which was called 2 times, avg 1.75ms/call: # once (1.51ms+495µs) by installer::run at line 171 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (1.13ms+372µs) by installer::run at line 206 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
11123µs my ($blockref) = @_;
112
11322µs my @newsettingsblock = ();
11422µs my $compilerstring = "";
1152500ns my $record = 1;
11621µs my $counter = 0;
117
118 # Allowed values in settings block:
119 # "Settings", "Variables", "unix" (for destination path and logfile)
120 # Furthermore allowed values are $installer::globals::build (srx645) and $installer::globals::compiler (pro and nonpro (unxsols4.pro))
121
122 # Comment line in settings block begin with "#" or ";"
123
12424µs if ( $installer::globals::pro )
125 {
126 $compilerstring = $installer::globals::compiler . ".pro";
127 }
128 else
129 {
130 $compilerstring = $installer::globals::compiler;
131 }
132
1332109µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
134 {
1358658µs my $line = ${$blockref}[$i];
1368637µs my $nextline = "";
137
1388679µs if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
139
140 # removing comment lines
141
14286548µs172104µs if (($line =~ /^\s*\#/) || ($line =~ /^\s*\;/))
# spent 104µs making 172 calls to installer::ziplist::CORE:match, avg 606ns/call
143 {
144 next;
145 }
146
147 # complete blocks of unknows strings are not recorded
148
149862.48ms678763µs if ((!($line =~ /^\s*\Q$compilerstring\E\s*$/i)) &&
# spent 597µs making 506 calls to installer::ziplist::CORE:match, avg 1µs/call # spent 167µs making 172 calls to installer::ziplist::CORE:regcomp, avg 970ns/call
150 (!($line =~ /^\s*\Q$installer::globals::build\E\s*$/i)) &&
151 (!($line =~ /^\s*\bSettings\b\s*$/i)) &&
152 (!($line =~ /^\s*\bVariables\b\s*$/i)) &&
153 (!($line =~ /^\s*\bunix\b\s*$/i)) &&
154 ($nextline =~ /^\s*\{\s*$/i))
155 {
156 $record = 0;
157 next; # continue with next $i
158 }
159
1608625µs if (!( $record ))
161 {
162 if ($line =~ /^\s*\{\s*$/i)
163 {
164 $counter++;
165 }
166
167 if ($line =~ /^\s*\}\s*$/i)
168 {
169 $counter--;
170 }
171
172 if ($counter == 0)
173 {
174 $record = 1;
175 next; # continue with next $i
176 }
177 }
178
17986148µs if ($record)
180 {
181 push(@newsettingsblock, $line);
182 }
183 }
184
185213µs return \@newsettingsblock;
186}
187
188########################################
189# Settings in zip list file
190########################################
191
192sub get_settings_from_ziplist
193
# spent 2.05ms (1.40+646µs) within installer::ziplist::get_settings_from_ziplist which was called 2 times, avg 1.03ms/call: # once (823µs+398µs) by installer::run at line 173 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (582µs+248µs) by installer::run at line 208 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
19422µs my ($blockref) = @_;
195
19621µs my @allsettings = ();
19721µs my $isvariables = 0;
19821µs my $counter = 0;
1992500ns my $variablescounter = 0;
200
201 # Take all settings from the settings block
202 # Do not take the variables from the settings block
203 # If a setting is defined more than once, take the
204 # setting with the largest counter (open brackets)
205
206266µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
207 {
2088660µs my $line = ${$blockref}[$i];
2098638µs my $nextline = "";
210
2118677µs if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
212
21386623µs108298µs if (($line =~ /^\s*\S+\s*$/i) &&
# spent 298µs making 108 calls to installer::ziplist::CORE:match, avg 3µs/call
214 ($nextline =~ /^\s*\{\s*$/i) &&
215 (!($line =~ /^\s*Variables\s*$/i)))
216 {
21723µs next;
218 }
219
22084329µs8492µs if ($line =~ /^\s*Variables\s*$/i)
# spent 92µs making 84 calls to installer::ziplist::CORE:match, avg 1µs/call
221 {
222 # This is a block of variables
223
22422µs $isvariables = 1;
22522µs next;
226 }
227
22882309µs8285µs if ($line =~ /^\s*\{\s*$/i)
# spent 85µs making 82 calls to installer::ziplist::CORE:match, avg 1µs/call
229 {
23043µs if ($isvariables)
231 {
232 $variablescounter++;
233 }
234 else
235 {
23621µs $counter++;
237 }
238
23944µs next;
240 }
241
24278297µs7884µs if ($line =~ /^\s*\}\s*$/i)
# spent 84µs making 78 calls to installer::ziplist::CORE:match, avg 1µs/call
243 {
24443µs if ($isvariables)
245 {
24621µs $variablescounter--;
247
24821µs if ($variablescounter == 0)
249 {
250 $isvariables = 0;
251 }
252 }
253 else
254 {
25521µs $counter--;
256 }
257
25843µs next;
259 }
260
2617427µs if ($isvariables)
262 {
2636751µs next;
264 }
265
266718µs788µs installer::remover::remove_leading_and_ending_whitespaces(\$line);
# spent 88µs making 7 calls to installer::remover::remove_leading_and_ending_whitespaces, avg 13µs/call
267
26879µs $line .= "\t##$counter##\n";
269
270710µs push(@allsettings, $line);
271 }
272
273213µs return \@allsettings;
274}
275
276#######################################
277# Variables from zip list file
278#######################################
279
280sub get_variables_from_ziplist
281
# spent 2.60ms (1.47+1.12) within installer::ziplist::get_variables_from_ziplist which was called 2 times, avg 1.30ms/call: # once (815µs+597µs) by installer::run at line 175 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (658µs+528µs) by installer::run at line 210 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
28222µs my ($blockref) = @_;
283
28422µs my @allvariables = ();
28521µs my $isvariables = 0;
28621µs my $counter = 0;
28721µs my $variablescounter = 0;
28821µs my $countersum = 0;
289
290 # Take all variables from the settings block
291 # Do not take the other settings from the settings block
292 # If a variable is defined more than once, take the
293 # variable with the largest counter (open brackets)
294
2952101µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
296 {
2978660µs my $line = ${$blockref}[$i];
2988663µs my $nextline = ${$blockref}[$i+1];
299
30086418µs86141µs if ($line =~ /^\s*Variables\s*$/i)
# spent 141µs making 86 calls to installer::ziplist::CORE:match, avg 2µs/call
301 {
302 # This is a block of variables
303
3042600ns $isvariables = 1;
30522µs next;
306 }
307
30884324µs8490µs if ($line =~ /^\s*\{\s*$/i)
# spent 90µs making 84 calls to installer::ziplist::CORE:match, avg 1µs/call
309 {
31042µs if ($isvariables)
311 {
312 $variablescounter++;
313 }
314 else
315 {
31621µs $counter++;
317 }
318
31942µs next;
320 }
321
32280300µs8081µs if ($line =~ /^\s*\}\s*$/i)
# spent 81µs making 80 calls to installer::ziplist::CORE:match, avg 1µs/call
323 {
32444µs if ($isvariables)
325 {
3262500ns $variablescounter--;
327
32822µs if ($variablescounter == 0)
329 {
330 $isvariables = 0;
331 }
332 }
333 else
334 {
33521µs $counter--;
336 }
337
33842µs next;
339 }
340
3417624µs if (!($isvariables))
342 {
34398µs next;
344 }
345
3466731µs $countersum = $counter + $variablescounter;
347
34867168µs67812µs installer::remover::remove_leading_and_ending_whitespaces(\$line);
# spent 812µs making 67 calls to installer::remover::remove_leading_and_ending_whitespaces, avg 12µs/call
349
3506764µs $line .= "\t##$countersum##\n";
351
3526792µs push(@allvariables, $line);
353 }
354
355212µs return \@allvariables;
356}
357
358#######################################################################
359# Removing multiple variables and settings, defined in zip list file
360#######################################################################
361
362sub remove_multiples_from_ziplist
363
# spent 39.9ms (31.5+8.38) within installer::ziplist::remove_multiples_from_ziplist which was called 2 times, avg 19.9ms/call: # once (30.9ms+8.02ms) by installer::run at line 218 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (582µs+360µs) by installer::run at line 216 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
36423µs my ($blockref) = @_;
365
366 # remove all definitions of settings and variables
367 # that occur more than once in the zip list file.
368 # Take the one with the most open brackets. This
369 # number is stored at the end of the string.
370
37122µs my @newarray = ();
37221µs my @itemarray = ();
37322µs my ($line, $itemname, $itemnumber);
374
375 # first collecting all variables and settings names
376
3772100µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
378 {
3797244µs $line = ${$blockref}[$i];
380
38172501µs72214µs if ($line =~ /^\s*\b(\S*)\b\s+.*\#\#\d+\#\#\s*$/i)
# spent 214µs making 72 calls to installer::ziplist::CORE:match, avg 3µs/call
382 {
383 $itemname = $1;
384 }
385
38672340µs if (! grep {$_ eq $itemname} @itemarray)
387 {
388 push(@itemarray, $itemname);
389 }
390 }
391
392 # and now all $items can be selected with the highest number
393
394292µs for ( my $i = 0; $i <= $#itemarray; $i++ )
395 {
3967242µs $itemname = $itemarray[$i];
397
3987231µs my $itemnumbermax = 0;
3997236µs my $printline = "";
400
401724.72ms for ( my $j = 0; $j <= $#{$blockref}; $j++ )
402 {
40342742.30ms $line = ${$blockref}[$j];
404
405427429.7ms85487.10ms if ($line =~ /^\s*\Q$itemname\E\s+.*\#\#(\d+)\#\#\s*$/)
# spent 4.66ms making 4274 calls to installer::ziplist::CORE:regcomp, avg 1µs/call # spent 2.44ms making 4274 calls to installer::ziplist::CORE:match, avg 571ns/call
406 {
4077278µs $itemnumber = $1;
408
4097287µs if ($itemnumber >= $itemnumbermax)
410 {
4117234µs $printline = $line;
4127236µs $itemnumbermax = $itemnumber;
413 }
414 }
415 }
416
417 # removing the ending number from the printline
418 # and putting it into the array
419
42072438µs72207µs $printline =~ s/\#\#\d+\#\#//;
# spent 207µs making 72 calls to installer::ziplist::CORE:subst, avg 3µs/call
42172202µs72862µs installer::remover::remove_leading_and_ending_whitespaces(\$line);
# spent 862µs making 72 calls to installer::remover::remove_leading_and_ending_whitespaces, avg 12µs/call
42272102µs push(@newarray, $printline);
423 }
424
425235µs return \@newarray;
426}
427
428#########################################################
429# Reading one variable defined in the zip list file
430#########################################################
431
432sub getinfofromziplist
433
# spent 418µs (187+231) within installer::ziplist::getinfofromziplist which was called 3 times, avg 139µs/call: # once (87µs+99µs) by installer::run at line 267 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (63µs+80µs) by installer::run at line 1799 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (37µs+53µs) by installer::setupscript::set_setupscript_name at line 61 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/setupscript.pm
{
43439µs my ($blockref, $variable) = @_;
435
43633µs my $searchstring = "";
43732µs my $line;
438
439321µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
440 {
4411417µs $line = ${$blockref}[$i];
442
44314325µs28231µs if ( $line =~ /^\s*\Q$variable\E\s+(.+?)\s*$/ ) # "?" for minimal matching
# spent 153µs making 14 calls to installer::ziplist::CORE:regcomp, avg 11µs/call # spent 78µs making 14 calls to installer::ziplist::CORE:match, avg 6µs/call
444 {
445312µs $searchstring = $1;
44636µs last;
447 }
448 }
449
450324µs return \$searchstring;
451}
452
453####################################################
454# Replacing variables in include path
455####################################################
456
457sub replace_all_variables_in_paths
458
# spent 4.22ms (1.68+2.54) within installer::ziplist::replace_all_variables_in_paths which was called: # once (1.68ms+2.54ms) by installer::run at line 275 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
45912µs my ( $patharrayref, $variableshashref ) = @_;
460
461131µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
462 {
4631410µs my $line = ${$patharrayref}[$i];
464
465144µs my $key;
466
46714232µs14126µs foreach $key (sort { length ($b) <=> length ($a) } keys %{$variableshashref})
# spent 126µs making 14 calls to installer::ziplist::CORE:sort, avg 9µs/call
468 {
46911292µs my $value = $variableshashref->{$key};
470
4711121.87ms2241.21ms if (( $line =~ /\{$key\}/ ) && ( $value eq "" )) { $line = ".\n"; }
# spent 1.12ms making 112 calls to installer::ziplist::CORE:regcomp, avg 10µs/call # spent 92µs making 112 calls to installer::ziplist::CORE:match, avg 819ns/call
472
4731121.96ms2241.20ms $line =~ s/\{\Q$key\E\}/$value/g;
# spent 1.09ms making 112 calls to installer::ziplist::CORE:regcomp, avg 10µs/call # spent 108µs making 112 calls to installer::ziplist::CORE:subst, avg 965ns/call
474 }
475
4761419µs ${$patharrayref}[$i] = $line;
477 }
478}
479
480####################################################
481# Replacing minor in include path
482####################################################
483
484sub replace_minor_in_paths
485
# spent 182µs (137+46) within installer::ziplist::replace_minor_in_paths which was called: # once (137µs+46µs) by installer::run at line 277 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
48612µs my ( $patharrayref ) = @_;
487
488127µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
489 {
4901411µs my $line = ${$patharrayref}[$i];
491
4921482µs1438µs $line =~ s/\.\{minor\}//g;
# spent 38µs making 14 calls to installer::ziplist::CORE:subst, avg 3µs/call
4931449µs148µs $line =~ s/\.\{minornonpre\}//g;
# spent 8µs making 14 calls to installer::ziplist::CORE:subst, avg 557ns/call
494
4951412µs ${$patharrayref}[$i] = $line;
496 }
497}
498
499####################################################
500# Replacing packagetype in include path
501####################################################
502
503sub replace_packagetype_in_paths
504
# spent 101µs (88+12) within installer::ziplist::replace_packagetype_in_paths which was called: # once (88µs+12µs) by installer::run at line 279 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
50511µs my ( $patharrayref ) = @_;
506
507123µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
508 {
5091410µs my $line = ${$patharrayref}[$i];
510
5111452µs149µs if (( $installer::globals::installertypedir ) && ( $line =~ /\{pkgtype\}/ ))
# spent 9µs making 14 calls to installer::ziplist::CORE:match, avg 643ns/call
512 {
51319µs14µs $line =~ s/\{pkgtype\}/$installer::globals::installertypedir/g;
# spent 4µs making 1 call to installer::ziplist::CORE:subst
514 }
515
516149µs ${$patharrayref}[$i] = $line;
517 }
518}
519
520####################################################
521# Removing ending separators in paths
522####################################################
523
524sub remove_ending_separator
525
# spent 477µs (166+311) within installer::ziplist::remove_ending_separator which was called: # once (166µs+311µs) by installer::run at line 283 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
52613µs my ( $patharrayref ) = @_;
527
528131µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
529 {
5301410µs my $line = ${$patharrayref}[$i];
531
5321437µs14167µs installer::remover::remove_ending_pathseparator(\$line);
# spent 167µs making 14 calls to installer::remover::remove_ending_pathseparator, avg 12µs/call
533
53414193µs14143µs $line =~ s/\s*$//;
# spent 143µs making 14 calls to installer::ziplist::CORE:subst, avg 10µs/call
535147µs $line = $line . "\n";
536
5371413µs ${$patharrayref}[$i] = $line;
538 }
539}
540
541####################################################
542# Replacing languages in include path
543####################################################
544
545sub replace_languages_in_paths
546
# spent 221µs (120+101) within installer::ziplist::replace_languages_in_paths which was called: # once (120µs+101µs) by installer::run at line 616 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
54712µs my ( $patharrayref, $languagesref ) = @_;
548
54915µs191µs installer::logger::include_header_into_logfile("Replacing languages in include paths:");
# spent 91µs making 1 call to installer::logger::include_header_into_logfile
550
55111µs my @patharray = ();
55212µs my $infoline = "";
553
554119µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
555 {
5561411µs my $line = ${$patharrayref}[$i];
557
5581463µs149µs if ( $line =~ /\$\(LANG\)/ )
# spent 9µs making 14 calls to installer::ziplist::CORE:match, avg 664ns/call
559 {
560 my $originalline = $line;
561 my $newline = "";
562
563 for ( my $j = 0; $j <= $#{$languagesref}; $j++ )
564 {
565 my $language = ${$languagesref}[$j];
566 $line =~ s/\$\(LANG\)/$language/g;
567 push(@patharray ,$line);
568 $newdir = $line;
569 $line = $originalline;
570
571 installer::remover::remove_leading_and_ending_whitespaces(\$newline);
572
573 # Is it necessary to refresh the global array, containing all files of all include paths?
574 if ( -d $newdir )
575 {
576 # Checking if $newdir is empty
577 if ( ! installer::systemactions::is_empty_dir($newdir) )
578 {
579 $installer::globals::refresh_includepaths = 1;
580 $infoline = "Directory $newdir exists and is not empty. Refreshing global file array is required.\n";
581 push( @installer::globals::logfileinfo, $infoline);
582 }
583 else
584 {
585 $infoline = "Directory $newdir is empty. No refresh of global file array required.\n";
586 push( @installer::globals::logfileinfo, $infoline);
587 }
588 }
589 else
590 {
591 $infoline = "Directory $newdir does not exist. No refresh of global file array required.\n";
592 push( @installer::globals::logfileinfo, $infoline);
593 }
594 }
595 }
596 else # not language dependent include path
597 {
5981417µs push(@patharray ,$line);
599 }
600 }
601
60218µs return \@patharray;
603}
604
605#####################################################
606# Collecting all files from all include paths
607#####################################################
608
609sub list_all_files_from_include_path
610
# spent 342µs (132+210) within installer::ziplist::list_all_files_from_include_path which was called: # once (132µs+210µs) by installer::run at line 620 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
61112µs my ( $patharrayref) = @_;
612
61312µs141µs installer::logger::include_header_into_logfile("Include paths:");
# spent 41µs making 1 call to installer::logger::include_header_into_logfile
614
615117µs for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
616 {
6171410µs my $path = ${$patharrayref}[$i];
6181438µs14169µs installer::remover::remove_leading_and_ending_whitespaces(\$path);
# spent 169µs making 14 calls to installer::remover::remove_leading_and_ending_whitespaces, avg 12µs/call
6191414µs my $infoline = "$path\n";
6201418µs push( @installer::globals::logfileinfo, $infoline);
621 }
622
62311µs push( @installer::globals::logfileinfo, "\n");
624
62518µs return \@filesarray;
626}
627
628#####################################################
629# Collecting all files from all include paths
630#####################################################
631
632sub set_manufacturer
633
# spent 12µs within installer::ziplist::set_manufacturer which was called: # once (12µs+0s) by installer::run at line 255 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
63412µs my ($allvariables) = @_;
6351500ns my $manufacturer;
636
63713µs if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" )
638 {
639 $manufacturer = $ENV{'OOO_VENDOR'};
640 }
641 elsif( defined $ENV{'USERNAME'} && $ENV{'USERNAME'} ne "" )
642 {
643 $manufacturer = $ENV{'USERNAME'};
644 }
645 elsif( defined $ENV{'USER'} && $ENV{'USER'} ne "" )
646 {
647 $manufacturer = $ENV{'USER'};
648 }
649 else
650 {
651 $manufacturer = "default";
652 }
653
65412µs $installer::globals::manufacturer = $manufacturer;
65512µs $installer::globals::longmanufacturer = $manufacturer;
656
65718µs $allvariables->{'MANUFACTURER'} = $installer::globals::manufacturer;
658}
659
660##############################################################
661# A ProductVersion has to be defined. If it is not set in
662# zip.lst, it is set now to "1"
663##############################################################
664
665sub set_default_productversion_if_required
666
# spent 6µs within installer::ziplist::set_default_productversion_if_required which was called: # once (6µs+0s) by installer::run at line 224 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
66711µs my ($allvariables) = @_;
668
66916µs if (!($allvariables->{'PRODUCTVERSION'}))
670 {
671 $allvariables->{'PRODUCTVERSION'} = 1; # FAKE
672 }
673}
674
675####################################################
676# Removing .. in paths
677####################################################
678
679sub simplify_path
680
# spent 308µs (198+110) within installer::ziplist::simplify_path which was called 14 times, avg 22µs/call: # 14 times (198µs+110µs) by installer::ziplist::resolve_relative_paths at line 709, avg 22µs/call
{
6811415µs my ( $pathref ) = @_;
682
683148µs my $oldpath = $$pathref;
684
685146µs my $change = 0;
686
68714192µs2891µs while ( $oldpath =~ /(^.*)(\Q$installer::globals::separator\E.*\w+?)(\Q$installer::globals::separator\E\.\.)(\Q$installer::globals::separator\E.*$)/ )
# spent 49µs making 14 calls to installer::ziplist::CORE:match, avg 3µs/call # spent 42µs making 14 calls to installer::ziplist::CORE:regcomp, avg 3µs/call
688 {
68937µs my $part1 = $1;
69033µs my $part2 = $4;
69131µs $oldpath = $part1 . $part2;
692342µs619µs $change = 1;
# spent 16µs making 3 calls to installer::ziplist::CORE:match, avg 5µs/call # spent 3µs making 3 calls to installer::ziplist::CORE:regcomp, avg 1µs/call
693 }
694
6951652µs if ( $change ) { $$pathref = $oldpath . "\n"; }
696}
697
698####################################################
699# Removing ending separators in paths
700####################################################
701
702sub resolve_relative_paths
703
# spent 2.31ms (153µs+2.16) within installer::ziplist::resolve_relative_paths which was called: # once (153µs+2.16ms) by installer::run at line 281 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
70412µs my ( $patharrayref ) = @_;
705
706111µs for my $path ( @{$patharrayref} )
707 {
7081455µs141.85ms $path = rel2abs($path);
# spent 1.85ms making 14 calls to File::Spec::Functions::__ANON__[File/Spec/Functions.pm:43], avg 132µs/call
7091450µs14308µs simplify_path(\$path);
# spent 308µs making 14 calls to installer::ziplist::simplify_path, avg 22µs/call
710 }
711}
712
713####################################################
714# Replacing variables inside zip list variables
715# Example: {milestone} to be replaced by
716# $installer::globals::lastminor
717####################################################
718
719sub replace_variables_in_ziplist_variables
720
# spent 1.41ms (1.25+161µs) within installer::ziplist::replace_variables_in_ziplist_variables which was called: # once (1.25ms+161µs) by installer::run at line 220 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
72111µs my ($blockref) = @_;
722
72311µs my $milestonevariable = $installer::globals::lastminor;
72418µs12µs $milestonevariable =~ s/m//;
# spent 2µs making 1 call to installer::ziplist::CORE:subst
72515µs1500ns $milestonevariable =~ s/s/\./;
# spent 500ns making 1 call to installer::ziplist::CORE:subst
726
72711µs my $localminor = $installer::globals::lastminor;
7281500ns if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; }
729
73014µs my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")";
731
732181µs for ( my $i = 0; $i <= $#{$blockref}; $i++ )
733 {
734130273µs6529µs if ($installer::globals::lastminor) { ${$blockref}[$i] =~ s/\{milestone\}/$milestonevariable/; }
# spent 29µs making 65 calls to installer::ziplist::CORE:subst, avg 445ns/call
735 else { ${$blockref}[$i] =~ s/\{milestone\}//; }
736130275µs6533µs if ( $localminor ) { ${$blockref}[$i] =~ s/\{minor\}/$localminor/; }
# spent 33µs making 65 calls to installer::ziplist::CORE:subst, avg 502ns/call
737 else { ${$blockref}[$i] =~ s/\{minor\}//; }
7386549µs if ( $installer::globals::buildid ) { ${$blockref}[$i] =~ s/\{buildid\}/$installer::globals::buildid/; }
73965226µs6533µs else { ${$blockref}[$i] =~ s/\{buildid\}//; }
# spent 33µs making 65 calls to installer::ziplist::CORE:subst, avg 512ns/call
740130271µs6531µs if ( $installer::globals::build ) { ${$blockref}[$i] =~ s/\{buildsource\}/$installer::globals::build/; }
# spent 31µs making 65 calls to installer::ziplist::CORE:subst, avg 471ns/call
741 else { ${$blockref}[$i] =~ s/\{build\}//; }
74265224µs6533µs ${$blockref}[$i] =~ s/\{buildidcws\}/$buildidstringcws/;
# spent 33µs making 65 calls to installer::ziplist::CORE:subst, avg 505ns/call
743 }
744}
745
746###########################################################
747# Overwrite branding data in openoffice.lst that is defined in configure
748###########################################################
749
750sub overwrite_branding
751
# spent 15µs within installer::ziplist::overwrite_branding which was called: # once (15µs+0s) by installer::run at line 228 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
75211µs my ($variableshashref) = @_;
75312µs $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" );
75412µs $variableshashref->{'PROGRESSBARCOLOR'} = $ENV{'PROGRESSBARCOLOR'} , if( defined $ENV{'PROGRESSBARCOLOR'} && $ENV{'PROGRESSBARCOLOR'} ne "" );
75512µs $variableshashref->{'PROGRESSSIZE'} = $ENV{'PROGRESSSIZE'} , if( defined $ENV{'PROGRESSSIZE'} && $ENV{'PROGRESSSIZE'} ne "" );
75612µs $variableshashref->{'PROGRESSPOSITION'} = $ENV{'PROGRESSPOSITION'} , if( defined $ENV{'PROGRESSPOSITION'} && $ENV{'PROGRESSPOSITION'} ne "" );
75719µs $variableshashref->{'PROGRESSFRAMECOLOR'} = $ENV{'PROGRESSFRAMECOLOR'} , if( defined $ENV{'PROGRESSFRAMECOLOR'} && $ENV{'PROGRESSFRAMECOLOR'} ne "" );
758}
759
760###########################################################
761# Adding the lowercase variables into the variableshashref
762###########################################################
763
764sub add_variables_to_allvariableshashref
765
# spent 50µs (43+7) within installer::ziplist::add_variables_to_allvariableshashref which was called: # once (43µs+7µs) by installer::run at line 226 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
76611µs my ($variableshashref) = @_;
767
76812µs my $lcvariable = lc($variableshashref->{'PRODUCTNAME'});
76912µs $variableshashref->{'LCPRODUCTNAME'} = $lcvariable;
770
77115µs if ($variableshashref->{'SHORT_PRODUCTEXTENSION'})
772 {
773 $variableshashref->{'LCPRODUCTEXTENSION'} = "\-" . lc($variableshashref->{'SHORT_PRODUCTEXTENSION'}); # including the "-" !
774 }
775 else
776 {
777 $variableshashref->{'LCPRODUCTEXTENSION'} = "";
778 }
779
78012µs if ( $installer::globals::patch ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::patchaddon; }
781 elsif ( $installer::globals::languagepack ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::languagepackaddon; }
782 elsif ( $installer::globals::helppack ) { $variableshashref->{'PRODUCTADDON'} = $installer::globals::helppackpackaddon; }
78315µs else { $variableshashref->{'PRODUCTADDON'} = ""; }
784
78511µs my $localbuild = $installer::globals::build;
786110µs14µs if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680"
# spent 4µs making 1 call to installer::ziplist::CORE:match
78712µs $variableshashref->{'PRODUCTMAJOR'} = $localbuild;
788
78911µs my $localminor = "";
79012µs if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
79111µs else { $localminor = $installer::globals::lastminor; }
792110µs13µs if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
# spent 3µs making 1 call to installer::ziplist::CORE:match
79311µs $variableshashref->{'PRODUCTMINOR'} = $localminor;
794
79512µs $variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
79618µs $variableshashref->{'SYSTEM_LIBEXTTEXTCAT_DATA'} = $ENV{'SYSTEM_LIBEXTTEXTCAT_DATA'} , if( defined $ENV{'SYSTEM_LIBEXTTEXTCAT_DATA'} && $ENV{'SYSTEM_LIBEXTTEXTCAT_DATA'} ne "" );
797}
798
79918µs1;
 
# spent 5.97ms within installer::ziplist::CORE:match which was called 7267 times, avg 821ns/call: # 4274 times (2.44ms+0s) by installer::ziplist::remove_multiples_from_ziplist at line 405, avg 571ns/call # 934 times (1.12ms+0s) by installer::ziplist::getproductblock at line 58, avg 1µs/call # 506 times (597µs+0s) by installer::ziplist::analyze_settings_block at line 149, avg 1µs/call # 178 times (129µs+0s) by installer::ziplist::getproductblock at line 70, avg 726ns/call # 178 times (119µs+0s) by installer::ziplist::getproductblock at line 75, avg 670ns/call # 178 times (115µs+0s) by installer::ziplist::getproductblock at line 80, avg 645ns/call # 172 times (104µs+0s) by installer::ziplist::analyze_settings_block at line 142, avg 606ns/call # 112 times (92µs+0s) by installer::ziplist::replace_all_variables_in_paths at line 471, avg 819ns/call # 108 times (298µs+0s) by installer::ziplist::get_settings_from_ziplist at line 213, avg 3µs/call # 86 times (141µs+0s) by installer::ziplist::get_variables_from_ziplist at line 300, avg 2µs/call # 84 times (92µs+0s) by installer::ziplist::get_settings_from_ziplist at line 220, avg 1µs/call # 84 times (90µs+0s) by installer::ziplist::get_variables_from_ziplist at line 308, avg 1µs/call # 82 times (85µs+0s) by installer::ziplist::get_settings_from_ziplist at line 228, avg 1µs/call # 80 times (81µs+0s) by installer::ziplist::get_variables_from_ziplist at line 322, avg 1µs/call # 78 times (84µs+0s) by installer::ziplist::get_settings_from_ziplist at line 242, avg 1µs/call # 72 times (214µs+0s) by installer::ziplist::remove_multiples_from_ziplist at line 381, avg 3µs/call # 14 times (78µs+0s) by installer::ziplist::getinfofromziplist at line 443, avg 6µs/call # 14 times (49µs+0s) by installer::ziplist::simplify_path at line 687, avg 3µs/call # 14 times (9µs+0s) by installer::ziplist::replace_languages_in_paths at line 558, avg 664ns/call # 14 times (9µs+0s) by installer::ziplist::replace_packagetype_in_paths at line 511, avg 643ns/call # 3 times (16µs+0s) by installer::ziplist::simplify_path at line 692, avg 5µs/call # once (4µs+0s) by installer::ziplist::add_variables_to_allvariableshashref at line 786 # once (3µs+0s) by installer::ziplist::add_variables_to_allvariableshashref at line 792
sub installer::ziplist::CORE:match; # opcode
# spent 8.17ms within installer::ziplist::CORE:regcomp which was called 5635 times, avg 1µs/call: # 4274 times (4.66ms+0s) by installer::ziplist::remove_multiples_from_ziplist at line 405, avg 1µs/call # 934 times (940µs+0s) by installer::ziplist::getproductblock at line 58, avg 1µs/call # 172 times (167µs+0s) by installer::ziplist::analyze_settings_block at line 149, avg 970ns/call # 112 times (1.12ms+0s) by installer::ziplist::replace_all_variables_in_paths at line 471, avg 10µs/call # 112 times (1.09ms+0s) by installer::ziplist::replace_all_variables_in_paths at line 473, avg 10µs/call # 14 times (153µs+0s) by installer::ziplist::getinfofromziplist at line 443, avg 11µs/call # 14 times (42µs+0s) by installer::ziplist::simplify_path at line 687, avg 3µs/call # 3 times (3µs+0s) by installer::ziplist::simplify_path at line 692, avg 1µs/call
sub installer::ziplist::CORE:regcomp; # opcode
# spent 126µs within installer::ziplist::CORE:sort which was called 14 times, avg 9µs/call: # 14 times (126µs+0s) by installer::ziplist::replace_all_variables_in_paths at line 467, avg 9µs/call
sub installer::ziplist::CORE:sort; # opcode
# spent 669µs within installer::ziplist::CORE:subst which was called 554 times, avg 1µs/call: # 112 times (108µs+0s) by installer::ziplist::replace_all_variables_in_paths at line 473, avg 965ns/call # 72 times (207µs+0s) by installer::ziplist::remove_multiples_from_ziplist at line 420, avg 3µs/call # 65 times (33µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 739, avg 512ns/call # 65 times (33µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 742, avg 505ns/call # 65 times (33µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 736, avg 502ns/call # 65 times (31µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 740, avg 471ns/call # 65 times (29µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 734, avg 445ns/call # 14 times (143µs+0s) by installer::ziplist::remove_ending_separator at line 534, avg 10µs/call # 14 times (38µs+0s) by installer::ziplist::replace_minor_in_paths at line 492, avg 3µs/call # 14 times (8µs+0s) by installer::ziplist::replace_minor_in_paths at line 493, avg 557ns/call # once (4µs+0s) by installer::ziplist::replace_packagetype_in_paths at line 513 # once (2µs+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 724 # once (500ns+0s) by installer::ziplist::replace_variables_in_ziplist_variables at line 725
sub installer::ziplist::CORE:subst; # opcode