← 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:32 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{
44566011.6ms my ($fileref, $search, $inheritance) = @_;
45
46 my @searchblock = ();
47 my $searchexists = 0;
48 my $record = 0;
49 my $count = 0;
50 my $line;
51 my $inh = $inheritance ? '(?::\s*(\S+)\s*)?' : "";
52 my $parent;
53
54 for ( my $i = 0; $i <= $#{$fileref}; $i++ )
55 {
56 $line = ${$fileref}[$i];
57
5818682.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 {
60 $record = 1;
61 $searchexists = 1;
62 $parent = $1 if $inheritance;
63 }
64
65 if ($record)
66 {
67 push(@searchblock, $line);
68 }
69
70178129µs if ( ($record) && ($line =~ /\{/) )
# spent 129µs making 178 calls to installer::ziplist::CORE:match, avg 726ns/call
71 {
72 $count++;
73 }
74
75178119µs if ( ($record) && ($line =~ /\}/) )
# spent 119µs making 178 calls to installer::ziplist::CORE:match, avg 670ns/call
76 {
77 $count--;
78 }
79
80178115µ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
86 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
102 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
{
1116183.51ms my ($blockref) = @_;
112
113 my @newsettingsblock = ();
114 my $compilerstring = "";
115 my $record = 1;
116 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
124 if ( $installer::globals::pro )
125 {
126 $compilerstring = $installer::globals::compiler . ".pro";
127 }
128 else
129 {
130 $compilerstring = $installer::globals::compiler;
131 }
132
133 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
134 {
135 my $line = ${$blockref}[$i];
136 my $nextline = "";
137
138 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
139
140 # removing comment lines
141
142172104µ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
149678763µ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
160 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
179 if ($record)
180 {
181 push(@newsettingsblock, $line);
182 }
183 }
184
185 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
{
1947941.96ms my ($blockref) = @_;
195
196 my @allsettings = ();
197 my $isvariables = 0;
198 my $counter = 0;
199 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
206 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
207 {
208 my $line = ${$blockref}[$i];
209 my $nextline = "";
210
211 if ( ${$blockref}[$i+1] ) { $nextline = ${$blockref}[$i+1]; }
212
213108298µ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 {
217 next;
218 }
219
2208492µ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
224 $isvariables = 1;
225 next;
226 }
227
2288285µs if ($line =~ /^\s*\{\s*$/i)
# spent 85µs making 82 calls to installer::ziplist::CORE:match, avg 1µs/call
229 {
230 if ($isvariables)
231 {
232 $variablescounter++;
233 }
234 else
235 {
236 $counter++;
237 }
238
239 next;
240 }
241
2427884µs if ($line =~ /^\s*\}\s*$/i)
# spent 84µs making 78 calls to installer::ziplist::CORE:match, avg 1µs/call
243 {
244 if ($isvariables)
245 {
246 $variablescounter--;
247
248 if ($variablescounter == 0)
249 {
250 $isvariables = 0;
251 }
252 }
253 else
254 {
255 $counter--;
256 }
257
258 next;
259 }
260
261 if ($isvariables)
262 {
263 next;
264 }
265
266788µ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
268 $line .= "\t##$counter##\n";
269
270 push(@allsettings, $line);
271 }
272
273 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
{
2828191.69ms my ($blockref) = @_;
283
284 my @allvariables = ();
285 my $isvariables = 0;
286 my $counter = 0;
287 my $variablescounter = 0;
288 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
295 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
296 {
297 my $line = ${$blockref}[$i];
298 my $nextline = ${$blockref}[$i+1];
299
30086141µ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
304 $isvariables = 1;
305 next;
306 }
307
3088490µs if ($line =~ /^\s*\{\s*$/i)
# spent 90µs making 84 calls to installer::ziplist::CORE:match, avg 1µs/call
309 {
310 if ($isvariables)
311 {
312 $variablescounter++;
313 }
314 else
315 {
316 $counter++;
317 }
318
319 next;
320 }
321
3228081µs if ($line =~ /^\s*\}\s*$/i)
# spent 81µs making 80 calls to installer::ziplist::CORE:match, avg 1µs/call
323 {
324 if ($isvariables)
325 {
326 $variablescounter--;
327
328 if ($variablescounter == 0)
329 {
330 $isvariables = 0;
331 }
332 }
333 else
334 {
335 $counter--;
336 }
337
338 next;
339 }
340
341 if (!($isvariables))
342 {
343 next;
344 }
345
346 $countersum = $counter + $variablescounter;
347
34867812µ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
350 $line .= "\t##$countersum##\n";
351
352 push(@allvariables, $line);
353 }
354
355 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
{
364957038.9ms 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
371 my @newarray = ();
372 my @itemarray = ();
373 my ($line, $itemname, $itemnumber);
374
375 # first collecting all variables and settings names
376
377 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
378 {
379 $line = ${$blockref}[$i];
380
38172214µ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
386 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
394 for ( my $i = 0; $i <= $#itemarray; $i++ )
395 {
396 $itemname = $itemarray[$i];
397
398 my $itemnumbermax = 0;
399 my $printline = "";
400
401 for ( my $j = 0; $j <= $#{$blockref}; $j++ )
402 {
403 $line = ${$blockref}[$j];
404
40585487.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 {
407 $itemnumber = $1;
408
409 if ($itemnumber >= $itemnumbermax)
410 {
411 $printline = $line;
412 $itemnumbermax = $itemnumber;
413 }
414 }
415 }
416
417 # removing the ending number from the printline
418 # and putting it into the array
419
42072207µs $printline =~ s/\#\#\d+\#\#//;
# spent 207µs making 72 calls to installer::ziplist::CORE:subst, avg 3µs/call
42172862µ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
422 push(@newarray, $printline);
423 }
424
425 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
{
43449419µs my ($blockref, $variable) = @_;
435
436 my $searchstring = "";
437 my $line;
438
439 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
440 {
441 $line = ${$blockref}[$i];
442
44328231µ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 {
445 $searchstring = $1;
446 last;
447 }
448 }
449
450 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
{
4593944.23ms my ( $patharrayref, $variableshashref ) = @_;
460
461 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
462 {
463 my $line = ${$patharrayref}[$i];
464
465 my $key;
466
46714126µ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 {
469 my $value = $variableshashref->{$key};
470
4712241.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
4732241.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
476 ${$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
{
48658182µs my ( $patharrayref ) = @_;
487
488 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
489 {
490 my $line = ${$patharrayref}[$i];
491
4921438µs $line =~ s/\.\{minor\}//g;
# spent 38µs making 14 calls to installer::ziplist::CORE:subst, avg 3µs/call
493148µs $line =~ s/\.\{minornonpre\}//g;
# spent 8µs making 14 calls to installer::ziplist::CORE:subst, avg 557ns/call
494
495 ${$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
{
50545104µs my ( $patharrayref ) = @_;
506
507 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
508 {
509 my $line = ${$patharrayref}[$i];
510
511149µs if (( $installer::globals::installertypedir ) && ( $line =~ /\{pkgtype\}/ ))
# spent 9µs making 14 calls to installer::ziplist::CORE:match, avg 643ns/call
512 {
51314µs $line =~ s/\{pkgtype\}/$installer::globals::installertypedir/g;
# spent 4µs making 1 call to installer::ziplist::CORE:subst
514 }
515
516 ${$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
{
52672292µs my ( $patharrayref ) = @_;
527
528 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
529 {
530 my $line = ${$patharrayref}[$i];
531
53214167µs installer::remover::remove_ending_pathseparator(\$line);
# spent 167µs making 14 calls to installer::remover::remove_ending_pathseparator, avg 12µs/call
533
53414143µs $line =~ s/\s*$//;
# spent 143µs making 14 calls to installer::ziplist::CORE:subst, avg 10µs/call
535 $line = $line . "\n";
536
537 ${$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
{
54748127µs my ( $patharrayref, $languagesref ) = @_;
548
549191µ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
551 my @patharray = ();
552 my $infoline = "";
553
554 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
555 {
556 my $line = ${$patharrayref}[$i];
557
558149µ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 {
598 push(@patharray ,$line);
599 }
600 }
601
602 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
{
61161111µs my ( $patharrayref) = @_;
612
613141µs installer::logger::include_header_into_logfile("Include paths:");
# spent 41µs making 1 call to installer::logger::include_header_into_logfile
614
615 for ( my $i = 0; $i <= $#{$patharrayref}; $i++ )
616 {
617 my $path = ${$patharrayref}[$i];
61814169µ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
619 my $infoline = "$path\n";
620 push( @installer::globals::logfileinfo, $infoline);
621 }
622
623 push( @installer::globals::logfileinfo, "\n");
624
625 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
{
634616µs my ($allvariables) = @_;
635 my $manufacturer;
636
637 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
654 $installer::globals::manufacturer = $manufacturer;
655 $installer::globals::longmanufacturer = $manufacturer;
656
657 $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
{
66727µs my ($allvariables) = @_;
668
669 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
{
68184324µs my ( $pathref ) = @_;
682
683 my $oldpath = $$pathref;
684
685 my $change = 0;
686
6872891µ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 {
689 my $part1 = $1;
690 my $part2 = $4;
691 $oldpath = $part1 . $part2;
692619µ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
695 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
{
70430118µs my ( $patharrayref ) = @_;
705
706 for my $path ( @{$patharrayref} )
707 {
708141.85ms $path = rel2abs($path);
# spent 1.85ms making 14 calls to File::Spec::Functions::__ANON__[File/Spec/Functions.pm:43], avg 132µs/call
70914308µ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
{
7215931.42ms my ($blockref) = @_;
722
723 my $milestonevariable = $installer::globals::lastminor;
72412µs $milestonevariable =~ s/m//;
# spent 2µs making 1 call to installer::ziplist::CORE:subst
7251500ns $milestonevariable =~ s/s/\./;
# spent 500ns making 1 call to installer::ziplist::CORE:subst
726
727 my $localminor = $installer::globals::lastminor;
728 if ( $installer::globals::minor ) { $localminor = $installer::globals::minor; }
729
730 my $buildidstringcws = $installer::globals::build . $localminor . "(Build:" . $installer::globals::buildid . ")";
731
732 for ( my $i = 0; $i <= $#{$blockref}; $i++ )
733 {
7346529µ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\}//; }
7366533µ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\}//; }
738 if ( $installer::globals::buildid ) { ${$blockref}[$i] =~ s/\{buildid\}/$installer::globals::buildid/; }
7396533µs else { ${$blockref}[$i] =~ s/\{buildid\}//; }
# spent 33µs making 65 calls to installer::ziplist::CORE:subst, avg 512ns/call
7406531µ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\}//; }
7426533µ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
{
752619µs my ($variableshashref) = @_;
753 $variableshashref->{'OOOVENDOR'} = $ENV{'OOO_VENDOR'} , if( defined $ENV{'OOO_VENDOR'} && $ENV{'OOO_VENDOR'} ne "" );
754 $variableshashref->{'PROGRESSBARCOLOR'} = $ENV{'PROGRESSBARCOLOR'} , if( defined $ENV{'PROGRESSBARCOLOR'} && $ENV{'PROGRESSBARCOLOR'} ne "" );
755 $variableshashref->{'PROGRESSSIZE'} = $ENV{'PROGRESSSIZE'} , if( defined $ENV{'PROGRESSSIZE'} && $ENV{'PROGRESSSIZE'} ne "" );
756 $variableshashref->{'PROGRESSPOSITION'} = $ENV{'PROGRESSPOSITION'} , if( defined $ENV{'PROGRESSPOSITION'} && $ENV{'PROGRESSPOSITION'} ne "" );
757 $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
{
7661652µs my ($variableshashref) = @_;
767
768 my $lcvariable = lc($variableshashref->{'PRODUCTNAME'});
769 $variableshashref->{'LCPRODUCTNAME'} = $lcvariable;
770
771 if ($variableshashref->{'SHORT_PRODUCTEXTENSION'})
772 {
773 $variableshashref->{'LCPRODUCTEXTENSION'} = "\-" . lc($variableshashref->{'SHORT_PRODUCTEXTENSION'}); # including the "-" !
774 }
775 else
776 {
777 $variableshashref->{'LCPRODUCTEXTENSION'} = "";
778 }
779
780 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; }
783 else { $variableshashref->{'PRODUCTADDON'} = ""; }
784
785 my $localbuild = $installer::globals::build;
78614µ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
787 $variableshashref->{'PRODUCTMAJOR'} = $localbuild;
788
789 my $localminor = "";
790 if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
791 else { $localminor = $installer::globals::lastminor; }
79213µs if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
# spent 3µs making 1 call to installer::ziplist::CORE:match
793 $variableshashref->{'PRODUCTMINOR'} = $localminor;
794
795 $variableshashref->{'PRODUCTBUILDID'} = $installer::globals::buildid;
796 $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