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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/parameter.pm
StatementsExecuted 260 statements in 443ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
421436ms436msinstaller::parameter::::CORE:backtickinstaller::parameter::CORE:backtick (opcode)
111453µs538µsinstaller::parameter::::BEGIN@30installer::parameter::BEGIN@30
331293µs331msinstaller::parameter::::make_path_absoluteinstaller::parameter::make_path_absolute
221275µs275µsinstaller::parameter::::CORE:ftdirinstaller::parameter::CORE:ftdir (opcode)
111226µs227msinstaller::parameter::::setglobalvariablesinstaller::parameter::setglobalvariables
111198µs355µsinstaller::parameter::::outputparameterinstaller::parameter::outputparameter
1261127µs127µsinstaller::parameter::::CORE:substinstaller::parameter::CORE:subst (opcode)
111105µs214msinstaller::parameter::::control_required_parameterinstaller::parameter::control_required_parameter
2212184µs84µsinstaller::parameter::::CORE:matchinstaller::parameter::CORE:match (opcode)
11165µs144µsinstaller::parameter::::saveparameterinstaller::parameter::saveparameter
22145µs45µsinstaller::parameter::::CORE:regcompinstaller::parameter::CORE:regcomp (opcode)
11144µs44µsinstaller::parameter::::getparameterinstaller::parameter::getparameter
11138µs40µsinstaller::parameter::::BEGIN@35installer::parameter::BEGIN@35
11115µs18µsinstaller::parameter::::BEGIN@31installer::parameter::BEGIN@31
11114µs16µsinstaller::parameter::::BEGIN@32installer::parameter::BEGIN@32
11114µs43µsinstaller::parameter::::BEGIN@34installer::parameter::BEGIN@34
11113µs15µsinstaller::parameter::::BEGIN@36installer::parameter::BEGIN@36
11113µs16µsinstaller::parameter::::BEGIN@33installer::parameter::BEGIN@33
1114µs4µsinstaller::parameter::::control_fundamental_parameterinstaller::parameter::control_fundamental_parameter
0000s0sinstaller::parameter::::usageinstaller::parameter::usage
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::parameter;
29
30262µs2622µs
# spent 538µs (453+85) within installer::parameter::BEGIN@30 which was called: # once (453µs+85µs) by installer::BEGIN@50 at line 30
use Cwd;
# spent 538µs making 1 call to installer::parameter::BEGIN@30 # spent 85µs making 1 call to Exporter::import
31253µs221µs
# spent 18µs (15+3) within installer::parameter::BEGIN@31 which was called: # once (15µs+3µs) by installer::BEGIN@50 at line 31
use installer::exiter;
# spent 18µs making 1 call to installer::parameter::BEGIN@31 # spent 3µs making 1 call to UNIVERSAL::import
32252µs218µs
# spent 16µs (14+2) within installer::parameter::BEGIN@32 which was called: # once (14µs+2µs) by installer::BEGIN@50 at line 32
use installer::files;
# spent 16µs making 1 call to installer::parameter::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
33252µs218µs
# spent 16µs (13+3) within installer::parameter::BEGIN@33 which was called: # once (13µs+3µs) by installer::BEGIN@50 at line 33
use installer::globals;
# spent 16µs making 1 call to installer::parameter::BEGIN@33 # spent 3µs making 1 call to UNIVERSAL::import
34253µs271µs
# spent 43µs (14+29) within installer::parameter::BEGIN@34 which was called: # once (14µs+29µs) by installer::BEGIN@50 at line 34
use installer::logger;
# spent 43µs making 1 call to installer::parameter::BEGIN@34 # spent 29µs making 1 call to Exporter::import
35255µs243µs
# spent 40µs (38+3) within installer::parameter::BEGIN@35 which was called: # once (38µs+3µs) by installer::BEGIN@50 at line 35
use installer::remover;
# spent 40µs making 1 call to installer::parameter::BEGIN@35 # spent 3µs making 1 call to UNIVERSAL::import
3625.56ms216µs
# spent 15µs (13+1) within installer::parameter::BEGIN@36 which was called: # once (13µs+1µs) by installer::BEGIN@50 at line 36
use installer::systemactions;
# spent 15µs making 1 call to installer::parameter::BEGIN@36 # spent 2µs making 1 call to UNIVERSAL::import
37
38############################################
39# Parameter Operations
40############################################
41
42sub usage
43{
44 print <<Ende;
45--------------------------------------------------------------------------------
46The following parameter are needed:
47-f: Path to the product list (required)
48-s: Path to the setup script (optional, if defined in product list)
49-i: Install path of the product (/opt/openofficeorg20) (optional)
50-p: Product from product list to be created (required)
51-l: Language of the product (comma and hash) (optional, defined in productlist)
52-b: Build, e.g. srx645 (optional)
53-m: Minor, e.g. m10 (optional)
54-simple: Path to do a simple install to
55-c: Compiler, e.g. wntmsci8, unxlngi5, unxsols4, ... (optional)
56-u: Path, in which zipfiles are unpacked (optional)
57-msitemplate: Source of the msi file templates (Windows compiler only)
58-msilanguage: Source of the msi file templates (Windows compiler only)
59-buildid: Current BuildID (optional)
60-pro: Product version
61-format: Package format
62-debian: Create Debian packages for Linux
63-dontunzip: do not unzip all files with flag ARCHIVE
64-dontcallepm : do not call epm to create install sets (opt., non-Windows only)
65-ispatchedepm : Usage of a patched (non-standard) epm (opt., non-Windows only)
66-copyproject : is set for projects that are only used for copying (optional)
67-languagepack : do create a languagepack, no product pack (optional)
68-helppack : do create a helppack, no product pack (optional)
69-patch : do create a patch (optional)
70-patchinc: Source for the patch include files (Solaris only)
71-strip: Stripping files (Unix only)
72-log : Logging all available information (optional)
73
74Examples for Windows:
75
76perl make_epmlist.pl -f zip.lst -p OfficeFAT -l en-US
77 -u /export/unpack -buildid 8712
78 -msitemplate /export/msi_files
79 -msilanguage /export/msi_languages
80
81Examples for Non-Windows:
82
83perl make_epmlist.pl -f zip.lst -p OfficeFAT -l en-US -format rpm
84 -u /export/unpack -buildid 8712 -ispatchedepm
85--------------------------------------------------------------------------------
86Ende
87 exit(-1);
88}
89
90#########################################
91# Writing all parameter into logfile
92#########################################
93
94sub saveparameter
95
# spent 144µs (65+79) within installer::parameter::saveparameter which was called: # once (65µs+79µs) by installer::run at line 117 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
96534µs my $include = "";
97
98179µs installer::logger::globallog("Command line arguments:");
# spent 79µs making 1 call to installer::logger::globallog
99
1003227µs for ( my $i = 0; $i <= $#ARGV; $i++ )
101 {
102 $include = $ARGV[$i] . "\n";
103 push(@installer::globals::globallogfileinfo, $include);
104 }
105
106 # also saving global settings:
107
108 $include = "Separator: $installer::globals::separator\n";
109 push(@installer::globals::globallogfileinfo, $include);
110
111}
112
113#####################################
114# Reading parameter
115#####################################
116
117sub getparameter
118
# spent 44µs within installer::parameter::getparameter which was called: # once (44µs+0s) by installer::run at line 118 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
11918µs while ( $#ARGV >= 0 )
120 {
1211631µs my $param = shift(@ARGV);
122
12389µs if ($param eq "-f") { $installer::globals::ziplistname = shift(@ARGV); }
124 elsif ($param eq "-s") { $installer::globals::setupscriptname = shift(@ARGV); }
125 elsif ($param eq "-p") { $installer::globals::product = shift(@ARGV); }
126 elsif ($param eq "-l") { $installer::globals::languagelist = shift(@ARGV); }
127 elsif ($param eq "-b") { $installer::globals::build = shift(@ARGV); }
128 elsif ($param eq "-m") { $installer::globals::minor = shift(@ARGV); }
129 elsif ($param eq "-dontunzip") { $installer::globals::dounzip = 0; }
130 elsif ($param eq "-c") { $installer::globals::compiler = shift(@ARGV); }
131 elsif ($param eq "-pro") { $installer::globals::pro = 1; }
132 elsif ($param eq "-format") { $installer::globals::packageformat = shift(@ARGV); }
133 elsif ($param eq "-quiet") { $installer::globals::quiet = 1; }
134 elsif ($param eq "-verbose") { $installer::globals::quiet = 0; }
135 elsif ($param eq "-u") { $installer::globals::unpackpath = shift(@ARGV); }
136 elsif ($param eq "-i") { $installer::globals::rootpath = shift(@ARGV); }
137 elsif ($param eq "-dontcallepm") { $installer::globals::call_epm = 0; }
138 elsif ($param eq "-msitemplate") { $installer::globals::idttemplatepath = shift(@ARGV); }
139 elsif ($param eq "-msilanguage") { $installer::globals::idtlanguagepath = shift(@ARGV); }
140 elsif ($param eq "-patchinc") { $installer::globals::patchincludepath = shift(@ARGV); }
141 elsif ($param eq "-buildid") { $installer::globals::buildid = shift(@ARGV); }
142 elsif ($param eq "-copyproject") { $installer::globals::is_copy_only_project = 1; }
143 elsif ($param eq "-languagepack") { $installer::globals::languagepack = 1; }
144 elsif ($param eq "-helppack") { $installer::globals::helppack = 1;}
145 elsif ($param eq "-patch") { $installer::globals::patch = 1; }
146 elsif ($param eq "-debian") { $installer::globals::debian = 1; }
147 elsif ($param eq "-strip") { $installer::globals::strip = 1; }
148 elsif ($param eq "-destdir") # new parameter for simple installer
149 {
150 $installer::globals::rootpath ne "" && die "must set destdir before -i or -simple";
151
152 my $path = shift(@ARGV);
153 mkdir $path;
154 $installer::globals::destdir = Cwd::realpath($path);
155 }
156 elsif ($param eq "-simple") # new parameter for simple installer
157 {
158 $installer::globals::simple = 1;
159 $installer::globals::call_epm = 0;
160 $installer::globals::makedownload = 0;
161 my $path = shift(@ARGV);
162 $path =~ s/^\Q$installer::globals::destdir\E//;
163 $installer::globals::rootpath = $path;
164 }
165 else
166 {
167 installer::logger::print_error( "unknown parameter: $param" );
168 usage();
169 exit(-1);
170 }
171 }
172
173 # Usage of simple installer (not for Windows):
174 # $PERL -w $SOLARENV/bin/make_installer.pl \
175 # -f openoffice.lst -l en-US -p OpenOffice \
176 # -buildid $BUILD -rpm \
177 # -destdir /tmp/nurk -simple $INSTALL_PATH
178}
179
180############################################
181# Controlling the fundamental parameter
182# (required for every process)
183############################################
184
185sub control_fundamental_parameter
186
# spent 4µs within installer::parameter::control_fundamental_parameter which was called: # once (4µs+0s) by installer::run at line 120 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
18717µs if ($installer::globals::product eq "")
188 {
189 installer::logger::print_error( "Product name not set!" );
190 usage();
191 exit(-1);
192 }
193}
194
195##########################################################
196# The path parameters can be relative or absolute.
197# This function creates absolute paths.
198##########################################################
199
200sub make_path_absolute
201
# spent 331ms (293µs+331) within installer::parameter::make_path_absolute which was called 3 times, avg 110ms/call: # once (111µs+118ms) by installer::parameter::setglobalvariables at line 361 # once (84µs+107ms) by installer::parameter::control_required_parameter at line 460 # once (98µs+106ms) by installer::parameter::control_required_parameter at line 451
{
2021285µs my ($pathref) = @_;
203
204 if ( $installer::globals::isunix )
205 {
206 if (!($$pathref =~ /^\s*\//)) # this is a relative unix path
207 {
208 $$pathref = cwd() . $installer::globals::separator . $$pathref;
209 }
210 }
211
212350µs if ( $installer::globals::iswin )
213 {
21427331ms328µs if ( $^O =~ /cygwin/i )
# spent 28µs making 3 calls to installer::parameter::CORE:match, avg 9µs/call
215 {
216323µs619µs if ( $$pathref !~ /^\s*\// && $$pathref !~ /^\s*\w\:/ ) # not an absolute POSIX or DOS path
# spent 19µs making 6 calls to installer::parameter::CORE:match, avg 3µs/call
217 {
218347µs $$pathref = cwd() . $installer::globals::separator . $$pathref;
# spent 47µs making 3 calls to Cwd::__ANON__[Cwd.pm:406], avg 16µs/call
219 }
220 my $p = $$pathref;
221 chomp( $p );
222 my $q = '';
223 # Avoid the $(LANG) problem.
22433µs if ($p =~ /(\A.*)(\$\(.*\Z)/) {
# spent 3µs making 3 calls to installer::parameter::CORE:match, avg 1µs/call
225 $p = $1;
226 $q = $2;
227 }
22834µs $p =~ s/\\/\\\\/g;
# spent 4µs making 3 calls to installer::parameter::CORE:subst, avg 1µs/call
2293331ms chomp( $p = qx{cygpath -w "$p"} );
# spent 331ms making 3 calls to installer::parameter::CORE:backtick, avg 110ms/call
230 $$pathref = $p.$q;
231 # Use windows paths, but with '/'s.
232388µs $$pathref =~ s/\\/\//g;
# spent 88µs making 3 calls to installer::parameter::CORE:subst, avg 29µs/call
233 }
234 else
235 {
236 if (!($$pathref =~ /^\s*\w\:/)) # this is a relative windows path (no dos drive)
237 {
238 $$pathref = cwd() . $installer::globals::separator . $$pathref;
239
240 $$pathref =~ s/\//\\/g;
241 }
242 }
243 }
244326µs $$pathref =~ s/[\/\\]\s*$//; # removing ending slashes
# spent 26µs making 3 calls to installer::parameter::CORE:subst, avg 9µs/call
245}
246
247##################################################
248# Setting some global parameters
249# This has to be expanded with furher platforms
250##################################################
251
252sub setglobalvariables
253
# spent 227ms (226µs+226) within installer::parameter::setglobalvariables which was called: # once (226µs+226ms) by installer::run at line 121 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
254 # Setting the installertype directory corresponding to the environment variable PKGFORMAT
255 # The global variable $installer::globals::packageformat can only contain one package format.
256 # If PKGFORMAT cotains more than one format (for example "rpm deb") this is splitted in the
257 # makefile calling the perl program.
25820332µs $installer::globals::installertypedir = $installer::globals::packageformat;
259
2601500ns115µs if ( $installer::globals::compiler =~ /wnt(msc|gcc)i/ )
# spent 15µs making 1 call to installer::parameter::CORE:match
261 {
262 $installer::globals::iswindowsbuild = 1;
263 }
264
26512µs if ( $installer::globals::compiler =~ /unxso[lg][siux]/ )
# spent 2µs making 1 call to installer::parameter::CORE:match
266 {
267 $installer::globals::issolarisbuild = 1;
268 if ( $installer::globals::packageformat eq "pkg" )
269 {
270 $installer::globals::issolarispkgbuild = 1;
271 $installer::globals::epmoutpath = "packages";
272 }
273 }
274
27522µs if (( $installer::globals::compiler =~ /unxmacxi/ ) || ( $installer::globals::compiler =~ /unxmacxp/ ))
# spent 2µs making 2 calls to installer::parameter::CORE:match, avg 750ns/call
276 {
277 $installer::globals::ismacbuild = 1;
278
279 if ( $installer::globals::packageformat eq "dmg" )
280 {
281 $installer::globals::ismacdmgbuild = 1;
282 }
283 }
284
28511µs if ( $installer::globals::compiler =~ /unxobsd/ )
# spent 1µs making 1 call to installer::parameter::CORE:match
286 {
287 $installer::globals::epmoutpath = "openbsd";
288 }
289
29011µs if ( $installer::globals::compiler =~ /unxfbsd/ )
# spent 1µs making 1 call to installer::parameter::CORE:match
291 {
292 $installer::globals::isfreebsdbuild = 1;
293
294 if ( $installer::globals::packageformat eq "bsd" )
295 {
296 $installer::globals::epmoutpath = "freebsd";
297 $installer::globals::isfreebsdpkgbuild = 1;
298 }
299 }
300
3011500ns if ( $installer::globals::compiler =~ /unxso[lg]s/ ) { $installer::globals::issolarissparcbuild = 1; }
# spent 500ns making 1 call to installer::parameter::CORE:match
302
30311µs if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; }
# spent 1µs making 1 call to installer::parameter::CORE:match
304
305 if ($ENV{OS} eq 'AIX')
306 {
307 if ( $installer::globals::packageformat eq "rpm" )
308 {
309 $installer::globals::isrpmbuild = 1;
310 $installer::globals::epmoutpath = "RPMS";
311 }
312 if ( $installer::globals::rpm eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"\$RPM\" has to be defined!", "setglobalvariables"); }
313 }
314
315 if ($ENV{OS} eq 'LINUX')
316 {
317 $installer::globals::islinuxbuild = 1;
318 if ( $installer::globals::packageformat eq "rpm" )
319 {
320 $installer::globals::isrpmbuild = 1;
321 $installer::globals::epmoutpath = "RPMS";
322
323 if ( $installer::globals::rpm eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"\$RPM\" has to be defined!", "setglobalvariables"); }
324 }
325
326 # Creating Debian packages ?
327 if (( $installer::globals::packageformat eq "deb" ) || ( $installer::globals::debian ))
328 {
329 $installer::globals::debian = 1;
330 $installer::globals::packageformat = "deb";
331 my $message = "Creating Debian packages";
332 installer::logger::print_message( $message );
333 push(@installer::globals::globallogfileinfo, $message);
334 $installer::globals::isrpmbuild = 0;
335 $installer::globals::isdebbuild = 1;
336 $installer::globals::epmoutpath = "DEBS";
337 }
338 }
339
340 # Defaulting to native package format for epm
341
342 if ( ! $installer::globals::packageformat ) { $installer::globals::packageformat = "native"; }
343
344 # extension, if $installer::globals::pro is set
34511µs if ($installer::globals::pro) { $installer::globals::productextension = ".pro"; }
346
347 # no languages defined as parameter
348 if ($installer::globals::languagelist eq "") { $installer::globals::languages_defined_in_productlist = 1; }
349
350 # setting and creating the unpackpath
351
352 if ($installer::globals::unpackpath eq "") # unpackpath not set
353 {
354 $installer::globals::unpackpath = cwd();
355 }
356
357 if ( $installer::globals::localunpackdir ne "" ) { $installer::globals::unpackpath = $installer::globals::localunpackdir; }
358
35914µs if (!($installer::globals::unpackpath eq ""))
360 {
3611118ms make_path_absolute(\$installer::globals::unpackpath);
# spent 118ms making 1 call to installer::parameter::make_path_absolute
362 }
363
364236µs $installer::globals::unpackpath =~ s/\Q$installer::globals::separator\E\s*$//;
# spent 32µs making 1 call to installer::parameter::CORE:regcomp # spent 3µs making 1 call to installer::parameter::CORE:subst
365
3661177µs if (! -d $installer::globals::unpackpath ) # create unpackpath
# spent 177µs making 1 call to installer::parameter::CORE:ftdir
367 {
368 installer::systemactions::create_directory($installer::globals::unpackpath);
369 }
370
371 # setting and creating the temppath
372
37314198µs if (( $ENV{'TMP'} ) || ( $ENV{'TEMP'} ) || ( $ENV{'TMPDIR'} ))
374 {
37513µs if ( $ENV{'TMP'} ) { $installer::globals::temppath = $ENV{'TMP'}; }
376 elsif ( $ENV{'TEMP'} ) { $installer::globals::temppath = $ENV{'TEMP'}; }
377 elsif ( $ENV{'TMPDIR'} ) { $installer::globals::temppath = $ENV{'TMPDIR'}; }
378216µs $installer::globals::temppath =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes and backslashes
# spent 12µs making 1 call to installer::parameter::CORE:regcomp # spent 3µs making 1 call to installer::parameter::CORE:subst
379 $installer::globals::temppath .= $installer::globals::separator . 'ooopackaging';
3801572µs installer::systemactions::create_directory_with_privileges($installer::globals::temppath, "777");
381 my $dirsave = $installer::globals::temppath;
382
38314µs if ( $installer::globals::compiler =~ /^unxmac/ )
# spent 4µs making 1 call to installer::parameter::CORE:match
384 {
385 chmod 0777, $installer::globals::temppath;
386 }
387
388 $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . "i";
38911.62ms $installer::globals::temppath = installer::systemactions::create_pid_directory($installer::globals::temppath);
# spent 1.62ms making 1 call to installer::systemactions::create_pid_directory
390 push(@installer::globals::removedirs, $installer::globals::temppath);
391
392198µs if ( ! -d $installer::globals::temppath ) { installer::exiter::exit_program("ERROR: Failed to create directory $installer::globals::temppath ! Possible reason: Wrong privileges in directory $dirsave .", "setglobalvariables"); }
# spent 98µs making 1 call to installer::parameter::CORE:ftdir
393
394 $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension;
3951983µs installer::systemactions::create_directory($installer::globals::temppath);
# spent 983µs making 1 call to installer::systemactions::create_directory
3963105ms19µs if ( $^O =~ /cygwin/i )
# spent 9µs making 1 call to installer::parameter::CORE:match
397 {
398 $installer::globals::cyg_temppath = $installer::globals::temppath;
39912µs $installer::globals::cyg_temppath =~ s/\\/\\\\/g;
# spent 2µs making 1 call to installer::parameter::CORE:subst
4001105ms chomp( $installer::globals::cyg_temppath = qx{cygpath -w "$installer::globals::cyg_temppath"} );
# spent 105ms making 1 call to installer::parameter::CORE:backtick
401 }
402 $installer::globals::temppathdefined = 1;
403 }
404 else
405 {
406 $installer::globals::temppathdefined = 0;
407 }
408
409 # only one cab file, if Windows msp patches shall be prepared
410 if ( $installer::globals::prepare_winpatch ) { $installer::globals::number_of_cabfiles = 1; }
411
412}
413
414############################################
415# Controlling the parameter that are
416# required for special processes
417############################################
418
419sub control_required_parameter
420
# spent 214ms (105µs+214) within installer::parameter::control_required_parameter which was called: # once (105µs+214ms) by installer::run at line 122 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
4211350µs if (!($installer::globals::is_copy_only_project))
422 {
423 ##############################################################################################
424 # idt template path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
425 # for the creation of the msi database.
426 ##############################################################################################
427
428 if (($installer::globals::idttemplatepath eq "") && ($installer::globals::iswindowsbuild))
429 {
430 installer::logger::print_error( "idt template path not set (-msitemplate)!" );
431 usage();
432 exit(-1);
433 }
434
435 ##############################################################################################
436 # idt language path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
437 # for the creation of the msi database.
438 ##############################################################################################
439
440 if (($installer::globals::idtlanguagepath eq "") && ($installer::globals::iswindowsbuild))
441 {
442 installer::logger::print_error( "idt language path not set (-msilanguage)!" );
443 usage();
444 exit(-1);
445 }
446
447 # Analyzing the idt template path
448
44916µs if (!($installer::globals::idttemplatepath eq "")) # idttemplatepath set, relative or absolute?
450 {
4511106ms make_path_absolute(\$installer::globals::idttemplatepath);
# spent 106ms making 1 call to installer::parameter::make_path_absolute
452 }
453
454171µs installer::remover::remove_ending_pathseparator(\$installer::globals::idttemplatepath);
# spent 71µs making 1 call to installer::remover::remove_ending_pathseparator
455
456 # Analyzing the idt language path
457
45815µs if (!($installer::globals::idtlanguagepath eq "")) # idtlanguagepath set, relative or absolute?
459 {
4601107ms make_path_absolute(\$installer::globals::idtlanguagepath);
# spent 107ms making 1 call to installer::parameter::make_path_absolute
461 }
462
463127µs installer::remover::remove_ending_pathseparator(\$installer::globals::idtlanguagepath);
# spent 27µs making 1 call to installer::remover::remove_ending_pathseparator
464
465 # In the msi template directory a files "codes.txt" has to exist, in which the ProductCode
466 # and the UpgradeCode for the product are defined.
467 # The name "codes.txt" can be overwritten in Product definition with CODEFILENAME (msiglobal.pm)
468
469417µs if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::packageformat ne "archive" ) && ( $installer::globals::packageformat ne "installed" ))
470 {
471 $installer::globals::codefilename = $installer::globals::idttemplatepath . $installer::globals::separator . $installer::globals::codefilename;
4721300µs installer::files::check_file($installer::globals::codefilename);
# spent 300µs making 1 call to installer::files::check_file
473 $installer::globals::componentfilename = $installer::globals::idttemplatepath . $installer::globals::separator . $installer::globals::componentfilename;
4741174µs installer::files::check_file($installer::globals::componentfilename);
# spent 174µs making 1 call to installer::files::check_file
475 }
476
477 }
478
479 #######################################
480 # Patch currently only available
481 # for Solaris packages and Linux
482 #######################################
483
484 if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::isrpmbuild ) && ( ! $installer::globals::isdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
485 {
486 installer::logger::print_error( "Sorry, Patch flag currently only available for Solaris pkg, Linux RPM and Windows builds!" );
487 usage();
488 exit(-1);
489 }
490
491 if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::patchincludepath ))
492 {
493 installer::logger::print_error( "Solaris patch requires parameter -patchinc !" );
494 usage();
495 exit(-1);
496 }
497
498 if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild ) && ( $installer::globals::patchincludepath ))
499 {
500 make_path_absolute(\$installer::globals::patchincludepath);
501 $installer::globals::patchincludepath = installer::converter::make_path_conform($installer::globals::patchincludepath);
502 }
503
504 #######################################
505 # Testing existence of files
506 # also for copy-only projects
507 #######################################
508
50914µs if ($installer::globals::ziplistname eq "")
510 {
511 installer::logger::print_error( "ERROR: Zip list file has to be defined (Parameter -f) !" );
512 usage();
513 exit(-1);
514 }
515 else
516 {
5171109µs installer::files::check_file($installer::globals::ziplistname);
# spent 109µs making 1 call to installer::files::check_file
518 }
519
52012µs if ($installer::globals::setupscriptname eq "") { $installer::globals::setupscript_defined_in_productlist = 1; }
521 else { installer::files::check_file($installer::globals::setupscriptname); } # if the setupscript file is defined, it has to exist
522
523}
524
525################################################
526# Writing parameter to shell and into logfile
527################################################
528
529sub outputparameter
530
# spent 355µs (198+157) within installer::parameter::outputparameter which was called: # once (198µs+157µs) by installer::run at line 125 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
5313190µs my $element;
532
533 my @output = ();
534
535 push(@output, "\n########################################################\n");
536 push(@output, "Product list file: $installer::globals::ziplistname\n");
53712µs if (!($installer::globals::setupscript_defined_in_productlist))
538 {
539 push(@output, "Setup script: $installer::globals::setupscriptname\n");
540 }
541 else
542 {
543 push(@output, "Taking setup script from solver\n");
544 }
545 push(@output, "Unpackpath: $installer::globals::unpackpath\n");
546 push(@output, "Compiler: $installer::globals::compiler\n");
547 push(@output, "Product: $installer::globals::product\n");
548 push(@output, "BuildID: $installer::globals::buildid\n");
549 push(@output, "Build: $installer::globals::build\n");
55011µs if ( $installer::globals::minor ) { push(@output, "Minor: $installer::globals::minor\n"); }
551 else { push(@output, "No minor set\n"); }
552 if ( $installer::globals::pro ) { push(@output, "Product version\n"); }
553 else { push(@output, "Non-Product version\n"); }
554 if ( $installer::globals::rootpath eq "" ) { push(@output, "Using default installpath\n"); }
555 else { push(@output, "Installpath: $installer::globals::rootpath\n"); }
556 push(@output, "Package format: $installer::globals::packageformat\n");
557 if (!($installer::globals::idttemplatepath eq "")) { push(@output, "msi templatepath: $installer::globals::idttemplatepath\n"); }
558 if ((!($installer::globals::idttemplatepath eq "")) && (!($installer::globals::iswindowsbuild))) { push(@output, "msi template path will be ignored for non Windows builds!\n"); }
559 if (!($installer::globals::idtlanguagepath eq "")) { push(@output, "msi languagepath: $installer::globals::idtlanguagepath\n"); }
560 if ((!($installer::globals::idtlanguagepath eq "")) && (!($installer::globals::iswindowsbuild))) { push(@output, "msi language path will be ignored for non Windows builds!\n"); }
561 if ((!($installer::globals::iswindowsbuild)) && ( $installer::globals::call_epm )) { push(@output, "Calling epm\n"); }
562 if ((!($installer::globals::iswindowsbuild)) && (!($installer::globals::call_epm))) { push(@output, "Not calling epm\n"); }
563 if ( $installer::globals::patchincludepath ) { push(@output, "Patch include path: $installer::globals::patchincludepath\n"); }
56412µs if ( $installer::globals::strip ) { push(@output, "Stripping files\n"); }
565 else { push(@output, "No file stripping\n"); }
566 if ( $installer::globals::debian ) { push(@output, "Linux: Creating Debian packages\n"); }
567 if ( $installer::globals::dounzip ) { push(@output, "Unzip ARCHIVE files\n"); }
568 else { push(@output, "Not unzipping ARCHIVE files\n"); }
56924µs if (!($installer::globals::languages_defined_in_productlist))
570 {
571 push(@output, "Languages:\n");
57215µs foreach $element (@installer::globals::languageproducts) { push(@output, "\t$element\n"); }
573 }
574 else
575 {
576 push(@output, "Languages defined in $installer::globals::ziplistname\n");
577 }
578 if ( $installer::globals::is_copy_only_project ) { push(@output, "This is a copy only project!\n"); }
579 if ( $installer::globals::languagepack ) { push(@output, "Creating language pack!\n"); }
580 if ( $installer::globals::helppack ) { push(@output, "Creating help pack!\n"); }
581 if ( $installer::globals::patch ) { push(@output, "Creating patch!\n"); }
582 push(@output, "########################################################\n");
583
584 # output into shell and into logfile
585
5863871µs for ( my $i = 0; $i <= $#output; $i++ )
587 {
58819157µs installer::logger::print_message( $output[$i] );
# spent 157µs making 19 calls to installer::logger::print_message, avg 8µs/call
589 push(@installer::globals::globallogfileinfo, $output[$i]);
590 }
591}
592
59319µs1;
 
# spent 436ms within installer::parameter::CORE:backtick which was called 4 times, avg 109ms/call: # 3 times (331ms+0s) by installer::parameter::make_path_absolute at line 229, avg 110ms/call # once (105ms+0s) by installer::parameter::setglobalvariables at line 400
sub installer::parameter::CORE:backtick; # opcode
# spent 275µs within installer::parameter::CORE:ftdir which was called 2 times, avg 138µs/call: # once (177µs+0s) by installer::parameter::setglobalvariables at line 366 # once (98µs+0s) by installer::parameter::setglobalvariables at line 392
sub installer::parameter::CORE:ftdir; # opcode
# spent 84µs within installer::parameter::CORE:match which was called 22 times, avg 4µs/call: # 6 times (19µs+0s) by installer::parameter::make_path_absolute at line 216, avg 3µs/call # 3 times (28µs+0s) by installer::parameter::make_path_absolute at line 214, avg 9µs/call # 3 times (3µs+0s) by installer::parameter::make_path_absolute at line 224, avg 1µs/call # 2 times (2µs+0s) by installer::parameter::setglobalvariables at line 275, avg 750ns/call # once (15µs+0s) by installer::parameter::setglobalvariables at line 260 # once (9µs+0s) by installer::parameter::setglobalvariables at line 396 # once (4µs+0s) by installer::parameter::setglobalvariables at line 383 # once (2µs+0s) by installer::parameter::setglobalvariables at line 265 # once (1µs+0s) by installer::parameter::setglobalvariables at line 285 # once (1µs+0s) by installer::parameter::setglobalvariables at line 303 # once (1µs+0s) by installer::parameter::setglobalvariables at line 290 # once (500ns+0s) by installer::parameter::setglobalvariables at line 301
sub installer::parameter::CORE:match; # opcode
# spent 45µs within installer::parameter::CORE:regcomp which was called 2 times, avg 22µs/call: # once (32µs+0s) by installer::parameter::setglobalvariables at line 364 # once (12µs+0s) by installer::parameter::setglobalvariables at line 378
sub installer::parameter::CORE:regcomp; # opcode
# spent 127µs within installer::parameter::CORE:subst which was called 12 times, avg 11µs/call: # 3 times (88µs+0s) by installer::parameter::make_path_absolute at line 232, avg 29µs/call # 3 times (26µs+0s) by installer::parameter::make_path_absolute at line 244, avg 9µs/call # 3 times (4µs+0s) by installer::parameter::make_path_absolute at line 228, avg 1µs/call # once (3µs+0s) by installer::parameter::setglobalvariables at line 364 # once (3µs+0s) by installer::parameter::setglobalvariables at line 378 # once (2µs+0s) by installer::parameter::setglobalvariables at line 399
sub installer::parameter::CORE:subst; # opcode