← 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:53 2012

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/directory.pm
StatementsExecuted 21170973 statements in 56.9s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1091118.6s45.3sinstaller::windows::directory::::create_unique_directorynamesinstaller::windows::directory::create_unique_directorynames
2014321113.5s15.1sinstaller::windows::directory::::make_short_dir_versioninstaller::windows::directory::make_short_dir_version
376616820111.7s11.7sinstaller::windows::directory::::CORE:substinstaller::windows::directory::CORE:subst (opcode)
109116.02s2211sinstaller::windows::directory::::create_defaultdir_directorynamesinstaller::windows::directory::create_defaultdir_directorynames
2867463912.92s2.92sinstaller::windows::directory::::CORE:matchinstaller::windows::directory::CORE:match (opcode)
201432111.77s2.61sinstaller::windows::directory::::get_last_directory_nameinstaller::windows::directory::get_last_directory_name
109111.57s1.57sinstaller::windows::directory::::create_directorytable_from_collectioninstaller::windows::directory::create_directorytable_from_collection
10911755ms757msinstaller::windows::directory::::set_installlocation_directoryinstaller::windows::directory::set_installlocation_directory
40286421313ms313msinstaller::windows::directory::::CORE:regcompinstaller::windows::directory::CORE:regcomp (opcode)
109118.69ms21.8msinstaller::windows::directory::::add_root_directoriesinstaller::windows::directory::add_root_directories
1115.87ms5.87msinstaller::windows::directory::::collectdirectorytreesinstaller::windows::directory::collectdirectorytrees
109111.43ms1.43msinstaller::windows::directory::::check_sourcedir_addoninstaller::windows::directory::check_sourcedir_addon
10911982µs982µsinstaller::windows::directory::::overwrite_programfilesfolderinstaller::windows::directory::overwrite_programfilesfolder
111423µs427µsinstaller::windows::directory::::BEGIN@30installer::windows::directory::BEGIN@30
11116µs18µsinstaller::windows::directory::::BEGIN@31installer::windows::directory::BEGIN@31
11115µs16µsinstaller::windows::directory::::BEGIN@33installer::windows::directory::BEGIN@33
11115µs18µsinstaller::windows::directory::::BEGIN@32installer::windows::directory::BEGIN@32
11114µs15µsinstaller::windows::directory::::BEGIN@34installer::windows::directory::BEGIN@34
111-6872s-4613sinstaller::windows::directory::::create_directory_tableinstaller::windows::directory::create_directory_table
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::windows::directory;
29
30262µs2430µs
# spent 427µs (423+3) within installer::windows::directory::BEGIN@30 which was called: # once (423µs+3µs) by installer::BEGIN@65 at line 30
use installer::exiter;
# spent 427µs making 1 call to installer::windows::directory::BEGIN@30 # spent 3µs making 1 call to UNIVERSAL::import
31255µs220µs
# spent 18µs (16+2) within installer::windows::directory::BEGIN@31 which was called: # once (16µs+2µs) by installer::BEGIN@65 at line 31
use installer::files;
# spent 18µs making 1 call to installer::windows::directory::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32254µs220µs
# spent 18µs (15+3) within installer::windows::directory::BEGIN@32 which was called: # once (15µs+3µs) by installer::BEGIN@65 at line 32
use installer::globals;
# spent 18µs making 1 call to installer::windows::directory::BEGIN@32 # spent 3µs making 1 call to UNIVERSAL::import
33253µs218µs
# spent 16µs (15+1) within installer::windows::directory::BEGIN@33 which was called: # once (15µs+1µs) by installer::BEGIN@65 at line 33
use installer::pathanalyzer;
# spent 16µs making 1 call to installer::windows::directory::BEGIN@33 # spent 2µs making 1 call to UNIVERSAL::import
3425.08ms217µs
# spent 15µs (14+1) within installer::windows::directory::BEGIN@34 which was called: # once (14µs+1µs) by installer::BEGIN@65 at line 34
use installer::windows::idtglobal;
# spent 15µs making 1 call to installer::windows::directory::BEGIN@34 # spent 2µs making 1 call to UNIVERSAL::import
35
36##############################################################
37# Collecting all directory trees in global hash
38##############################################################
39
40sub collectdirectorytrees
41
# spent 5.87ms within installer::windows::directory::collectdirectorytrees which was called: # once (5.87ms+0s) by installer::run at line 1491 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
4214µs my ( $directoryref ) = @_;
43
4411.93ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
45 {
4618481.21ms my $onedir = ${$directoryref}[$i];
471848777µs my $styles = "";
4818481.07ms if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
49
501848847µs if ( $styles ne "" )
51 {
521632µs foreach my $treestyle ( keys %installer::globals::treestyles )
53 {
54 if ( $styles =~ /\b$treestyle\b/ )
55 {
56 my $hostname = $onedir->{'HostName'};
57 # -> hostname is the key, the style the value!
58 $installer::globals::hostnametreestyles{$hostname} = $treestyle;
59 }
60 }
61 }
62 }
63}
64
65##############################################################
66# Overwriting global programfilesfolder, if required
67##############################################################
68
69sub overwrite_programfilesfolder
70
# spent 982µs within installer::windows::directory::overwrite_programfilesfolder which was called 109 times, avg 9µs/call: # 109 times (982µs+0s) by installer::windows::directory::create_directory_table at line 531, avg 9µs/call
{
71109156µs my ( $allvariables ) = @_;
72
73109808µs if ( $allvariables->{'PROGRAMFILESFOLDERNAME'} )
74 {
75 $installer::globals::programfilesfolder = $allvariables->{'PROGRAMFILESFOLDERNAME'};
76 }
77}
78
79##############################################################
80# Maximum length of directory name is 72.
81# Taking care of underlines, which are the separator.
82##############################################################
83
84sub make_short_dir_version
85
# spent 15.1s (13.5+1.52) within installer::windows::directory::make_short_dir_version which was called 201432 times, avg 75µs/call: # 201432 times (13.5s+1.52s) by installer::windows::directory::create_unique_directorynames at line 176, avg 75µs/call
{
86201432218ms my ($longstring, $length, $displayname) = @_;
87
8820143296.9ms my $shortstring = "";
89
90 # Splitting the string at each "underline" and allowing only
91 # $length characters per directory name.
92 # Checking also uniqueness and length.
93
942014321.92s for my $onestring ( split /_\s*/, $longstring )
95 {
961256007531ms my $partstring = "";
97
9812560075.27s1256007904ms if ( $onestring =~ /\-/ )
# spent 904ms making 1256007 calls to installer::windows::directory::CORE:match, avg 720ns/call
99 {
100140283605ms for my $onelocalstring ( split /-\s*/, $onestring )
101 {
102285253224ms if ( length($onelocalstring) > $length ) {
103 $onelocalstring = substr($onelocalstring, 0, $length);
104 }
105285253432ms $partstring .= "-" . $onelocalstring;
106 }
107140283755ms140283248ms $partstring =~ s/^\s*\-//;
# spent 248ms making 140283 calls to installer::windows::directory::CORE:subst, avg 2µs/call
108 }
109 else
110 {
11111157241.15s if ( length($onestring) > $length ) {
112 $partstring = substr($onestring, 0, $length);
113 }
114 else {
115870801447ms $partstring = $onestring;
116 }
117 }
118
11912560071.65s $shortstring .= "_" . $partstring;
120 }
121
1222014321.04s201432370ms $shortstring =~ s/^\s*\_//;
# spent 370ms making 201432 calls to installer::windows::directory::CORE:subst, avg 2µs/call
123
124201432118ms if ( length($shortstring) > 72 )
125 {
126 my $shortlength = length($shortstring);
127 my $infoline = "WARNING: Failed to create unique directory name with less than 72 characters: \"$displayname\" ($shortstring ($shortlength)).\n";
128 push(@installer::globals::logfileinfo, $infoline);
129 }
130
131201432915ms return $shortstring;
132}
133
134##############################################################
135# Adding unique directory names to the directory collection
136##############################################################
137
13812µsmy $already_checked_the_frigging_directories_for_uniqueness = 0;
139
140sub create_unique_directorynames
141
# spent 45.3s (18.6+26.7) within installer::windows::directory::create_unique_directorynames which was called 109 times, avg 416ms/call: # 109 times (18.6s+26.7s) by installer::windows::directory::create_directory_table at line 532, avg 416ms/call
{
142109139µs my ($directoryref, $allvariables) = @_;
143
144109501µs my %conversionhash = ();
14510992µs my $infoline = "";
14610957µs my $errorcount = 0;
147
148109318ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
149 {
150201432173ms my $onedir = ${$directoryref}[$i];
151201432256ms my $hostname = $onedir->{'HostName'};
152
153201432196ms my $uniquename = $hostname;
15420143293.2ms my $styles = "";
155201432135ms if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
156 # get_path_from_fullqualifiedname(\$uniqueparentname);
157 # making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs
158
1592014321.54s201432858ms $uniquename =~ s/^\s*//g; # removing beginning white spaces
# spent 858ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
1602014323.32s2014322.66s $uniquename =~ s/\s*$//g; # removing ending white spaces
# spent 2.66s making 201432 calls to installer::windows::directory::CORE:subst, avg 13µs/call
1612014321.37s201432734ms $uniquename =~ s/\s//g; # removing white spaces
# spent 734ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
162201432725ms201432140ms $uniquename =~ s/\_//g; # removing existing underlines
# spent 140ms making 201432 calls to installer::windows::directory::CORE:subst, avg 694ns/call
1632014321.47s201432850ms $uniquename =~ s/\.//g; # removing dots in directoryname
# spent 850ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
1642014323.10s4028641.91s $uniquename =~ s/\Q$installer::globals::separator\E/\_/g; # replacing slash and backslash with underline
# spent 1.82s making 201432 calls to installer::windows::directory::CORE:subst, avg 9µs/call # spent 94.2ms making 201432 calls to installer::windows::directory::CORE:regcomp, avg 468ns/call
165201432727ms201432128ms $uniquename =~ s/OpenOffice/OO/g;
# spent 128ms making 201432 calls to installer::windows::directory::CORE:subst, avg 634ns/call
1662014321.41s201432782ms $uniquename =~ s/LibreOffice/LO/g;
# spent 782ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
167201432712ms201432124ms $uniquename =~ s/_registry/_rgy/g;
# spent 124ms making 201432 calls to installer::windows::directory::CORE:subst, avg 615ns/call
168201432673ms201432105ms $uniquename =~ s/_registration/_rgn/g;
# spent 105ms making 201432 calls to installer::windows::directory::CORE:subst, avg 519ns/call
1692014321.33s201432715ms $uniquename =~ s/_extension/_ext/g;
# spent 715ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
170201432690ms201432116ms $uniquename =~ s/_frame/_frm/g;
# spent 116ms making 201432 calls to installer::windows::directory::CORE:subst, avg 577ns/call
171201432674ms201432107ms $uniquename =~ s/_table/_tbl/g;
# spent 107ms making 201432 calls to installer::windows::directory::CORE:subst, avg 533ns/call
172201432669ms201432108ms $uniquename =~ s/_chart/_crt/g;
# spent 108ms making 201432 calls to installer::windows::directory::CORE:subst, avg 535ns/call
173
17420143297.9ms my $startlength = 5;
175
176201432714ms20143215.1s if ( ! $allvariables->{'NOSHORTDIRECTORYNAMES'} )
# spent 15.1s making 201432 calls to installer::windows::directory::make_short_dir_version, avg 75µs/call
177 {
178 # This process does not work for SDK, because of its long and similar paths
179 $uniquename = make_short_dir_version($uniquename, $startlength, $hostname); # taking care of underlines!
180 }
181
18220143289.3ms if ( !$already_checked_the_frigging_directories_for_uniqueness &&
183 exists($installer::globals::alluniquedirectorynames{$uniquename}) )
184 {
185 # This is an error, that must stop the packaging process
186 $errorcount++;
187
188 $infoline = "$errorcount: Already existing unique directory: $uniquename\n";
189 push( @installer::globals::logfileinfo, $infoline);
190 $infoline = "$errorcount: First full directory: $conversionhash{$uniquename}\n";
191 push( @installer::globals::logfileinfo, $infoline);
192 $infoline = "$errorcount: Current full directory: $hostname\n";
193 push( @installer::globals::logfileinfo, $infoline);
194 }
195
196201432409ms $conversionhash{$uniquename} = $hostname;
197
198201432244ms $installer::globals::alluniquedirectorynames{$uniquename} = 1;
199
200 # Important: The unique parent is generated from the string $uniquename. Therefore counters
201 # like adding "_1" is not allowed to achive uniqueness, because this depends from other directories
202 # and does not deliver always the same result.
203
204201432142ms my $uniqueparentname = $uniquename;
205
2062014321.59s201432703ms if ( $uniqueparentname =~ /^\s*(.*)\_(.*?)\s*$/ ) # the underline is now the separator
# spent 703ms making 201432 calls to installer::windows::directory::CORE:match, avg 3µs/call
207 {
208 $uniqueparentname = $1;
209 }
210 else
211 {
212109110µs $uniqueparentname = $installer::globals::programfilesfolder;
213 }
214
215201432671ms20143285.7ms if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; }
# spent 85.7ms making 201432 calls to installer::windows::directory::CORE:match, avg 426ns/call
216201432644ms20143279.4ms if ( $styles =~ /\bCOMMONFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonfilesfolder; }
# spent 79.4ms making 201432 calls to installer::windows::directory::CORE:match, avg 394ns/call
217201432648ms20143272.6ms if ( $styles =~ /\bCOMMONAPPDATAFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonappdatafolder; }
# spent 72.6ms making 201432 calls to installer::windows::directory::CORE:match, avg 360ns/call
218201432635ms20143275.5ms if ( $styles =~ /\bLOCALAPPDATAFOLDER\b/ ) { $uniqueparentname = $installer::globals::localappdatafolder; }
# spent 75.5ms making 201432 calls to installer::windows::directory::CORE:match, avg 375ns/call
219
220201432632ms20143272.9ms if ( $styles =~ /\bSHAREPOINTPATH\b/ )
# spent 72.9ms making 201432 calls to installer::windows::directory::CORE:match, avg 362ns/call
221 {
222 $uniqueparentname = "SHAREPOINTPATH";
223 $installer::globals::usesharepointpath = 1;
224 }
225
2262014321.27s201432631ms $uniquename =~ s/\-/\_/g; # making "-" to "_"
# spent 631ms making 201432 calls to installer::windows::directory::CORE:subst, avg 3µs/call
2272014321.11s201432495ms $uniqueparentname =~ s/\-/\_/g; # making "-" to "_"
# spent 495ms making 201432 calls to installer::windows::directory::CORE:subst, avg 2µs/call
228
229201432204ms $onedir->{'uniquename'} = $uniquename;
230201432171ms $onedir->{'uniqueparentname'} = $uniqueparentname;
231
232 # setting the installlocation directory
233201432931ms20143289.0ms if ( $styles =~ /\bISINSTALLLOCATION\b/ )
# spent 89.0ms making 201432 calls to installer::windows::directory::CORE:match, avg 442ns/call
234 {
23510961µs if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); }
23610984µs $installer::globals::installlocationdirectory = $uniquename;
23710983µs $installer::globals::installlocationdirectoryset = 1;
238 }
239 }
240
241109175ms if ( $errorcount > 0 )
242 {
243 installer::exiter::exit_program("ERROR: Failed to create unique directory names.", "create_unique_directorynames");
244 }
245}
246
247#####################################################
248# Adding ":." to selected default directory names
249#####################################################
250
251sub check_sourcedir_addon
252
# spent 1.43ms within installer::windows::directory::check_sourcedir_addon which was called 109 times, avg 13µs/call: # 109 times (1.43ms+0s) by installer::windows::directory::set_installlocation_directory at line 284, avg 13µs/call
{
253109169µs my ( $onedir, $allvariableshashref ) = @_;
254
2551091.25ms if (($installer::globals::patch) ||
256 ($installer::globals::languagepack) ||
257 ($installer::globals::helppack) ||
258 ($allvariableshashref->{'CHANGETARGETDIR'}))
259 {
26010992µs my $sourcediraddon = "\:\.";
261109245µs $onedir->{'defaultdir'} = $onedir->{'defaultdir'} . $sourcediraddon;
262 }
263
264}
265
266#####################################################
267# The directory with the style ISINSTALLLOCATION
268# will be replaced by INSTALLLOCATION
269#####################################################
270
271sub set_installlocation_directory
272
# spent 757ms (755+1.43) within installer::windows::directory::set_installlocation_directory which was called 109 times, avg 6.94ms/call: # 109 times (755ms+1.43ms) by installer::windows::directory::create_directory_table at line 535, avg 6.94ms/call
{
273109230µs my ( $directoryref, $allvariableshashref ) = @_;
274
275109119µs if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); }
276
277109219ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
278 {
279201432133ms my $onedir = ${$directoryref}[$i];
280
281201432167ms if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory )
282 {
283109117µs $onedir->{'uniquename'} = "INSTALLLOCATION";
284109444µs1091.43ms check_sourcedir_addon($onedir, $allvariableshashref);
# spent 1.43ms making 109 calls to installer::windows::directory::check_sourcedir_addon, avg 13µs/call
285 }
286
28720143289.2ms if ( $onedir->{'uniquename'} eq $installer::globals::vendordirectory )
288 {
289 check_sourcedir_addon($onedir, $allvariableshashref);
290 }
291
292201432147ms if ( $onedir->{'uniqueparentname'} eq $installer::globals::installlocationdirectory )
293 {
294 $onedir->{'uniqueparentname'} = "INSTALLLOCATION";
295 }
296 }
297}
298
299#####################################################
300# Getting the name of the top level directory. This
301# can have only one letter
302#####################################################
303
304sub get_last_directory_name
305
# spent 2.61s (1.77+841ms) within installer::windows::directory::get_last_directory_name which was called 201432 times, avg 13µs/call: # 201432 times (1.77s+841ms) by installer::windows::directory::create_defaultdir_directorynames at line 332, avg 13µs/call
{
306201432181ms my ($completepathref) = @_;
307
3082014322.44s201432841ms if ( $$completepathref =~ /^.*[\/\\](.+?)\s*$/ )
# spent 841ms making 201432 calls to installer::windows::directory::CORE:match, avg 4µs/call
309 {
310201323320ms $$completepathref = $1;
311 }
312}
313
314#####################################################
315# Creating the defaultdir for the file Director.idt
316#####################################################
317
318sub create_defaultdir_directorynames
319
# spent 2211s (6.02+2205) within installer::windows::directory::create_defaultdir_directorynames which was called 109 times, avg 20.3s/call: # 109 times (6.02s+2205s) by installer::windows::directory::create_directory_table at line 534, avg 20.3s/call
{
320109222µs my ($directoryref, $shortdirnamehashref) = @_;
321
322109164µs my @shortnames = ();
323109164µs if ( $installer::globals::updatedatabase ) { @shortnames = values(%{$shortdirnamehashref}); }
324 elsif ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
325
326109331ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
327 {
328201432185ms my $onedir = ${$directoryref}[$i];
329201432254ms my $hostname = $onedir->{'HostName'};
330
3312014322.23s402864890ms $hostname =~ s/\Q$installer::globals::separator\E\s*$//;
# spent 671ms making 201432 calls to installer::windows::directory::CORE:subst, avg 3µs/call # spent 219ms making 201432 calls to installer::windows::directory::CORE:regcomp, avg 1µs/call
332201432622ms2014322.61s get_last_directory_name(\$hostname);
# spent 2.61s making 201432 calls to installer::windows::directory::get_last_directory_name, avg 13µs/call
333201432273ms my $uniquename = $onedir->{'uniquename'};
33420143271.2ms my $shortstring;
335201432235ms if (( $installer::globals::updatedatabase ) && ( exists($shortdirnamehashref->{$uniquename}) ))
336 {
337 $shortstring = $shortdirnamehashref->{$uniquename};
338 }
339 elsif (( $installer::globals::prepare_winpatch ) && ( exists($installer::globals::saved83dirmapping{$uniquename}) ))
340 {
341 $shortstring = $installer::globals::saved83dirmapping{$uniquename};
342 }
343 else
344 {
345201432679ms2014322201s $shortstring = installer::windows::idtglobal::make_eight_three_conform($hostname, "dir", \@shortnames);
# spent 2201s making 201432 calls to installer::windows::idtglobal::make_eight_three_conform, avg 10.9ms/call
346 }
347
34820143276.6ms my $defaultdir;
349
350201432166ms if ( $shortstring eq $hostname )
351 {
352 $defaultdir = $hostname;
353 }
354 else
355 {
3564479957.0ms $defaultdir = $shortstring . "|" . $hostname;
357 }
358
359201432227ms $onedir->{'defaultdir'} = $defaultdir;
360
361201432101ms my $fontdir = "";
362201432227ms if ( $onedir->{'Dir'} ) { $fontdir = $onedir->{'Dir'}; }
363
36420143295.2ms my $fontdefaultdir = "";
365201432154ms if ( $onedir->{'defaultdir'} ) { $fontdefaultdir = $onedir->{'defaultdir'}; }
366
367201432178ms if (( $fontdir eq "PREDEFINED_OSSYSTEMFONTDIR" ) && ( $fontdefaultdir eq $installer::globals::fontsdirhostname ))
368 {
369109127µs $installer::globals::fontsdirname = $onedir->{'defaultdir'};
370109199µs $installer::globals::fontsdirparent = $onedir->{'uniqueparentname'};
371 }
372 }
373}
374
375###############################################
376# Fill content into the directory table
377###############################################
378
379sub create_directorytable_from_collection
380
# spent 1.57s within installer::windows::directory::create_directorytable_from_collection which was called 109 times, avg 14.4ms/call: # 109 times (1.57s+0s) by installer::windows::directory::create_directory_table at line 538, avg 14.4ms/call
{
381109173µs my ($directorytableref, $directoryref) = @_;
382
383109244ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
384 {
385201432126ms my $onedir = ${$directoryref}[$i];
386201432206ms my $hostname = $onedir->{'HostName'};
38720143287.8ms my $dir = "";
388
389201432177ms if ( $onedir->{'Dir'} ) { $dir = $onedir->{'Dir'}; }
390
39120143278.5ms if (( $dir eq "PREDEFINED_PROGDIR" ) && ( $hostname eq "" )) { next; } # removing files from root directory
392
393201432403ms my $oneline = $onedir->{'uniquename'} . "\t" . $onedir->{'uniqueparentname'} . "\t" . $onedir->{'defaultdir'} . "\n";
394
395201432252ms push(@{$directorytableref}, $oneline);
396 }
397}
398
399###############################################
400# Defining the root installation structure
401###############################################
402
403sub add_root_directories
404
# spent 21.8ms (8.69+13.1) within installer::windows::directory::add_root_directories which was called 109 times, avg 200µs/call: # 109 times (8.69ms+13.1ms) by installer::windows::directory::create_directory_table at line 537, avg 200µs/call
{
405109241µs my ($directorytableref, $allvariableshashref, $onelanguage) = @_;
406
407109119µs my $oneline = "";
408
409109378µs if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
410 {
41110962µs my $productname;
412
413109246µs $productname = $allvariableshashref->{'PRODUCTNAME'};
414109168µs my $productversion = $allvariableshashref->{'PRODUCTVERSION'};
41510975µs my $baseproductversion = $productversion;
416
41710973µs if (( $installer::globals::prepare_winpatch ) && ( $allvariableshashref->{'BASEPRODUCTVERSION'} ))
418 {
419 $baseproductversion = $allvariableshashref->{'BASEPRODUCTVERSION'}; # for example "2.0" for OOo
420 }
421
422109183µs my $realproductkey = $productname . " " . $productversion;
423109141µs my $productkey = $productname . " " . $baseproductversion;
424
425109214µs if (( $allvariableshashref->{'POSTVERSIONEXTENSION'} ) && ( ! $allvariableshashref->{'DONTUSEEXTENSIONINDEFAULTDIR'} ))
426 {
427 $productkey = $productkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
428 $realproductkey = $realproductkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
429 }
430109105µs if ( $allvariableshashref->{'NOVERSIONINDIRNAME'} )
431 {
432 $productkey = $productname;
433 $realproductkey = $realproductname;
434 }
435109171µs if ( $allvariableshashref->{'NOSPACEINDIRECTORYNAME'} )
436 {
437 $productkey =~ s/\ /\_/g;
438 $realproductkey =~ s/\ /\_/g;
439 }
440
441109478µs1097.73ms my $shortproductkey = installer::windows::idtglobal::make_eight_three_conform($productkey, "dir"); # third parameter not used
# spent 7.73ms making 109 calls to installer::windows::idtglobal::make_eight_three_conform, avg 71µs/call
442109709µs109202µs $shortproductkey =~ s/\s/\_/g; # changing empty space to underline
# spent 202µs making 109 calls to installer::windows::directory::CORE:subst, avg 2µs/call
443
444109335µs $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n";
445109182µs push(@{$directorytableref}, $oneline);
446 }
447
44810964µs $oneline = "TARGETDIR\t\tSourceDir\n";
449109109µs push(@{$directorytableref}, $oneline);
450
45110951µs $oneline = "WindowsFolder\tTARGETDIR\tWindows\n";
452109122µs push(@{$directorytableref}, $oneline);
453
454109114µs $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n";
455109121µs push(@{$directorytableref}, $oneline);
456
45710999µs $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n";
458109133µs push(@{$directorytableref}, $oneline);
459
460109103µs $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n";
461109102µs push(@{$directorytableref}, $oneline);
462
46310995µs $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n";
464109114µs push(@{$directorytableref}, $oneline);
465
46610968µs $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n";
467109140µs push(@{$directorytableref}, $oneline);
468
46910990µs $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n";
470109145µs push(@{$directorytableref}, $oneline);
471
47210998µs $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n";
473109154µs push(@{$directorytableref}, $oneline);
474
47510993µs $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n";
476109145µs push(@{$directorytableref}, $oneline);
477
47810964µs if ( $installer::globals::usesharepointpath )
479 {
480 $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n";
481 push(@{$directorytableref}, $oneline);
482 }
483
484109109µs $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n";
485109128µs push(@{$directorytableref}, $oneline);
486
48710992µs my $localtemplatefoldername = $installer::globals::templatefoldername;
48810993µs my $directorytableentry = $localtemplatefoldername;
489109452µs1095.15ms my $shorttemplatefoldername = installer::windows::idtglobal::make_eight_three_conform($localtemplatefoldername, "dir");
# spent 5.15ms making 109 calls to installer::windows::idtglobal::make_eight_three_conform, avg 47µs/call
490109155µs if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; }
491109114µs $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n";
492109152µs push(@{$directorytableref}, $oneline);
493
494109363µs if ( $installer::globals::fontsdirname )
495 {
496 $oneline = "$installer::globals::fontsfolder\t$installer::globals::fontsdirparent\t$installer::globals::fontsfoldername\:$installer::globals::fontsdirname\n";
497 }
498 else
499 {
500 $oneline = "$installer::globals::fontsfolder\tTARGETDIR\t$installer::globals::fontsfoldername\n";
501 }
502
503109721µs push(@{$directorytableref}, $oneline);
504
505}
506
507###############################################
508# Creating the file Director.idt dynamically
509###############################################
510
511sub create_directory_table
512
# spent -4613s (-6872+2259) within installer::windows::directory::create_directory_table which was called: # once (-6872s+2259s) by installer::run at line 1494 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
51315µs my ($directoryref, $languagesarrayref, $basedir, $allvariableshashref, $shortdirnamehashref, $loggingdir) = @_;
514
515 # Structure of the directory table:
516 # Directory Directory_Parent DefaultDir
517 # Directory is a unique identifier
518 # Directory_Parent is the unique identifier of the parent
519 # DefaultDir is .:APPLIC~1|Application Data with
520 # Before ":" : [sourcedir]:[destdir] (not programmed yet)
521 # After ":" : 8+3 and not 8+3 the destination directory name
522
5231474µs for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
524 {
525109365µs my $onelanguage = ${$languagesarrayref}[$m];
526109131µs $installer::globals::installlocationdirectoryset = 0;
527
528109188µs my @directorytable = ();
52910956µs my $infoline;
530
531109705µs109982µs overwrite_programfilesfolder($allvariableshashref);
# spent 982µs making 109 calls to installer::windows::directory::overwrite_programfilesfolder, avg 9µs/call
532109419µs10945.3s create_unique_directorynames($directoryref, $allvariableshashref);
# spent 45.3s making 109 calls to installer::windows::directory::create_unique_directorynames, avg 416ms/call
53310969µs $already_checked_the_frigging_directories_for_uniqueness++;
534109558µs1092211s create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir!
# spent 2211s making 109 calls to installer::windows::directory::create_defaultdir_directorynames, avg 20.3s/call
535109477µs109757ms set_installlocation_directory($directoryref, $allvariableshashref);
# spent 757ms making 109 calls to installer::windows::directory::set_installlocation_directory, avg 6.94ms/call
536109904µs1093.63ms installer::windows::idtglobal::write_idt_header(\@directorytable, "directory");
# spent 3.63ms making 109 calls to installer::windows::idtglobal::write_idt_header, avg 33µs/call
537109537µs10921.8ms add_root_directories(\@directorytable, $allvariableshashref, $onelanguage);
# spent 21.8ms making 109 calls to installer::windows::directory::add_root_directories, avg 200µs/call
538109511µs1091.57s create_directorytable_from_collection(\@directorytable, $directoryref);
# spent 1.57s making 109 calls to installer::windows::directory::create_directorytable_from_collection, avg 14.4ms/call
539
540 # Saving the file
541
542109366µs my $directorytablename = $basedir . $installer::globals::separator . "Director.idt" . "." . $onelanguage;
5431091.31ms109226ms installer::files::save_file($directorytablename ,\@directorytable);
# spent 226ms making 109 calls to installer::files::save_file, avg 2.07ms/call
544109265µs $infoline = "Created idt file: $directorytablename\n";
54510973.6ms push(@installer::globals::logfileinfo, $infoline);
546 }
547}
548
549110µs1;
 
# spent 2.92s within installer::windows::directory::CORE:match which was called 2867463 times, avg 1µs/call: # 1256007 times (904ms+0s) by installer::windows::directory::make_short_dir_version at line 98, avg 720ns/call # 201432 times (841ms+0s) by installer::windows::directory::get_last_directory_name at line 308, avg 4µs/call # 201432 times (703ms+0s) by installer::windows::directory::create_unique_directorynames at line 206, avg 3µs/call # 201432 times (89.0ms+0s) by installer::windows::directory::create_unique_directorynames at line 233, avg 442ns/call # 201432 times (85.7ms+0s) by installer::windows::directory::create_unique_directorynames at line 215, avg 426ns/call # 201432 times (79.4ms+0s) by installer::windows::directory::create_unique_directorynames at line 216, avg 394ns/call # 201432 times (75.5ms+0s) by installer::windows::directory::create_unique_directorynames at line 218, avg 375ns/call # 201432 times (72.9ms+0s) by installer::windows::directory::create_unique_directorynames at line 220, avg 362ns/call # 201432 times (72.6ms+0s) by installer::windows::directory::create_unique_directorynames at line 217, avg 360ns/call
sub installer::windows::directory::CORE:match; # opcode
# spent 313ms within installer::windows::directory::CORE:regcomp which was called 402864 times, avg 777ns/call: # 201432 times (219ms+0s) by installer::windows::directory::create_defaultdir_directorynames at line 331, avg 1µs/call # 201432 times (94.2ms+0s) by installer::windows::directory::create_unique_directorynames at line 164, avg 468ns/call
sub installer::windows::directory::CORE:regcomp; # opcode
# spent 11.7s within installer::windows::directory::CORE:subst which was called 3766168 times, avg 3µs/call: # 201432 times (2.66s+0s) by installer::windows::directory::create_unique_directorynames at line 160, avg 13µs/call # 201432 times (1.82s+0s) by installer::windows::directory::create_unique_directorynames at line 164, avg 9µs/call # 201432 times (858ms+0s) by installer::windows::directory::create_unique_directorynames at line 159, avg 4µs/call # 201432 times (850ms+0s) by installer::windows::directory::create_unique_directorynames at line 163, avg 4µs/call # 201432 times (782ms+0s) by installer::windows::directory::create_unique_directorynames at line 166, avg 4µs/call # 201432 times (734ms+0s) by installer::windows::directory::create_unique_directorynames at line 161, avg 4µs/call # 201432 times (715ms+0s) by installer::windows::directory::create_unique_directorynames at line 169, avg 4µs/call # 201432 times (671ms+0s) by installer::windows::directory::create_defaultdir_directorynames at line 331, avg 3µs/call # 201432 times (631ms+0s) by installer::windows::directory::create_unique_directorynames at line 226, avg 3µs/call # 201432 times (495ms+0s) by installer::windows::directory::create_unique_directorynames at line 227, avg 2µs/call # 201432 times (370ms+0s) by installer::windows::directory::make_short_dir_version at line 122, avg 2µs/call # 201432 times (140ms+0s) by installer::windows::directory::create_unique_directorynames at line 162, avg 694ns/call # 201432 times (128ms+0s) by installer::windows::directory::create_unique_directorynames at line 165, avg 634ns/call # 201432 times (124ms+0s) by installer::windows::directory::create_unique_directorynames at line 167, avg 615ns/call # 201432 times (116ms+0s) by installer::windows::directory::create_unique_directorynames at line 170, avg 577ns/call # 201432 times (108ms+0s) by installer::windows::directory::create_unique_directorynames at line 172, avg 535ns/call # 201432 times (107ms+0s) by installer::windows::directory::create_unique_directorynames at line 171, avg 533ns/call # 201432 times (105ms+0s) by installer::windows::directory::create_unique_directorynames at line 168, avg 519ns/call # 140283 times (248ms+0s) by installer::windows::directory::make_short_dir_version at line 107, avg 2µs/call # 109 times (202µs+0s) by installer::windows::directory::add_root_directories at line 442, avg 2µs/call
sub installer::windows::directory::CORE:subst; # opcode