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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/substfilenamefiles.pm
StatementsExecuted 63597 statements in 112ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
111103ms407msinstaller::substfilenamefiles::::resolving_subst_filename_flaginstaller::substfilenamefiles::resolving_subst_filename_flag
15895117.26ms7.26msinstaller::substfilenamefiles::::CORE:matchinstaller::substfilenamefiles::CORE:match (opcode)
111341µs343µsinstaller::substfilenamefiles::::BEGIN@30installer::substfilenamefiles::BEGIN@30
11119µs22µsinstaller::substfilenamefiles::::BEGIN@31installer::substfilenamefiles::BEGIN@31
11117µs50µsinstaller::substfilenamefiles::::BEGIN@32installer::substfilenamefiles::BEGIN@32
11116µs19µsinstaller::substfilenamefiles::::BEGIN@33installer::substfilenamefiles::BEGIN@33
11114µs16µsinstaller::substfilenamefiles::::BEGIN@34installer::substfilenamefiles::BEGIN@34
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::substfilenamefiles;
29
30267µs2346µs
# spent 343µs (341+3) within installer::substfilenamefiles::BEGIN@30 which was called: # once (341µs+3µs) by installer::BEGIN@59 at line 30
use installer::exiter;
# spent 343µs making 1 call to installer::substfilenamefiles::BEGIN@30 # spent 3µs making 1 call to UNIVERSAL::import
31257µs225µs
# spent 22µs (19+3) within installer::substfilenamefiles::BEGIN@31 which was called: # once (19µs+3µs) by installer::BEGIN@59 at line 31
use installer::globals;
# spent 22µs making 1 call to installer::substfilenamefiles::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
32258µs283µs
# spent 50µs (17+33) within installer::substfilenamefiles::BEGIN@32 which was called: # once (17µs+33µs) by installer::BEGIN@59 at line 32
use installer::logger;
# spent 50µs making 1 call to installer::substfilenamefiles::BEGIN@32 # spent 33µs making 1 call to Exporter::import
33255µs221µs
# spent 19µs (16+3) within installer::substfilenamefiles::BEGIN@33 which was called: # once (16µs+3µs) by installer::BEGIN@59 at line 33
use installer::pathanalyzer;
# spent 19µs making 1 call to installer::substfilenamefiles::BEGIN@33 # spent 3µs making 1 call to UNIVERSAL::import
3421.59ms219µs
# spent 16µs (14+3) within installer::substfilenamefiles::BEGIN@34 which was called: # once (14µs+3µs) by installer::BEGIN@59 at line 34
use installer::systemactions;
# spent 16µs making 1 call to installer::substfilenamefiles::BEGIN@34 # spent 3µs making 1 call to UNIVERSAL::import
35
36#########################################################
37# Analyzing files with flag SUBST_FILENAME
38#########################################################
39
40sub resolving_subst_filename_flag
41
# spent 407ms (103+304) within installer::substfilenamefiles::resolving_subst_filename_flag which was called: # once (103ms+304ms) by installer::run at line 703 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
4263586111ms my ($filesarrayref, $variableshashref, $languagestringref) = @_;
43
441297ms my $replacedirbase = installer::systemactions::create_directories("change_filename", $languagestringref);
# spent 297ms making 1 call to installer::systemactions::create_directories
45
461148µs installer::logger::include_header_into_logfile("Files with flag SUBST_FILENAME:");
# spent 148µs making 1 call to installer::logger::include_header_into_logfile
47
48 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
49 {
50 my $onefile = ${$filesarrayref}[$i];
51 my $styles = "";
52
53 if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
54
55158957.26ms if ( $styles =~ /\bSUBST_FILENAME\b/ )
# spent 7.26ms making 15895 calls to installer::substfilenamefiles::CORE:match, avg 457ns/call
56 {
57 # Files with flag SUBST_FILENAME must have a "Substitute" key
58 if (( ! $onefile->{'Substitute'} ) && ( ! $onefile->{'InstallName'} ))
59 {
60 installer::exiter::exit_program("ERROR: SUBST_FILENAME is set, but no Substitute and no InstallName defined at file $onefile->{'gid'}!", "resolving_subst_filename_flag");
61 }
62
63 # Language specific subdirectory
64 my $onelanguage = $onefile->{'specificlanguage'};
65
66 if ($onelanguage eq "")
67 {
68 $onelanguage = "00"; # files without language into directory "00"
69 }
70
71 my $replacedir = $replacedirbase . $installer::globals::separator . $onelanguage . $installer::globals::separator;
72 installer::systemactions::create_directory($replacedir); # creating language specific directories
73
74 # copy files and edit them with the variables defined in the zip.lst
75
76 my $longfilename = 0;
77
78 my $onefilename = $onefile->{'Name'};
79
80 my $sourcepath = $onefile->{'sourcepath'};
81
82 if ( $onefilename =~ /\Q$installer::globals::separator\E/ ) # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
83 {
84 $onefilename =~ s/^\s*\Q$installer::globals::separator\E//;
85 $longfilename = 1;
86 }
87
88 my $destinationpath = $replacedir . $onefilename;
89 my $movepath = $destinationpath . ".orig";
90 my $destdir = $replacedir;
91
92 if ( $longfilename ) # the destination directory has to be created before copying
93 {
94 $destdir = $movepath;
95 installer::pathanalyzer::get_path_from_fullqualifiedname(\$destdir);
96 installer::systemactions::create_directory_structure($destdir);
97 }
98
99 my $copysuccess = installer::systemactions::copy_one_file($sourcepath, $movepath);
100
101 if ( $copysuccess )
102 {
103 if ( $onefile->{'Substitute'} )
104 {
105 my $substitute = $onefile->{'Substitute'};
106
107 my $newfilename = $destinationpath;
108 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newfilename);
109 eval '$newfilename =~ ' . "$substitute";
110
111 my $longnewfilename = $destdir . $newfilename;
112
113 $copysuccess = installer::systemactions::copy_one_file($movepath, $longnewfilename);
114
115 # Saving the new file name
116 $onefile->{'Name'} = $newfilename;
117
118 # Saving the new destination
119 my $newdest = $onefile->{'destination'};
120 installer::pathanalyzer::get_path_from_fullqualifiedname(\$newdest);
121 $onefile->{'destination'} = $newdest . $newfilename;
122
123 # Saving the original source, where the file was found
124 $onefile->{'originalsourcepath'} = $onefile->{'sourcepath'};
125
126 # Writing the new sourcepath into the hashref, even if it was not copied
127 $onefile->{'sourcepath'} = $longnewfilename;
128 }
129 else
130 {
131 if ( $onefile->{'InstallName'} )
132 {
133 my $installname = $onefile->{'InstallName'};
134
135 my $newfilename = $destinationpath;
136 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newfilename);
137
138 my $longnewfilename = $destdir . $installname;
139
140 $copysuccess = installer::systemactions::copy_one_file($movepath, $longnewfilename);
141
142 # Saving the new file name
143 $onefile->{'Name'} = $installname;
144
145 # Saving the new destination
146 my $newdest = $onefile->{'destination'};
147 installer::pathanalyzer::get_path_from_fullqualifiedname(\$newdest);
148 $onefile->{'destination'} = $newdest . $installname;
149
150 # Saving the original source, where the file was found
151 $onefile->{'originalsourcepath'} = $onefile->{'sourcepath'};
152
153 # Writing the new sourcepath into the hashref, even if it was not copied
154 $onefile->{'sourcepath'} = $longnewfilename;
155 }
156 }
157 }
158 }
159 }
160
161 my $infoline = "\n";
162 push( @installer::globals::logfileinfo, $infoline);
163}
164
165110µs1;
 
# spent 7.26ms within installer::substfilenamefiles::CORE:match which was called 15895 times, avg 457ns/call: # 15895 times (7.26ms+0s) by installer::substfilenamefiles::resolving_subst_filename_flag at line 55, avg 457ns/call
sub installer::substfilenamefiles::CORE:match; # opcode