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

Filename/cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/scriptitems.pm
StatementsExecuted 39442532 statements in 171s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11111105s158sinstaller::scriptitems::::resolving_all_languages_in_productlistsinstaller::scriptitems::resolving_all_languages_in_productlists
2182861238131.8s31.8sinstaller::scriptitems::::CORE:matchinstaller::scriptitems::CORE:match (opcode)
71941112.9s14.3sinstaller::scriptitems::::get_languagespecific_moduleinstaller::scriptitems::get_languagespecific_module
104772261418.76s8.76sinstaller::scriptitems::::CORE:regcompinstaller::scriptitems::CORE:regcomp (opcode)
1113.21s3.28sinstaller::scriptitems::::remove_not_required_language_modulesinstaller::scriptitems::remove_not_required_language_modules
111113.01s3.56sinstaller::scriptitems::::changing_name_of_language_dependent_keysinstaller::scriptitems::changing_name_of_language_dependent_keys
1111.40s1.40sinstaller::scriptitems::::CORE:backtickinstaller::scriptitems::CORE:backtick (opcode)
1111.31s2.51sinstaller::scriptitems::::collect_directories_from_filesarrayinstaller::scriptitems::collect_directories_from_filesarray
119480341554ms554msinstaller::scriptitems::::CORE:substinstaller::scriptitems::CORE:subst (opcode)
751211520ms520msinstaller::scriptitems::::get_Directoryname_From_Directorygidinstaller::scriptitems::get_Directoryname_From_Directorygid
111311ms365msinstaller::scriptitems::::select_required_language_stringsinstaller::scriptitems::select_required_language_strings
111247ms280msinstaller::scriptitems::::collect_all_languagemodulesinstaller::scriptitems::collect_all_languagemodules
8888107214ms215msinstaller::scriptitems::::get_sourcepath_from_filename_and_includepathinstaller::scriptitems::get_sourcepath_from_filename_and_includepath
221212ms439msinstaller::scriptitems::::get_Source_Directory_For_Files_From_Includepathlistinstaller::scriptitems::get_Source_Directory_For_Files_From_Includepathlist
441206ms800msinstaller::scriptitems::::get_Destination_Directory_For_Item_From_Directorylistinstaller::scriptitems::get_Destination_Directory_For_Item_From_Directorylist
368221174ms353msinstaller::scriptitems::::optimize_listinstaller::scriptitems::optimize_list
10996641143ms143msinstaller::scriptitems::::CORE:substcontinstaller::scriptitems::CORE:substcont (opcode)
84211141ms141msinstaller::scriptitems::::CORE:ftfileinstaller::scriptitems::CORE:ftfile (opcode)
111118ms119msinstaller::scriptitems::::remove_not_required_spellcheckerlanguage_modulesinstaller::scriptitems::remove_not_required_spellcheckerlanguage_modules
11198.8ms114msinstaller::scriptitems::::add_License_Files_into_Installdirinstaller::scriptitems::add_License_Files_into_Installdir
31182.7ms151msinstaller::scriptitems::::build_modulegids_tableinstaller::scriptitems::build_modulegids_table
11176.1ms81.3msinstaller::scriptitems::::resolve_all_directory_namesinstaller::scriptitems::resolve_all_directory_names
11159.9ms59.9msinstaller::scriptitems::::remove_not_required_spellcheckerlanguage_filesinstaller::scriptitems::remove_not_required_spellcheckerlanguage_files
11156.7ms100msinstaller::scriptitems::::set_children_flaginstaller::scriptitems::set_children_flag
95551156.1ms56.1msinstaller::scriptitems::::insert_for_iteminstaller::scriptitems::insert_for_item
11153.4ms56.5msinstaller::scriptitems::::make_filename_language_specificinstaller::scriptitems::make_filename_language_specific
11152.5ms55.7msinstaller::scriptitems::::remove_office_start_language_filesinstaller::scriptitems::remove_office_start_language_files
11143.5ms43.7msinstaller::scriptitems::::remove_non_existent_languages_in_productlistsinstaller::scriptitems::remove_non_existent_languages_in_productlists
11143.4ms43.4msinstaller::scriptitems::::collect_all_parent_featureinstaller::scriptitems::collect_all_parent_feature
8201135.4ms45.3msinstaller::scriptitems::::get_string_of_modulegids_for_itemgidinstaller::scriptitems::get_string_of_modulegids_for_itemgid
11132.9ms34.5msinstaller::scriptitems::::resolve_assigned_modulesinstaller::scriptitems::resolve_assigned_modules
11132.3ms102msinstaller::scriptitems::::collect_directories_with_create_flag_from_directoryarrayinstaller::scriptitems::collect_directories_with_create_flag_from_directoryarray
831125.7ms25.7msinstaller::scriptitems::::determine_directory_language_dependencyinstaller::scriptitems::determine_directory_language_dependency
11123.9ms23.9msinstaller::scriptitems::::remove_Files_Without_Sourcedirectoryinstaller::scriptitems::remove_Files_Without_Sourcedirectory
36843117.2ms17.2msinstaller::scriptitems::::CORE:sortinstaller::scriptitems::CORE:sort (opcode)
33116.0ms212msinstaller::scriptitems::::assigning_modules_to_itemsinstaller::scriptitems::assigning_modules_to_items
1162213.3ms166msinstaller::scriptitems::::get_sourcepath_from_filename_and_includepath_classicinstaller::scriptitems::get_sourcepath_from_filename_and_includepath_classic
11110.9ms11.7msinstaller::scriptitems::::set_global_directory_hostnamesinstaller::scriptitems::set_global_directory_hostnames
11110.4ms11.3msinstaller::scriptitems::::remove_template_modulesinstaller::scriptitems::remove_template_modules
1118.83ms9.46msinstaller::scriptitems::::remove_uninstall_regitems_from_scriptinstaller::scriptitems::remove_uninstall_regitems_from_script
1117.27ms7.27msinstaller::scriptitems::::checking_directories_with_corrupt_hostnameinstaller::scriptitems::checking_directories_with_corrupt_hostname
1115.67ms6.06msinstaller::scriptitems::::remove_Languagepacklibraries_from_Installsetinstaller::scriptitems::remove_Languagepacklibraries_from_Installset
1115.22ms5.68msinstaller::scriptitems::::remove_Helppacklibraries_from_Installsetinstaller::scriptitems::remove_Helppacklibraries_from_Installset
1115.15ms5.53msinstaller::scriptitems::::remove_patchonlyfiles_from_Installsetinstaller::scriptitems::remove_patchonlyfiles_from_Installset
1113.71ms1.40sinstaller::scriptitems::::replace_setup_variablesinstaller::scriptitems::replace_setup_variables
1112.27ms14.1msinstaller::scriptitems::::BEGIN@33installer::scriptitems::BEGIN@33
111339µs342µsinstaller::scriptitems::::BEGIN@30installer::scriptitems::BEGIN@30
831184µs84µsinstaller::scriptitems::::CORE:printinstaller::scriptitems::CORE:print (opcode)
11134µs47µsinstaller::scriptitems::::get_office_directory_gid_and_hostnameinstaller::scriptitems::get_office_directory_gid_and_hostname
11117µs58µsinstaller::scriptitems::::BEGIN@34installer::scriptitems::BEGIN@34
11116µs18µsinstaller::scriptitems::::BEGIN@35installer::scriptitems::BEGIN@35
11114µs16µsinstaller::scriptitems::::BEGIN@36installer::scriptitems::BEGIN@36
11114µs15µsinstaller::scriptitems::::BEGIN@31installer::scriptitems::BEGIN@31
11113µs13µsinstaller::scriptitems::::change_keys_of_scpactionsinstaller::scriptitems::change_keys_of_scpactions
11113µs15µsinstaller::scriptitems::::BEGIN@37installer::scriptitems::BEGIN@37
11113µs15µsinstaller::scriptitems::::BEGIN@32installer::scriptitems::BEGIN@32
11113µs13µsinstaller::scriptitems::::get_destination_file_path_for_linksinstaller::scriptitems::get_destination_file_path_for_links
11110µs10µsinstaller::scriptitems::::get_destination_link_path_for_linksinstaller::scriptitems::get_destination_link_path_for_links
1119µs9µsinstaller::scriptitems::::remove_workstation_only_itemsinstaller::scriptitems::remove_workstation_only_items
1118µs8µsinstaller::scriptitems::::resolve_links_with_flag_relativeinstaller::scriptitems::resolve_links_with_flag_relative
0000s0sinstaller::scriptitems::::add_rootpath_to_directoriesinstaller::scriptitems::add_rootpath_to_directories
0000s0sinstaller::scriptitems::::add_rootpath_to_filesinstaller::scriptitems::add_rootpath_to_files
0000s0sinstaller::scriptitems::::add_rootpath_to_linksinstaller::scriptitems::add_rootpath_to_links
0000s0sinstaller::scriptitems::::get_childreninstaller::scriptitems::get_children
0000s0sinstaller::scriptitems::::quoting_illegal_filenamesinstaller::scriptitems::quoting_illegal_filenames
0000s0sinstaller::scriptitems::::remove_Files_For_Languagepacksinstaller::scriptitems::remove_Files_For_Languagepacks
0000s0sinstaller::scriptitems::::replace_userdir_variableinstaller::scriptitems::replace_userdir_variable
0000s0sinstaller::scriptitems::::set_officedirectory_nameinstaller::scriptitems::set_officedirectory_name
0000s0sinstaller::scriptitems::::shift_basis_directory_parentsinstaller::scriptitems::shift_basis_directory_parents
0000s0sinstaller::scriptitems::::use_devversion_copy_scpactioninstaller::scriptitems::use_devversion_copy_scpaction
0000s0sinstaller::scriptitems::::use_langpack_copy_scpactioninstaller::scriptitems::use_langpack_copy_scpaction
0000s0sinstaller::scriptitems::::use_langpack_hostnameinstaller::scriptitems::use_langpack_hostname
0000s0sinstaller::scriptitems::::use_patch_copy_scpactioninstaller::scriptitems::use_patch_copy_scpaction
0000s0sinstaller::scriptitems::::use_patch_hostnameinstaller::scriptitems::use_patch_hostname
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::scriptitems;
29
30260µs2345µs
# spent 342µs (339+3) within installer::scriptitems::BEGIN@30 which was called: # once (339µs+3µs) by installer::control::BEGIN@36 at line 30
use installer::converter;
# spent 342µs making 1 call to installer::scriptitems::BEGIN@30 # spent 3µs making 1 call to UNIVERSAL::import
31252µs216µs
# spent 15µs (14+1) within installer::scriptitems::BEGIN@31 which was called: # once (14µs+1µs) by installer::control::BEGIN@36 at line 31
use installer::exiter;
# spent 15µs making 1 call to installer::scriptitems::BEGIN@31 # spent 2µs making 1 call to UNIVERSAL::import
32252µs218µs
# spent 15µs (13+3) within installer::scriptitems::BEGIN@32 which was called: # once (13µs+3µs) by installer::control::BEGIN@36 at line 32
use installer::globals;
# spent 15µs making 1 call to installer::scriptitems::BEGIN@32 # spent 2µs making 1 call to UNIVERSAL::import
3321.02ms214.1ms
# spent 14.1ms (2.27+11.8) within installer::scriptitems::BEGIN@33 which was called: # once (2.27ms+11.8ms) by installer::control::BEGIN@36 at line 33
use installer::languages;
# spent 14.1ms making 1 call to installer::scriptitems::BEGIN@33 # spent 3µs making 1 call to UNIVERSAL::import
34258µs298µs
# spent 58µs (17+41) within installer::scriptitems::BEGIN@34 which was called: # once (17µs+41µs) by installer::control::BEGIN@36 at line 34
use installer::logger;
# spent 58µs making 1 call to installer::scriptitems::BEGIN@34 # spent 41µs making 1 call to Exporter::import
35253µs220µs
# spent 18µs (16+2) within installer::scriptitems::BEGIN@35 which was called: # once (16µs+2µs) by installer::control::BEGIN@36 at line 35
use installer::pathanalyzer;
# spent 18µs making 1 call to installer::scriptitems::BEGIN@35 # spent 2µs making 1 call to UNIVERSAL::import
36250µs218µs
# spent 16µs (14+2) within installer::scriptitems::BEGIN@36 which was called: # once (14µs+2µs) by installer::control::BEGIN@36 at line 36
use installer::remover;
# spent 16µs making 1 call to installer::scriptitems::BEGIN@36 # spent 2µs making 1 call to UNIVERSAL::import
37220.9ms217µs
# spent 15µs (13+2) within installer::scriptitems::BEGIN@37 which was called: # once (13µs+2µs) by installer::control::BEGIN@36 at line 37
use installer::systemactions;
# spent 15µs making 1 call to installer::scriptitems::BEGIN@37 # spent 2µs making 1 call to UNIVERSAL::import
38
39################################################################
40# Resolving the GID for the directories defined in setup script
41################################################################
42
43sub resolve_all_directory_names
44
# spent 81.3ms (76.1+5.20) within installer::scriptitems::resolve_all_directory_names which was called: # once (76.1ms+5.20ms) by installer::run at line 368 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
4513µs my ($directoryarrayref) = @_;
46
47 # After this procedure the hash shall contain the complete language
48 # dependent path, not only the language dependent HostName.
49
5012µs my ($key, $value, $parentvalue, $parentgid, $parentdirectoryhashref);
51
521335µs for ( my $i = 0; $i <= $#{$directoryarrayref}; $i++ )
53 {
54244191µs my $directoryhashref = ${$directoryarrayref}[$i];
55244242µs my $gid = $directoryhashref-> {'gid'};
56244168µs my $parentid = $directoryhashref-> {'ParentID'};
57
58244246µs if ( $parentid ne "PREDEFINED_PROGDIR" )
59 {
60 # find the array of the parentid, which has to be defined before in setup script
61 # and is therefore listed before in this array
62
6324321.6ms for ( my $j = 0; $j <= $i; $j++ )
64 {
652458611.2ms $parentdirectoryhashref = ${$directoryarrayref}[$j];
662458612.7ms $parentgid = $parentdirectoryhashref->{'gid'};
67
682458610.0ms if ( $parentid eq $parentgid)
69 {
70243133µs last;
71 }
72 }
73
74 # and now we can put the path together
75 # But take care of the languages!
76
77243140µs my $dirismultilingual = $directoryhashref->{'ismultilingual'};
78243125µs my $parentismultilingual = $parentdirectoryhashref->{'ismultilingual'};
79
80 # First: Both directories are language independent or both directories are language dependent
81
82243421µs if ((( ! $dirismultilingual ) && ( ! $parentismultilingual )) ||
83 (( $dirismultilingual ) && ( $parentismultilingual )))
84 {
85237782µs foreach $key (keys %{$directoryhashref})
86 {
87 # the key ("HostName (en-US)") must be usable for both hashes
88
89206711.5ms20673.60ms if ( $key =~ /\bHostName\b/ )
# spent 3.60ms making 2067 calls to installer::scriptitems::CORE:match, avg 2µs/call
90 {
911327628µs $parentvalue = "";
921327982µs $value = $directoryhashref->{$key};
931327902µs if ( $parentdirectoryhashref->{$key} ) { $parentvalue = $parentdirectoryhashref->{$key}; }
94
95 # It is possible, that in scp project, a directory is defined in more languages than
96 # the directory parent (happened after automatic generation of macros.inc).
97 # Therefore this is checked now and written with a warning into the logfile.
98 # This is no error, because (in most cases) the concerned language is not build.
99
10013271.15ms if ($parentvalue eq "")
101 {
102 $directoryhashref->{$key} = "FAILURE";
103 my $infoline = "WARNING: No hostname for $parentid with \"$key\". Needed by child directory $gid !\n";
104 push( @installer::globals::globallogfileinfo, $infoline);
105 }
106 else
107 {
10813271.80ms $directoryhashref->{$key} = $parentvalue . $installer::globals::separator . $value;
109 }
110 }
111 }
112 }
113
114 # Second: The directory is language dependent, the parent not
115
116243115µs if (( $dirismultilingual ) && ( ! $parentismultilingual ))
117 {
11843µs $parentvalue = $parentdirectoryhashref->{'HostName'}; # there is only one
119
1204106µs foreach $key (keys %{$directoryhashref}) # the current directory
121 {
1224532.82ms4531.05ms if ( $key =~ /\bHostName\b/ )
# spent 1.05ms making 453 calls to installer::scriptitems::CORE:match, avg 2µs/call
123 {
124440304µs $value = $directoryhashref->{$key};
125440574µs $directoryhashref->{$key} = $parentvalue . $installer::globals::separator . $value;
126 }
127 }
128 }
129
130 # Third: The directory is not language dependent, the parent is language dependent
131
132243136µs if (( ! $dirismultilingual ) && ( $parentismultilingual ))
133 {
13422µs $value = $directoryhashref->{'HostName'}; # there is only one
13528µs delete($directoryhashref->{'HostName'});
136
137279µs foreach $key (keys %{$parentdirectoryhashref}) # the parent directory
138 {
1392261.47ms226552µs if ( $key =~ /\bHostName\b/ )
# spent 552µs making 226 calls to installer::scriptitems::CORE:match, avg 2µs/call
140 {
141220148µs $parentvalue = $parentdirectoryhashref->{$key}; # there is only one
142220388µs $directoryhashref->{$key} = $parentvalue . $installer::globals::separator . $value;
143 }
144 }
145
14623µs $directoryhashref->{'ismultilingual'} = 1; # now this directory is also language dependent
147 }
148 }
149 }
150}
151
152#############################################################################
153# Files with flag NOT_IN_SUITE do not need to be packed into
154# Suite installation sets
155#############################################################################
156
157sub remove_office_start_language_files
158
# spent 55.7ms (52.5+3.26) within installer::scriptitems::remove_office_start_language_files which was called: # once (52.5ms+3.26ms) by installer::run at line 651 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
15912µs my ($productarrayref) = @_;
160
16111µs my @newitems = ();
162
16318.94ms for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
164 {
16579214.88ms my $oneitem = ${$productarrayref}[$i];
16679213.42ms my $styles = "";
167
16879219.95ms if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
169
170792128.5ms79213.26ms if (!($styles =~ /\bSET_OFFICE_LANGUAGE\b/))
# spent 3.26ms making 7921 calls to installer::scriptitems::CORE:match, avg 412ns/call
171 {
172 push(@newitems, $oneitem);
173 }
174 else
175 {
17618µs my $infoline = "INFO: Flag SET_OFFICE_LANGUAGE \-\> Removing $oneitem->{'gid'} from file list.\n";
17712µs push( @installer::globals::logfileinfo, $infoline);
178 }
179 }
180
181116µs return \@newitems;
182}
183
184#############################################################################
185# Registryitems for Uninstall have to be removed
186#############################################################################
187
188sub remove_uninstall_regitems_from_script
189
# spent 9.46ms (8.83+634µs) within installer::scriptitems::remove_uninstall_regitems_from_script which was called: # once (8.83ms+634µs) by installer::run at line 449 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
19011µs my ($registryarrayref) = @_;
191
19211µs my @newitems = ();
193
19411.46ms for ( my $i = 0; $i <= $#{$registryarrayref}; $i++ )
195 {
1961286814µs my $oneitem = ${$registryarrayref}[$i];
1971286543µs my $subkey = "";
198
19912861.43ms if ( $oneitem->{'Subkey'} ) { $subkey = $oneitem->{'Subkey'}; }
200
20112954.35ms1286634µs if ( $subkey =~ /Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall/ ) { next; }
# spent 634µs making 1286 calls to installer::scriptitems::CORE:match, avg 493ns/call
202
2031277851µs push(@newitems, $oneitem);
204 }
205
206110µs return \@newitems;
207}
208
209##############################################################################
210# Searching the language module for a specified language
211##############################################################################
212
213sub get_languagespecific_module
214
# spent 14.3s (12.9+1.32) within installer::scriptitems::get_languagespecific_module which was called 7194 times, avg 1.98ms/call: # 7194 times (12.9s+1.32s) by installer::scriptitems::resolving_all_languages_in_productlists at line 287, avg 1.98ms/call
{
215719412.6ms my ( $lang, $modulestring ) = @_;
216
21771943.58ms my $langmodulestring = "";
218
21971942.45ms my $module;
22071942.48s foreach $module ( keys %installer::globals::alllangmodules )
221 {
2221028742011.7s1870441.30s if (( $installer::globals::alllangmodules{$module} eq $lang ) && ( $modulestring =~ /\b$module\b/ ))
# spent 1.08s making 93522 calls to installer::scriptitems::CORE:regcomp, avg 12µs/call # spent 218ms making 93522 calls to installer::scriptitems::CORE:match, avg 2µs/call
223 {
224 $langmodulestring = "$langmodulestring,$module";
225 }
226 }
227
228719445.9ms719419.9ms $langmodulestring =~ s/^\s*,//;
# spent 19.9ms making 7194 calls to installer::scriptitems::CORE:subst, avg 3µs/call
229
23071943.70ms if ( $langmodulestring eq "" ) { installer::exiter::exit_program("ERROR: No language pack module found for language $lang in string \"$modulestring\"!", "get_languagespecific_module"); }
231
232719436.0ms return $langmodulestring;
233}
234
235##############################################################################
236# Removing all items in product lists which do not have the correct languages
237##############################################################################
238
239sub resolving_all_languages_in_productlists
240
# spent 158s (105+52.7) within installer::scriptitems::resolving_all_languages_in_productlists which was called 11 times, avg 14.3s/call: # once (75.4s+27.7s) by installer::run at line 880 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (18.9s+6.87s) by installer::run at line 865 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (7.87s+17.1s) by installer::run at line 649 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (1.95s+718ms) by installer::run at line 632 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (1.04s+364ms) by installer::run at line 855 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (436µs+0s) by installer::run at line 813 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (62µs+0s) by installer::run at line 811 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (29µs+0s) by installer::run at line 845 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (16µs+0s) by installer::run at line 772 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (13µs+0s) by installer::run at line 754 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (7µs+0s) by installer::run at line 794 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
2411117µs my ($productarrayref, $languagesarrayref) = @_;
242
2431112µs my @itemsinalllanguages = ();
244
2451110µs my ($key, $value);
246
247114.58ms for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
248 {
24939772.83ms my $oneitem = ${$productarrayref}[$i];
250
25139773.52ms my $ismultilingual = $oneitem->{'ismultilingual'};
252
25339773.89ms if (!($ismultilingual)) # nothing to do with single language items
254 {
25534254.17ms $oneitem->{'specificlanguage'} = "";
25634251.64ms push(@itemsinalllanguages, $oneitem);
257 }
258 else #all language dependent files
259 {
260552107ms for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ ) # iterating over all languages
261 {
2626016856.9ms my $onelanguage = ${$languagesarrayref}[$j];
263
2646016842.5ms my %oneitemhash = ();
265
266601682.51s foreach $key (keys %{$oneitem})
267 {
2681069039369.0s1069039325.1s if ( $key =~ /\(\S+\)/ ) # this are the language dependent keys
# spent 25.1s making 10690393 calls to installer::scriptitems::CORE:match, avg 2µs/call
269 {
2701028175270.6s2056350413.3s if ( $key =~ /\(\Q$onelanguage\E\)/ )
# spent 7.59s making 10281752 calls to installer::scriptitems::CORE:regcomp, avg 739ns/call # spent 5.72s making 10281752 calls to installer::scriptitems::CORE:match, avg 557ns/call
271 {
2729347077.7ms $value = $oneitem->{$key};
27393470144ms $oneitemhash{$key} = $value;
274 }
275 }
276 else
277 {
278408641305ms $value = $oneitem->{$key};
279408641551ms $oneitemhash{$key} = $value;
280 }
281 }
282
2836016882.0ms $oneitemhash{'specificlanguage'} = $onelanguage;
284
2856016836.8ms if ( $oneitemhash{'haslanguagemodule'} )
286 {
287719426.6ms719414.3s my $langmodulestring = get_languagespecific_module($onelanguage, $oneitemhash{'modules'});
# spent 14.3s making 7194 calls to installer::scriptitems::get_languagespecific_module, avg 1.98ms/call
28871947.54ms $oneitemhash{'modules'} = $langmodulestring;
289 }
290
2916016868.3ms push(@itemsinalllanguages, \%oneitemhash);
292 }
293 }
294 }
295
29611136µs return \@itemsinalllanguages;
297}
298
299################################################################################
300# Removing all modules, that have the flag LANGUAGEMODULE, but do not
301# have the correct language
302################################################################################
303
304sub remove_not_required_language_modules
305
# spent 3.28s (3.21+61.3ms) within installer::scriptitems::remove_not_required_language_modules which was called: # once (3.21s+61.3ms) by installer::run at line 882 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
30612µs my ($modulesarrayref, $languagesarrayref) = @_;
307
30811µs my @allmodules = ();
309
310138.1ms for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
311 {
3123493923.0ms my $module = ${$modulesarrayref}[$i];
3133493915.4ms my $styles = "";
3143493944.5ms if ( $module->{'Styles'} ) { $styles = $module->{'Styles'}; }
315
31634939201ms3493961.3ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 61.3ms making 34939 calls to installer::scriptitems::CORE:match, avg 2µs/call
317 {
3182519016.8ms if ( ! exists($module->{'Language'}) ) { installer::exiter::exit_program("ERROR: \"$module->{'gid'}\" has flag LANGUAGEMODULE, but does not know its language!", "remove_not_required_language_modules"); }
3192519020.8ms my $modulelanguage = $module->{'Language'};
320 # checking, if language is required
3212519010.2ms my $doinclude = 0;
322251901.52s for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ )
323 {
3241397816705ms my $onelanguage = ${$languagesarrayref}[$j];
3251397816629ms if ( $onelanguage eq $modulelanguage )
326 {
3272496110.1ms $doinclude = 1;
3282496115.4ms last;
329 }
330 }
331
3322519018.0ms if ( $doinclude ) { push(@allmodules, $module); }
333 }
334 else
335 {
33697495.21ms push(@allmodules, $module);
337 }
338 }
339
340120µs return \@allmodules;
341}
342
343################################################################################
344# Removing all modules, that have a spellchecker language that is not
345# required for this product (spellchecker selection).
346# All required spellchecker languages are stored in
347# %installer::globals::spellcheckerlanguagehash
348################################################################################
349
350sub remove_not_required_spellcheckerlanguage_modules
351
# spent 119ms (118+1.51) within installer::scriptitems::remove_not_required_spellcheckerlanguage_modules which was called: # once (118ms+1.51ms) by installer::run at line 886 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
35215µs my ($modulesarrayref) = @_;
353
35412µs my $infoline = "";
35512µs my @allmodules = ();
356
357134.8ms for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
358 {
3593471018.6ms my $module = ${$modulesarrayref}[$i];
3603471040.9ms if ( $module->{'Spellcheckerlanguage'} ) # selecting modules with Spellcheckerlanguage
361 {
36251234.97ms if ( exists($installer::globals::spellcheckerlanguagehash{$module->{'Spellcheckerlanguage'}}) )
363 {
364 push(@allmodules, $module);
365 }
366 else
367 {
368109158µs $infoline = "Spellchecker selection: Removing module $module->{'gid'}\n";
369109133µs push( @installer::globals::logfileinfo, $infoline);
370
371 # Collecting all files at modules that are removed
372
373109133µs if ( $module->{'Files'} )
374 {
375109859µs109365µs if ( $module->{'Files'} =~ /^\s*\((.*?)\)\s*$/ )
# spent 365µs making 109 calls to installer::scriptitems::CORE:match, avg 3µs/call
376 {
377109127µs my $filelist = $1;
378
379109398µs1091.14ms my $filelisthash = installer::converter::convert_stringlist_into_hash(\$filelist, ",");
# spent 1.14ms making 109 calls to installer::converter::convert_stringlist_into_hash, avg 11µs/call
380218533µs foreach my $onefile ( keys %{$filelisthash} ) { $installer::globals::spellcheckerfilehash{$onefile} = 1; }
381 }
382 }
383 }
384 }
385 else
386 {
3872958716.2ms push(@allmodules, $module);
388 }
389 }
390
391136µs return \@allmodules;
392}
393
394################################################################################
395# Removing all modules, that belong to a module that was removed
396# in "remove_not_required_spellcheckerlanguage_modules" because of the
397# spellchecker language. The files belonging to the modules are collected
398# in %installer::globals::spellcheckerfilehash.
399################################################################################
400
401sub remove_not_required_spellcheckerlanguage_files
402
# spent 59.9ms within installer::scriptitems::remove_not_required_spellcheckerlanguage_files which was called: # once (59.9ms+0s) by installer::run at line 888 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
40313µs my ($filesarrayref) = @_;
404
40512µs my @filesarray = ();
40612µs my $infoline = "";
407
408123.6ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
409 {
410159039.38ms my $onefile = ${$filesarrayref}[$i];
4111590318.9ms if ( exists($installer::globals::spellcheckerfilehash{$onefile->{'gid'}}) )
412 {
41368µs $infoline = "Spellchecker selection: Removing file $onefile->{'gid'}\n";
41467µs push( @installer::globals::logfileinfo, $infoline);
41564µs next;
416 }
417158978.02ms push(@filesarray, $onefile);
418 }
419
420136µs return \@filesarray;
421}
422
423################################################################################
424# Looking for directories without correct HostName
425################################################################################
426
427sub checking_directories_with_corrupt_hostname
428
# spent 7.27ms within installer::scriptitems::checking_directories_with_corrupt_hostname which was called: # once (7.27ms+0s) by installer::run at line 639 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
42913µs my ($dirsref, $languagesarrayref) = @_;
430
43112.01ms for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
432 {
43319721.10ms my $onedir = ${$dirsref}[$i];
434
4351972807µs my $hostname = "";
436
43719721.69ms if ( $onedir->{'HostName'} ) { $hostname = $onedir->{'HostName'}; }
438
4391972724µs if ( $hostname eq "" )
440 {
441 my $langstring = "";
442 for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ ) { $langstring .= ${$languagesarrayref}[$j] . " "; }
443 installer::exiter::exit_program("ERROR: HostName not defined for $onedir->{'gid'} for specified language. Probably you wanted to create an installation set, in a language not defined in scp2 project. You selected the following language(s): $langstring", "checking_directories_with_corrupt_hostname");
444 }
445
4461972935µs if ( $hostname eq "FAILURE" )
447 {
448 installer::exiter::exit_program("ERROR: Could not create HostName for $onedir->{'gid'} (missing language at parent). See logfile warning for more info!", "checking_directories_with_corrupt_hostname");
449 }
450 }
451}
452
453################################################################################
454# Setting global properties
455################################################################################
456
457sub set_global_directory_hostnames
458
# spent 11.7ms (10.9+783µs) within installer::scriptitems::set_global_directory_hostnames which was called: # once (10.9ms+783µs) by installer::run at line 641 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
45912µs my ($dirsref, $allvariables) = @_;
460
46112.16ms for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
462 {
46319721.06ms my $onedir = ${$dirsref}[$i];
4641972865µs my $styles = "";
46519721.00ms if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
466
46719726.61ms1972783µs if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
# spent 783µs making 1972 calls to installer::scriptitems::CORE:match, avg 397ns/call
468 {
46913µs $installer::globals::officedirhostname = $onedir->{'HostName'};
47012µs $installer::globals::officedirgid = $onedir->{'gid'};
47112µs $allvariables->{'OFFICEDIRECTORYHOSTNAME'} = $installer::globals::officedirhostname;
472 }
473 }
474}
475
476########################################################
477# Recursively defined procedure to order
478# modules and directories
479########################################################
480
481sub get_children
482{
483 my ($allitems, $startparent, $newitemorder) = @_;
484
485 for ( my $i = 0; $i <= $#{$allitems}; $i++ )
486 {
487 my $gid = ${$allitems}[$i]->{'gid'};
488 my $parent = "";
489 if ( ${$allitems}[$i]->{'ParentID'} ) { $parent = ${$allitems}[$i]->{'ParentID'}; }
490
491 if ( $parent eq $startparent )
492 {
493 push(@{$newitemorder}, ${$allitems}[$i]);
494 my $parent = $gid;
495 get_children($allitems, $parent, $newitemorder); # recursive!
496 }
497 }
498}
499
500################################################################################
501# Using different HostName for language packs
502################################################################################
503
504sub use_langpack_hostname
505{
506 my ($dirsref) = @_;
507
508 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
509 {
510 my $onedir = ${$dirsref}[$i];
511 if (( $onedir->{'LangPackHostName'} ) && ( $onedir->{'LangPackHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'LangPackHostName'}; }
512 }
513}
514
515################################################################################
516# Using different HostName for language packs
517################################################################################
518
519sub use_patch_hostname
520{
521 my ($dirsref) = @_;
522
523 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
524 {
525 my $onedir = ${$dirsref}[$i];
526 if (( $onedir->{'PatchHostName'} ) && ( $onedir->{'PatchHostName'} ne "" )) { $onedir->{'HostName'} = $onedir->{'PatchHostName'}; }
527 }
528}
529
530################################################################################
531# Using different HostName for language packs
532################################################################################
533
534sub use_langpack_copy_scpaction
535{
536 my ($scpactionsref) = @_;
537
538 for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
539 {
540 my $onescpaction = ${$scpactionsref}[$i];
541 if (( $onescpaction->{'LangPackCopy'} ) && ( $onescpaction->{'LangPackCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'LangPackCopy'}; }
542 }
543}
544
545################################################################################
546# Using different HostName for dev builds
547################################################################################
548
549sub use_devversion_copy_scpaction
550{
551 my ($scpactionsref) = @_;
552
553 for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
554 {
555 my $onescpaction = ${$scpactionsref}[$i];
556 if (( $onescpaction->{'DevVersionCopy'} ) && ( $onescpaction->{'DevVersionCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'DevVersionCopy'}; }
557 }
558}
559
560################################################################################
561# Using different HostName for language packs
562################################################################################
563
564sub use_patch_copy_scpaction
565{
566 my ($scpactionsref) = @_;
567
568 for ( my $i = 0; $i <= $#{$scpactionsref}; $i++ )
569 {
570 my $onescpaction = ${$scpactionsref}[$i];
571 if (( $onescpaction->{'PatchCopy'} ) && ( $onescpaction->{'PatchCopy'} ne "" )) { $onescpaction->{'Copy'} = $onescpaction->{'PatchCopy'}; }
572 }
573}
574
575################################################################################
576# Shifting parent directories of URE and Basis layer, so that
577# these directories are located below the Brand layer.
578# Style: SHIFT_BASIS_INTO_BRAND_LAYER
579################################################################################
580
581sub shift_basis_directory_parents
582{
583 my ($dirsref) = @_;
584
585 my @alldirs = ();
586 my @savedirs = ();
587 my @shifteddirs = ();
588
589 my $officedirgid = "";
590
591 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
592 {
593 my $onedir = ${$dirsref}[$i];
594 my $styles = "";
595 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
596
597 if ( $styles =~ /\bOFFICEDIRECTORY\b/ ) { $officedirgid = $onedir->{'gid'}; }
598 }
599
600 if ( $officedirgid ne "" )
601 {
602 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
603 {
604 my $onedir = ${$dirsref}[$i];
605 my $styles = "";
606 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
607
608 if (( $styles =~ /\bBASISDIRECTORY\b/ ) || ( $styles =~ /\bUREDIRECTORY\b/ ))
609 {
610 $onedir->{'ParentID'} = $officedirgid;
611 }
612 }
613
614 # Sorting directories
615 my $startgid = "PREDEFINED_PROGDIR";
616 get_children($dirsref, $startgid, \@alldirs);
617 }
618
619 return \@alldirs;
620}
621
622################################################################################
623# Setting the name of the directory with style OFFICEDIRECTORY.
624# The name can be defined in property OFFICEDIRECTORYNAME.
625################################################################################
626
627sub set_officedirectory_name
628{
629 my ($dirsref, $officedirname) = @_;
630
631 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
632 {
633 my $onedir = ${$dirsref}[$i];
634 my $styles = "";
635 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
636 if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
637 {
638 $onedir->{'HostName'} = $officedirname;
639 last;
640 }
641 }
642}
643
644################################################################################
645# Simplifying the name for language dependent items from "Name (xy)" to "Name"
646################################################################################
647
648sub changing_name_of_language_dependent_keys
649
# spent 3.56s (3.01+550ms) within installer::scriptitems::changing_name_of_language_dependent_keys which was called 11 times, avg 324ms/call: # once (1.92s+380ms) by installer::run at line 891 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (652ms+103ms) by installer::run at line 867 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (326ms+48.6ms) by installer::run at line 656 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (59.9ms+8.13ms) by installer::run at line 857 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (54.6ms+9.48ms) by installer::run at line 637 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (210µs+0s) by installer::run at line 817 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (28µs+0s) by installer::run at line 815 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (15µs+0s) by installer::run at line 847 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (7µs+0s) by installer::run at line 774 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (7µs+0s) by installer::run at line 756 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (4µs+0s) by installer::run at line 796 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
6501116µs my ($itemsarrayref) = @_;
651
652 # Changing key for multilingual items from "Name ( )" to "Name" or "HostName ( )" to "HostName"
653
65411142ms for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
655 {
6566325445.4ms my $oneitem = ${$itemsarrayref}[$i];
6576325457.1ms my $onelanguage = $oneitem->{'specificlanguage'};
658
6596325467.0ms if (!($onelanguage eq "" )) # language dependent item
660 {
6615984120.6ms my $itemkey;
662
66359841221ms foreach $itemkey (keys %{$oneitem})
664 {
6655586822.58s558682550ms if ( $itemkey =~ /^\s*(\S+?)\s+\(\S+\)\s*$/ )
# spent 550ms making 558682 calls to installer::scriptitems::CORE:match, avg 984ns/call
666 {
6679281699.4ms my $newitemkey = $1;
6689281685.1ms my $itemvalue = $oneitem->{$itemkey};
66992816125ms $oneitem->{$newitemkey} = $itemvalue;
67092816120ms delete($oneitem->{$itemkey});
671 }
672 }
673 }
674 }
675}
676
677################################################################################
678# Replacement of setup variables in ConfigurationItems and ProfileItems
679# <productkey>, <buildid>, <sequence_languages>, <productcode>, <upgradecode>, <productupdate>
680################################################################################
681
682sub replace_setup_variables
683
# spent 1.40s (3.71ms+1.40) within installer::scriptitems::replace_setup_variables which was called: # once (3.71ms+1.40s) by installer::run at line 819 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
68412µs my ($itemsarrayref, $languagestringref, $hashref) = @_;
685
68613µs my $languagesstring = $$languagestringref;
6871122µs1115µs $languagesstring =~ s/\_/ /g; # replacing underscore with whitespace
# spent 115µs making 1 call to installer::scriptitems::CORE:subst
688
68913µs my $productname = $hashref->{'PRODUCTNAME'};
69012µs my $productversion = $hashref->{'PRODUCTVERSION'};
69112µs my $userdirproductversion = "";
69212µs if ( $hashref->{'USERDIRPRODUCTVERSION'} ) { $userdirproductversion = $hashref->{'USERDIRPRODUCTVERSION'}; }
69313µs my $productkey = $productname . " " . $productversion;
694
695 # string $buildid, which is used to replace the setup variable <buildid>
696
69711µs my $localminor = "flat";
69812µs if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
69912µs else { $localminor = $installer::globals::lastminor; }
700
70112µs my $localbuild = $installer::globals::build;
702
703115µs16µs if ( $localbuild =~ /^\s*(\w+?)(\d+)\s*$/ ) { $localbuild = $2; } # using "680" instead of "src680"
# spent 6µs making 1 call to installer::scriptitems::CORE:match
704
70511.40s11.40s my $buildidstring = join( '-', split( ' ', `$ENV{'SRC_ROOT'}/g -s log -n 1 --pretty=format:"%h "` ));
# spent 1.40s making 1 call to installer::scriptitems::CORE:backtick
70616µs if ($? || !$buildidstring) {
707 $buildidstring = $localbuild . $localminor . "(Build:" . $installer::globals::buildid . ")";
708 }
709 else {
71015µs $buildidstring = substr($buildidstring, 0, -1);
711 }
712
713133µs120µs if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
# spent 20µs making 1 call to installer::scriptitems::CORE:match
714
71519µs my $updateid = $productname . "_" . $userdirproductversion . "_" . $$languagestringref;
716111µs13µs $updateid =~ s/ /_/g;
# spent 3µs making 1 call to installer::scriptitems::CORE:subst
717
7181111µs for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
719 {
7207860µs my $oneitem = ${$itemsarrayref}[$i];
72178107µs my $value = $oneitem->{'Value'};
722
72378285µs7850µs $value =~ s/\<buildid\>/$buildidstring/;
# spent 50µs making 78 calls to installer::scriptitems::CORE:subst, avg 645ns/call
72478254µs7839µs $value =~ s/\<sequence_languages\>/$languagesstring/;
# spent 39µs making 78 calls to installer::scriptitems::CORE:subst, avg 500ns/call
72578260µs7845µs $value =~ s/\<productkey\>/$productkey/;
# spent 45µs making 78 calls to installer::scriptitems::CORE:subst, avg 573ns/call
72678269µs7848µs $value =~ s/\<productcode\>/$installer::globals::productcode/;
# spent 48µs making 78 calls to installer::scriptitems::CORE:subst, avg 610ns/call
72778273µs7849µs $value =~ s/\<upgradecode\>/$installer::globals::upgradecode/;
# spent 49µs making 78 calls to installer::scriptitems::CORE:subst, avg 623ns/call
72878262µs7842µs $value =~ s/\<alllanguages\>/$languagesstring/;
# spent 42µs making 78 calls to installer::scriptitems::CORE:subst, avg 535ns/call
72978250µs7839µs $value =~ s/\<productmajor\>/$localbuild/;
# spent 39µs making 78 calls to installer::scriptitems::CORE:subst, avg 495ns/call
73078256µs7838µs $value =~ s/\<productminor\>/$localminor/;
# spent 38µs making 78 calls to installer::scriptitems::CORE:subst, avg 486ns/call
73178258µs7841µs $value =~ s/\<productbuildid\>/$installer::globals::buildid/;
# spent 41µs making 78 calls to installer::scriptitems::CORE:subst, avg 531ns/call
73278257µs7841µs $value =~ s/\<sourceid\>/$installer::globals::build/;
# spent 41µs making 78 calls to installer::scriptitems::CORE:subst, avg 529ns/call
73378257µs7840µs $value =~ s/\<updateid\>/$updateid/;
# spent 40µs making 78 calls to installer::scriptitems::CORE:subst, avg 519ns/call
73478269µs7848µs $value =~ s/\<pkgformat\>/$installer::globals::packageformat/;
# spent 48µs making 78 calls to installer::scriptitems::CORE:subst, avg 618ns/call
7357850µs $ENV{'OOO_VENDOR'} = "" if !defined $ENV{'OOO_VENDOR'};
73678270µs7843µs $value =~ s/\<vendor\>/$ENV{'OOO_VENDOR'}/;
# spent 43µs making 78 calls to installer::scriptitems::CORE:subst, avg 547ns/call
7377841µs $ENV{'BUILD_VER_STRING'} = "" if !defined $ENV{'BUILD_VER_STRING'};
73878262µs7838µs $value =~ s/\<buildversion\>/$ENV{'BUILD_VER_STRING'}/;
# spent 38µs making 78 calls to installer::scriptitems::CORE:subst, avg 492ns/call
739
74078108µs $oneitem->{'Value'} = $value;
741 }
742}
743
744################################################################################
745# By defining variable LOCALUSERDIR in *.lst it is possible to change
746# the standard destination of user directory defined in scp2 ($SYSUSERCONFIG).
747################################################################################
748
749sub replace_userdir_variable
750{
751 my ($itemsarrayref) = @_;
752
753 my $userdir = "";
754 if ( $allvariableshashref->{'LOCALUSERDIR'} ) { $userdir = $allvariableshashref->{'LOCALUSERDIR'}; }
755 else { $userdir = $installer::globals::simpledefaultuserdir; }
756
757 if ( $userdir ne "" )
758 {
759 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
760 {
761 my $oneitem = ${$itemsarrayref}[$i];
762 $oneitem->{'Value'} =~ s/\$SYSUSERCONFIG/$userdir/;
763 }
764 }
765}
766
767#####################################################################################
768# Files and ConfigurationItems are not included for all languages.
769# For instance asian fonts. These can be removed, if no "Name" is found.
770# ConfigurationItems are not always defined in the linguistic configuration file.
771# The "Key" cannot be found for them.
772#####################################################################################
773
774sub remove_non_existent_languages_in_productlists
775
# spent 43.7ms (43.5+150µs) within installer::scriptitems::remove_non_existent_languages_in_productlists which was called: # once (43.5ms+150µs) by installer::run at line 660 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
77615µs my ($itemsarrayref, $languagestringref, $searchkey, $itemtype) = @_;
777
778 # Removing of all non existent files, for instance asian fonts
779
78018µs1150µs installer::logger::include_header_into_logfile("Removing for this language $$languagestringref:");
# spent 150µs making 1 call to installer::logger::include_header_into_logfile
781
78211µs my @allexistentitems = ();
783
7841600ns my $infoline;
785
78618.02ms for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
787 {
78879204.34ms my $oneitem = ${$itemsarrayref}[$i];
78979203.33ms my $oneitemname = ""; # $searchkey is "Name" for files and "Key" for ConfigurationItems
790
79179209.50ms if ( $oneitem->{$searchkey} ) { $oneitemname = $oneitem->{$searchkey} }
792
79379203.03ms my $itemtoberemoved = 0;
794
79579202.99ms if ($oneitemname eq "") # for instance asian font in english installation set
796 {
797 $itemtoberemoved = 1;
798 }
799
80079206.45ms if ($itemtoberemoved)
801 {
802416684µs $infoline = "WARNING: Language $$languagestringref: No $itemtype packed for $oneitem->{'gid'}!\n";
803416732µs push( @installer::globals::logfileinfo, $infoline);
804 }
805 else
806 {
80775044.40ms push(@allexistentitems, $oneitem);
808 }
809 }
810
81111µs $infoline = "\n";
81211µs push( @installer::globals::logfileinfo, $infoline);
813
814128µs return \@allexistentitems;
815}
816
817########################################################################
818# Input is the directory gid, output the "HostName" of the directory
819########################################################################
820
821sub get_Directoryname_From_Directorygid
822
# spent 520ms within installer::scriptitems::get_Directoryname_From_Directorygid which was called 7512 times, avg 69µs/call: # 7512 times (520ms+0s) by installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist at line 917, avg 69µs/call
{
82375127.92ms my ($dirsarrayref ,$searchgid, $onelanguage, $oneitemgid) = @_;
824
82575126.94ms my $directoryname = "";
82675122.57ms my $onedirectory;
82775123.15ms my $foundgid = 0;
828
8297512193ms for ( my $i = 0; $i <= $#{$dirsarrayref}; $i++ )
830 {
83118208884.7ms $onedirectory = ${$dirsarrayref}[$i];
832182088101ms my $directorygid = $onedirectory->{'gid'};
833
83418208877.8ms if ($directorygid eq $searchgid)
835 {
83675123.24ms $foundgid = 1;
83775124.65ms last;
838 }
839 }
840
84175122.78ms if (!($foundgid))
842 {
843 installer::exiter::exit_program("ERROR: Gid $searchgid not defined in $installer::globals::setupscriptname", "get_Directoryname_From_Directorygid");
844 }
845
846751210.5ms if ( ! ( $onedirectory->{'ismultilingual'} )) # the directory is not language dependent
847 {
848 $directoryname = $onedirectory->{'HostName'};
849 }
850 else
851 {
852109229µs $directoryname = $onedirectory->{"HostName ($onelanguage)"};
853 }
854
855 # gid_Dir_Template_Wizard_Letter is defined as language dependent directory, but the file gid_Dir_Template_Wizard_Letter
856 # is not language dependent. Therefore $onelanguage is not defined. But which language is the correct language for the
857 # directory?
858 # Perhaps better solution: In scp it must be forbidden to have a language independent file in a language dependent directory.
859
86075123.01ms if (( ! $directoryname ) && ( $onelanguage eq "" ))
861 {
862 installer::exiter::exit_program("ERROR (in scp): Directory $searchgid is language dependent, but not $oneitemgid inside this directory", "get_Directoryname_From_Directorygid");
863 }
864
865751234.5ms return \$directoryname;
866}
867
868##################################################################
869# Getting destination direcotory for links, files and profiles
870##################################################################
871
872sub get_Destination_Directory_For_Item_From_Directorylist # this is used for Files, Profiles and Links
873
# spent 800ms (206+594) within installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist which was called 4 times, avg 200ms/call: # once (206ms+594ms) by installer::run at line 662 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (254µs+216µs) by installer::run at line 826 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (8µs+0s) by installer::run at line 778 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (4µs+0s) by installer::run at line 798 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
87448µs my ($itemarrayref, $dirsarrayref) = @_;
875
87648.95ms for ( my $i = 0; $i <= $#{$itemarrayref}; $i++ )
877 {
87875125.77ms my $oneitem = ${$itemarrayref}[$i];
87975127.51ms my $oneitemgid = $oneitem->{'gid'};
88075125.81ms my $directorygid = $oneitem->{'Dir'}; # for instance gid_Dir_Program
88175123.55ms my $netdirectorygid = "";
88275124.80ms my $onelanguage = $oneitem->{'specificlanguage'};
88375123.06ms my $ispredefinedprogdir = 0;
88475123.05ms my $ispredefinedconfigdir = 0;
885
88675125.14ms my $oneitemname = $oneitem->{'Name'};
887
88875124.12ms if ( $oneitem->{'NetDir'} ) { $netdirectorygid = $oneitem->{'NetDir'}; }
889
890751219.7ms751268.1ms installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$oneitemname); # making /registry/schema/org/openoffice/VCL.xcs to VCL.xcs
# spent 68.1ms making 7512 calls to installer::pathanalyzer::make_absolute_filename_to_relative_filename, avg 9µs/call
891
89275122.88ms my $searchdirgid;
893
89475124.80ms if ( $netdirectorygid eq "" ) # if NetDir is defined, it is privileged
895 {
896 $searchdirgid = $directorygid
897 }
898 else
899 {
9005531µs $searchdirgid = $netdirectorygid
901 }
902
903751226.5ms75123.48ms if ($searchdirgid =~ /PREDEFINED_PROGDIR/) # the root directory is not defined in setup script
# spent 3.48ms making 7512 calls to installer::scriptitems::CORE:match, avg 463ns/call
904 {
905 $ispredefinedprogdir = 1;
906 }
907
908751224.6ms75122.93ms if ($searchdirgid =~ /PREDEFINED_CONFIGDIR/) # the root directory is not defined in setup script
# spent 2.93ms making 7512 calls to installer::scriptitems::CORE:match, avg 390ns/call
909 {
910 $ispredefinedconfigdir = 1;
911 }
912
91375122.78ms my $destfilename;
914
91575126.83ms if ((!( $ispredefinedprogdir )) && (!( $ispredefinedconfigdir )))
916 {
917751219.4ms7512520ms my $directorynameref = get_Directoryname_From_Directorygid($dirsarrayref, $searchdirgid, $onelanguage, $oneitemgid);
# spent 520ms making 7512 calls to installer::scriptitems::get_Directoryname_From_Directorygid, avg 69µs/call
918751210.5ms $destfilename = $$directorynameref . $installer::globals::separator . $oneitemname;
919 }
920 else
921 {
922 $destfilename = $oneitemname;
923 }
924
925751213.0ms $oneitem->{'destination'} = $destfilename;
926 }
927}
928
929##########################################################################
930# Searching a file in a list of paths
931##########################################################################
932
933sub get_sourcepath_from_filename_and_includepath_classic
934
# spent 166ms (13.3+153) within installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic which was called 116 times, avg 1.43ms/call: # 109 times (12.1ms+141ms) by installer::windows::shortcut::create_shortcut_table at line 644 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/shortcut.pm, avg 1.41ms/call # 7 times (1.15ms+11.5ms) by installer::control::check_system_path at line 129 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/control.pm, avg 1.81ms/call
{
935116150µs my ($searchfilenameref, $includepatharrayref, $write_logfile) = @_;
936
93711669µs my ($onefile, $includepath, $infoline);
938
93911663µs my $foundsourcefile = 0;
940
9411161.52ms for ( my $j = 0; $j <= $#{$includepatharrayref}; $j++ )
942 {
943842809µs $includepath = ${$includepatharrayref}[$j];
9448422.79ms84211.9ms installer::remover::remove_leading_and_ending_whitespaces(\$includepath);
# spent 11.9ms making 842 calls to installer::remover::remove_leading_and_ending_whitespaces, avg 14µs/call
945
9468421.14ms $onefile = $includepath . $installer::globals::separator . $$searchfilenameref;
947
948842146ms842141ms if ( -f $onefile )
# spent 141ms making 842 calls to installer::scriptitems::CORE:ftfile, avg 168µs/call
949 {
95011681µs $foundsourcefile = 1;
951116157µs last;
952 }
953 }
954
955116136µs if (!($foundsourcefile))
956 {
957 $onefile = ""; # the sourcepath has to be empty
958 if ( $write_logfile)
959 {
960 if ( $ENV{'DEFAULT_TO_ENGLISH_FOR_PACKING'} )
961 {
962 $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
963 }
964 else
965 {
966 $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
967 }
968
969 push( @installer::globals::logfileinfo, $infoline);
970 }
971 }
972 else
973 {
97411662µs if ( $write_logfile)
975 {
976 $infoline = "SUCCESS: Source for $$searchfilenameref: $onefile\n";
977 push( @installer::globals::logfileinfo, $infoline);
978 }
979 }
980
981116747µs return \$onefile;
982}
983
984##########################################################################
985# Input is one file name, output the complete absolute path of this file
986##########################################################################
987
988sub get_sourcepath_from_filename_and_includepath
989
# spent 215ms (214+846µs) within installer::scriptitems::get_sourcepath_from_filename_and_includepath which was called 8888 times, avg 24µs/call: # 7504 times (181ms+846µs) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1128, avg 24µs/call # 1283 times (29.9ms+0s) by installer::packagelist::collectpackages at line 661 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/packagelist.pm, avg 23µs/call # 83 times (2.54ms+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1144, avg 31µs/call # 7 times (144µs+0s) by installer::packagelist::check_packagelist at line 519 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/packagelist.pm, avg 21µs/call # 5 times (213µs+0s) by installer::windows::mergemodule::merge_mergemodules_into_msi_database at line 87 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/mergemodule.pm, avg 43µs/call # 2 times (60µs+0s) by installer::worker::add_variables_from_inc_to_hashref at line 984 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/worker.pm, avg 30µs/call # once (40µs+0s) by installer::windows::update::readdatabase at line 320 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/update.pm # once (40µs+0s) by installer::worker::set_spellcheckerlanguages at line 1425 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/worker.pm # once (32µs+0s) by installer::control::read_encodinglist at line 418 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/control.pm # once (24µs+0s) by installer::setupscript::set_setupscript_name at line 82 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/setupscript.pm
{
99088888.40ms my ($searchfilenameref, $unused, $write_logfile) = @_;
991
99288884.23ms my ($onefile, $includepath, $infoline);
993
99488883.87ms my $foundsourcefile = 0;
99588883.22ms my $foundnewname = 0;
996
997888850.4ms for ( my $j = 0; $j <= $#installer::globals::allincludepaths; $j++ )
998 {
9994707423.5ms my $allfiles = $installer::globals::allincludepaths[$j];
1000
10014707432.4ms if ( exists( $allfiles->{$$searchfilenameref} ))
1002 {
1003880513.8ms $onefile = $allfiles->{'includepath'} . $installer::globals::separator . $$searchfilenameref;
100488053.75ms $foundsourcefile = 1;
100588055.99ms last;
1006 }
1007 }
1008
100988883.42ms if (!($foundsourcefile)) # testing with lowercase filename
1010 {
1011 # Attention: README01.html is copied for Windows to readme01.html, not case sensitive
1012
1013831.07ms for ( my $j = 0; $j <= $#installer::globals::allincludepaths; $j++ )
1014 {
1015830439µs my $allfiles = $installer::globals::allincludepaths[$j];
1016
1017830418µs my $newfilename = $$searchfilenameref;
10188303.05ms830450µs $newfilename =~ s/readme/README/; # special handling for readme files
# spent 450µs making 830 calls to installer::scriptitems::CORE:subst, avg 542ns/call
10198302.82ms830396µs $newfilename =~ s/license/LICENSE/; # special handling for license files
# spent 396µs making 830 calls to installer::scriptitems::CORE:subst, avg 477ns/call
1020
1021830682µs if ( exists( $allfiles->{$newfilename} ))
1022 {
1023 $onefile = $allfiles->{'includepath'} . $installer::globals::separator . $newfilename;
1024 $foundsourcefile = 1;
1025 $foundnewname = 1;
1026 last;
1027 }
1028 }
1029 }
1030
103188887.42ms if (!($foundsourcefile))
1032 {
10338390µs $onefile = ""; # the sourcepath has to be empty
10348369µs if ( $write_logfile)
1035 {
103683114µs if ( $ENV{'DEFAULT_TO_ENGLISH_FOR_PACKING'} )
1037 {
1038 $infoline = "WARNING: Source for $$searchfilenameref not found!\n"; # Important message in log file
1039 }
1040 else
1041 {
1042 $infoline = "ERROR: Source for $$searchfilenameref not found!\n"; # Important message in log file
1043 }
1044
104583103µs push( @installer::globals::logfileinfo, $infoline);
1046 }
1047 }
1048 else
1049 {
105088056.50ms if ( $write_logfile)
1051 {
105275147.74ms if (!($foundnewname))
1053 {
1054 $infoline = "SUCCESS: Source for $$searchfilenameref: $onefile\n";
1055 }
1056 else
1057 {
1058 $infoline = "SUCCESS/WARNING: Special handling for $$searchfilenameref: $onefile\n";
1059 }
106075148.92ms push( @installer::globals::logfileinfo, $infoline);
1061 }
1062 }
1063
1064888842.7ms return \$onefile;
1065}
1066
1067##############################################################
1068# Determining, whether a specified directory is language
1069# dependent
1070##############################################################
1071
1072sub determine_directory_language_dependency
1073
# spent 25.7ms within installer::scriptitems::determine_directory_language_dependency which was called 83 times, avg 309µs/call: # 83 times (25.7ms+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1161, avg 309µs/call
{
10748385µs my($directorygid, $dirsref) = @_;
1075
10768335µs my $is_multilingual = 0;
1077
10788310.2ms for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
1079 {
108098774.82ms my $onedir = ${$dirsref}[$i];
108198775.75ms my $gid = $onedir->{'gid'};
1082
108398774.43ms if ( $gid eq $directorygid )
1084 {
10858349µs $is_multilingual = $onedir->{'ismultilingual'};
10868358µs last;
1087 }
1088 }
1089
109083426µs return $is_multilingual;
1091}
1092
1093##############################################################
1094# Getting all source paths for all files to be packed
1095# $item can be "Files" or "ScpActions"
1096##############################################################
1097
1098sub get_Source_Directory_For_Files_From_Includepathlist
1099
# spent 439ms (212+227) within installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist which was called 2 times, avg 219ms/call: # once (212ms+227ms) by installer::run at line 664 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (18µs+145µs) by installer::run at line 758 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
110024µs my ($filesarrayref, $includepatharrayref, $dirsref, $item) = @_;
1101
1102211µs2287µs installer::logger::include_header_into_logfile("$item:");
# spent 287µs making 2 calls to installer::logger::include_header_into_logfile, avg 144µs/call
1103
110422µs my $infoline = "";
1105
110629.21ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1107 {
110875045.49ms my $onefile = ${$filesarrayref}[$i];
110975047.13ms my $onelanguage = $onefile->{'specificlanguage'};
1110
111175044.54ms if ( ! $onefile->{'Name'} ) { installer::exiter::exit_program("ERROR: $item without name ! GID: $onefile->{'gid'} ! Language: $onelanguage", "get_Source_Directory_For_Files_From_Includepathlist"); }
1112
111375044.66ms my $onefilename = $onefile->{'Name'};
111475043.41ms if ( $item eq "ScpActions" ) { $onefilename =~ s/\//$installer::globals::separator/g; }
1115750459.3ms1500811.4ms $onefilename =~ s/^\s*\Q$installer::globals::separator\E//; # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
# spent 6.05ms making 7504 calls to installer::scriptitems::CORE:regcomp, avg 806ns/call # spent 5.38ms making 7504 calls to installer::scriptitems::CORE:subst, avg 717ns/call
1116
111775043.45ms my $styles = "";
111875043.20ms my $file_can_miss = 0;
111975048.57ms if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
1120750426.8ms75043.47ms if ( $styles =~ /\bFILE_CAN_MISS\b/ ) { $file_can_miss = 1; }
# spent 3.47ms making 7504 calls to installer::scriptitems::CORE:match, avg 462ns/call
1121
112275043.13ms if (( $installer::globals::languagepack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))) { $file_can_miss = 1; }
112375042.72ms if (( $installer::globals::helppack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCEHELPPACK\b/ ))) { $file_can_miss = 1; }
1124
112575046.46ms my $sourcepathref = "";
1126
112775047.10ms if ( $file_can_miss ) { $sourcepathref = get_sourcepath_from_filename_and_includepath(\$onefilename, $includepatharrayref, 0); }
1128750421.8ms7504182ms else { $sourcepathref = get_sourcepath_from_filename_and_includepath(\$onefilename, $includepatharrayref, 1); }
# spent 182ms making 7504 calls to installer::scriptitems::get_sourcepath_from_filename_and_includepath, avg 24µs/call
1129
1130750410.3ms $onefile->{'sourcepath'} = $$sourcepathref; # This $$sourcepathref is empty, if no source was found
1131
1132 # defaulting to english for multilingual files if DEFAULT_TO_ENGLISH_FOR_PACKING is set
1133
1134750413.3ms if ( $ENV{'DEFAULT_TO_ENGLISH_FOR_PACKING'} )
1135 {
113675044.25ms if (( ! $onefile->{'sourcepath'} ) && ( $onefile->{'ismultilingual'} ))
1137 {
11388353µs my $oldname = $onefile->{'Name'};
11398355µs my $oldlanguage = $onefile->{'specificlanguage'};
11408343µs my $newlanguage = "en-US";
11418353µs $onefilename = $onefile->{'Name'};
1142832.47ms3321.36ms $onefilename =~ s/$oldlanguage\./$newlanguage\./; # Example: tplwizfax_it.zip -> tplwizfax_en-US.zip
# spent 878µs making 83 calls to installer::scriptitems::CORE:regcomp, avg 11µs/call # spent 267µs making 83 calls to installer::scriptitems::CORE:subst, avg 3µs/call # spent 216µs making 166 calls to installer::scriptitems::CORE:substcont, avg 1µs/call
114383654µs166129µs $onefilename =~ s/^\s*\Q$installer::globals::separator\E//; # filename begins with a slash, for instance /registry/schema/org/openoffice/VCL.xcs
# spent 70µs making 83 calls to installer::scriptitems::CORE:regcomp, avg 843ns/call # spent 59µs making 83 calls to installer::scriptitems::CORE:subst, avg 711ns/call
114483287µs832.54ms $sourcepathref = get_sourcepath_from_filename_and_includepath(\$onefilename, $includepatharrayref, 1);
# spent 2.54ms making 83 calls to installer::scriptitems::get_sourcepath_from_filename_and_includepath, avg 31µs/call
114583117µs $onefile->{'sourcepath'} = $$sourcepathref; # This $$sourcepathref is empty, if no source was found
1146
114783195µs if ($onefile->{'sourcepath'}) # defaulting to english was successful
1148 {
11498387µs $infoline = "WARNING: Using $onefilename instead of $oldname\n";
11508394µs push( @installer::globals::logfileinfo, $infoline);
115183396µs8384µs print " $infoline";
# spent 84µs making 83 calls to installer::scriptitems::CORE:print, avg 1µs/call
1152
1153 # If the directory, in which the new file is installed, is not language dependent,
1154 # the filename has to be changed to avoid installation conflicts
1155 # No mechanism for resource files!
1156 # -> implementing for the content of ARCHIVE files
1157
115883586µs83231µs if ( $onefile->{'Styles'} =~ /\bARCHIVE\b/ )
# spent 231µs making 83 calls to installer::scriptitems::CORE:match, avg 3µs/call
1159 {
11608378µs my $directorygid = $onefile->{'Dir'};
116183243µs8325.7ms my $islanguagedependent = determine_directory_language_dependency($directorygid, $dirsref);
# spent 25.7ms making 83 calls to installer::scriptitems::determine_directory_language_dependency, avg 309µs/call
1162
11638348µs if ( ! $islanguagedependent )
1164 {
1165 $onefile->{'Styles'} =~ s/\bARCHIVE\b/ARCHIVE, RENAME_TO_LANGUAGE/; # Setting new flag RENAME_TO_LANGUAGE
1166 $infoline = "Setting flag RENAME_TO_LANGUAGE: File $onefile->{'Name'} in directory: $directorygid\n";
1167 push( @installer::globals::logfileinfo, $infoline);
1168 }
1169 }
1170 }
1171 else
1172 {
1173 $infoline = "WARNING: Using $onefile->{'Name'} instead of $oldname was not successful\n";
1174 push( @installer::globals::logfileinfo, $infoline);
1175 $onefile->{'Name'} = $oldname; # Switching back to old file name
1176 }
1177 }
1178 }
1179 }
1180
118122µs $infoline = "\n"; # empty line after listing of all files
1182221µs push( @installer::globals::logfileinfo, $infoline);
1183}
1184
1185#################################################################################
1186# Removing files, that shall not be included into languagepacks
1187# (because of rpm conflicts)
1188#################################################################################
1189
1190sub remove_Files_For_Languagepacks
1191{
1192 my ($itemsarrayref) = @_;
1193
1194 my $infoline;
1195
1196 my @newitemsarray = ();
1197
1198 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1199 {
1200 my $oneitem = ${$itemsarrayref}[$i];
1201 my $gid = $oneitem->{'gid'};
1202
1203 # scp Todo: Remove asap after removal of old setup
1204
1205 if (( $gid eq "gid_File_Extra_Fontunxpsprint" ) ||
1206 ( $gid eq "gid_File_Extra_Migration_Lang" ))
1207 {
1208 $infoline = "ATTENTION: Removing item $oneitem->{'gid'} from the installation set.\n";
1209 push( @installer::globals::logfileinfo, $infoline);
1210
1211 next;
1212 }
1213
1214 push(@newitemsarray, $oneitem);
1215 }
1216
1217 return \@newitemsarray;
1218}
1219
1220#################################################################################
1221# Files, whose source directory is not found, are removed now (this is an ERROR)
1222#################################################################################
1223
1224sub remove_Files_Without_Sourcedirectory
1225
# spent 23.9ms within installer::scriptitems::remove_Files_Without_Sourcedirectory which was called: # once (23.9ms+0s) by installer::run at line 666 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
122612µs my ($filesarrayref) = @_;
1227
12281500ns my $infoline;
1229
12301500ns my $error_occurred = 0;
123111µs my @missingfiles = ();
123212µs push(@missingfiles, "ERROR: The following files could not be found: \n");
1233
123411µs my @newfilesarray = ();
1235
123617.66ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1237 {
123875044.59ms my $onefile = ${$filesarrayref}[$i];
123975044.97ms my $sourcepath = $onefile->{'sourcepath'};
1240
124175042.78ms if ($sourcepath eq "")
1242 {
1243 my $styles = $onefile->{'Styles'};
1244 my $filename = $onefile->{'Name'};
1245
1246 if ( ! $installer::globals::languagepack && !$installer::globals::helppack)
1247 {
1248 $infoline = "ERROR: Removing file $filename from file list.\n";
1249 push( @installer::globals::logfileinfo, $infoline);
1250
1251 push(@missingfiles, "ERROR: File not found: $filename\n");
1252 $error_occurred = 1;
1253
1254 next; # removing this file from list, if sourcepath is empty
1255 }
1256 elsif ( $installer::globals::languagepack ) # special case for language packs
1257 {
1258 if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))
1259 {
1260 $infoline = "ERROR: Removing file $filename from file list.\n";
1261 push( @installer::globals::logfileinfo, $infoline);
1262
1263 push(@missingfiles, "ERROR: File not found: $filename\n");
1264 $error_occurred = 1;
1265
1266 next; # removing this file from list, if sourcepath is empty
1267 }
1268 else
1269 {
1270 $infoline = "INFO: Removing file $filename from file list. It is not language dependent.\n";
1271 push( @installer::globals::logfileinfo, $infoline);
1272 $infoline = "INFO: It is not language dependent and can be ignored in language packs.\n";
1273 push( @installer::globals::logfileinfo, $infoline);
1274
1275 next; # removing this file from list, if sourcepath is empty
1276 }
1277 }
1278 else # special case for help packs
1279 {
1280 if (( $onefile->{'ismultilingual'} ) || ( $styles =~ /\bFORCEHELPPACK\b/ ))
1281 {
1282 $infoline = "ERROR: Removing file $filename from file list.\n";
1283 push( @installer::globals::logfileinfo, $infoline);
1284
1285 push(@missingfiles, "ERROR: File not found: $filename\n");
1286 $error_occurred = 1;
1287
1288 next; # removing this file from list, if sourcepath is empty
1289 }
1290 else
1291 {
1292 $infoline = "INFO: Removing file $filename from file list. It is not language dependent.\n";
1293 push( @installer::globals::logfileinfo, $infoline);
1294 $infoline = "INFO: It is not language dependent and can be ignored in help packs.\n";
1295 push( @installer::globals::logfileinfo, $infoline);
1296
1297 next; # removing this file from list, if sourcepath is empty
1298 }
1299 }
1300 }
1301
130275043.86ms push(@newfilesarray, $onefile);
1303 }
1304
130512µs $infoline = "\n";
130612µs push( @installer::globals::logfileinfo, $infoline);
1307
130811µs if ( $error_occurred )
1309 {
1310 for ( my $i = 0; $i <= $#missingfiles; $i++ ) { print "$missingfiles[$i]"; }
1311 installer::exiter::exit_program("ERROR: Missing files", "remove_Files_Without_Sourcedirectory");
1312 }
1313
1314127µs return \@newfilesarray;
1315}
1316
1317############################################################################
1318# License and Readme files in the default language have to be installed
1319# in the directory with flag OFFICEDIRECTORY. If this is not defined
1320# they have to be installed in the installation root.
1321############################################################################
1322
1323sub get_office_directory_gid_and_hostname
1324
# spent 47µs (34+13) within installer::scriptitems::get_office_directory_gid_and_hostname which was called: # once (34µs+13µs) by installer::scriptitems::add_License_Files_into_Installdir at line 1367
{
132511µs my ($dirsarrayref) = @_;
1326
132711µs my $foundofficedir = 0;
132812µs my $gid = "";
132911µs my $hostname = "";
1330
133112µs for ( my $i = 0; $i <= $#{$dirsarrayref}; $i++ )
1332 {
133311µs my $onedir = ${$dirsarrayref}[$i];
133412µs if ( $onedir->{'Styles'} )
1335 {
133612µs my $styles = $onedir->{'Styles'};
1337
1338121µs113µs if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
# spent 13µs making 1 call to installer::scriptitems::CORE:match
1339 {
134011µs $foundofficedir = 1;
134114µs $gid = $onedir->{'gid'};
134212µs $hostname = $onedir->{'HostName'};
134312µs last;
1344 }
1345 }
1346 }
1347
134819µs return ($foundofficedir, $gid, $hostname);
1349}
1350
1351############################################################################
1352# License and Readme files in the default language have to be installed
1353# in the installation root (next to the program dir). This is in scp
1354# project done by a post install basic script
1355############################################################################
1356
1357sub add_License_Files_into_Installdir
1358
# spent 114ms (98.8+15.7) within installer::scriptitems::add_License_Files_into_Installdir which was called: # once (98.8ms+15.7ms) by installer::run at line 673 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
135913µs my ($filesarrayref, $dirsarrayref, $languagesarrayref) = @_;
1360
13611500ns my $infoline;
1362
136311µs my @newfilesarray = ();
1364
136516µs18µs my $defaultlanguage = installer::languages::get_default_language($languagesarrayref);
# spent 8µs making 1 call to installer::languages::get_default_language
1366
136716µs147µs my ($foundofficedir, $officedirectorygid, $officedirectoryhostname) = get_office_directory_gid_and_hostname($dirsarrayref);
1368
1369 # copy all files from directory share/readme, that contain the default language in their name
1370 # without default language into the installation root. This makes the settings of the correct
1371 # file names superfluous. On the other hand this requires a dependency to the directory
1372 # share/readme
1373
137418.65ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1375 {
137675044.60ms my $onefile = ${$filesarrayref}[$i];
137775046.18ms my $destination = $onefile->{'destination'};
137875043.02ms my $styles = "";
137975048.25ms if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
1380
1381750477.8ms2251215.6ms if ( ( $destination =~ /share\Q$installer::globals::separator\Ereadme\Q$installer::globals::separator\E(\w+?)_?$defaultlanguage\.?(\w*)\s*/ )
# spent 8.69ms making 7504 calls to installer::scriptitems::CORE:regcomp, avg 1µs/call # spent 6.93ms making 15008 calls to installer::scriptitems::CORE:match, avg 462ns/call
1382 || (( $styles =~ /\bROOTLICENSEFILE\b/ ) && ( $destination =~ /\Q$installer::globals::separator\E?(\w+?)_?$defaultlanguage\.?(\w*?)\s*$/ )) )
1383 {
1384 my $filename = $1;
1385 my $extension = $2;
1386
1387 my $newfilename;
1388
1389 if ( $extension eq "" ) { $newfilename = $filename; }
1390 else { $newfilename = $filename . "\." . $extension; }
1391
1392 my %newfile = ();
1393 my $newfile = \%newfile;
1394
1395 installer::converter::copy_item_object($onefile, $newfile);
1396
1397 $newfile->{'gid'} = $onefile->{'gid'} . "_Copy";
1398 $newfile->{'Name'} = $newfilename;
1399 $newfile->{'ismultilingual'} = "0";
1400 $newfile->{'specificlanguage'} = "";
1401 $newfile->{'haslanguagemodule'} = "0";
1402
1403 if ( defined $newfile->{'InstallName'} )
1404 {
1405 if ( $newfile->{'InstallName'} =~ /^\s*(.*?)_$defaultlanguage\.?(\w*?)\s*$/ )
1406 {
1407 my $localfilename = $1;
1408 my $localextension = $2;
1409
1410 if ( $localextension eq "" ) { $newfile->{'InstallName'} = $localfilename; }
1411 else { $newfile->{'InstallName'} = $localfilename . "\." . $localextension; }
1412 }
1413 }
1414
1415 $newfile->{'removelangfromfile'} = "1"; # Important for files with an InstallName, because language also has to be removed there.
1416
1417 if ( $foundofficedir )
1418 {
1419 $newfile->{'Dir'} = $officedirectorygid;
1420 $newfile->{'destination'} = $officedirectoryhostname . $installer::globals::separator . $newfilename;
1421 }
1422 else
1423 {
1424 $newfile->{'Dir'} = "PREDEFINED_PROGDIR";
1425 $newfile->{'destination'} = $newfilename;
1426 }
1427
1428 # Also setting "modules=gid_Module_Root_Brand" (module with style: ROOT_BRAND_PACKAGE)
1429 if ( $installer::globals::rootbrandpackageset )
1430 {
1431 $newfile->{'modules'} = $installer::globals::rootbrandpackage;
1432 }
1433
1434 push(@newfilesarray, $newfile);
1435
1436 $infoline = "New files: Adding file $newfilename for the installation root to the file list. Language: $defaultlanguage\n";
1437 push( @installer::globals::logfileinfo, $infoline);
1438
1439 if ( defined $newfile->{'InstallName'} )
1440 {
1441 $infoline = "New files: Using installation name: $newfile->{'InstallName'}\n";
1442 push( @installer::globals::logfileinfo, $infoline);
1443 }
1444 }
1445
144675045.91ms push(@newfilesarray, $onefile);
1447 }
1448
1449122µs return \@newfilesarray;
1450}
1451
1452############################################################################
1453# Some files are included for more than one language and have the same
1454# name and the same destination directory for all languages. This would
1455# lead to conflicts, if the filenames are not changed.
1456# In scp project this files must have the flag MAKE_LANG_SPECIFIC
1457# For this files, the language is included into the filename.
1458############################################################################
1459
1460sub make_filename_language_specific
1461
# spent 56.5ms (53.4+3.13) within installer::scriptitems::make_filename_language_specific which was called: # once (53.4ms+3.13ms) by installer::run at line 678 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
146213µs my ($filesarrayref) = @_;
1463
146412µs my $infoline = "";
1465
146618.36ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1467 {
146875045.00ms my $onefile = ${$filesarrayref}[$i];
1469
147075049.16ms if ( $onefile->{'ismultilingual'} )
1471 {
147267792.91ms my $styles = "";
147367796.70ms if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
1474677923.2ms67792.74ms if ( $styles =~ /\bMAKE_LANG_SPECIFIC\b/ )
# spent 2.74ms making 6779 calls to installer::scriptitems::CORE:match, avg 404ns/call
1475 {
14762121µs my $language = $onefile->{'specificlanguage'};
14772115µs my $olddestination = $onefile->{'destination'};
14782116µs my $oldname = $onefile->{'Name'};
1479
1480 # Including the language into the file name.
1481 # But be sure, to include the language before the file extension.
1482
14832110µs my $fileextension = "";
1484
148521167µs2166µs if ( $onefile->{'Name'} =~ /(\.\w+?)\s*$/ ) { $fileextension = $1; }
# spent 66µs making 21 calls to installer::scriptitems::CORE:match, avg 3µs/call
14862122µs if ( $fileextension ne "" )
1487 {
148821455µs84175µs $onefile->{'Name'} =~ s/\Q$fileextension\E\s*$/_$language$fileextension/;
# spent 73µs making 21 calls to installer::scriptitems::CORE:subst, avg 3µs/call # spent 53µs making 42 calls to installer::scriptitems::CORE:substcont, avg 1µs/call # spent 48µs making 21 calls to installer::scriptitems::CORE:regcomp, avg 2µs/call
148921413µs84151µs $onefile->{'destination'} =~ s/\Q$fileextension\E\s*$/_$language$fileextension/;
# spent 67µs making 21 calls to installer::scriptitems::CORE:subst, avg 3µs/call # spent 58µs making 42 calls to installer::scriptitems::CORE:substcont, avg 1µs/call # spent 27µs making 21 calls to installer::scriptitems::CORE:regcomp, avg 1µs/call
1490 }
1491
14922112µs $infoline = "Flag MAKE_LANG_SPECIFIC:\n";
14932128µs push( @installer::globals::logfileinfo, $infoline);
14942128µs $infoline = "Changing name from $oldname to $onefile->{'Name'} !\n";
14952120µs push( @installer::globals::logfileinfo, $infoline);
14962124µs $infoline = "Changing destination from $olddestination to $onefile->{'destination'} !\n";
14972125µs push( @installer::globals::logfileinfo, $infoline);
1498 }
1499 }
1500 }
1501}
1502
1503############################################################################
1504# Because of the item "File" the source name must be "Name". Therefore
1505# "Copy" is changed to "Name" and "Name" is changed to "DestinationName".
1506############################################################################
1507
1508sub change_keys_of_scpactions
1509
# spent 13µs within installer::scriptitems::change_keys_of_scpactions which was called: # once (13µs+0s) by installer::run at line 407 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
151013µs my ($itemsarrayref) = @_;
1511
1512114µs for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1513 {
1514 my $oneitem = ${$itemsarrayref}[$i];
1515
1516 my $key;
1517
1518 # First Name to DestinationName, then deleting Name
1519 foreach $key (keys %{$oneitem})
1520 {
1521 if ( $key =~ /\bName\b/ )
1522 {
1523 my $value = $oneitem->{$key};
1524 my $oldkey = $key;
1525 $key =~ s/Name/DestinationName/;
1526 $oneitem->{$key} = $value;
1527 delete($oneitem->{$oldkey});
1528 }
1529 }
1530
1531 # Second Copy to Name, then deleting Copy
1532 foreach $key (keys %{$oneitem})
1533 {
1534 if ( $key =~ /\bCopy\b/ )
1535 {
1536 my $value = $oneitem->{$key};
1537 my $oldkey = $key;
1538 $key =~ s/Copy/Name/;
1539 $oneitem->{$key} = $value;
1540 delete($oneitem->{$oldkey});
1541 }
1542 }
1543 }
1544}
1545
1546############################################################################
1547# Removing all language pack files from installation set (files with
1548# the style LANGUAGEPACK), except this is a language pack.
1549############################################################################
1550
1551sub remove_Languagepacklibraries_from_Installset
1552
# spent 6.06ms (5.67+393µs) within installer::scriptitems::remove_Languagepacklibraries_from_Installset which was called: # once (5.67ms+393µs) by installer::run at line 383 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
155313µs my ($itemsarrayref) = @_;
1554
15551500ns my $infoline;
1556
155711µs my @newitemsarray = ();
1558
15591897µs for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1560 {
1561806512µs my $oneitem = ${$itemsarrayref}[$i];
1562806350µs my $styles = "";
1563806957µs if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1564
15658062.84ms806393µs if ( $styles =~ /\bLANGUAGEPACK\b/ )
# spent 393µs making 806 calls to installer::scriptitems::CORE:match, avg 488ns/call
1566 {
156715µs $infoline = "Removing language pack file $oneitem->{'gid'} from the installation set.\n";
156812µs push( @installer::globals::globallogfileinfo, $infoline);
1569
157011µs next;
1571 }
1572
1573805483µs push(@newitemsarray, $oneitem);
1574 }
1575
15761600ns $infoline = "\n";
157712µs push( @installer::globals::globallogfileinfo, $infoline);
1578
157919µs return \@newitemsarray;
1580}
1581
1582############################################################################
1583# Removing all help pack files from installation set (files with
1584# the style HELPPACK), except this is a help pack.
1585############################################################################
1586
1587sub remove_Helppacklibraries_from_Installset
1588
# spent 5.68ms (5.22+456µs) within installer::scriptitems::remove_Helppacklibraries_from_Installset which was called: # once (5.22ms+456µs) by installer::run at line 388 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
158911µs my ($itemsarrayref) = @_;
1590
15911500ns my $infoline;
1592
159311µs my @newitemsarray = ();
1594
15951915µs for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1596 {
1597805422µs my $oneitem = ${$itemsarrayref}[$i];
1598805341µs my $styles = "";
1599805594µs if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1600
16018052.89ms805456µs if ( $styles =~ /\bHELPPACK\b/ )
# spent 456µs making 805 calls to installer::scriptitems::CORE:match, avg 566ns/call
1602 {
1603914µs $infoline = "Removing help pack file $oneitem->{'gid'} from the installation set.\n";
1604910µs push( @installer::globals::globallogfileinfo, $infoline);
1605
160696µs next;
1607 }
1608
1609796476µs push(@newitemsarray, $oneitem);
1610 }
1611
16121500ns $infoline = "\n";
161311µs push( @installer::globals::globallogfileinfo, $infoline);
1614
161517µs return \@newitemsarray;
1616}
1617
1618############################################################################
1619# Removing all files with flag PATCH_ONLY from installation set.
1620# This function is not called during patch creation.
1621############################################################################
1622
1623sub remove_patchonlyfiles_from_Installset
1624
# spent 5.53ms (5.15+374µs) within installer::scriptitems::remove_patchonlyfiles_from_Installset which was called: # once (5.15ms+374µs) by installer::run at line 393 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
162511µs my ($itemsarrayref) = @_;
1626
16271600ns my $infoline;
1628
16291500ns my @newitemsarray = ();
1630
16311888µs for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1632 {
1633796412µs my $oneitem = ${$itemsarrayref}[$i];
1634796344µs my $styles = "";
1635796585µs if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1636
16377962.82ms796374µs if ( $styles =~ /\bPATCH_ONLY\b/ )
# spent 374µs making 796 calls to installer::scriptitems::CORE:match, avg 470ns/call
1638 {
163936µs $infoline = "Removing file with flag PATCH_ONLY $oneitem->{'gid'} from the installation set.\n";
164033µs push( @installer::globals::globallogfileinfo, $infoline);
1641
164233µs next;
1643 }
1644
1645793460µs push(@newitemsarray, $oneitem);
1646 }
1647
16481500ns $infoline = "\n";
164911µs push( @installer::globals::globallogfileinfo, $infoline);
1650
165118µs return \@newitemsarray;
1652}
1653
1654############################################################################
1655# Some files cotain a $ in their name. epm conflicts with such files.
1656# Solution: Renaming this files, converting "$" to "$$"
1657############################################################################
1658
1659sub quoting_illegal_filenames
1660{
1661 my ($filesarrayref) = @_;
1662
1663 # This function has to be removed as soon as possible!
1664
1665 installer::logger::include_header_into_logfile("Renaming illegal filenames:");
1666
1667 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1668 {
1669 my $onefile = ${$filesarrayref}[$i];
1670 my $filename = $onefile->{'Name'};
1671
1672 if ( $filename =~ /\$/ )
1673 {
1674 my $sourcepath = $onefile->{'sourcepath'};
1675 my $destpath = $onefile->{'destination'};
1676
1677 # sourcepath and destination have to be quoted for epm list file
1678
1679 $destpath =~ s/\$/\$\$/g;
1680 $sourcepath =~ s/\$/\$\$/g;
1681
1682 my $infoline = "ATTENTION: Files: Quoting sourcepath $onefile->{'sourcepath'} to $sourcepath\n";
1683 push( @installer::globals::logfileinfo, $infoline);
1684 $infoline = "ATTENTION: Files: Quoting destination path $onefile->{'destination'} to $destpath\n";
1685 push( @installer::globals::logfileinfo, $infoline);
1686
1687 $onefile->{'sourcepath'} = $sourcepath;
1688 $onefile->{'destination'} = $destpath;
1689 }
1690 }
1691}
1692
1693############################################################################
1694# Removing multiple occurrences of same module.
1695############################################################################
1696
1697sub optimize_list
1698
# spent 353ms (174+179) within installer::scriptitems::optimize_list which was called 3682 times, avg 96µs/call: # 1848 times (49.6ms+15.2ms) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1900, avg 35µs/call # 1834 times (125ms+164ms) by installer::scriptitems::collect_directories_from_filesarray at line 1778, avg 157µs/call
{
169936824.76ms my ( $longlist ) = @_;
170036821.32ms my %tmpHash;
1701
1702368216.2ms36824.24ms $longlist =~ s/^\s+//;
# spent 4.24ms making 3682 calls to installer::scriptitems::CORE:subst, avg 1µs/call
1703368217.2ms36827.05ms $longlist =~ s/\s+$//;
# spent 7.05ms making 3682 calls to installer::scriptitems::CORE:subst, avg 2µs/call
17043682168ms3682157ms $longlist =~ s/\s*,\s*/,/g;
# spent 157ms making 3682 calls to installer::scriptitems::CORE:subst, avg 43µs/call
1705
1706368288.3ms @tmpHash{split /,/, $longlist} = ();
1707368263.1ms368210.6ms return join(",", sort keys %tmpHash);
# spent 10.6ms making 3682 calls to installer::scriptitems::CORE:sort, avg 3µs/call
1708}
1709
1710#######################################################################
1711# Collecting all directories needed for the epm list
1712# 1. Looking for all destination paths in the files array
1713# 2. Looking for directories with CREATE flag in the directory array
1714#######################################################################
1715
1716##################################
1717# Collecting directories: Part 1
1718##################################
1719
1720sub collect_directories_from_filesarray
1721
# spent 2.51s (1.31+1.20) within installer::scriptitems::collect_directories_from_filesarray which was called: # once (1.31s+1.20s) by installer::run at line 746 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
172212µs my ($filesarrayref) = @_;
1723
172411µs my @alldirectories = ();
172512µs my %alldirectoryhash = ();
1726
17271500ns my $predefinedprogdir_added = 0;
1728
1729 # Preparing this already as hash, although the only needed value at the moment is the HostName
1730 # But also adding: "specificlanguage" and "Dir" (for instance gid_Dir_Program)
1731
1732122.0ms for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1733 {
17341589513.4ms my $onefile = ${$filesarrayref}[$i];
17351589525.1ms my $destinationpath = $onefile->{'destination'};
17361589541.7ms15895356ms installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationpath);
# spent 356ms making 15895 calls to installer::pathanalyzer::get_path_from_fullqualifiedname, avg 22µs/call
173715895162ms3179065.4ms $destinationpath =~ s/\Q$installer::globals::separator\E\s*$//; # removing ending slashes or backslashes
# spent 53.2ms making 15895 calls to installer::scriptitems::CORE:subst, avg 3µs/call # spent 12.2ms making 15895 calls to installer::scriptitems::CORE:regcomp, avg 768ns/call
1738
1739 do
1740158951.32s251222491ms {
# spent 292ms making 70753 calls to installer::scriptitems::CORE:subst, avg 4µs/call # spent 143ms making 109716 calls to installer::scriptitems::CORE:substcont, avg 1µs/call # spent 56.3ms making 70753 calls to installer::scriptitems::CORE:regcomp, avg 795ns/call
174170753108ms if (!exists($alldirectoryhash{$destinationpath}))
1742 {
174318341.28ms my %directoryhash = ();
174418343.30ms $directoryhash{'HostName'} = $destinationpath;
174518342.88ms $directoryhash{'specificlanguage'} = $onefile->{'specificlanguage'};
174618342.65ms $directoryhash{'Dir'} = $onefile->{'Dir'};
174718342.26ms $directoryhash{'modules'} = $onefile->{'modules'}; # NEW, saving modules
1748
174918341.28ms $predefinedprogdir_added ||= $onefile->{'Dir'} eq "PREDEFINED_PROGDIR";
1750
175118344.18ms $alldirectoryhash{$destinationpath} = \%directoryhash;
1752 }
1753 else
1754 {
1755 # Adding the modules to the module list!
175668919116ms $alldirectoryhash{$destinationpath}->{'modules'} .= "," . $onefile->{'modules'};
1757 }
1758 } while ($destinationpath =~ s/(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/$1/); # as long as the path contains slashes
1759 }
1760
1761 # if there is no file in the root directory PREDEFINED_PROGDIR, it has to be included into the directory array now
1762 # HostName= specificlanguage= Dir=PREDEFINED_PROGDIR
1763
17641500ns if (! $predefinedprogdir_added )
1765 {
176611µs my %directoryhash = ();
176712µs $directoryhash{'HostName'} = "";
176811µs $directoryhash{'specificlanguage'} = "";
176911µs $directoryhash{'modules'} = ""; # ToDo?
177011µs $directoryhash{'Dir'} = "PREDEFINED_PROGDIR";
1771
177213µs push(@alldirectories, \%directoryhash);
1773 }
1774
1775 # Creating directory array
177614.22ms13.26ms foreach my $destdir ( sort keys %alldirectoryhash )
# spent 3.26ms making 1 call to installer::scriptitems::CORE:sort
1777 {
177818349.13ms1834288ms $alldirectoryhash{$destdir}->{'modules'} = optimize_list($alldirectoryhash{$destdir}->{'modules'});
# spent 288ms making 1834 calls to installer::scriptitems::optimize_list, avg 157µs/call
177918342.35ms push(@alldirectories, $alldirectoryhash{$destdir});
1780 }
1781
1782113µs return (\@alldirectories, \%alldirectoryhash);
1783}
1784
1785##################################
1786# Collecting directories: Part 2
1787##################################
1788
1789sub collect_directories_with_create_flag_from_directoryarray
1790
# spent 102ms (32.3+69.9) within installer::scriptitems::collect_directories_with_create_flag_from_directoryarray which was called: # once (32.3ms+69.9ms) by installer::run at line 748 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
179112µs my ($directoryarrayref, $alldirectoryhash) = @_;
1792
17931500ns my $alreadyincluded = 0;
179411µs my @alldirectories = ();
1795
179612.31ms for ( my $i = 0; $i <= $#{$directoryarrayref}; $i++ )
1797 {
179819721.32ms my $onedir = ${$directoryarrayref}[$i];
17991972869µs my $styles = "";
18001972706µs $newdirincluded = 0;
1801
180219721.48ms if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
1803
180419727.02ms1972879µs if ( $styles =~ /\bCREATE\b/ )
# spent 879µs making 1972 calls to installer::scriptitems::CORE:match, avg 446ns/call
1805 {
18062714µs my $directoryname = "";
1807
18082730µs if ( $onedir->{'HostName'} ) { $directoryname = $onedir->{'HostName'}; }
1809 else { installer::exiter::exit_program("ERROR: No directory name (HostName) set for specified language in gid $onedir->{'gid'}", "collect_directories_with_create_flag_from_directoryarray"); }
1810
18112710µs $alreadyincluded = 0;
18122725µs if ( exists($alldirectoryhash->{$directoryname}) ) { $alreadyincluded = 1; }
1813
18142725µs if (!($alreadyincluded))
1815 {
18161412µs my %directoryhash = ();
18171423µs $directoryhash{'HostName'} = $directoryname;
18181421µs $directoryhash{'specificlanguage'} = $onedir->{'specificlanguage'};
18191417µs $directoryhash{'Dir'} = $onedir->{'gid'};
18201415µs $directoryhash{'Styles'} = $onedir->{'Styles'};
1821
1822 # saving also the modules
1823149µs if ( ! $onedir->{'modules'} ) { installer::exiter::exit_program("ERROR: No assigned modules found for directory $onedir->{'gid'}", "collect_directories_with_create_flag_from_directoryarray"); }
18241417µs $directoryhash{'modules'} = $onedir->{'modules'};
1825
18261425µs $alldirectoryhash->{$directoryname} = \%directoryhash;
1827145µs $newdirincluded = 1;
1828
1829 # Problem: The $destinationpath can be share/registry/schema/org/openoffice
1830 # but not all directories contain files and will be added to this list.
1831 # Therefore the path has to be analyzed.
1832
183314201µs2890µs while ( $directoryname =~ /(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/ ) # as long as the path contains slashes
# spent 62µs making 14 calls to installer::scriptitems::CORE:match, avg 4µs/call # spent 29µs making 14 calls to installer::scriptitems::CORE:regcomp, avg 2µs/call
1834 {
18353234µs $directoryname = $1;
1836
18373213µs $alreadyincluded = 0;
18383228µs if ( exists($alldirectoryhash->{$directoryname}) ) { $alreadyincluded = 1; }
1839
184032443µs64118µs if (!($alreadyincluded))
# spent 88µs making 32 calls to installer::scriptitems::CORE:match, avg 3µs/call # spent 30µs making 32 calls to installer::scriptitems::CORE:regcomp, avg 944ns/call
1841 {
1842 my %directoryhash = ();
1843
1844 $directoryhash{'HostName'} = $directoryname;
1845 $directoryhash{'specificlanguage'} = $onedir->{'specificlanguage'};
1846 $directoryhash{'Dir'} = $onedir->{'gid'};
1847 if ( ! $installer::globals::iswindowsbuild ) { $directoryhash{'Styles'} = "(CREATE)"; } # Exeception for Windows?
1848
1849 # saving also the modules
1850 $directoryhash{'modules'} = $onedir->{'modules'};
1851
1852 $alldirectoryhash->{$directoryname} = \%directoryhash;
1853 $newdirincluded = 1;
1854 }
1855 else
1856 {
1857 # Adding the modules to the module list!
185832224µs $alldirectoryhash->{$directoryname}->{'modules'} = $alldirectoryhash->{$directoryname}->{'modules'} . "," . $onedir->{'modules'};
1859 }
1860 }
1861 }
1862 else
1863 {
1864 # Adding the modules to the module list!
18651368µs $alldirectoryhash->{$directoryname}->{'modules'} = $alldirectoryhash->{$directoryname}->{'modules'} . "," . $onedir->{'modules'};
1866
186713198µs2699µs while ( $directoryname =~ /(^.*\S)\Q$installer::globals::separator\E(\S.*?)\s*$/ ) # as long as the path contains slashes
# spent 51µs making 13 calls to installer::scriptitems::CORE:regcomp, avg 4µs/call # spent 48µs making 13 calls to installer::scriptitems::CORE:match, avg 4µs/call
1868 {
18692931µs $directoryname = $1;
1870 # Adding the modules to the module list!
187129494µs58102µs $alldirectoryhash->{$directoryname}->{'modules'} = $alldirectoryhash->{$directoryname}->{'modules'} . "," . $onedir->{'modules'};
# spent 77µs making 29 calls to installer::scriptitems::CORE:match, avg 3µs/call # spent 25µs making 29 calls to installer::scriptitems::CORE:regcomp, avg 876ns/call
1872 }
1873 }
1874 }
1875
1876 # Saving the styles for already added directories in function collect_directories_from_filesarray
1877
187819721.28ms if (( ! $newdirincluded ) && ( $styles ne "" ))
1879 {
1880125485µs12591µs $styles =~ s/\bWORKSTATION\b//;
# spent 91µs making 125 calls to installer::scriptitems::CORE:subst, avg 728ns/call
1881125484µs12594µs $styles =~ s/\bCREATE\b//;
# spent 94µs making 125 calls to installer::scriptitems::CORE:subst, avg 749ns/call
1882
18831251.52ms355371µs if (( ! ( $styles =~ /^\s*\(\s*\)\s*$/ )) && ( ! ( $styles =~ /^\s*\(\s*\,\s*\)\s*$/ )) && ( ! ( $styles =~ /^\s*$/ ))) # checking, if there are styles left
# spent 371µs making 355 calls to installer::scriptitems::CORE:match, avg 1µs/call
1884 {
188511156µs my $directoryname = "";
1886111110µs if ( $onedir->{'HostName'} ) { $directoryname = $onedir->{'HostName'}; }
1887 else { installer::exiter::exit_program("ERROR: No directory name (HostName) set for specified language in gid $onedir->{'gid'}", "collect_directories_with_create_flag_from_directoryarray"); }
1888
1889111108µs if ( exists($alldirectoryhash->{$directoryname}) )
1890 {
1891 $alldirectoryhash->{$directoryname}->{'Styles'} = $styles;
1892 }
1893 }
1894 }
1895 }
1896
1897 # Creating directory array
189813.96ms13.28ms foreach my $destdir ( sort keys %{$alldirectoryhash} )
# spent 3.28ms making 1 call to installer::scriptitems::CORE:sort
1899 {
190018488.34ms184864.8ms $alldirectoryhash->{$destdir}->{'modules'} = optimize_list($alldirectoryhash->{$destdir}->{'modules'});
# spent 64.8ms making 1848 calls to installer::scriptitems::optimize_list, avg 35µs/call
190118482.36ms push(@alldirectories, $alldirectoryhash->{$destdir});
1902 }
1903
1904111µs return (\@alldirectories, \%alldirectoryhash);
1905}
1906
1907#################################################
1908# Determining the destination file of a link
1909#################################################
1910
1911sub get_destination_file_path_for_links
1912
# spent 13µs within installer::scriptitems::get_destination_file_path_for_links which was called: # once (13µs+0s) by installer::run at line 776 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
191312µs my ($linksarrayref, $filesarrayref) = @_;
1914
19151500ns my $infoline;
1916
191713µs for ( my $i = 0; $i <= $#{$linksarrayref}; $i++ )
1918 {
1919 my $fileid = "";
1920 my $onelink = ${$linksarrayref}[$i];
1921 if ( $onelink->{'FileID'} ) { $fileid = $onelink->{'FileID'}; }
1922
1923 if (!( $fileid eq "" ))
1924 {
1925 my $foundfile = 0;
1926
1927 for ( my $j = 0; $j <= $#{$filesarrayref}; $j++ )
1928 {
1929 my $onefile = ${$filesarrayref}[$j];
1930 my $filegid = $onefile->{'gid'};
1931
1932 if ( $filegid eq $fileid )
1933 {
1934 $foundfile = 1;
1935 $onelink->{'destinationfile'} = $onefile->{'destination'};
1936 last;
1937 }
1938 }
1939
1940 if (!($foundfile))
1941 {
1942 $infoline = "Warning: FileID $fileid for Link $onelink->{'gid'} not found!\n";
1943 push( @installer::globals::logfileinfo, $infoline);
1944 }
1945 }
1946 }
1947
194812µs $infoline = "\n";
194918µs push( @installer::globals::logfileinfo, $infoline);
1950}
1951
1952#################################################
1953# Determining the destination link of a link
1954#################################################
1955
1956sub get_destination_link_path_for_links
1957
# spent 10µs within installer::scriptitems::get_destination_link_path_for_links which was called: # once (10µs+0s) by installer::run at line 782 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
195811µs my ($linksarrayref) = @_;
1959
19601500ns my $infoline;
1961
196212µs for ( my $i = 0; $i <= $#{$linksarrayref}; $i++ )
1963 {
1964 my $shortcutid = "";
1965 my $onelink = ${$linksarrayref}[$i];
1966 if ( $onelink->{'ShortcutID'} ) { $shortcutid = $onelink->{'ShortcutID'}; }
1967
1968 if (!( $shortcutid eq "" ))
1969 {
1970 my $foundlink = 0;
1971
1972 for ( my $j = 0; $j <= $#{$linksarrayref}; $j++ )
1973 {
1974 my $destlink = ${$linksarrayref}[$j];
1975 $shortcutgid = $destlink->{'gid'};
1976
1977 if ( $shortcutgid eq $shortcutid )
1978 {
1979 $foundlink = 1;
1980 $onelink->{'destinationfile'} = $destlink->{'destination'}; # making key 'destinationfile'
1981 last;
1982 }
1983 }
1984
1985 if (!($foundlink))
1986 {
1987 $infoline = "Warning: ShortcutID $shortcutid for Link $onelink->{'gid'} not found!\n";
1988 push( @installer::globals::logfileinfo, $infoline);
1989 }
1990 }
1991 }
1992
199312µs $infoline = "\n";
199419µs push( @installer::globals::logfileinfo, $infoline);
1995}
1996
1997###################################################################################
1998# Items with flag WORKSTATION are not needed (here: links and configurationitems)
1999###################################################################################
2000
2001sub remove_workstation_only_items
2002
# spent 9µs within installer::scriptitems::remove_workstation_only_items which was called: # once (9µs+0s) by installer::run at line 784 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
200312µs my ($itemarrayref) = @_;
2004
200511µs my @newitemarray = ();
2006
200713µs for ( my $i = 0; $i <= $#{$itemarrayref}; $i++ )
2008 {
2009 my $oneitem = ${$itemarrayref}[$i];
2010 my $styles = $oneitem->{'Styles'};
2011
2012 if (( $styles =~ /\bWORKSTATION\b/ ) &&
2013 (!( $styles =~ /\bNETWORK\b/ )) &&
2014 (!( $styles =~ /\bSTANDALONE\b/ )))
2015 {
2016 next; # removing this link, it is only needed for a workstation installation
2017 }
2018
2019 push(@newitemarray, $oneitem);
2020 }
2021
202219µs return \@newitemarray;
2023}
2024
2025################################################
2026# Resolving relative path in links
2027################################################
2028
2029sub resolve_links_with_flag_relative
2030
# spent 8µs within installer::scriptitems::resolve_links_with_flag_relative which was called: # once (8µs+0s) by installer::run at line 786 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
203112µs my ($linksarrayref) = @_;
2032
2033 # Before this step is:
2034 # destination=program/libsalhelperC52.so.3, this will be the name of the link
2035 # destinationfile=program/libsalhelperC52.so.3, this will be the linked file or name
2036 # If the flag RELATIVE is set, the paths have to be analyzed. If the flag is not set
2037 # (this will not occur in the future?) destinationfile has to be an absolute path name
2038
2039110µs for ( my $i = 0; $i <= $#{$linksarrayref}; $i++ )
2040 {
2041 my $onelink = ${$linksarrayref}[$i];
2042 my $styles = $onelink->{'Styles'};
2043
2044 if ( $styles =~ /\bRELATIVE\b/ )
2045 {
2046 # ToDo: This is only a simple not sufficient mechanism
2047
2048 my $destination = $onelink->{'destination'};
2049 my $destinationfile = $onelink->{'destinationfile'};
2050
2051 my $destinationpath = $destination;
2052
2053 installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationpath);
2054
2055 my $destinationfilepath = $destinationfile;
2056
2057 # it is possible, that the destinationfile is no longer part of the files collector
2058 if ($destinationfilepath) { installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationfilepath); }
2059 else { $destinationfilepath = ""; }
2060
2061 if ( $destinationpath eq $destinationfilepath )
2062 {
2063 # link and file are in the same directory
2064 # Therefore the path of the file can be removed
2065
2066 my $newdestinationfile = $destinationfile;
2067 installer::pathanalyzer::make_absolute_filename_to_relative_filename(\$newdestinationfile);
2068
2069 $onelink->{'destinationfile'} = $newdestinationfile;
2070 }
2071 }
2072 }
2073}
2074
2075########################################################################
2076# This function is a helper of function "assigning_modules_to_items"
2077########################################################################
2078
2079sub insert_for_item ($$$)
2080
# spent 56.1ms within installer::scriptitems::insert_for_item which was called 9555 times, avg 6µs/call: # 9555 times (56.1ms+0s) by installer::scriptitems::build_modulegids_table at line 2114, avg 6µs/call
{
208195558.91ms my ($hash, $item, $id) = @_;
2082
208395557.40ms if (!defined $hash->{$item})
2084 {
20851050514µs my @gids = ();
208610501.91ms $hash->{$item} = \@gids;
2087 }
208895556.40ms my $gid_list = $hash->{$item};
208995559.83ms push @{$gid_list}, $id;
2090955539.3ms $hash->{$item} = $gid_list;
2091}
2092
2093sub build_modulegids_table
2094
# spent 151ms (82.7+67.8) within installer::scriptitems::build_modulegids_table which was called 3 times, avg 50.2ms/call: # 3 times (82.7ms+67.8ms) by installer::scriptitems::assigning_modules_to_items at line 2169, avg 50.2ms/call
{
209534µs my ($modulesref, $itemname) = @_;
2096
209734µs my %module_lookup_table = ();
2098
2099 # build map of item names to list of respective module gids
2100 # containing these items
210131.38ms for my $onemodule (@{$modulesref})
2102 {
210347013.79ms next if ( ! defined $onemodule->{$itemname} );
2104 # these are the items contained in this module
2105 # eg. Files = (gid_a_b_c,gid_d_e_f)
210615281.60ms my $module_gids = $onemodule->{$itemname};
2107
2108 # prune outer brackets
2109152811.7ms15286.50ms $module_gids =~ s|^\s*\(||g;
# spent 6.50ms making 1528 calls to installer::scriptitems::CORE:subst, avg 4µs/call
2110152810.0ms15285.18ms $module_gids =~ s|\)\s*$||g;
# spent 5.18ms making 1528 calls to installer::scriptitems::CORE:subst, avg 3µs/call
2111152811.3ms for my $id (split (/,/, $module_gids))
2112 {
211395554.66ms chomp $id;
2114955531.9ms955556.1ms insert_for_item(\%module_lookup_table, lc ($id), $onemodule->{'gid'});
# spent 56.1ms making 9555 calls to installer::scriptitems::insert_for_item, avg 6µs/call
2115 }
2116 }
2117
2118326µs return \%module_lookup_table;
2119}
2120
2121########################################################################
2122# Items like files do not know their modules
2123# This function is a helper of function "assigning_modules_to_items"
2124########################################################################
2125
2126sub get_string_of_modulegids_for_itemgid
2127
# spent 45.3ms (35.4+9.88) within installer::scriptitems::get_string_of_modulegids_for_itemgid which was called 820 times, avg 55µs/call: # 820 times (35.4ms+9.88ms) by installer::scriptitems::assigning_modules_to_items at line 2186, avg 55µs/call
{
2128820830µs my ($module_lookup_table, $modulesref, $itemgid, $itemname) = @_;
2129
2130820364µs my $allmodules = "";
2131820327µs my $haslanguagemodule = 0;
2132820506µs my %foundmodules = ();
2133
2134820861µs my $gid_list = $module_lookup_table->{lc($itemgid)};
2135
21368201.27ms for my $gid (@{$gid_list})
2137 {
213880166.61ms $foundmodules{$gid} = 1;
213980167.19ms $allmodules = $allmodules . "," . $gid;
2140 # Is this module a language module? This info should be stored at the file.
214180169.65ms if ( exists($installer::globals::alllangmodules{$gid}) ) { $haslanguagemodule = 1; }
2142 }
2143
21448204.64ms8201.66ms $allmodules =~ s/^\s*\,//; # removing leading comma
# spent 1.66ms making 820 calls to installer::scriptitems::CORE:subst, avg 2µs/call
2145
2146 # Check: All modules or no module must have flag LANGUAGEMODULE
2147820326µs if ( $haslanguagemodule )
2148 {
214966275µs668.22ms my $isreallylanguagemodule = installer::worker::key_in_a_is_also_key_in_b(\%foundmodules, \%installer::globals::alllangmodules);
# spent 8.22ms making 66 calls to installer::worker::key_in_a_is_also_key_in_b, avg 124µs/call
21506638µs if ( ! $isreallylanguagemodule ) { installer::exiter::exit_program("ERROR: \"$itemgid\" is assigned to modules with flag \"LANGUAGEMODULE\" and also to modules without this flag! Modules: $allmodules", "get_string_of_modulegids_for_itemgid"); }
2151 }
2152
21538205.39ms return ($allmodules, $haslanguagemodule);
2154}
2155
2156########################################################
2157# Items like files do not know their modules
2158# This function add the {'modules'} to these items
2159########################################################
2160
2161sub assigning_modules_to_items
2162
# spent 212ms (16.0+196) within installer::scriptitems::assigning_modules_to_items which was called 3 times, avg 70.6ms/call: # once (13.8ms+179ms) by installer::run at line 478 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (2.20ms+14.9ms) by installer::run at line 482 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm # once (17µs+1.94ms) by installer::run at line 480 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
216338µs my ($modulesref, $itemsref, $itemname) = @_;
2164
216532µs my $infoline = "";
216632µs my $languageassignmenterror = 0;
216733µs my @languageassignmenterrors = ();
2168
2169313µs3151ms my $module_lookup_table = build_modulegids_table($modulesref, $itemname);
# spent 151ms making 3 calls to installer::scriptitems::build_modulegids_table, avg 50.2ms/call
2170
21713119µs for my $oneitem (@{$itemsref})
2172 {
21731037893µs my $itemgid = $oneitem->{'gid'};
2174
21751037443µs my $styles = "";
21761037915µs if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
217712541.37ms244168µs if (( $itemname eq "Dirs" ) && ( ! ( $styles =~ /\bCREATE\b/ ))) { next; }
# spent 168µs making 244 calls to installer::scriptitems::CORE:match, avg 688ns/call
2178
2179820294µs if ( $itemgid eq "" )
2180 {
2181 installer::exiter::exit_program("ERROR in item collection: No gid for item $oneitem->{'Name'}", "assigning_modules_to_items");
2182 }
2183
2184 # every item can belong to many modules
2185
21868202.57ms82045.3ms my ($modulegids, $haslanguagemodule) = get_string_of_modulegids_for_itemgid($module_lookup_table, $modulesref, $itemgid, $itemname);
# spent 45.3ms making 820 calls to installer::scriptitems::get_string_of_modulegids_for_itemgid, avg 55µs/call
2187
2188820360µs if ($modulegids eq "")
2189 {
2190 installer::exiter::exit_program("ERROR in file collection: No module found for $itemname $itemgid", "assigning_modules_to_items");
2191 }
2192
21938201.07ms $oneitem->{'modules'} = $modulegids;
2194820975µs $oneitem->{'haslanguagemodule'} = $haslanguagemodule;
2195
2196 # Important check: "ismultilingual" and "haslanguagemodule" must have the same value !
2197820464µs if (( $oneitem->{'ismultilingual'} ) && ( ! $oneitem->{'haslanguagemodule'} ))
2198 {
2199 $infoline = "Error: \"$oneitem->{'gid'}\" is multi lingual, but not in language pack (Assigned module: $modulegids)!\n";
2200 push( @installer::globals::globallogfileinfo, $infoline);
2201 push( @languageassignmenterrors, $infoline );
2202 $languageassignmenterror = 1;
2203 }
2204820993µs if (( $oneitem->{'haslanguagemodule'} ) && ( ! $oneitem->{'ismultilingual'} ))
2205 {
2206 $infoline = "Error: \"$oneitem->{'gid'}\" is in language pack, but not multi lingual (Assigned module: $modulegids)!\n";
2207 push( @installer::globals::globallogfileinfo, $infoline);
2208 push( @languageassignmenterrors, $infoline );
2209 $languageassignmenterror = 1;
2210 }
2211 }
2212
221334.28ms if ($languageassignmenterror)
2214 {
2215 for ( my $i = 0; $i <= $#languageassignmenterrors; $i++ ) { print "$languageassignmenterrors[$i]"; }
2216 installer::exiter::exit_program("ERROR: Incorrect assignments for language packs.", "assigning_modules_to_items");
2217 }
2218
2219}
2220
2221#################################################################################################
2222# Root path (for instance /opt/openofficeorg20) needs to be added to directories, files and links
2223#################################################################################################
2224
2225sub add_rootpath_to_directories
2226{
2227 my ($dirsref, $rootpath) = @_;
2228
2229 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
2230 {
2231 my $onedir = ${$dirsref}[$i];
2232 my $dir = "";
2233
2234 if ( $onedir->{'Dir'} ) { $dir = $onedir->{'Dir'}; }
2235
2236 if (!($dir =~ /\bPREDEFINED_/ ))
2237 {
2238 my $hostname = $onedir->{'HostName'};
2239 $hostname = $rootpath . $installer::globals::separator . $hostname;
2240 $onedir->{'HostName'} = $hostname;
2241 }
2242
2243 # added
2244
2245 if ( $dir =~ /\bPREDEFINED_PROGDIR\b/ )
2246 {
2247 my $hostname = $onedir->{'HostName'};
2248 if ( $hostname eq "" ) { $onedir->{'HostName'} = $rootpath; }
2249 else { $onedir->{'HostName'} = $rootpath . $installer::globals::separator . $hostname; }
2250 }
2251 }
2252}
2253
2254sub add_rootpath_to_files
2255{
2256 my ($filesref, $rootpath) = @_;
2257
2258 for ( my $i = 0; $i <= $#{$filesref}; $i++ )
2259 {
2260 my $onefile = ${$filesref}[$i];
2261 my $destination = $onefile->{'destination'};
2262 $destination = $rootpath . $installer::globals::separator . $destination;
2263 $onefile->{'destination'} = $destination;
2264 }
2265}
2266
2267sub add_rootpath_to_links
2268{
2269 my ($linksref, $rootpath) = @_;
2270
2271 for ( my $i = 0; $i <= $#{$linksref}; $i++ )
2272 {
2273 my $onelink = ${$linksref}[$i];
2274 my $styles = $onelink->{'Styles'};
2275
2276 my $destination = $onelink->{'destination'};
2277 $destination = $rootpath . $installer::globals::separator . $destination;
2278 $onelink->{'destination'} = $destination;
2279
2280 if (!($styles =~ /\bRELATIVE\b/ )) # for absolute links
2281 {
2282 my $destinationfile = $onelink->{'destinationfile'};
2283 $destinationfile = $rootpath . $installer::globals::separator . $destinationfile;
2284 $onelink->{'destinationfile'} = $destinationfile;
2285 }
2286 }
2287}
2288
2289#################################################################################
2290# Collecting all parent gids
2291#################################################################################
2292
2293sub collect_all_parent_feature
2294
# spent 43.4ms within installer::scriptitems::collect_all_parent_feature which was called: # once (43.4ms+0s) by installer::scriptitems::set_children_flag at line 2345
{
229511µs my ($modulesref) = @_;
2296
229711µs my @allparents = ();
2298
22991500ns my $found_root_module = 0;
2300
230111.63ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2302 {
23031567841µs my $onefeature = ${$modulesref}[$i];
2304
23051567694µs my $parentgid = "";
230615671.54ms if ( $onefeature->{'ParentID'} )
2307 {
2308 $parentgid = $onefeature->{'ParentID'};
2309 }
2310
2311156737.5ms if ( $parentgid ne "" )
2312 {
2313 if (! grep {$_ eq $parentgid} @allparents)
2314 {
2315 push(@allparents, $parentgid);
2316 }
2317 }
2318
2319 # Setting the global root module
2320
23211567554µs if ( $parentgid eq "" )
2322 {
23231500ns if ( $found_root_module ) { installer::exiter::exit_program("ERROR: Only one module without ParentID or with empty ParentID allowed ($installer::globals::rootmodulegid, $onefeature->{'gid'}).", "collect_all_parent_feature"); }
232413µs $installer::globals::rootmodulegid = $onefeature->{'gid'};
23251500ns $found_root_module = 1;
232614µs $infoline = "Setting Root Module: $installer::globals::rootmodulegid\n";
232712µs push( @installer::globals::globallogfileinfo, $infoline);
2328 }
2329
23301567679µs if ( ! $found_root_module ) { installer::exiter::exit_program("ERROR: Could not define root module. No module without ParentID or with empty ParentID exists.", "collect_all_parent_feature"); }
2331
2332 }
2333
2334112µs return \@allparents;
2335}
2336
2337#################################################################################
2338# Checking for every feature, whether it has children
2339#################################################################################
2340
2341sub set_children_flag
2342
# spent 100ms (56.7+43.4) within installer::scriptitems::set_children_flag which was called: # once (56.7ms+43.4ms) by installer::run at line 472 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
234312µs my ($modulesref) = @_;
2344
234516µs143.4ms my $allparents = collect_all_parent_feature($modulesref);
2346
234711.75ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2348 {
23491567874µs my $onefeature = ${$modulesref}[$i];
235015671.21ms my $gid = $onefeature->{'gid'};
2351
2352 # is this gid a parent?
2353
2354156752.0ms if ( grep {$_ eq $gid} @{$allparents} )
2355 {
2356 $onefeature->{'has_children'} = 1;
2357 }
2358 else
2359 {
23601324871µs $onefeature->{'has_children'} = 0;
2361 }
2362 }
2363}
2364
2365#################################################################################
2366# All modules, that use a template module, do now get the assignments of
2367# the template module.
2368#################################################################################
2369
2370sub resolve_assigned_modules
2371
# spent 34.5ms (32.9+1.57) within installer::scriptitems::resolve_assigned_modules which was called: # once (32.9ms+1.57ms) by installer::run at line 468 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
237212µs my ($modulesref) = @_;
2373
2374 # collecting all template modules
2375
237613µs my %directaccess = ();
2377
237811.78ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2379 {
238015781.07ms my $onefeature = ${$modulesref}[$i];
23811578665µs my $styles = "";
238215781.98ms if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
238315785.47ms1578844µs if ( $styles =~ /\bTEMPLATEMODULE\b/ ) { $directaccess{$onefeature->{'gid'}} = $onefeature; }
# spent 844µs making 1578 calls to installer::scriptitems::CORE:match, avg 535ns/call
2384
2385 # also looking for module with flag ROOT_BRAND_PACKAGE, to save is for further usage
238615785.48ms1578730µs if ( $styles =~ /\bROOT_BRAND_PACKAGE\b/ )
# spent 730µs making 1578 calls to installer::scriptitems::CORE:match, avg 462ns/call
2387 {
238814µs $installer::globals::rootbrandpackage = $onefeature->{'gid'};
238911µs $installer::globals::rootbrandpackageset = 1;
2390 }
2391 }
2392
2393 # looking, where template modules are assigned
2394
239512.40ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2396 {
23971578858µs my $onefeature = ${$modulesref}[$i];
239815781.62ms if ( $onefeature->{'Assigns'} )
2399 {
24001210816µs my $templategid = $onefeature->{'Assigns'};
2401
24021210862µs if ( ! exists($directaccess{$templategid}) )
2403 {
2404 installer::exiter::exit_program("ERROR: Did not find definition of assigned template module \"$templategid\"", "resolve_assigned_modules");
2405 }
2406
2407 # Currently no merging of Files, Dirs, ...
2408 # This has to be included here, if it is required
240912102.35ms my @items_at_modules = ("Files", "Dirs", "Unixlinks");
241012101.95ms for my $item (@items_at_modules)
2411 {
241236307.21ms if ( exists($directaccess{$templategid}->{$item}) ) { $onefeature->{$item} = $directaccess{$templategid}->{$item}; }
2413 }
2414 }
2415 }
2416}
2417
2418#################################################################################
2419# Removing the template modules from the list, after all
2420# assignments are transferred to the "real" modules.
2421#################################################################################
2422
2423sub remove_template_modules
2424
# spent 11.3ms (10.4+880µs) within installer::scriptitems::remove_template_modules which was called: # once (10.4ms+880µs) by installer::run at line 470 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
242512µs my ($modulesref) = @_;
2426
24271500ns my @modules = ();
2428
242911.76ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2430 {
24311578883µs my $onefeature = ${$modulesref}[$i];
24321578660µs my $styles = "";
243315781.51ms if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
243415895.52ms1578880µs if ( $styles =~ /\bTEMPLATEMODULE\b/ ) { next; }
# spent 880µs making 1578 calls to installer::scriptitems::CORE:match, avg 557ns/call
2435
24361567973µs push(@modules, $onefeature);
2437 }
2438
2439110µs return \@modules;
2440}
2441
2442#################################################################################
2443# Collecting all modules with flag LANGUAGEMODULE in a global
2444# collector.
2445#################################################################################
2446
2447sub collect_all_languagemodules
2448
# spent 280ms (247+32.4) within installer::scriptitems::collect_all_languagemodules which was called: # once (247ms+32.4ms) by installer::run at line 474 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
244912µs my ($modulesref) = @_;
2450
245115.87ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2452 {
245315671.12ms my $onefeature = ${$modulesref}[$i];
24541567700µs my $styles = "";
245515671.95ms if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
245615679.30ms15673.33ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 3.33ms making 1567 calls to installer::scriptitems::CORE:match, avg 2µs/call
2457 {
245814301.09ms if ( ! exists($onefeature->{'Language'}) ) { installer::exiter::exit_program("ERROR: \"$onefeature->{'gid'}\" has flag LANGUAGEMODULE, but does not know its language!", "collect_all_languagemodules"); }
245914303.87ms $installer::globals::alllangmodules{$onefeature->{'gid'}} = $onefeature->{'Language'};
2460 # Collecting also the english names, that are used for nsis unpack directory for language packs
24611430820µs my $lang = $onefeature->{'Language'};
24621430613µs my $name = "";
2463143015.3ms foreach my $localkey ( keys %{$onefeature} )
2464 {
246564900239ms6490029.0ms if ( $localkey =~ /^\s*Name\s*\(\s*en-US\s*\)\s*$/ )
# spent 29.0ms making 64900 calls to installer::scriptitems::CORE:match, avg 448ns/call
2466 {
2467 $installer::globals::all_english_languagestrings{$lang} = $onefeature->{$localkey};
2468 }
2469 }
2470 }
2471 }
2472}
2473
2474#################################################################################
2475# Selecting from all collected english language strings those, that are really
2476# required in this installation set.
2477#################################################################################
2478
2479sub select_required_language_strings
2480
# spent 365ms (311+54.6) within installer::scriptitems::select_required_language_strings which was called: # once (311ms+54.6ms) by installer::run at line 893 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm
{
248113µs my ($modulesref) = @_;
2482
2483149.0ms for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2484 {
24853460123.9ms my $onefeature = ${$modulesref}[$i];
24863460115.0ms my $styles = "";
24873460141.0ms if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
248834601180ms3460154.6ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 54.6ms making 34601 calls to installer::scriptitems::CORE:match, avg 2µs/call
2489 {
24902496116.2ms if ( ! exists($onefeature->{'Language'}) ) { installer::exiter::exit_program("ERROR: \"$onefeature->{'gid'}\" has flag LANGUAGEMODULE, but does not know its language!", "select_required_language_strings"); }
24912496119.7ms my $lang = $onefeature->{'Language'};
2492
24932496120.7ms if (( exists($installer::globals::all_english_languagestrings{$lang}) ) && ( ! exists($installer::globals::all_required_english_languagestrings{$lang}) ))
2494 {
2495 $installer::globals::all_required_english_languagestrings{$lang} = $installer::globals::all_english_languagestrings{$lang};
2496 }
2497 }
2498 }
2499}
2500
2501111µs1;
 
# spent 1.40s within installer::scriptitems::CORE:backtick which was called: # once (1.40s+0s) by installer::scriptitems::replace_setup_variables at line 705
sub installer::scriptitems::CORE:backtick; # opcode
# spent 141ms within installer::scriptitems::CORE:ftfile which was called 842 times, avg 168µs/call: # 842 times (141ms+0s) by installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic at line 948, avg 168µs/call
sub installer::scriptitems::CORE:ftfile; # opcode
# spent 31.8s within installer::scriptitems::CORE:match which was called 21828612 times, avg 1µs/call: # 10690393 times (25.1s+0s) by installer::scriptitems::resolving_all_languages_in_productlists at line 268, avg 2µs/call # 10281752 times (5.72s+0s) by installer::scriptitems::resolving_all_languages_in_productlists at line 270, avg 557ns/call # 558682 times (550ms+0s) by installer::scriptitems::changing_name_of_language_dependent_keys at line 665, avg 984ns/call # 93522 times (218ms+0s) by installer::scriptitems::get_languagespecific_module at line 222, avg 2µs/call # 64900 times (29.0ms+0s) by installer::scriptitems::collect_all_languagemodules at line 2465, avg 448ns/call # 34939 times (61.3ms+0s) by installer::scriptitems::remove_not_required_language_modules at line 316, avg 2µs/call # 34601 times (54.6ms+0s) by installer::scriptitems::select_required_language_strings at line 2488, avg 2µs/call # 15008 times (6.93ms+0s) by installer::scriptitems::add_License_Files_into_Installdir at line 1381, avg 462ns/call # 7921 times (3.26ms+0s) by installer::scriptitems::remove_office_start_language_files at line 170, avg 412ns/call # 7512 times (3.48ms+0s) by installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist at line 903, avg 463ns/call # 7512 times (2.93ms+0s) by installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist at line 908, avg 390ns/call # 7504 times (3.47ms+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1120, avg 462ns/call # 6779 times (2.74ms+0s) by installer::scriptitems::make_filename_language_specific at line 1474, avg 404ns/call # 2067 times (3.60ms+0s) by installer::scriptitems::resolve_all_directory_names at line 89, avg 2µs/call # 1972 times (879µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1804, avg 446ns/call # 1972 times (783µs+0s) by installer::scriptitems::set_global_directory_hostnames at line 467, avg 397ns/call # 1578 times (880µs+0s) by installer::scriptitems::remove_template_modules at line 2434, avg 557ns/call # 1578 times (844µs+0s) by installer::scriptitems::resolve_assigned_modules at line 2383, avg 535ns/call # 1578 times (730µs+0s) by installer::scriptitems::resolve_assigned_modules at line 2386, avg 462ns/call # 1567 times (3.33ms+0s) by installer::scriptitems::collect_all_languagemodules at line 2456, avg 2µs/call # 1286 times (634µs+0s) by installer::scriptitems::remove_uninstall_regitems_from_script at line 201, avg 493ns/call # 806 times (393µs+0s) by installer::scriptitems::remove_Languagepacklibraries_from_Installset at line 1565, avg 488ns/call # 805 times (456µs+0s) by installer::scriptitems::remove_Helppacklibraries_from_Installset at line 1601, avg 566ns/call # 796 times (374µs+0s) by installer::scriptitems::remove_patchonlyfiles_from_Installset at line 1637, avg 470ns/call # 453 times (1.05ms+0s) by installer::scriptitems::resolve_all_directory_names at line 122, avg 2µs/call # 355 times (371µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1883, avg 1µs/call # 244 times (168µs+0s) by installer::scriptitems::assigning_modules_to_items at line 2177, avg 688ns/call # 226 times (552µs+0s) by installer::scriptitems::resolve_all_directory_names at line 139, avg 2µs/call # 109 times (365µs+0s) by installer::scriptitems::remove_not_required_spellcheckerlanguage_modules at line 375, avg 3µs/call # 83 times (231µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1158, avg 3µs/call # 32 times (88µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1840, avg 3µs/call # 29 times (77µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1871, avg 3µs/call # 21 times (66µs+0s) by installer::scriptitems::make_filename_language_specific at line 1485, avg 3µs/call # 14 times (62µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1833, avg 4µs/call # 13 times (48µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1867, avg 4µs/call # once (20µs+0s) by installer::scriptitems::replace_setup_variables at line 713 # once (13µs+0s) by installer::scriptitems::get_office_directory_gid_and_hostname at line 1338 # once (6µs+0s) by installer::scriptitems::replace_setup_variables at line 703
sub installer::scriptitems::CORE:match; # opcode
# spent 84µs within installer::scriptitems::CORE:print which was called 83 times, avg 1µs/call: # 83 times (84µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1151, avg 1µs/call
sub installer::scriptitems::CORE:print; # opcode
# spent 8.76s within installer::scriptitems::CORE:regcomp which was called 10477226 times, avg 836ns/call: # 10281752 times (7.59s+0s) by installer::scriptitems::resolving_all_languages_in_productlists at line 270, avg 739ns/call # 93522 times (1.08s+0s) by installer::scriptitems::get_languagespecific_module at line 222, avg 12µs/call # 70753 times (56.3ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1740, avg 795ns/call # 15895 times (12.2ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1737, avg 768ns/call # 7504 times (8.69ms+0s) by installer::scriptitems::add_License_Files_into_Installdir at line 1381, avg 1µs/call # 7504 times (6.05ms+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1115, avg 806ns/call # 83 times (878µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1142, avg 11µs/call # 83 times (70µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1143, avg 843ns/call # 32 times (30µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1840, avg 944ns/call # 29 times (25µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1871, avg 876ns/call # 21 times (48µs+0s) by installer::scriptitems::make_filename_language_specific at line 1488, avg 2µs/call # 21 times (27µs+0s) by installer::scriptitems::make_filename_language_specific at line 1489, avg 1µs/call # 14 times (29µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1833, avg 2µs/call # 13 times (51µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1867, avg 4µs/call
sub installer::scriptitems::CORE:regcomp; # opcode
# spent 17.2ms within installer::scriptitems::CORE:sort which was called 3684 times, avg 5µs/call: # 3682 times (10.6ms+0s) by installer::scriptitems::optimize_list at line 1707, avg 3µs/call # once (3.28ms+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1898 # once (3.26ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1776
sub installer::scriptitems::CORE:sort; # opcode
# spent 554ms within installer::scriptitems::CORE:subst which was called 119480 times, avg 5µs/call: # 70753 times (292ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1740, avg 4µs/call # 15895 times (53.2ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1737, avg 3µs/call # 7504 times (5.38ms+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1115, avg 717ns/call # 7194 times (19.9ms+0s) by installer::scriptitems::get_languagespecific_module at line 228, avg 3µs/call # 3682 times (157ms+0s) by installer::scriptitems::optimize_list at line 1704, avg 43µs/call # 3682 times (7.05ms+0s) by installer::scriptitems::optimize_list at line 1703, avg 2µs/call # 3682 times (4.24ms+0s) by installer::scriptitems::optimize_list at line 1702, avg 1µs/call # 1528 times (6.50ms+0s) by installer::scriptitems::build_modulegids_table at line 2109, avg 4µs/call # 1528 times (5.18ms+0s) by installer::scriptitems::build_modulegids_table at line 2110, avg 3µs/call # 830 times (450µs+0s) by installer::scriptitems::get_sourcepath_from_filename_and_includepath at line 1018, avg 542ns/call # 830 times (396µs+0s) by installer::scriptitems::get_sourcepath_from_filename_and_includepath at line 1019, avg 477ns/call # 820 times (1.66ms+0s) by installer::scriptitems::get_string_of_modulegids_for_itemgid at line 2144, avg 2µs/call # 125 times (94µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1881, avg 749ns/call # 125 times (91µs+0s) by installer::scriptitems::collect_directories_with_create_flag_from_directoryarray at line 1880, avg 728ns/call # 83 times (267µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1142, avg 3µs/call # 83 times (59µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1143, avg 711ns/call # 78 times (50µs+0s) by installer::scriptitems::replace_setup_variables at line 723, avg 645ns/call # 78 times (49µs+0s) by installer::scriptitems::replace_setup_variables at line 727, avg 623ns/call # 78 times (48µs+0s) by installer::scriptitems::replace_setup_variables at line 734, avg 618ns/call # 78 times (48µs+0s) by installer::scriptitems::replace_setup_variables at line 726, avg 610ns/call # 78 times (45µs+0s) by installer::scriptitems::replace_setup_variables at line 725, avg 573ns/call # 78 times (43µs+0s) by installer::scriptitems::replace_setup_variables at line 736, avg 547ns/call # 78 times (42µs+0s) by installer::scriptitems::replace_setup_variables at line 728, avg 535ns/call # 78 times (41µs+0s) by installer::scriptitems::replace_setup_variables at line 731, avg 531ns/call # 78 times (41µs+0s) by installer::scriptitems::replace_setup_variables at line 732, avg 529ns/call # 78 times (40µs+0s) by installer::scriptitems::replace_setup_variables at line 733, avg 519ns/call # 78 times (39µs+0s) by installer::scriptitems::replace_setup_variables at line 724, avg 500ns/call # 78 times (39µs+0s) by installer::scriptitems::replace_setup_variables at line 729, avg 495ns/call # 78 times (38µs+0s) by installer::scriptitems::replace_setup_variables at line 738, avg 492ns/call # 78 times (38µs+0s) by installer::scriptitems::replace_setup_variables at line 730, avg 486ns/call # 21 times (73µs+0s) by installer::scriptitems::make_filename_language_specific at line 1488, avg 3µs/call # 21 times (67µs+0s) by installer::scriptitems::make_filename_language_specific at line 1489, avg 3µs/call # once (115µs+0s) by installer::scriptitems::replace_setup_variables at line 687 # once (3µs+0s) by installer::scriptitems::replace_setup_variables at line 716
sub installer::scriptitems::CORE:subst; # opcode
# spent 143ms within installer::scriptitems::CORE:substcont which was called 109966 times, avg 1µs/call: # 109716 times (143ms+0s) by installer::scriptitems::collect_directories_from_filesarray at line 1740, avg 1µs/call # 166 times (216µs+0s) by installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist at line 1142, avg 1µs/call # 42 times (58µs+0s) by installer::scriptitems::make_filename_language_specific at line 1489, avg 1µs/call # 42 times (53µs+0s) by installer::scriptitems::make_filename_language_specific at line 1488, avg 1µs/call
sub installer::scriptitems::CORE:substcont; # opcode