Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/ziplist.pm |
Statements | Executed 18938 statements in 74.1ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
2 | 2 | 1 | 31.5ms | 39.9ms | remove_multiples_from_ziplist | installer::ziplist::
4 | 4 | 1 | 9.12ms | 11.5ms | getproductblock | installer::ziplist::
5635 | 8 | 1 | 8.17ms | 8.17ms | CORE:regcomp (opcode) | installer::ziplist::
7267 | 23 | 1 | 5.97ms | 5.97ms | CORE:match (opcode) | installer::ziplist::
1 | 1 | 1 | 3.58ms | 4.20ms | BEGIN@30 | installer::ziplist::
2 | 2 | 1 | 2.64ms | 3.51ms | analyze_settings_block | installer::ziplist::
1 | 1 | 1 | 1.68ms | 4.22ms | replace_all_variables_in_paths | installer::ziplist::
2 | 2 | 1 | 1.47ms | 2.60ms | get_variables_from_ziplist | installer::ziplist::
2 | 2 | 1 | 1.40ms | 2.05ms | get_settings_from_ziplist | installer::ziplist::
1 | 1 | 1 | 1.25ms | 1.41ms | replace_variables_in_ziplist_variables | installer::ziplist::
554 | 13 | 1 | 669µs | 669µs | CORE:subst (opcode) | installer::ziplist::
14 | 1 | 1 | 198µs | 308µs | simplify_path | installer::ziplist::
3 | 3 | 2 | 187µs | 418µs | getinfofromziplist | installer::ziplist::
1 | 1 | 1 | 166µs | 477µs | remove_ending_separator | installer::ziplist::
1 | 1 | 1 | 153µs | 2.31ms | resolve_relative_paths | installer::ziplist::
1 | 1 | 1 | 137µs | 182µs | replace_minor_in_paths | installer::ziplist::
1 | 1 | 1 | 132µs | 342µs | list_all_files_from_include_path | installer::ziplist::
14 | 1 | 1 | 126µs | 126µs | CORE:sort (opcode) | installer::ziplist::
1 | 1 | 1 | 120µs | 221µs | replace_languages_in_paths | installer::ziplist::
1 | 1 | 1 | 88µs | 101µs | replace_packagetype_in_paths | installer::ziplist::
1 | 1 | 1 | 43µs | 50µs | add_variables_to_allvariableshashref | installer::ziplist::
1 | 1 | 1 | 19µs | 21µs | BEGIN@32 | installer::ziplist::
1 | 1 | 1 | 17µs | 43µs | BEGIN@34 | installer::ziplist::
1 | 1 | 1 | 15µs | 15µs | overwrite_branding | installer::ziplist::
1 | 1 | 1 | 14µs | 16µs | BEGIN@36 | installer::ziplist::
1 | 1 | 1 | 13µs | 16µs | BEGIN@35 | installer::ziplist::
1 | 1 | 1 | 13µs | 15µs | BEGIN@33 | installer::ziplist::
1 | 1 | 1 | 12µs | 12µs | set_manufacturer | installer::ziplist::
1 | 1 | 1 | 6µs | 6µs | set_default_productversion_if_required | installer::ziplist::
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 | |||||
28 | package installer::ziplist; | ||||
29 | |||||
30 | 2 | 2.57ms | 2 | 4.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 # spent 4.20ms making 1 call to installer::ziplist::BEGIN@30
# spent 116µs making 1 call to Exporter::import |
31 | |||||
32 | 2 | 53µs | 2 | 23µ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 # spent 21µs making 1 call to installer::ziplist::BEGIN@32
# spent 2µs making 1 call to UNIVERSAL::import |
33 | 2 | 51µs | 2 | 17µ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 # spent 15µs making 1 call to installer::ziplist::BEGIN@33
# spent 2µs making 1 call to UNIVERSAL::import |
34 | 2 | 57µs | 2 | 69µ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 # spent 43µs making 1 call to installer::ziplist::BEGIN@34
# spent 26µs making 1 call to Exporter::import |
35 | 2 | 111µs | 2 | 18µ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 # spent 16µs making 1 call to installer::ziplist::BEGIN@35
# spent 3µs making 1 call to UNIVERSAL::import |
36 | 2 | 6.16ms | 2 | 18µ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 # 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 | |||||
42 | sub getproductblock | ||||
43 | # spent 11.5ms (9.12+2.42) within installer::ziplist::getproductblock which was called 4 times, avg 2.89ms/call:
# once (3.91ms+1.06ms) by installer::run at line 167 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
# once (3.77ms+951µs) by installer::run at line 177 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
# once (792µs+235µs) by installer::run at line 169 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
# once (644µs+173µs) by installer::run at line 204 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
44 | 44 | 1.14ms | 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 | 5604 | 10.4ms | for ( my $i = 0; $i <= $#{$fileref}; $i++ ) | ||
55 | { | ||||
56 | $line = ${$fileref}[$i]; | ||||
57 | |||||
58 | 12 | 8µs | 1868 | 2.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 | |||||
70 | 178 | 129µs | if ( ($record) && ($line =~ /\{/) ) # spent 129µs making 178 calls to installer::ziplist::CORE:match, avg 726ns/call | ||
71 | { | ||||
72 | $count++; | ||||
73 | } | ||||
74 | |||||
75 | 178 | 119µs | if ( ($record) && ($line =~ /\}/) ) # spent 119µs making 178 calls to installer::ziplist::CORE:match, avg 670ns/call | ||
76 | { | ||||
77 | $count--; | ||||
78 | } | ||||
79 | |||||
80 | 178 | 115µ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 | |||||
109 | sub 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 | ||||
111 | 16 | 135µs | 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 | 602 | 3.38ms | 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 | |||||
142 | 172 | 104µ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 | |||||
149 | 678 | 763µ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 | |||||
192 | sub 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 | ||||
194 | 14 | 84µs | 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 | 683 | 1.80ms | 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 | |||||
213 | 2 | 3µs | 108 | 298µ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 | |||||
220 | 4 | 4µs | 84 | 92µ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 | |||||
228 | 8 | 7µs | 82 | 85µs | if ($line =~ /^\s*\{\s*$/i) # spent 85µs making 82 calls to installer::ziplist::CORE:match, avg 1µs/call |
229 | { | ||||
230 | 2 | 1µs | if ($isvariables) | ||
231 | { | ||||
232 | $variablescounter++; | ||||
233 | } | ||||
234 | else | ||||
235 | { | ||||
236 | $counter++; | ||||
237 | } | ||||
238 | |||||
239 | next; | ||||
240 | } | ||||
241 | |||||
242 | 8 | 7µs | 78 | 84µs | if ($line =~ /^\s*\}\s*$/i) # spent 84µs making 78 calls to installer::ziplist::CORE:match, avg 1µs/call |
243 | { | ||||
244 | 6 | 3µs | 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 | 67 | 51µs | if ($isvariables) | ||
262 | { | ||||
263 | next; | ||||
264 | } | ||||
265 | |||||
266 | 7 | 88µ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 | |||||
280 | sub 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 | ||||
282 | 16 | 121µs | 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 | 766 | 1.54ms | for ( my $i = 0; $i <= $#{$blockref}; $i++ ) | ||
296 | { | ||||
297 | my $line = ${$blockref}[$i]; | ||||
298 | my $nextline = ${$blockref}[$i+1]; | ||||
299 | |||||
300 | 4 | 2µs | 86 | 141µ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 | |||||
308 | 8 | 4µs | 84 | 90µs | if ($line =~ /^\s*\{\s*$/i) # spent 90µs making 84 calls to installer::ziplist::CORE:match, avg 1µs/call |
309 | { | ||||
310 | 2 | 1µs | if ($isvariables) | ||
311 | { | ||||
312 | $variablescounter++; | ||||
313 | } | ||||
314 | else | ||||
315 | { | ||||
316 | $counter++; | ||||
317 | } | ||||
318 | |||||
319 | next; | ||||
320 | } | ||||
321 | |||||
322 | 8 | 6µs | 80 | 81µs | if ($line =~ /^\s*\}\s*$/i) # spent 81µs making 80 calls to installer::ziplist::CORE:match, avg 1µs/call |
323 | { | ||||
324 | 6 | 3µs | 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 | 9 | 8µs | if (!($isvariables)) | ||
342 | { | ||||
343 | next; | ||||
344 | } | ||||
345 | |||||
346 | $countersum = $counter + $variablescounter; | ||||
347 | |||||
348 | 67 | 812µ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 | |||||
362 | sub 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 | ||||
364 | 14 | 235µ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 | |||||
371 | my @newarray = (); | ||||
372 | my @itemarray = (); | ||||
373 | my ($line, $itemname, $itemnumber); | ||||
374 | |||||
375 | # first collecting all variables and settings names | ||||
376 | |||||
377 | 216 | 885µs | for ( my $i = 0; $i <= $#{$blockref}; $i++ ) | ||
378 | { | ||||
379 | $line = ${$blockref}[$i]; | ||||
380 | |||||
381 | 72 | 214µ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 | 504 | 5.57ms | for ( my $i = 0; $i <= $#itemarray; $i++ ) | ||
395 | { | ||||
396 | $itemname = $itemarray[$i]; | ||||
397 | |||||
398 | my $itemnumbermax = 0; | ||||
399 | my $printline = ""; | ||||
400 | |||||
401 | 8548 | 32.0ms | for ( my $j = 0; $j <= $#{$blockref}; $j++ ) | ||
402 | { | ||||
403 | $line = ${$blockref}[$j]; | ||||
404 | |||||
405 | 144 | 165µs | 8548 | 7.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 | 144 | 70µs | 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 | |||||
420 | 72 | 207µs | $printline =~ s/\#\#\d+\#\#//; # spent 207µs making 72 calls to installer::ziplist::CORE:subst, avg 3µs/call | ||
421 | 72 | 862µ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 | |||||
432 | sub 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 | ||||
434 | 15 | 59µs | my ($blockref, $variable) = @_; | ||
435 | |||||
436 | my $searchstring = ""; | ||||
437 | my $line; | ||||
438 | |||||
439 | 28 | 342µs | for ( my $i = 0; $i <= $#{$blockref}; $i++ ) | ||
440 | { | ||||
441 | $line = ${$blockref}[$i]; | ||||
442 | |||||
443 | 6 | 18µs | 28 | 231µ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 | |||||
457 | sub 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 | ||||
459 | 2 | 33µs | my ( $patharrayref, $variableshashref ) = @_; | ||
460 | |||||
461 | 56 | 265µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
462 | { | ||||
463 | my $line = ${$patharrayref}[$i]; | ||||
464 | |||||
465 | my $key; | ||||
466 | |||||
467 | 14 | 126µ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 | 336 | 3.93ms | my $value = $variableshashref->{$key}; | ||
470 | |||||
471 | 224 | 1.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 | |||||
473 | 224 | 1.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 | |||||
484 | sub 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 | ||||
486 | 2 | 28µs | my ( $patharrayref ) = @_; | ||
487 | |||||
488 | 56 | 154µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
489 | { | ||||
490 | my $line = ${$patharrayref}[$i]; | ||||
491 | |||||
492 | 14 | 38µs | $line =~ s/\.\{minor\}//g; # spent 38µs making 14 calls to installer::ziplist::CORE:subst, avg 3µs/call | ||
493 | 14 | 8µ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 | |||||
503 | sub 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 | ||||
505 | 2 | 24µs | my ( $patharrayref ) = @_; | ||
506 | |||||
507 | 42 | 71µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
508 | { | ||||
509 | my $line = ${$patharrayref}[$i]; | ||||
510 | |||||
511 | 1 | 9µs | 14 | 9µs | if (( $installer::globals::installertypedir ) && ( $line =~ /\{pkgtype\}/ )) # spent 9µs making 14 calls to installer::ziplist::CORE:match, avg 643ns/call |
512 | { | ||||
513 | 1 | 4µ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 | |||||
524 | sub 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 | ||||
526 | 2 | 33µs | my ( $patharrayref ) = @_; | ||
527 | |||||
528 | 70 | 259µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
529 | { | ||||
530 | my $line = ${$patharrayref}[$i]; | ||||
531 | |||||
532 | 14 | 167µs | installer::remover::remove_ending_pathseparator(\$line); # spent 167µs making 14 calls to installer::remover::remove_ending_pathseparator, avg 12µs/call | ||
533 | |||||
534 | 14 | 143µ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 | |||||
545 | sub 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 | ||||
547 | 6 | 36µs | my ( $patharrayref, $languagesref ) = @_; | ||
548 | |||||
549 | 1 | 91µ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 | 28 | 73µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
555 | { | ||||
556 | my $line = ${$patharrayref}[$i]; | ||||
557 | |||||
558 | 14 | 17µs | 14 | 9µ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 | |||||
609 | sub 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 | ||||
611 | 5 | 31µs | my ( $patharrayref) = @_; | ||
612 | |||||
613 | 1 | 41µs | installer::logger::include_header_into_logfile("Include paths:"); # spent 41µs making 1 call to installer::logger::include_header_into_logfile | ||
614 | |||||
615 | 56 | 80µs | for ( my $i = 0; $i <= $#{$patharrayref}; $i++ ) | ||
616 | { | ||||
617 | my $path = ${$patharrayref}[$i]; | ||||
618 | 14 | 169µ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 | |||||
632 | sub 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 | ||||
634 | 6 | 16µ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 | |||||
665 | sub 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 | ||||
667 | 2 | 7µs | my ($allvariables) = @_; | ||
668 | |||||
669 | if (!($allvariables->{'PRODUCTVERSION'})) | ||||
670 | { | ||||
671 | $allvariables->{'PRODUCTVERSION'} = 1; # FAKE | ||||
672 | } | ||||
673 | } | ||||
674 | |||||
675 | #################################################### | ||||
676 | # Removing .. in paths | ||||
677 | #################################################### | ||||
678 | |||||
679 | sub 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 | ||||
681 | 70 | 270µs | my ( $pathref ) = @_; | ||
682 | |||||
683 | my $oldpath = $$pathref; | ||||
684 | |||||
685 | my $change = 0; | ||||
686 | |||||
687 | 28 | 91µ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 | 12 | 52µs | my $part1 = $1; | ||
690 | my $part2 = $4; | ||||
691 | $oldpath = $part1 . $part2; | ||||
692 | 6 | 19µ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 | 2 | 3µs | if ( $change ) { $$pathref = $oldpath . "\n"; } | ||
696 | } | ||||
697 | |||||
698 | #################################################### | ||||
699 | # Removing ending separators in paths | ||||
700 | #################################################### | ||||
701 | |||||
702 | sub 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 | ||||
704 | 2 | 13µs | my ( $patharrayref ) = @_; | ||
705 | |||||
706 | for my $path ( @{$patharrayref} ) | ||||
707 | { | ||||
708 | 28 | 105µs | 14 | 1.85ms | $path = rel2abs($path); # spent 1.85ms making 14 calls to File::Spec::Functions::__ANON__[File/Spec/Functions.pm:43], avg 132µs/call |
709 | 14 | 308µ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 | |||||
719 | sub 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 | ||||
721 | 8 | 100µs | my ($blockref) = @_; | ||
722 | |||||
723 | my $milestonevariable = $installer::globals::lastminor; | ||||
724 | 1 | 2µs | $milestonevariable =~ s/m//; # spent 2µs making 1 call to installer::ziplist::CORE:subst | ||
725 | 1 | 500ns | $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 | 325 | 410µs | for ( my $i = 0; $i <= $#{$blockref}; $i++ ) | ||
733 | { | ||||
734 | 65 | 230µs | 65 | 29µ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\}//; } | ||||
736 | 65 | 227µs | 65 | 33µ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 | 65 | 226µs | if ( $installer::globals::buildid ) { ${$blockref}[$i] =~ s/\{buildid\}/$installer::globals::buildid/; } | ||
739 | 65 | 33µs | else { ${$blockref}[$i] =~ s/\{buildid\}//; } # spent 33µs making 65 calls to installer::ziplist::CORE:subst, avg 512ns/call | ||
740 | 65 | 224µs | 65 | 31µ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\}//; } | ||||
742 | 65 | 33µ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 | |||||
750 | sub 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 | ||||
752 | 6 | 19µ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 | |||||
764 | sub 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 | ||||
766 | 14 | 47µ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 | 1 | 5µ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; } | ||||
783 | else { $variableshashref->{'PRODUCTADDON'} = ""; } | ||||
784 | |||||
785 | my $localbuild = $installer::globals::build; | ||||
786 | 1 | 4µ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 | 1 | 1µs | if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; } | ||
791 | else { $localminor = $installer::globals::lastminor; } | ||||
792 | 1 | 3µ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 | |||||
799 | 1 | 8µs | 1; | ||
# 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 | |||||
# 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 | |||||
# 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 | |||||
# 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 |