← 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:42 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
{
4221.94ms my ( $directoryref ) = @_;
43
4473923.91ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
45 {
46 my $onedir = ${$directoryref}[$i];
47 my $styles = "";
48 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
49
501632µs if ( $styles ne "" )
51 {
52 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
{
71218964µs my ( $allvariables ) = @_;
72
73 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
{
8612085924.31s my ($longstring, $length, $displayname) = @_;
87
88 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
94 for my $onestring ( split /_\s*/, $longstring )
95 {
9637680217.45s my $partstring = "";
97
9813962902.51s1256007904ms if ( $onestring =~ /\-/ )
# spent 904ms making 1256007 calls to installer::windows::directory::CORE:match, avg 720ns/call
99 {
100 for my $onelocalstring ( split /-\s*/, $onestring )
101 {
102570506656ms if ( length($onelocalstring) > $length ) {
103 $onelocalstring = substr($onelocalstring, 0, $length);
104 }
105 $partstring .= "-" . $onelocalstring;
106 }
107140283248ms $partstring =~ s/^\s*\-//;
# spent 248ms making 140283 calls to installer::windows::directory::CORE:subst, avg 2µs/call
108 }
109 else
110 {
111870801447ms if ( length($onestring) > $length ) {
112 $partstring = substr($onestring, 0, $length);
113 }
114 else {
115 $partstring = $onestring;
116 }
117 }
118
119 $shortstring .= "_" . $partstring;
120 }
121
122201432370ms $shortstring =~ s/^\s*\_//;
# spent 370ms making 201432 calls to installer::windows::directory::CORE:subst, avg 2µs/call
123
124 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
131 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
{
142654494ms my ($directoryref, $allvariables) = @_;
143
144 my %conversionhash = ();
145 my $infoline = "";
146 my $errorcount = 0;
147
148725155229.5s for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
149 {
150 my $onedir = ${$directoryref}[$i];
151 my $hostname = $onedir->{'HostName'};
152
153 my $uniquename = $hostname;
154 my $styles = "";
155 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
156 # get_path_from_fullqualifiedname(\$uniqueparentname);
157 # making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs
158
159201432858ms $uniquename =~ s/^\s*//g; # removing beginning white spaces
# spent 858ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
1602014322.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
161201432734ms $uniquename =~ s/\s//g; # removing white spaces
# spent 734ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
162201432140ms $uniquename =~ s/\_//g; # removing existing underlines
# spent 140ms making 201432 calls to installer::windows::directory::CORE:subst, avg 694ns/call
163201432850ms $uniquename =~ s/\.//g; # removing dots in directoryname
# spent 850ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
1644028641.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
165201432128ms $uniquename =~ s/OpenOffice/OO/g;
# spent 128ms making 201432 calls to installer::windows::directory::CORE:subst, avg 634ns/call
166201432782ms $uniquename =~ s/LibreOffice/LO/g;
# spent 782ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
167201432124ms $uniquename =~ s/_registry/_rgy/g;
# spent 124ms making 201432 calls to installer::windows::directory::CORE:subst, avg 615ns/call
168201432105ms $uniquename =~ s/_registration/_rgn/g;
# spent 105ms making 201432 calls to installer::windows::directory::CORE:subst, avg 519ns/call
169201432715ms $uniquename =~ s/_extension/_ext/g;
# spent 715ms making 201432 calls to installer::windows::directory::CORE:subst, avg 4µs/call
170201432116ms $uniquename =~ s/_frame/_frm/g;
# spent 116ms making 201432 calls to installer::windows::directory::CORE:subst, avg 577ns/call
171201432107ms $uniquename =~ s/_table/_tbl/g;
# spent 107ms making 201432 calls to installer::windows::directory::CORE:subst, avg 533ns/call
172201432108ms $uniquename =~ s/_chart/_crt/g;
# spent 108ms making 201432 calls to installer::windows::directory::CORE:subst, avg 535ns/call
173
174 my $startlength = 5;
175
17620143215.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
182 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
196 $conversionhash{$uniquename} = $hostname;
197
198 $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
204 my $uniqueparentname = $uniquename;
205
206109110µs201432703ms 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 {
212 $uniqueparentname = $installer::globals::programfilesfolder;
213 }
214
21520143285.7ms if ( $styles =~ /\bPROGRAMFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::programfilesfolder; }
# spent 85.7ms making 201432 calls to installer::windows::directory::CORE:match, avg 426ns/call
21620143279.4ms if ( $styles =~ /\bCOMMONFILESFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonfilesfolder; }
# spent 79.4ms making 201432 calls to installer::windows::directory::CORE:match, avg 394ns/call
21720143272.6ms if ( $styles =~ /\bCOMMONAPPDATAFOLDER\b/ ) { $uniqueparentname = $installer::globals::commonappdatafolder; }
# spent 72.6ms making 201432 calls to installer::windows::directory::CORE:match, avg 360ns/call
21820143275.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
22020143272.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
226201432631ms $uniquename =~ s/\-/\_/g; # making "-" to "_"
# spent 631ms making 201432 calls to installer::windows::directory::CORE:subst, avg 3µs/call
227201432495ms $uniqueparentname =~ s/\-/\_/g; # making "-" to "_"
# spent 495ms making 201432 calls to installer::windows::directory::CORE:subst, avg 2µs/call
228
229 $onedir->{'uniquename'} = $uniquename;
230 $onedir->{'uniqueparentname'} = $uniqueparentname;
231
232 # setting the installlocation directory
233327228µs20143289.0ms if ( $styles =~ /\bISINSTALLLOCATION\b/ )
# spent 89.0ms making 201432 calls to installer::windows::directory::CORE:match, avg 442ns/call
234 {
235 if ( $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION alread set: \"$installer::globals::installlocationdirectory\".", "create_unique_directorynames"); }
236 $installer::globals::installlocationdirectory = $uniquename;
237 $installer::globals::installlocationdirectoryset = 1;
238 }
239 }
240
241 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
{
2532181.42ms my ( $onedir, $allvariableshashref ) = @_;
254
255218338µs if (($installer::globals::patch) ||
256 ($installer::globals::languagepack) ||
257 ($installer::globals::helppack) ||
258 ($allvariableshashref->{'CHANGETARGETDIR'}))
259 {
260 my $sourcediraddon = "\:\.";
261 $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
{
273327219ms my ( $directoryref, $allvariableshashref ) = @_;
274
275 if ( ! $installer::globals::installlocationdirectoryset ) { installer::exiter::exit_program("ERROR: Directory with flag ISINSTALLLOCATION not set!", "set_installlocation_directory"); }
276
277805728536ms for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
278 {
279 my $onedir = ${$directoryref}[$i];
280
281218562µs if ( $onedir->{'uniquename'} eq $installer::globals::installlocationdirectory )
282 {
283 $onedir->{'uniquename'} = "INSTALLLOCATION";
2841091.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
287 if ( $onedir->{'uniquename'} eq $installer::globals::vendordirectory )
288 {
289 check_sourcedir_addon($onedir, $allvariableshashref);
290 }
291
292 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
{
3064028642.63s my ($completepathref) = @_;
307
308201323320ms201432841ms if ( $$completepathref =~ /^.*[\/\\](.+?)\s*$/ )
# spent 841ms making 201432 calls to installer::windows::directory::CORE:match, avg 4µs/call
309 {
310 $$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
{
320436331ms my ($directoryref, $shortdirnamehashref) = @_;
321
322 my @shortnames = ();
323 if ( $installer::globals::updatedatabase ) { @shortnames = values(%{$shortdirnamehashref}); }
324 elsif ( $installer::globals::prepare_winpatch ) { @shortnames = values(%installer::globals::saved83dirmapping); }
325
32630214805.10s for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
327 {
328 my $onedir = ${$directoryref}[$i];
329 my $hostname = $onedir->{'HostName'};
330
331402864890ms $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
3322014322.61s get_last_directory_name(\$hostname);
# spent 2.61s making 201432 calls to installer::windows::directory::get_last_directory_name, avg 13µs/call
333 my $uniquename = $onedir->{'uniquename'};
334 my $shortstring;
335201432679ms 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 {
3452014322201s $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
348 my $defaultdir;
349
3504479957.0ms if ( $shortstring eq $hostname )
351 {
352 $defaultdir = $hostname;
353 }
354 else
355 {
356 $defaultdir = $shortstring . "|" . $hostname;
357 }
358
359 $onedir->{'defaultdir'} = $defaultdir;
360
361 my $fontdir = "";
362 if ( $onedir->{'Dir'} ) { $fontdir = $onedir->{'Dir'}; }
363
364 my $fontdefaultdir = "";
365 if ( $onedir->{'defaultdir'} ) { $fontdefaultdir = $onedir->{'defaultdir'}; }
366
367218326µs if (( $fontdir eq "PREDEFINED_OSSYSTEMFONTDIR" ) && ( $fontdefaultdir eq $installer::globals::fontsdirhostname ))
368 {
369 $installer::globals::fontsdirname = $onedir->{'defaultdir'};
370 $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
{
381218244ms my ($directorytableref, $directoryref) = @_;
382
38314100241.33s for ( my $i = 0; $i <= $#{$directoryref}; $i++ )
384 {
385 my $onedir = ${$directoryref}[$i];
386 my $hostname = $onedir->{'HostName'};
387 my $dir = "";
388
389 if ( $onedir->{'Dir'} ) { $dir = $onedir->{'Dir'}; }
390
391 if (( $dir eq "PREDEFINED_PROGDIR" ) && ( $hostname eq "" )) { next; } # removing files from root directory
392
393 my $oneline = $onedir->{'uniquename'} . "\t" . $onedir->{'uniqueparentname'} . "\t" . $onedir->{'defaultdir'} . "\n";
394
395 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
{
40537065.35ms my ($directorytableref, $allvariableshashref, $onelanguage) = @_;
406
407 my $oneline = "";
408
40915263.14ms if (( ! $installer::globals::patch ) && ( ! $installer::globals::languagepack ) && ( ! $installer::globals::helppack ) && ( ! $allvariableshashref->{'DONTUSESTARTMENUFOLDER'} ))
410 {
411 my $productname;
412
413 $productname = $allvariableshashref->{'PRODUCTNAME'};
414 my $productversion = $allvariableshashref->{'PRODUCTVERSION'};
415 my $baseproductversion = $productversion;
416
417 if (( $installer::globals::prepare_winpatch ) && ( $allvariableshashref->{'BASEPRODUCTVERSION'} ))
418 {
419 $baseproductversion = $allvariableshashref->{'BASEPRODUCTVERSION'}; # for example "2.0" for OOo
420 }
421
422 my $realproductkey = $productname . " " . $productversion;
423 my $productkey = $productname . " " . $baseproductversion;
424
425 if (( $allvariableshashref->{'POSTVERSIONEXTENSION'} ) && ( ! $allvariableshashref->{'DONTUSEEXTENSIONINDEFAULTDIR'} ))
426 {
427 $productkey = $productkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
428 $realproductkey = $realproductkey . " " . $allvariableshashref->{'POSTVERSIONEXTENSION'};
429 }
430 if ( $allvariableshashref->{'NOVERSIONINDIRNAME'} )
431 {
432 $productkey = $productname;
433 $realproductkey = $realproductname;
434 }
435 if ( $allvariableshashref->{'NOSPACEINDIRECTORYNAME'} )
436 {
437 $productkey =~ s/\ /\_/g;
438 $realproductkey =~ s/\ /\_/g;
439 }
440
4411097.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
442109202µ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
444 $oneline = "$installer::globals::officemenufolder\t$installer::globals::programmenufolder\t$shortproductkey|$realproductkey\n";
445 push(@{$directorytableref}, $oneline);
446 }
447
448 $oneline = "TARGETDIR\t\tSourceDir\n";
449 push(@{$directorytableref}, $oneline);
450
451 $oneline = "WindowsFolder\tTARGETDIR\tWindows\n";
452 push(@{$directorytableref}, $oneline);
453
454 $oneline = "$installer::globals::programfilesfolder\tTARGETDIR\t.\n";
455 push(@{$directorytableref}, $oneline);
456
457 $oneline = "$installer::globals::programmenufolder\tTARGETDIR\t.\n";
458 push(@{$directorytableref}, $oneline);
459
460 $oneline = "$installer::globals::startupfolder\tTARGETDIR\t.\n";
461 push(@{$directorytableref}, $oneline);
462
463 $oneline = "$installer::globals::desktopfolder\tTARGETDIR\t.\n";
464 push(@{$directorytableref}, $oneline);
465
466 $oneline = "$installer::globals::startmenufolder\tTARGETDIR\t.\n";
467 push(@{$directorytableref}, $oneline);
468
469 $oneline = "$installer::globals::commonfilesfolder\tTARGETDIR\t.\n";
470 push(@{$directorytableref}, $oneline);
471
472 $oneline = "$installer::globals::commonappdatafolder\tTARGETDIR\t.\n";
473 push(@{$directorytableref}, $oneline);
474
475 $oneline = "$installer::globals::localappdatafolder\tTARGETDIR\t.\n";
476 push(@{$directorytableref}, $oneline);
477
478 if ( $installer::globals::usesharepointpath )
479 {
480 $oneline = "SHAREPOINTPATH\tTARGETDIR\t.\n";
481 push(@{$directorytableref}, $oneline);
482 }
483
484 $oneline = "$installer::globals::systemfolder\tTARGETDIR\t.\n";
485 push(@{$directorytableref}, $oneline);
486
487 my $localtemplatefoldername = $installer::globals::templatefoldername;
488 my $directorytableentry = $localtemplatefoldername;
4891095.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
490 if ( $shorttemplatefoldername ne $localtemplatefoldername ) { $directorytableentry = "$shorttemplatefoldername|$localtemplatefoldername"; }
491 $oneline = "$installer::globals::templatefolder\tTARGETDIR\t$directorytableentry\n";
492 push(@{$directorytableref}, $oneline);
493
494 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
503 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
{
5132479µ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
523174480.4ms for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ )
524 {
525 my $onelanguage = ${$languagesarrayref}[$m];
526 $installer::globals::installlocationdirectoryset = 0;
527
528 my @directorytable = ();
529 my $infoline;
530
531109982µs overwrite_programfilesfolder($allvariableshashref);
# spent 982µs making 109 calls to installer::windows::directory::overwrite_programfilesfolder, avg 9µs/call
53210945.3s create_unique_directorynames($directoryref, $allvariableshashref);
# spent 45.3s making 109 calls to installer::windows::directory::create_unique_directorynames, avg 416ms/call
533 $already_checked_the_frigging_directories_for_uniqueness++;
5341092211s create_defaultdir_directorynames($directoryref, $shortdirnamehashref); # only destdir!
# spent 2211s making 109 calls to installer::windows::directory::create_defaultdir_directorynames, avg 20.3s/call
535109757ms set_installlocation_directory($directoryref, $allvariableshashref);
# spent 757ms making 109 calls to installer::windows::directory::set_installlocation_directory, avg 6.94ms/call
5361093.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
53710921.8ms add_root_directories(\@directorytable, $allvariableshashref, $onelanguage);
# spent 21.8ms making 109 calls to installer::windows::directory::add_root_directories, avg 200µs/call
5381091.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
542 my $directorytablename = $basedir . $installer::globals::separator . "Director.idt" . "." . $onelanguage;
543109226ms installer::files::save_file($directorytablename ,\@directorytable);
# spent 226ms making 109 calls to installer::files::save_file, avg 2.07ms/call
544 $infoline = "Created idt file: $directorytablename\n";
545 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