Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/control.pm |
Statements | Executed 750527 statements in 5.12s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
26 | 1 | 1 | 2.59s | 2.59s | CORE:backtick (opcode) | installer::control::
1 | 1 | 1 | 1.75s | 2.40s | check_logfile | installer::control::
83826 | 9 | 1 | 381ms | 381ms | CORE:match (opcode) | installer::control::
499128 | 6 | 1 | 265ms | 265ms | CORE:subst (opcode) | installer::control::
1 | 1 | 1 | 100ms | 100ms | CORE:open (opcode) | installer::control::
1 | 1 | 1 | 21.9ms | 36.5ms | BEGIN@36 | installer::control::
15 | 1 | 1 | 17.8ms | 17.8ms | CORE:readline (opcode) | installer::control::
1 | 1 | 1 | 3.14ms | 5.11ms | read_encodinglist | installer::control::
1 | 1 | 1 | 1.83ms | 1.83ms | CORE:close (opcode) | installer::control::
1 | 1 | 1 | 1.34ms | 2.60s | check_system_path | installer::control::
1 | 1 | 1 | 357µs | 120ms | get_makecab_version | installer::control::
1 | 1 | 1 | 354µs | 424µs | BEGIN@30 | installer::control::
1 | 1 | 1 | 39µs | 39µs | check_system_environment | installer::control::
1 | 1 | 1 | 23µs | 120ms | check_makecab_version | installer::control::
1 | 1 | 1 | 18µs | 21µs | BEGIN@37 | installer::control::
1 | 1 | 1 | 17µs | 22µs | BEGIN@31 | installer::control::
1 | 1 | 1 | 15µs | 18µs | BEGIN@32 | installer::control::
1 | 1 | 1 | 15µs | 17µs | BEGIN@33 | installer::control::
1 | 1 | 1 | 15µs | 18µs | BEGIN@34 | installer::control::
1 | 1 | 1 | 15µs | 15µs | set_addsystemintegration | installer::control::
1 | 1 | 1 | 14µs | 16µs | BEGIN@35 | installer::control::
1 | 1 | 1 | 10µs | 10µs | CORE:regcomp (opcode) | installer::control::
0 | 0 | 0 | 0s | 0s | check_needed_files_in_path | installer::control::
0 | 0 | 0 | 0s | 0s | check_oxtfiles | installer::control::
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::control; | ||||
29 | |||||
30 | 2 | 60µs | 2 | 495µs | # spent 424µs (354+70) within installer::control::BEGIN@30 which was called:
# once (354µs+70µs) by installer::worker::BEGIN@35 at line 30 # spent 424µs making 1 call to installer::control::BEGIN@30
# spent 70µs making 1 call to Exporter::import |
31 | 2 | 56µs | 2 | 27µs | # spent 22µs (17+5) within installer::control::BEGIN@31 which was called:
# once (17µs+5µs) by installer::worker::BEGIN@35 at line 31 # spent 22µs making 1 call to installer::control::BEGIN@31
# spent 5µs making 1 call to UNIVERSAL::import |
32 | 2 | 52µs | 2 | 20µs | # spent 18µs (15+3) within installer::control::BEGIN@32 which was called:
# once (15µs+3µs) by installer::worker::BEGIN@35 at line 32 # spent 18µs making 1 call to installer::control::BEGIN@32
# spent 2µs making 1 call to UNIVERSAL::import |
33 | 2 | 53µs | 2 | 20µs | # spent 17µs (15+3) within installer::control::BEGIN@33 which was called:
# once (15µs+3µs) by installer::worker::BEGIN@35 at line 33 # spent 17µs making 1 call to installer::control::BEGIN@33
# spent 2µs making 1 call to UNIVERSAL::import |
34 | 2 | 53µs | 2 | 20µs | # spent 18µs (15+3) within installer::control::BEGIN@34 which was called:
# once (15µs+3µs) by installer::worker::BEGIN@35 at line 34 # spent 18µs making 1 call to installer::control::BEGIN@34
# spent 3µs making 1 call to UNIVERSAL::import |
35 | 2 | 51µs | 2 | 19µs | # spent 16µs (14+3) within installer::control::BEGIN@35 which was called:
# once (14µs+3µs) by installer::worker::BEGIN@35 at line 35 # spent 16µs making 1 call to installer::control::BEGIN@35
# spent 3µs making 1 call to UNIVERSAL::import |
36 | 2 | 1.05ms | 2 | 36.5ms | # spent 36.5ms (21.9+14.6) within installer::control::BEGIN@36 which was called:
# once (21.9ms+14.6ms) by installer::worker::BEGIN@35 at line 36 # spent 36.5ms making 1 call to installer::control::BEGIN@36
# spent 10µs making 1 call to UNIVERSAL::import |
37 | 2 | 4.10ms | 2 | 23µs | # spent 21µs (18+3) within installer::control::BEGIN@37 which was called:
# once (18µs+3µs) by installer::worker::BEGIN@35 at line 37 # spent 21µs making 1 call to installer::control::BEGIN@37
# spent 2µs making 1 call to UNIVERSAL::import |
38 | |||||
39 | ######################################################### | ||||
40 | # Function that can be used for additional controls. | ||||
41 | # Search happens in $installer::globals::patharray. | ||||
42 | ######################################################### | ||||
43 | |||||
44 | sub check_needed_files_in_path | ||||
45 | { | ||||
46 | my ( $filesref ) = @_; | ||||
47 | |||||
48 | foreach $onefile ( @{$filesref} ) | ||||
49 | { | ||||
50 | installer::logger::print_message( "...... searching $onefile ..." ); | ||||
51 | |||||
52 | my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $installer::globals::patharray , 0); | ||||
53 | |||||
54 | if ( $$fileref eq "" ) | ||||
55 | { | ||||
56 | $error = 1; | ||||
57 | installer::logger::print_error( "$onefile not found\n" ); | ||||
58 | } | ||||
59 | else | ||||
60 | { | ||||
61 | installer::logger::print_message( "\tFound: $$fileref\n" ); | ||||
62 | } | ||||
63 | } | ||||
64 | |||||
65 | if ( $error ) | ||||
66 | { | ||||
67 | installer::exiter::exit_program("ERROR: Could not find all needed files in path!", "check_needed_files_in_path"); | ||||
68 | } | ||||
69 | } | ||||
70 | |||||
71 | ######################################################### | ||||
72 | # Checking the local system | ||||
73 | # Checking existence of needed files in include path | ||||
74 | ######################################################### | ||||
75 | |||||
76 | sub check_system_path | ||||
77 | # spent 2.60s (1.34ms+2.60) within installer::control::check_system_path which was called:
# once (1.34ms+2.60s) by installer::run at line 147 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
78 | # The following files have to be found in the environment variable PATH | ||||
79 | # All platforms: zip | ||||
80 | # Windows only: "msiinfo.exe", "msidb.exe", "uuidgen.exe", "makecab.exe", "msitran.exe", "expand.exe" for msi database and packaging | ||||
81 | |||||
82 | 13 | 77µs | if ($ENV{'CROSS_COMPILING'} eq 'YES') | ||
83 | { | ||||
84 | # we build our own msi* etc. tools when cross-compiling | ||||
85 | $ENV{'PATH'} .= $installer::globals::pathseparator . $ENV{'OUTDIR_FOR_BUILD'} . '/bin'; | ||||
86 | } | ||||
87 | |||||
88 | my $onefile; | ||||
89 | my $error = 0; | ||||
90 | my $pathvariable = $ENV{'PATH'}; | ||||
91 | my $local_pathseparator = $installer::globals::pathseparator; | ||||
92 | |||||
93 | 2 | 169µs | 1 | 6µs | if( $^O =~ /cygwin/i ) # spent 6µs making 1 call to installer::control::CORE:match |
94 | { | ||||
95 | # When using cygwin's perl the PATH variable is POSIX style and | ||||
96 | # has to be converted to DOS style for further use. | ||||
97 | 26 | 2.59s | $pathvariable = join ';', # spent 2.59s making 26 calls to installer::control::CORE:backtick, avg 99.6ms/call | ||
98 | 78 | 2.59s | 1 | 10µs | map { $dir = qx{cygpath -m "$_"}; chomp($dir); $dir } # spent 10µs making 1 call to installer::control::CORE:regcomp |
99 | split /\Q$local_pathseparator\E\s*/, $pathvariable; | ||||
100 | $local_pathseparator = ';'; | ||||
101 | } | ||||
102 | 1 | 135µs | my $patharrayref = installer::converter::convert_stringlist_into_array(\$pathvariable, $local_pathseparator); # spent 135µs making 1 call to installer::converter::convert_stringlist_into_array | ||
103 | |||||
104 | $installer::globals::patharray = $patharrayref; | ||||
105 | |||||
106 | my @needed_files_in_path = (); | ||||
107 | |||||
108 | if (($installer::globals::iswin) && ($installer::globals::iswindowsbuild)) | ||||
109 | { | ||||
110 | @needed_files_in_path = ("zip.exe", "msiinfo.exe", "msidb.exe", "uuidgen", "makecab.exe", "msitran.exe", "expand.exe"); | ||||
111 | } | ||||
112 | elsif ($installer::globals::isunix && $installer::globals::packageformat eq 'msi') | ||||
113 | { | ||||
114 | @needed_files_in_path = ("zip", "msiinfo.exe", "msidb.exe", "uuidgen", "makecab.exe", "msitran.exe", "cabextract"); | ||||
115 | } | ||||
116 | elsif ($installer::globals::iswin) | ||||
117 | { | ||||
118 | @needed_files_in_path = ("zip.exe"); | ||||
119 | } | ||||
120 | else | ||||
121 | { | ||||
122 | @needed_files_in_path = ("zip"); | ||||
123 | } | ||||
124 | |||||
125 | foreach $onefile ( @needed_files_in_path ) | ||||
126 | { | ||||
127 | 21 | 69µs | 7 | 66µs | installer::logger::print_message( "...... searching $onefile ..." ); # spent 66µs making 7 calls to installer::logger::print_message, avg 9µs/call |
128 | |||||
129 | 7 | 12.7ms | my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $patharrayref , 0); # spent 12.7ms making 7 calls to installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic, avg 1.81ms/call | ||
130 | |||||
131 | 14 | 32µs | if ( $$fileref eq "" ) | ||
132 | { | ||||
133 | $error = 1; | ||||
134 | installer::logger::print_error( "$onefile not found\n" ); | ||||
135 | } | ||||
136 | else | ||||
137 | { | ||||
138 | 7 | 68µs | installer::logger::print_message( "\tFound: $$fileref\n" ); # spent 68µs making 7 calls to installer::logger::print_message, avg 10µs/call | ||
139 | # Saving the absolut path for msitran.exe. This is required for the determination of the checksum. | ||||
140 | 1 | 2µs | if ( $onefile eq "msitran.exe" ) { $installer::globals::msitranpath = $$fileref; } | ||
141 | } | ||||
142 | } | ||||
143 | |||||
144 | if ( $error ) | ||||
145 | { | ||||
146 | installer::exiter::exit_program("ERROR: Could not find all needed files in path!", "check_system_path"); | ||||
147 | } | ||||
148 | |||||
149 | # checking for epm, which has to be in the path or in the solver | ||||
150 | |||||
151 | if (( $installer::globals::call_epm ) && (!($installer::globals::iswindowsbuild))) | ||||
152 | { | ||||
153 | my $onefile = "epm"; | ||||
154 | my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$onefile, $patharrayref , 0); | ||||
155 | if (!( $$fileref eq "" )) | ||||
156 | { | ||||
157 | $installer::globals::epm_in_path = 1; | ||||
158 | |||||
159 | if ( $$fileref =~ /^\s*\.\/epm\s*$/ ) | ||||
160 | { | ||||
161 | my $currentdir = cwd(); | ||||
162 | $$fileref =~ s/\./$currentdir/; | ||||
163 | } | ||||
164 | |||||
165 | $installer::globals::epm_path = $$fileref; | ||||
166 | } | ||||
167 | } | ||||
168 | } | ||||
169 | |||||
170 | ###################################################################### | ||||
171 | # Determining the version of file makecab.exe | ||||
172 | ###################################################################### | ||||
173 | |||||
174 | sub get_makecab_version | ||||
175 | # spent 120ms (357µs+120) within installer::control::get_makecab_version which was called:
# once (357µs+120ms) by installer::control::check_makecab_version at line 245 | ||||
176 | 10 | 113ms | my $makecabversion = -1; | ||
177 | |||||
178 | my $systemcall = "makecab.exe |"; | ||||
179 | if ( $installer::globals::isunix ) | ||||
180 | { | ||||
181 | $systemcall = "$ENV{'OUTDIR_FOR_BUILD'}/bin/makecab.exe |"; | ||||
182 | } | ||||
183 | my @makecaboutput = (); | ||||
184 | |||||
185 | 1 | 100ms | open (CAB, $systemcall); # spent 100ms making 1 call to installer::control::CORE:open | ||
186 | 14 | 6.51ms | 15 | 17.8ms | while (<CAB>) { push(@makecaboutput, $_); } # spent 17.8ms making 15 calls to installer::control::CORE:readline, avg 1.19ms/call |
187 | 1 | 1.83ms | close (CAB); # spent 1.83ms making 1 call to installer::control::CORE:close | ||
188 | |||||
189 | my $returnvalue = $?; # $? contains the return value of the systemcall | ||||
190 | |||||
191 | 10 | 59µs | if ($returnvalue) | ||
192 | { | ||||
193 | $infoline = "ERROR: Could not execute \"$systemcall\"!\n"; | ||||
194 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
195 | } | ||||
196 | else | ||||
197 | { | ||||
198 | $infoline = "Success: Executed \"$systemcall\" successfully!\n"; | ||||
199 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
200 | |||||
201 | my $versionline = ""; | ||||
202 | |||||
203 | 14 | 100µs | for ( my $i = 0; $i <= $#makecaboutput; $i++ ) | ||
204 | { | ||||
205 | 14 | 53µs | if ( $makecaboutput[$i] =~ /\bVersion\b/i ) # spent 53µs making 14 calls to installer::control::CORE:match, avg 4µs/call | ||
206 | { | ||||
207 | $versionline = $makecaboutput[$i]; | ||||
208 | last; | ||||
209 | } | ||||
210 | } | ||||
211 | |||||
212 | $infoline = $versionline; | ||||
213 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
214 | |||||
215 | 1 | 500ns | if ( $versionline =~ /\bVersion\b\s+(\d+[\d\.]+\d+)\s+/ ) # spent 500ns making 1 call to installer::control::CORE:match | ||
216 | { | ||||
217 | $makecabversion = $1; | ||||
218 | } | ||||
219 | |||||
220 | # Only using the first number | ||||
221 | |||||
222 | 1 | 8µs | if ( $makecabversion =~ /^\s*(\d+?)\D*/ ) # spent 8µs making 1 call to installer::control::CORE:match | ||
223 | { | ||||
224 | $makecabversion = $1; | ||||
225 | } | ||||
226 | |||||
227 | $infoline = "Using version: " . $makecabversion . "\n"; | ||||
228 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
229 | } | ||||
230 | |||||
231 | return $makecabversion; | ||||
232 | } | ||||
233 | |||||
234 | ###################################################################### | ||||
235 | # Checking the version of file makecab.exe | ||||
236 | ###################################################################### | ||||
237 | |||||
238 | sub check_makecab_version | ||||
239 | # spent 120ms (23µs+120) within installer::control::check_makecab_version which was called:
# once (23µs+120ms) by installer::run at line 261 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
240 | # checking version of makecab.exe | ||||
241 | # Now it is guaranteed, that makecab.exe is in the path | ||||
242 | |||||
243 | 6 | 19µs | my $do_check = 1; | ||
244 | |||||
245 | 1 | 120ms | my $makecabversion = get_makecab_version(); # spent 120ms making 1 call to installer::control::get_makecab_version | ||
246 | |||||
247 | my $infoline = "Tested version: " . $installer::globals::controlledmakecabversion . "\n"; | ||||
248 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
249 | |||||
250 | if ( $makecabversion < 0 ) { $do_check = 0; } # version could not be determined | ||||
251 | |||||
252 | 2 | 3µs | if ( $do_check ) | ||
253 | { | ||||
254 | if ( $makecabversion < $installer::globals::controlledmakecabversion ) | ||||
255 | { | ||||
256 | installer::exiter::exit_program("makecab.exe too old. Found version: \"$makecabversion\", required version: \"$installer::globals::controlledmakecabversion\"!", "check_makecab_version"); | ||||
257 | } | ||||
258 | } | ||||
259 | else | ||||
260 | { | ||||
261 | $infoline = "Warning: No version check of makecab.exe\n"; | ||||
262 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
263 | } | ||||
264 | } | ||||
265 | |||||
266 | ###################################################################### | ||||
267 | # Reading the environment variables for the paths in ziplist. | ||||
268 | # solarpath, solarenvpath, solarcommonpath, os, osdef, pmiscpath | ||||
269 | ###################################################################### | ||||
270 | |||||
271 | sub check_system_environment | ||||
272 | # spent 39µs within installer::control::check_system_environment which was called:
# once (39µs+0s) by installer::run at line 109 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
273 | 6 | 21µs | my %variables = (); | ||
274 | my $error = 0; | ||||
275 | |||||
276 | my @environmentvariables = qw( | ||||
277 | SOLARVERSION | ||||
278 | GUI | ||||
279 | WORK_STAMP | ||||
280 | OUTPATH | ||||
281 | LOCAL_OUT | ||||
282 | LOCAL_COMMON_OUT | ||||
283 | ); | ||||
284 | |||||
285 | for my $key ( @environmentvariables ) | ||||
286 | { | ||||
287 | 12 | 21µs | $variables{$key} = $ENV{$key} || ""; | ||
288 | |||||
289 | if ( $variables{$key} eq "" ) | ||||
290 | { | ||||
291 | installer::logger::print_error( "$key not set in environment\n" ); | ||||
292 | $error = 1; | ||||
293 | } | ||||
294 | } | ||||
295 | |||||
296 | if ( $error ) | ||||
297 | { | ||||
298 | installer::exiter::exit_program("ERROR: Environment variable not set!", "check_system_environment"); | ||||
299 | } | ||||
300 | |||||
301 | return \%variables; | ||||
302 | } | ||||
303 | |||||
304 | ############################################################# | ||||
305 | # Controlling the log file at the end of the | ||||
306 | # packaging process | ||||
307 | ############################################################# | ||||
308 | |||||
309 | sub check_logfile | ||||
310 | # spent 2.40s (1.75+645ms) within installer::control::check_logfile which was called:
# once (1.75s+645ms) by installer::worker::analyze_and_save_logfile at line 189 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/worker.pm | ||||
311 | 13 | 109ms | my ($logfile) = @_; | ||
312 | |||||
313 | my @errors = (); | ||||
314 | my @output = (); | ||||
315 | my $contains_error = 0; | ||||
316 | |||||
317 | my $ignore_error = 0; | ||||
318 | my $make_error_to_warning = 0; | ||||
319 | |||||
320 | if (( ! $installer::globals::pro ) && ( $installer::globals::ignore_error_in_logfile )) { $ignore_error = 1; } | ||||
321 | |||||
322 | 748692 | 2.29s | for ( my $i = 0; $i <= $#{$logfile}; $i++ ) | ||
323 | { | ||||
324 | my $line = ${$logfile}[$i]; | ||||
325 | |||||
326 | # Errors are all errors, but not the Windows installer table "Error.idt" | ||||
327 | |||||
328 | my $compareline = $line; | ||||
329 | 83188 | 51.3ms | $compareline =~ s/Error\.idt//g; # removing all occurrences of "Error.idt" # spent 51.3ms making 83188 calls to installer::control::CORE:subst, avg 617ns/call | ||
330 | 83188 | 42.7ms | $compareline =~ s/Error\.mlf//g; # removing all occurrences of "Error.mlf" # spent 42.7ms making 83188 calls to installer::control::CORE:subst, avg 513ns/call | ||
331 | 83188 | 41.9ms | $compareline =~ s/Error\.ulf//g; # removing all occurrences of "Error.ulf" # spent 41.9ms making 83188 calls to installer::control::CORE:subst, avg 504ns/call | ||
332 | 83188 | 43.6ms | $compareline =~ s/Error\.idl//g; # removing all occurrences of "Error.idl" # spent 43.6ms making 83188 calls to installer::control::CORE:subst, avg 524ns/call | ||
333 | 83188 | 43.8ms | $compareline =~ s/Error\.html//g; # removing all occurrences of "Error.html" # spent 43.8ms making 83188 calls to installer::control::CORE:subst, avg 527ns/call | ||
334 | 83188 | 41.4ms | $compareline =~ s/libgpg-error-0.dll//g; # spent 41.4ms making 83188 calls to installer::control::CORE:subst, avg 497ns/call | ||
335 | |||||
336 | 83188 | 380ms | if ( $compareline =~ /\bError\b/i ) # spent 380ms making 83188 calls to installer::control::CORE:match, avg 5µs/call | ||
337 | { | ||||
338 | $contains_error = 1; | ||||
339 | push(@errors, $line); | ||||
340 | |||||
341 | if ( $ignore_error ) | ||||
342 | { | ||||
343 | $contains_error = 0; | ||||
344 | $make_error_to_warning = 1; | ||||
345 | } | ||||
346 | } | ||||
347 | } | ||||
348 | |||||
349 | 8 | 10µs | if ($contains_error) | ||
350 | { | ||||
351 | my $line = "\n*********************************************************************\n"; | ||||
352 | push(@output, $line); | ||||
353 | $line = "ERROR: The following errors occurred in packaging process:\n\n"; | ||||
354 | push(@output, $line); | ||||
355 | |||||
356 | for ( my $i = 0; $i <= $#errors; $i++ ) | ||||
357 | { | ||||
358 | $line = "$errors[$i]"; | ||||
359 | push(@output, $line); | ||||
360 | } | ||||
361 | |||||
362 | $line = "*********************************************************************\n"; | ||||
363 | push(@output, $line); | ||||
364 | } | ||||
365 | else | ||||
366 | { | ||||
367 | my $line = ""; | ||||
368 | |||||
369 | if ( $make_error_to_warning ) | ||||
370 | { | ||||
371 | $line = "\n*********************************************************************\n"; | ||||
372 | push(@output, $line); | ||||
373 | $line = "The following errors in the log file were ignored:\n\n"; | ||||
374 | push(@output, $line); | ||||
375 | |||||
376 | for ( my $i = 0; $i <= $#errors; $i++ ) | ||||
377 | { | ||||
378 | $line = "$errors[$i]"; | ||||
379 | push(@output, $line); | ||||
380 | } | ||||
381 | |||||
382 | $line = "*********************************************************************\n"; | ||||
383 | push(@output, $line); | ||||
384 | } | ||||
385 | |||||
386 | $line = "\n***********************************************************\n"; | ||||
387 | push(@output, $line); | ||||
388 | $line = "Successful packaging process!\n"; | ||||
389 | push(@output, $line); | ||||
390 | $line = "***********************************************************\n"; | ||||
391 | push(@output, $line); | ||||
392 | } | ||||
393 | |||||
394 | # printing the output file and adding it to the logfile | ||||
395 | |||||
396 | 1 | 201µs | installer::logger::include_header_into_logfile("Summary:"); # spent 201µs making 1 call to installer::logger::include_header_into_logfile | ||
397 | |||||
398 | my $force = 1; # print this message even in 'quiet' mode | ||||
399 | 12 | 21µs | for ( my $i = 0; $i <= $#output; $i++ ) | ||
400 | { | ||||
401 | my $line = "$output[$i]"; | ||||
402 | 3 | 34µs | installer::logger::print_message( "$line", $force ); # spent 34µs making 3 calls to installer::logger::print_message, avg 11µs/call | ||
403 | push( @installer::globals::logfileinfo, $line); | ||||
404 | push( @installer::globals::errorlogfileinfo, $line); | ||||
405 | } | ||||
406 | |||||
407 | return $contains_error; | ||||
408 | } | ||||
409 | |||||
410 | ############################################################# | ||||
411 | # Reading the Windows list file for language encodings | ||||
412 | ############################################################# | ||||
413 | |||||
414 | sub read_encodinglist | ||||
415 | # spent 5.11ms (3.14+1.97) within installer::control::read_encodinglist which was called:
# once (3.14ms+1.97ms) by installer::run at line 303 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
416 | 11 | 290µs | my ($patharrayref) = @_; | ||
417 | |||||
418 | 1 | 32µs | my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$installer::globals::encodinglistname, $patharrayref , 0); # spent 32µs making 1 call to installer::scriptitems::get_sourcepath_from_filename_and_includepath | ||
419 | |||||
420 | if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Did not find Windows encoding list $installer::globals::encodinglistname!", "read_encodinglist"); } | ||||
421 | |||||
422 | my $infoline = "Found encoding file: $$fileref\n"; | ||||
423 | push(@installer::globals::globallogfileinfo, $infoline); | ||||
424 | |||||
425 | 1 | 990µs | my $encodinglist = installer::files::read_file($$fileref); # spent 990µs making 1 call to installer::files::read_file | ||
426 | |||||
427 | my %msiencoding = (); | ||||
428 | my %msilanguage = (); | ||||
429 | |||||
430 | # Controlling the encoding list | ||||
431 | |||||
432 | 791 | 2.98ms | for ( my $i = 0; $i <= $#{$encodinglist}; $i++ ) | ||
433 | { | ||||
434 | my $line = ${$encodinglist}[$i]; | ||||
435 | |||||
436 | 19 | 14µs | 170 | 222µs | if ( $line =~ /^\s*\#/ ) { next; } # this is a comment line # spent 222µs making 170 calls to installer::control::CORE:match, avg 1µs/call |
437 | |||||
438 | 1 | 1µs | 151 | 119µs | if ( $line =~ /^$/ ) { next; } # this is an empty line # spent 119µs making 151 calls to installer::control::CORE:match, avg 791ns/call |
439 | |||||
440 | 150 | 238µs | if ( $line =~ /^(.*?)(\#.*)$/ ) { $line = $1; } # removing comments after "#" # spent 238µs making 150 calls to installer::control::CORE:match, avg 2µs/call | ||
441 | |||||
442 | 750 | 802µs | 150 | 365µs | if ( $line =~ /^\s*([\w-]+)\s*(\d+)\s*(\d+)\s*$/ ) # spent 365µs making 150 calls to installer::control::CORE:match, avg 2µs/call |
443 | { | ||||
444 | my $onelanguage = $1; | ||||
445 | my $codepage = $2; | ||||
446 | my $windowslanguage = $3; | ||||
447 | |||||
448 | $msiencoding{$onelanguage} = $codepage; | ||||
449 | $msilanguage{$onelanguage} = $windowslanguage; | ||||
450 | } | ||||
451 | else | ||||
452 | { | ||||
453 | installer::exiter::exit_program("ERROR: Wrong syntax in Windows encoding list $installer::globals::encodinglistname in line $i.", "read_encodinglist"); | ||||
454 | } | ||||
455 | } | ||||
456 | |||||
457 | $installer::globals::msiencoding = \%msiencoding; | ||||
458 | $installer::globals::msilanguage = \%msilanguage; | ||||
459 | } | ||||
460 | |||||
461 | ############################################################# | ||||
462 | # Only for Windows and Linux (RPM)there is currently | ||||
463 | # a reliable mechanism to register extensions during | ||||
464 | # installation process. Therefore it is for all other | ||||
465 | # platforms forbidden to install oxt files into that | ||||
466 | # directory, in which they are searched for registration. | ||||
467 | ############################################################# | ||||
468 | |||||
469 | sub check_oxtfiles | ||||
470 | { | ||||
471 | my ( $filesarray ) = @_; | ||||
472 | |||||
473 | for ( my $i = 0; $i <= $#{$filesarray}; $i++ ) | ||||
474 | { | ||||
475 | my $onefile = ${$filesarray}[$i]; | ||||
476 | |||||
477 | if (( $onefile->{'Name'} ) && ( $onefile->{'Dir'} )) | ||||
478 | { | ||||
479 | if (( $onefile->{'Name'} =~ /\.oxt\s*$/ ) && ( $onefile->{'Dir'} eq $installer::globals::extensioninstalldir )) | ||||
480 | { | ||||
481 | installer::exiter::exit_program("There is currently only for Linux (RPM) and Windows a reliable mechanism to register extensions during installation.\nPlease remove file \"$onefile->{'gid'}\" from your installation set!\nYou can use \"\#ifdef WNT\" and \"\#ifdef LINUX\" in scp.", "check_oxtfiles"); | ||||
482 | } | ||||
483 | } | ||||
484 | } | ||||
485 | } | ||||
486 | |||||
487 | ####################################################################### | ||||
488 | # Setting global variable "$installer::globals::addsystemintegration" | ||||
489 | ####################################################################### | ||||
490 | |||||
491 | sub set_addsystemintegration | ||||
492 | # spent 15µs within installer::control::set_addsystemintegration which was called:
# once (15µs+0s) by installer::run at line 241 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
493 | 8 | 15µs | my ($allvariables) = @_; | ||
494 | |||||
495 | 1 | 1µs | if ( $allvariables->{'ADDSYSTEMINTEGRATION'} ) { $installer::globals::addsystemintegration = 1; } | ||
496 | |||||
497 | if ( $installer::globals::patch ) { $installer::globals::addsystemintegration = 0; } | ||||
498 | if ( $installer::globals::languagepack ) { $installer::globals::addsystemintegration = 0; } | ||||
499 | if ( $installer::globals::helppack ) { $installer::globals::addsystemintegration = 0; } | ||||
500 | 1 | 500ns | if (( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "portable" )) { $installer::globals::addsystemintegration = 0; } | ||
501 | |||||
502 | my $infoline = "Value of \$installer::globals::addsystemintegration: $installer::globals::addsystemintegration\n"; | ||||
503 | push( @installer::globals::globallogfileinfo, $infoline); | ||||
504 | } | ||||
505 | |||||
506 | 1 | 9µs | 1; | ||
# spent 2.59s within installer::control::CORE:backtick which was called 26 times, avg 99.6ms/call:
# 26 times (2.59s+0s) by installer::control::check_system_path at line 97, avg 99.6ms/call | |||||
# spent 1.83ms within installer::control::CORE:close which was called:
# once (1.83ms+0s) by installer::control::get_makecab_version at line 187 | |||||
# spent 381ms within installer::control::CORE:match which was called 83826 times, avg 5µs/call:
# 83188 times (380ms+0s) by installer::control::check_logfile at line 336, avg 5µs/call
# 170 times (222µs+0s) by installer::control::read_encodinglist at line 436, avg 1µs/call
# 151 times (119µs+0s) by installer::control::read_encodinglist at line 438, avg 791ns/call
# 150 times (365µs+0s) by installer::control::read_encodinglist at line 442, avg 2µs/call
# 150 times (238µs+0s) by installer::control::read_encodinglist at line 440, avg 2µs/call
# 14 times (53µs+0s) by installer::control::get_makecab_version at line 205, avg 4µs/call
# once (8µs+0s) by installer::control::get_makecab_version at line 222
# once (6µs+0s) by installer::control::check_system_path at line 93
# once (500ns+0s) by installer::control::get_makecab_version at line 215 | |||||
# spent 100ms within installer::control::CORE:open which was called:
# once (100ms+0s) by installer::control::get_makecab_version at line 185 | |||||
# spent 17.8ms within installer::control::CORE:readline which was called 15 times, avg 1.19ms/call:
# 15 times (17.8ms+0s) by installer::control::get_makecab_version at line 186, avg 1.19ms/call | |||||
# spent 10µs within installer::control::CORE:regcomp which was called:
# once (10µs+0s) by installer::control::check_system_path at line 98 | |||||
# spent 265ms within installer::control::CORE:subst which was called 499128 times, avg 530ns/call:
# 83188 times (51.3ms+0s) by installer::control::check_logfile at line 329, avg 617ns/call
# 83188 times (43.8ms+0s) by installer::control::check_logfile at line 333, avg 527ns/call
# 83188 times (43.6ms+0s) by installer::control::check_logfile at line 332, avg 524ns/call
# 83188 times (42.7ms+0s) by installer::control::check_logfile at line 330, avg 513ns/call
# 83188 times (41.9ms+0s) by installer::control::check_logfile at line 331, avg 504ns/call
# 83188 times (41.4ms+0s) by installer::control::check_logfile at line 334, avg 497ns/call |