← 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:32 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
{
458739281.3ms my ($directoryarrayref) = @_;
46
47 # After this procedure the hash shall contain the complete language
48 # dependent path, not only the language dependent HostName.
49
50 my ($key, $value, $parentvalue, $parentgid, $parentdirectoryhashref);
51
52 for ( my $i = 0; $i <= $#{$directoryarrayref}; $i++ )
53 {
54 my $directoryhashref = ${$directoryarrayref}[$i];
55 my $gid = $directoryhashref-> {'gid'};
56 my $parentid = $directoryhashref-> {'ParentID'};
57
58 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
63 for ( my $j = 0; $j <= $i; $j++ )
64 {
65 $parentdirectoryhashref = ${$directoryarrayref}[$j];
66 $parentgid = $parentdirectoryhashref->{'gid'};
67
68 if ( $parentid eq $parentgid)
69 {
70 last;
71 }
72 }
73
74 # and now we can put the path together
75 # But take care of the languages!
76
77 my $dirismultilingual = $directoryhashref->{'ismultilingual'};
78 my $parentismultilingual = $parentdirectoryhashref->{'ismultilingual'};
79
80 # First: Both directories are language independent or both directories are language dependent
81
82 if ((( ! $dirismultilingual ) && ( ! $parentismultilingual )) ||
83 (( $dirismultilingual ) && ( $parentismultilingual )))
84 {
85 foreach $key (keys %{$directoryhashref})
86 {
87 # the key ("HostName (en-US)") must be usable for both hashes
88
8920673.60ms if ( $key =~ /\bHostName\b/ )
# spent 3.60ms making 2067 calls to installer::scriptitems::CORE:match, avg 2µs/call
90 {
91 $parentvalue = "";
92 $value = $directoryhashref->{$key};
93 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
100 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 {
108 $directoryhashref->{$key} = $parentvalue . $installer::globals::separator . $value;
109 }
110 }
111 }
112 }
113
114 # Second: The directory is language dependent, the parent not
115
116 if (( $dirismultilingual ) && ( ! $parentismultilingual ))
117 {
118 $parentvalue = $parentdirectoryhashref->{'HostName'}; # there is only one
119
120 foreach $key (keys %{$directoryhashref}) # the current directory
121 {
1224531.05ms if ( $key =~ /\bHostName\b/ )
# spent 1.05ms making 453 calls to installer::scriptitems::CORE:match, avg 2µs/call
123 {
124 $value = $directoryhashref->{$key};
125 $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
132 if (( ! $dirismultilingual ) && ( $parentismultilingual ))
133 {
134 $value = $directoryhashref->{'HostName'}; # there is only one
135 delete($directoryhashref->{'HostName'});
136
137 foreach $key (keys %{$parentdirectoryhashref}) # the parent directory
138 {
139226552µs if ( $key =~ /\bHostName\b/ )
# spent 552µs making 226 calls to installer::scriptitems::CORE:match, avg 2µs/call
140 {
141 $parentvalue = $parentdirectoryhashref->{$key}; # there is only one
142 $directoryhashref->{$key} = $parentvalue . $installer::globals::separator . $value;
143 }
144 }
145
146 $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
{
1593169055.7ms my ($productarrayref) = @_;
160
161 my @newitems = ();
162
163 for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
164 {
165 my $oneitem = ${$productarrayref}[$i];
166 my $styles = "";
167
168 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
169
17079213.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 {
176 my $infoline = "INFO: Flag SET_OFFICE_LANGUAGE \-\> Removing $oneitem->{'gid'} from file list.\n";
177 push( @installer::globals::logfileinfo, $infoline);
178 }
179 }
180
181 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
{
19064349.47ms my ($registryarrayref) = @_;
191
192 my @newitems = ();
193
194 for ( my $i = 0; $i <= $#{$registryarrayref}; $i++ )
195 {
196 my $oneitem = ${$registryarrayref}[$i];
197 my $subkey = "";
198
199 if ( $oneitem->{'Subkey'} ) { $subkey = $oneitem->{'Subkey'}; }
200
2011286634µs if ( $subkey =~ /Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall/ ) { next; }
# spent 634µs making 1286 calls to installer::scriptitems::CORE:match, avg 493ns/call
202
203 push(@newitems, $oneitem);
204 }
205
206 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
{
2151033777814.3s my ( $lang, $modulestring ) = @_;
216
217 my $langmodulestring = "";
218
219 my $module;
220 foreach $module ( keys %installer::globals::alllangmodules )
221 {
2221870441.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
228719419.9ms $langmodulestring =~ s/^\s*,//;
# spent 19.9ms making 7194 calls to installer::scriptitems::CORE:subst, avg 3µs/call
229
230 if ( $langmodulestring eq "" ) { installer::exiter::exit_program("ERROR: No language pack module found for language $lang in string \"$modulestring\"!", "get_languagespecific_module"); }
231
232 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
{
24122371151144s my ($productarrayref, $languagesarrayref) = @_;
242
243 my @itemsinalllanguages = ();
244
245 my ($key, $value);
246
247 for ( my $i = 0; $i <= $#{$productarrayref}; $i++ )
248 {
249 my $oneitem = ${$productarrayref}[$i];
250
251 my $ismultilingual = $oneitem->{'ismultilingual'};
252
253 if (!($ismultilingual)) # nothing to do with single language items
254 {
255 $oneitem->{'specificlanguage'} = "";
256 push(@itemsinalllanguages, $oneitem);
257 }
258 else #all language dependent files
259 {
260 for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ ) # iterating over all languages
261 {
262 my $onelanguage = ${$languagesarrayref}[$j];
263
264 my %oneitemhash = ();
265
266 foreach $key (keys %{$oneitem})
267 {
2681069039325.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 {
2702056350413.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 {
272 $value = $oneitem->{$key};
273 $oneitemhash{$key} = $value;
274 }
275 }
276 else
277 {
278 $value = $oneitem->{$key};
279 $oneitemhash{$key} = $value;
280 }
281 }
282
283 $oneitemhash{'specificlanguage'} = $onelanguage;
284
285 if ( $oneitemhash{'haslanguagemodule'} )
286 {
287719414.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
288 $oneitemhash{'modules'} = $langmodulestring;
289 }
290
291 push(@itemsinalllanguages, \%oneitemhash);
292 }
293 }
294 }
295
296 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
{
30631210133.28s my ($modulesarrayref, $languagesarrayref) = @_;
307
308 my @allmodules = ();
309
310 for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
311 {
312 my $module = ${$modulesarrayref}[$i];
313 my $styles = "";
314 if ( $module->{'Styles'} ) { $styles = $module->{'Styles'}; }
315
3163493961.3ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 61.3ms making 34939 calls to installer::scriptitems::CORE:match, avg 2µs/call
317 {
318 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"); }
319 my $modulelanguage = $module->{'Language'};
320 # checking, if language is required
321 my $doinclude = 0;
322 for ( my $j = 0; $j <= $#{$languagesarrayref}; $j++ )
323 {
324 my $onelanguage = ${$languagesarrayref}[$j];
325 if ( $onelanguage eq $modulelanguage )
326 {
327 $doinclude = 1;
328 last;
329 }
330 }
331
332 if ( $doinclude ) { push(@allmodules, $module); }
333 }
334 else
335 {
336 push(@allmodules, $module);
337 }
338 }
339
340 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
{
352105007118ms my ($modulesarrayref) = @_;
353
354 my $infoline = "";
355 my @allmodules = ();
356
357 for ( my $i = 0; $i <= $#{$modulesarrayref}; $i++ )
358 {
359 my $module = ${$modulesarrayref}[$i];
360 if ( $module->{'Spellcheckerlanguage'} ) # selecting modules with Spellcheckerlanguage
361 {
362 if ( exists($installer::globals::spellcheckerlanguagehash{$module->{'Spellcheckerlanguage'}}) )
363 {
364 push(@allmodules, $module);
365 }
366 else
367 {
368 $infoline = "Spellchecker selection: Removing module $module->{'gid'}\n";
369 push( @installer::globals::logfileinfo, $infoline);
370
371 # Collecting all files at modules that are removed
372
373 if ( $module->{'Files'} )
374 {
375109365µs if ( $module->{'Files'} =~ /^\s*\((.*?)\)\s*$/ )
# spent 365µs making 109 calls to installer::scriptitems::CORE:match, avg 3µs/call
376 {
377 my $filelist = $1;
378
3791091.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
380 foreach my $onefile ( keys %{$filelisthash} ) { $installer::globals::spellcheckerfilehash{$onefile} = 1; }
381 }
382 }
383 }
384 }
385 else
386 {
387 push(@allmodules, $module);
388 }
389 }
390
391 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
{
4034772659.9ms my ($filesarrayref) = @_;
404
405 my @filesarray = ();
406 my $infoline = "";
407
408 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
409 {
410 my $onefile = ${$filesarrayref}[$i];
411 if ( exists($installer::globals::spellcheckerfilehash{$onefile->{'gid'}}) )
412 {
413 $infoline = "Spellchecker selection: Removing file $onefile->{'gid'}\n";
414 push( @installer::globals::logfileinfo, $infoline);
415 next;
416 }
417 push(@filesarray, $onefile);
418 }
419
420 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
{
42998627.27ms my ($dirsref, $languagesarrayref) = @_;
430
431 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
432 {
433 my $onedir = ${$dirsref}[$i];
434
435 my $hostname = "";
436
437 if ( $onedir->{'HostName'} ) { $hostname = $onedir->{'HostName'}; }
438
439 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
446 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
{
459789311.7ms my ($dirsref, $allvariables) = @_;
460
461 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
462 {
463 my $onedir = ${$dirsref}[$i];
464 my $styles = "";
465 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
466
4671972783µs if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
# spent 783µs making 1972 calls to installer::scriptitems::CORE:match, avg 397ns/call
468 {
469 $installer::globals::officedirhostname = $onedir->{'HostName'};
470 $installer::globals::officedirgid = $onedir->{'gid'};
471 $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
{
65012394123.56s my ($itemsarrayref) = @_;
651
652 # Changing key for multilingual items from "Name ( )" to "Name" or "HostName ( )" to "HostName"
653
654 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
655 {
656 my $oneitem = ${$itemsarrayref}[$i];
657 my $onelanguage = $oneitem->{'specificlanguage'};
658
659 if (!($onelanguage eq "" )) # language dependent item
660 {
661 my $itemkey;
662
663 foreach $itemkey (keys %{$oneitem})
664 {
665558682550ms if ( $itemkey =~ /^\s*(\S+?)\s+\(\S+\)\s*$/ )
# spent 550ms making 558682 calls to installer::scriptitems::CORE:match, avg 984ns/call
666 {
667 my $newitemkey = $1;
668 my $itemvalue = $oneitem->{$itemkey};
669 $oneitem->{$newitemkey} = $itemvalue;
670 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
{
68415021.40s my ($itemsarrayref, $languagestringref, $hashref) = @_;
685
686 my $languagesstring = $$languagestringref;
6871115µs $languagesstring =~ s/\_/ /g; # replacing underscore with whitespace
# spent 115µs making 1 call to installer::scriptitems::CORE:subst
688
689 my $productname = $hashref->{'PRODUCTNAME'};
690 my $productversion = $hashref->{'PRODUCTVERSION'};
691 my $userdirproductversion = "";
692 if ( $hashref->{'USERDIRPRODUCTVERSION'} ) { $userdirproductversion = $hashref->{'USERDIRPRODUCTVERSION'}; }
693 my $productkey = $productname . " " . $productversion;
694
695 # string $buildid, which is used to replace the setup variable <buildid>
696
697 my $localminor = "flat";
698 if ( $installer::globals::minor ne "" ) { $localminor = $installer::globals::minor; }
699 else { $localminor = $installer::globals::lastminor; }
700
701 my $localbuild = $installer::globals::build;
702
70316µ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.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
706 if ($? || !$buildidstring) {
707 $buildidstring = $localbuild . $localminor . "(Build:" . $installer::globals::buildid . ")";
708 }
709 else {
710 $buildidstring = substr($buildidstring, 0, -1);
711 }
712
713120µs if ( $localminor =~ /^\s*\w(\d+)\w*\s*$/ ) { $localminor = $1; }
# spent 20µs making 1 call to installer::scriptitems::CORE:match
714
715 my $updateid = $productname . "_" . $userdirproductversion . "_" . $$languagestringref;
71613µs $updateid =~ s/ /_/g;
# spent 3µs making 1 call to installer::scriptitems::CORE:subst
717
718 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
719 {
720 my $oneitem = ${$itemsarrayref}[$i];
721 my $value = $oneitem->{'Value'};
722
7237850µs $value =~ s/\<buildid\>/$buildidstring/;
# spent 50µs making 78 calls to installer::scriptitems::CORE:subst, avg 645ns/call
7247839µs $value =~ s/\<sequence_languages\>/$languagesstring/;
# spent 39µs making 78 calls to installer::scriptitems::CORE:subst, avg 500ns/call
7257845µs $value =~ s/\<productkey\>/$productkey/;
# spent 45µs making 78 calls to installer::scriptitems::CORE:subst, avg 573ns/call
7267848µs $value =~ s/\<productcode\>/$installer::globals::productcode/;
# spent 48µs making 78 calls to installer::scriptitems::CORE:subst, avg 610ns/call
7277849µs $value =~ s/\<upgradecode\>/$installer::globals::upgradecode/;
# spent 49µs making 78 calls to installer::scriptitems::CORE:subst, avg 623ns/call
7287842µs $value =~ s/\<alllanguages\>/$languagesstring/;
# spent 42µs making 78 calls to installer::scriptitems::CORE:subst, avg 535ns/call
7297839µs $value =~ s/\<productmajor\>/$localbuild/;
# spent 39µs making 78 calls to installer::scriptitems::CORE:subst, avg 495ns/call
7307838µs $value =~ s/\<productminor\>/$localminor/;
# spent 38µs making 78 calls to installer::scriptitems::CORE:subst, avg 486ns/call
7317841µs $value =~ s/\<productbuildid\>/$installer::globals::buildid/;
# spent 41µs making 78 calls to installer::scriptitems::CORE:subst, avg 531ns/call
7327841µs $value =~ s/\<sourceid\>/$installer::globals::build/;
# spent 41µs making 78 calls to installer::scriptitems::CORE:subst, avg 529ns/call
7337840µs $value =~ s/\<updateid\>/$updateid/;
# spent 40µs making 78 calls to installer::scriptitems::CORE:subst, avg 519ns/call
7347848µs $value =~ s/\<pkgformat\>/$installer::globals::packageformat/;
# spent 48µs making 78 calls to installer::scriptitems::CORE:subst, avg 618ns/call
735 $ENV{'OOO_VENDOR'} = "" if !defined $ENV{'OOO_VENDOR'};
7367843µs $value =~ s/\<vendor\>/$ENV{'OOO_VENDOR'}/;
# spent 43µs making 78 calls to installer::scriptitems::CORE:subst, avg 547ns/call
737 $ENV{'BUILD_VER_STRING'} = "" if !defined $ENV{'BUILD_VER_STRING'};
7387838µs $value =~ s/\<buildversion\>/$ENV{'BUILD_VER_STRING'}/;
# spent 38µs making 78 calls to installer::scriptitems::CORE:subst, avg 492ns/call
739
740 $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
{
7765586443.5ms my ($itemsarrayref, $languagestringref, $searchkey, $itemtype) = @_;
777
778 # Removing of all non existent files, for instance asian fonts
779
7801150µ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
782 my @allexistentitems = ();
783
784 my $infoline;
785
786 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
787 {
788 my $oneitem = ${$itemsarrayref}[$i];
789 my $oneitemname = ""; # $searchkey is "Name" for files and "Key" for ConfigurationItems
790
791 if ( $oneitem->{$searchkey} ) { $oneitemname = $oneitem->{$searchkey} }
792
793 my $itemtoberemoved = 0;
794
795 if ($oneitemname eq "") # for instance asian font in english installation set
796 {
797 $itemtoberemoved = 1;
798 }
799
800 if ($itemtoberemoved)
801 {
802 $infoline = "WARNING: Language $$languagestringref: No $itemtype packed for $oneitem->{'gid'}!\n";
803 push( @installer::globals::logfileinfo, $infoline);
804 }
805 else
806 {
807 push(@allexistentitems, $oneitem);
808 }
809 }
810
811 $infoline = "\n";
812 push( @installer::globals::logfileinfo, $infoline);
813
814 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
{
823629005536ms my ($dirsarrayref ,$searchgid, $onelanguage, $oneitemgid) = @_;
824
825 my $directoryname = "";
826 my $onedirectory;
827 my $foundgid = 0;
828
829 for ( my $i = 0; $i <= $#{$dirsarrayref}; $i++ )
830 {
831 $onedirectory = ${$dirsarrayref}[$i];
832 my $directorygid = $onedirectory->{'gid'};
833
834 if ($directorygid eq $searchgid)
835 {
836 $foundgid = 1;
837 last;
838 }
839 }
840
841 if (!($foundgid))
842 {
843 installer::exiter::exit_program("ERROR: Gid $searchgid not defined in $installer::globals::setupscriptname", "get_Directoryname_From_Directorygid");
844 }
845
846 if ( ! ( $onedirectory->{'ismultilingual'} )) # the directory is not language dependent
847 {
848 $directoryname = $onedirectory->{'HostName'};
849 }
850 else
851 {
852 $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
860 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
865 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
{
874142791183ms my ($itemarrayref, $dirsarrayref) = @_;
875
876 for ( my $i = 0; $i <= $#{$itemarrayref}; $i++ )
877 {
878 my $oneitem = ${$itemarrayref}[$i];
879 my $oneitemgid = $oneitem->{'gid'};
880 my $directorygid = $oneitem->{'Dir'}; # for instance gid_Dir_Program
881 my $netdirectorygid = "";
882 my $onelanguage = $oneitem->{'specificlanguage'};
883 my $ispredefinedprogdir = 0;
884 my $ispredefinedconfigdir = 0;
885
886 my $oneitemname = $oneitem->{'Name'};
887
888 if ( $oneitem->{'NetDir'} ) { $netdirectorygid = $oneitem->{'NetDir'}; }
889
890751268.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
892 my $searchdirgid;
893
894 if ( $netdirectorygid eq "" ) # if NetDir is defined, it is privileged
895 {
896 $searchdirgid = $directorygid
897 }
898 else
899 {
900 $searchdirgid = $netdirectorygid
901 }
902
90375123.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
90875122.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
913 my $destfilename;
914
915 if ((!( $ispredefinedprogdir )) && (!( $ispredefinedconfigdir )))
916 {
9177512520ms 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
918 $destfilename = $$directorynameref . $installer::globals::separator . $oneitemname;
919 }
920 else
921 {
922 $destfilename = $oneitemname;
923 }
924
925 $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
{
9354412153ms my ($searchfilenameref, $includepatharrayref, $write_logfile) = @_;
936
937 my ($onefile, $includepath, $infoline);
938
939 my $foundsourcefile = 0;
940
941 for ( my $j = 0; $j <= $#{$includepatharrayref}; $j++ )
942 {
943 $includepath = ${$includepatharrayref}[$j];
94484211.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
946 $onefile = $includepath . $installer::globals::separator . $$searchfilenameref;
947
948842141ms if ( -f $onefile )
# spent 141ms making 842 calls to installer::scriptitems::CORE:ftfile, avg 168µs/call
949 {
950 $foundsourcefile = 1;
951 last;
952 }
953 }
954
955 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 {
974 if ( $write_logfile)
975 {
976 $infoline = "SUCCESS: Source for $$searchfilenameref: $onefile\n";
977 push( @installer::globals::logfileinfo, $infoline);
978 }
979 }
980
981 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
{
990220065235ms my ($searchfilenameref, $unused, $write_logfile) = @_;
991
992 my ($onefile, $includepath, $infoline);
993
994 my $foundsourcefile = 0;
995 my $foundnewname = 0;
996
997 for ( my $j = 0; $j <= $#installer::globals::allincludepaths; $j++ )
998 {
999 my $allfiles = $installer::globals::allincludepaths[$j];
1000
1001 if ( exists( $allfiles->{$$searchfilenameref} ))
1002 {
1003 $onefile = $allfiles->{'includepath'} . $installer::globals::separator . $$searchfilenameref;
1004 $foundsourcefile = 1;
1005 last;
1006 }
1007 }
1008
1009 if (!($foundsourcefile)) # testing with lowercase filename
1010 {
1011 # Attention: README01.html is copied for Windows to readme01.html, not case sensitive
1012
1013 for ( my $j = 0; $j <= $#installer::globals::allincludepaths; $j++ )
1014 {
1015 my $allfiles = $installer::globals::allincludepaths[$j];
1016
1017 my $newfilename = $$searchfilenameref;
1018830450µs $newfilename =~ s/readme/README/; # special handling for readme files
# spent 450µs making 830 calls to installer::scriptitems::CORE:subst, avg 542ns/call
1019830396µ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
1021 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
1031 if (!($foundsourcefile))
1032 {
1033 $onefile = ""; # the sourcepath has to be empty
1034 if ( $write_logfile)
1035 {
1036 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
1045 push( @installer::globals::logfileinfo, $infoline);
1046 }
1047 }
1048 else
1049 {
1050 if ( $write_logfile)
1051 {
1052 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 }
1060 push( @installer::globals::logfileinfo, $infoline);
1061 }
1062 }
1063
1064 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
{
10743012925.9ms my($directorygid, $dirsref) = @_;
1075
1076 my $is_multilingual = 0;
1077
1078 for ( my $i = 0; $i <= $#{$dirsref}; $i++ )
1079 {
1080 my $onedir = ${$dirsref}[$i];
1081 my $gid = $onedir->{'gid'};
1082
1083 if ( $gid eq $directorygid )
1084 {
1085 $is_multilingual = $onedir->{'ismultilingual'};
1086 last;
1087 }
1088 }
1089
1090 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
{
1100136412210ms my ($filesarrayref, $includepatharrayref, $dirsref, $item) = @_;
1101
11022287µ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
1104 my $infoline = "";
1105
1106 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1107 {
1108 my $onefile = ${$filesarrayref}[$i];
1109 my $onelanguage = $onefile->{'specificlanguage'};
1110
1111 if ( ! $onefile->{'Name'} ) { installer::exiter::exit_program("ERROR: $item without name ! GID: $onefile->{'gid'} ! Language: $onelanguage", "get_Source_Directory_For_Files_From_Includepathlist"); }
1112
1113 my $onefilename = $onefile->{'Name'};
1114 if ( $item eq "ScpActions" ) { $onefilename =~ s/\//$installer::globals::separator/g; }
11151500811.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
1117 my $styles = "";
1118 my $file_can_miss = 0;
1119 if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
112075043.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
1122 if (( $installer::globals::languagepack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCELANGUAGEPACK\b/ ))) { $file_can_miss = 1; }
1123 if (( $installer::globals::helppack ) && ( ! $onefile->{'ismultilingual'} ) && ( ! ( $styles =~ /\bFORCEHELPPACK\b/ ))) { $file_can_miss = 1; }
1124
1125 my $sourcepathref = "";
1126
1127 if ( $file_can_miss ) { $sourcepathref = get_sourcepath_from_filename_and_includepath(\$onefilename, $includepatharrayref, 0); }
11287504182ms 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
1130 $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
1134 if ( $ENV{'DEFAULT_TO_ENGLISH_FOR_PACKING'} )
1135 {
1136 if (( ! $onefile->{'sourcepath'} ) && ( $onefile->{'ismultilingual'} ))
1137 {
1138 my $oldname = $onefile->{'Name'};
1139 my $oldlanguage = $onefile->{'specificlanguage'};
1140 my $newlanguage = "en-US";
1141 $onefilename = $onefile->{'Name'};
11423321.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
1143166129µ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
1144832.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
1145 $onefile->{'sourcepath'} = $$sourcepathref; # This $$sourcepathref is empty, if no source was found
1146
1147 if ($onefile->{'sourcepath'}) # defaulting to english was successful
1148 {
1149 $infoline = "WARNING: Using $onefilename instead of $oldname\n";
1150 push( @installer::globals::logfileinfo, $infoline);
11518384µ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
115883231µs if ( $onefile->{'Styles'} =~ /\bARCHIVE\b/ )
# spent 231µs making 83 calls to installer::scriptitems::CORE:match, avg 3µs/call
1159 {
1160 my $directorygid = $onefile->{'Dir'};
11618325.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
1163 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
1181 $infoline = "\n"; # empty line after listing of all files
1182 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
{
12263002723.9ms my ($filesarrayref) = @_;
1227
1228 my $infoline;
1229
1230 my $error_occurred = 0;
1231 my @missingfiles = ();
1232 push(@missingfiles, "ERROR: The following files could not be found: \n");
1233
1234 my @newfilesarray = ();
1235
1236 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1237 {
1238 my $onefile = ${$filesarrayref}[$i];
1239 my $sourcepath = $onefile->{'sourcepath'};
1240
1241 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
1302 push(@newfilesarray, $onefile);
1303 }
1304
1305 $infoline = "\n";
1306 push( @installer::globals::logfileinfo, $infoline);
1307
1308 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
1314 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
{
13251450µs my ($dirsarrayref) = @_;
1326
1327 my $foundofficedir = 0;
1328 my $gid = "";
1329 my $hostname = "";
1330
1331 for ( my $i = 0; $i <= $#{$dirsarrayref}; $i++ )
1332 {
1333 my $onedir = ${$dirsarrayref}[$i];
1334 if ( $onedir->{'Styles'} )
1335 {
1336 my $styles = $onedir->{'Styles'};
1337
1338113µs if ( $styles =~ /\bOFFICEDIRECTORY\b/ )
# spent 13µs making 1 call to installer::scriptitems::CORE:match
1339 {
1340 $foundofficedir = 1;
1341 $gid = $onedir->{'gid'};
1342 $hostname = $onedir->{'HostName'};
1343 last;
1344 }
1345 }
1346 }
1347
1348 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
{
135945031114ms my ($filesarrayref, $dirsarrayref, $languagesarrayref) = @_;
1360
1361 my $infoline;
1362
1363 my @newfilesarray = ();
1364
136518µs my $defaultlanguage = installer::languages::get_default_language($languagesarrayref);
# spent 8µs making 1 call to installer::languages::get_default_language
1366
1367147µ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
1374 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1375 {
1376 my $onefile = ${$filesarrayref}[$i];
1377 my $destination = $onefile->{'destination'};
1378 my $styles = "";
1379 if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
1380
13812251215.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
1446 push(@newfilesarray, $onefile);
1447 }
1448
1449 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
{
14623564256.6ms my ($filesarrayref) = @_;
1463
1464 my $infoline = "";
1465
1466 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1467 {
1468 my $onefile = ${$filesarrayref}[$i];
1469
1470 if ( $onefile->{'ismultilingual'} )
1471 {
1472 my $styles = "";
1473 if ( $onefile->{'Styles'} ) { $styles = $onefile->{'Styles'}; }
147467792.74ms if ( $styles =~ /\bMAKE_LANG_SPECIFIC\b/ )
# spent 2.74ms making 6779 calls to installer::scriptitems::CORE:match, avg 404ns/call
1475 {
1476 my $language = $onefile->{'specificlanguage'};
1477 my $olddestination = $onefile->{'destination'};
1478 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
1483 my $fileextension = "";
1484
14852166µs if ( $onefile->{'Name'} =~ /(\.\w+?)\s*$/ ) { $fileextension = $1; }
# spent 66µs making 21 calls to installer::scriptitems::CORE:match, avg 3µs/call
1486 if ( $fileextension ne "" )
1487 {
148884175µ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
148984151µ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
1492 $infoline = "Flag MAKE_LANG_SPECIFIC:\n";
1493 push( @installer::globals::logfileinfo, $infoline);
1494 $infoline = "Changing name from $oldname to $onefile->{'Name'} !\n";
1495 push( @installer::globals::logfileinfo, $infoline);
1496 $infoline = "Changing destination from $olddestination to $onefile->{'destination'} !\n";
1497 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
{
1510217µs my ($itemsarrayref) = @_;
1511
1512 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
{
155340396.06ms my ($itemsarrayref) = @_;
1554
1555 my $infoline;
1556
1557 my @newitemsarray = ();
1558
1559 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1560 {
1561 my $oneitem = ${$itemsarrayref}[$i];
1562 my $styles = "";
1563 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1564
1565806393µs if ( $styles =~ /\bLANGUAGEPACK\b/ )
# spent 393µs making 806 calls to installer::scriptitems::CORE:match, avg 488ns/call
1566 {
1567 $infoline = "Removing language pack file $oneitem->{'gid'} from the installation set.\n";
1568 push( @installer::globals::globallogfileinfo, $infoline);
1569
1570 next;
1571 }
1572
1573 push(@newitemsarray, $oneitem);
1574 }
1575
1576 $infoline = "\n";
1577 push( @installer::globals::globallogfileinfo, $infoline);
1578
1579 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
{
158940505.68ms my ($itemsarrayref) = @_;
1590
1591 my $infoline;
1592
1593 my @newitemsarray = ();
1594
1595 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1596 {
1597 my $oneitem = ${$itemsarrayref}[$i];
1598 my $styles = "";
1599 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1600
1601805456µs if ( $styles =~ /\bHELPPACK\b/ )
# spent 456µs making 805 calls to installer::scriptitems::CORE:match, avg 566ns/call
1602 {
1603 $infoline = "Removing help pack file $oneitem->{'gid'} from the installation set.\n";
1604 push( @installer::globals::globallogfileinfo, $infoline);
1605
1606 next;
1607 }
1608
1609 push(@newitemsarray, $oneitem);
1610 }
1611
1612 $infoline = "\n";
1613 push( @installer::globals::globallogfileinfo, $infoline);
1614
1615 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
{
162539935.53ms my ($itemsarrayref) = @_;
1626
1627 my $infoline;
1628
1629 my @newitemsarray = ();
1630
1631 for ( my $i = 0; $i <= $#{$itemsarrayref}; $i++ )
1632 {
1633 my $oneitem = ${$itemsarrayref}[$i];
1634 my $styles = "";
1635 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
1636
1637796374µs if ( $styles =~ /\bPATCH_ONLY\b/ )
# spent 374µs making 796 calls to installer::scriptitems::CORE:match, avg 470ns/call
1638 {
1639 $infoline = "Removing file with flag PATCH_ONLY $oneitem->{'gid'} from the installation set.\n";
1640 push( @installer::globals::globallogfileinfo, $infoline);
1641
1642 next;
1643 }
1644
1645 push(@newitemsarray, $oneitem);
1646 }
1647
1648 $infoline = "\n";
1649 push( @installer::globals::globallogfileinfo, $infoline);
1650
1651 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
{
169925774359ms my ( $longlist ) = @_;
1700 my %tmpHash;
1701
170236824.24ms $longlist =~ s/^\s+//;
# spent 4.24ms making 3682 calls to installer::scriptitems::CORE:subst, avg 1µs/call
170336827.05ms $longlist =~ s/\s+$//;
# spent 7.05ms making 3682 calls to installer::scriptitems::CORE:subst, avg 2µs/call
17043682157ms $longlist =~ s/\s*,\s*/,/g;
# spent 157ms making 3682 calls to installer::scriptitems::CORE:subst, avg 43µs/call
1705
1706 @tmpHash{split /,/, $longlist} = ();
1707368210.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
{
17222356671.84s my ($filesarrayref) = @_;
1723
1724 my @alldirectories = ();
1725 my %alldirectoryhash = ();
1726
1727 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
1732 for ( my $i = 0; $i <= $#{$filesarrayref}; $i++ )
1733 {
1734 my $onefile = ${$filesarrayref}[$i];
1735 my $destinationpath = $onefile->{'destination'};
173615895356ms installer::pathanalyzer::get_path_from_fullqualifiedname(\$destinationpath);
# spent 356ms making 15895 calls to installer::pathanalyzer::get_path_from_fullqualifiedname, avg 22µs/call
17373179065.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
1740251222491ms {
# 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
1741 if (!exists($alldirectoryhash{$destinationpath}))
1742 {
1743 my %directoryhash = ();
1744 $directoryhash{'HostName'} = $destinationpath;
1745 $directoryhash{'specificlanguage'} = $onefile->{'specificlanguage'};
1746 $directoryhash{'Dir'} = $onefile->{'Dir'};
1747 $directoryhash{'modules'} = $onefile->{'modules'}; # NEW, saving modules
1748
1749 $predefinedprogdir_added ||= $onefile->{'Dir'} eq "PREDEFINED_PROGDIR";
1750
1751 $alldirectoryhash{$destinationpath} = \%directoryhash;
1752 }
1753 else
1754 {
1755 # Adding the modules to the module list!
1756 $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
1764 if (! $predefinedprogdir_added )
1765 {
1766 my %directoryhash = ();
1767 $directoryhash{'HostName'} = "";
1768 $directoryhash{'specificlanguage'} = "";
1769 $directoryhash{'modules'} = ""; # ToDo?
1770 $directoryhash{'Dir'} = "PREDEFINED_PROGDIR";
1771
1772 push(@alldirectories, \%directoryhash);
1773 }
1774
1775 # Creating directory array
177613.26ms foreach my $destdir ( sort keys %alldirectoryhash )
# spent 3.26ms making 1 call to installer::scriptitems::CORE:sort
1777 {
17781834288ms $alldirectoryhash{$destdir}->{'modules'} = optimize_list($alldirectoryhash{$destdir}->{'modules'});
# spent 288ms making 1834 calls to installer::scriptitems::optimize_list, avg 157µs/call
1779 push(@alldirectories, $alldirectoryhash{$destdir});
1780 }
1781
1782 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
{
17911676134.4ms my ($directoryarrayref, $alldirectoryhash) = @_;
1792
1793 my $alreadyincluded = 0;
1794 my @alldirectories = ();
1795
1796 for ( my $i = 0; $i <= $#{$directoryarrayref}; $i++ )
1797 {
1798 my $onedir = ${$directoryarrayref}[$i];
1799 my $styles = "";
1800 $newdirincluded = 0;
1801
1802 if ( $onedir->{'Styles'} ) { $styles = $onedir->{'Styles'}; }
1803
18041972879µs if ( $styles =~ /\bCREATE\b/ )
# spent 879µs making 1972 calls to installer::scriptitems::CORE:match, avg 446ns/call
1805 {
1806 my $directoryname = "";
1807
1808 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
1811 $alreadyincluded = 0;
1812 if ( exists($alldirectoryhash->{$directoryname}) ) { $alreadyincluded = 1; }
1813
1814 if (!($alreadyincluded))
1815 {
1816 my %directoryhash = ();
1817 $directoryhash{'HostName'} = $directoryname;
1818 $directoryhash{'specificlanguage'} = $onedir->{'specificlanguage'};
1819 $directoryhash{'Dir'} = $onedir->{'gid'};
1820 $directoryhash{'Styles'} = $onedir->{'Styles'};
1821
1822 # saving also the modules
1823 if ( ! $onedir->{'modules'} ) { installer::exiter::exit_program("ERROR: No assigned modules found for directory $onedir->{'gid'}", "collect_directories_with_create_flag_from_directoryarray"); }
1824 $directoryhash{'modules'} = $onedir->{'modules'};
1825
1826 $alldirectoryhash->{$directoryname} = \%directoryhash;
1827 $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
18332890µ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 {
1835 $directoryname = $1;
1836
1837 $alreadyincluded = 0;
1838 if ( exists($alldirectoryhash->{$directoryname}) ) { $alreadyincluded = 1; }
1839
184064118µ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!
1858 $alldirectoryhash->{$directoryname}->{'modules'} = $alldirectoryhash->{$directoryname}->{'modules'} . "," . $onedir->{'modules'};
1859 }
1860 }
1861 }
1862 else
1863 {
1864 # Adding the modules to the module list!
1865 $alldirectoryhash->{$directoryname}->{'modules'} = $alldirectoryhash->{$directoryname}->{'modules'} . "," . $onedir->{'modules'};
1866
18672699µ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 {
1869 $directoryname = $1;
1870 # Adding the modules to the module list!
187158102µ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
1878 if (( ! $newdirincluded ) && ( $styles ne "" ))
1879 {
188012591µs $styles =~ s/\bWORKSTATION\b//;
# spent 91µs making 125 calls to installer::scriptitems::CORE:subst, avg 728ns/call
188112594µs $styles =~ s/\bCREATE\b//;
# spent 94µs making 125 calls to installer::scriptitems::CORE:subst, avg 749ns/call
1882
1883355371µ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 {
1885 my $directoryname = "";
1886 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
1889 if ( exists($alldirectoryhash->{$directoryname}) )
1890 {
1891 $alldirectoryhash->{$directoryname}->{'Styles'} = $styles;
1892 }
1893 }
1894 }
1895 }
1896
1897 # Creating directory array
189813.28ms foreach my $destdir ( sort keys %{$alldirectoryhash} )
# spent 3.28ms making 1 call to installer::scriptitems::CORE:sort
1899 {
1900184864.8ms $alldirectoryhash->{$destdir}->{'modules'} = optimize_list($alldirectoryhash->{$destdir}->{'modules'});
# spent 64.8ms making 1848 calls to installer::scriptitems::optimize_list, avg 35µs/call
1901 push(@alldirectories, $alldirectoryhash->{$destdir});
1902 }
1903
1904 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
{
1913515µs my ($linksarrayref, $filesarrayref) = @_;
1914
1915 my $infoline;
1916
1917 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
1948 $infoline = "\n";
1949 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
{
1958515µs my ($linksarrayref) = @_;
1959
1960 my $infoline;
1961
1962 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
1993 $infoline = "\n";
1994 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
{
2003414µs my ($itemarrayref) = @_;
2004
2005 my @newitemarray = ();
2006
2007 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
2022 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
{
2031212µ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
2039 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
{
20814987574.2ms my ($hash, $item, $id) = @_;
2082
2083 if (!defined $hash->{$item})
2084 {
2085 my @gids = ();
2086 $hash->{$item} = \@gids;
2087 }
2088 my $gid_list = $hash->{$item};
2089 push @{$gid_list}, $id;
2090 $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
{
20952993576.3ms my ($modulesref, $itemname) = @_;
2096
2097 my %module_lookup_table = ();
2098
2099 # build map of item names to list of respective module gids
2100 # containing these items
2101 for my $onemodule (@{$modulesref})
2102 {
2103 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)
2106 my $module_gids = $onemodule->{$itemname};
2107
2108 # prune outer brackets
210915286.50ms $module_gids =~ s|^\s*\(||g;
# spent 6.50ms making 1528 calls to installer::scriptitems::CORE:subst, avg 4µs/call
211015285.18ms $module_gids =~ s|\)\s*$||g;
# spent 5.18ms making 1528 calls to installer::scriptitems::CORE:subst, avg 3µs/call
2111 for my $id (split (/,/, $module_gids))
2112 {
2113 chomp $id;
2114955556.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
2118 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
{
21283156038.3ms my ($module_lookup_table, $modulesref, $itemgid, $itemname) = @_;
2129
2130 my $allmodules = "";
2131 my $haslanguagemodule = 0;
2132 my %foundmodules = ();
2133
2134 my $gid_list = $module_lookup_table->{lc($itemgid)};
2135
2136 for my $gid (@{$gid_list})
2137 {
2138 $foundmodules{$gid} = 1;
2139 $allmodules = $allmodules . "," . $gid;
2140 # Is this module a language module? This info should be stored at the file.
2141 if ( exists($installer::globals::alllangmodules{$gid}) ) { $haslanguagemodule = 1; }
2142 }
2143
21448201.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
2147 if ( $haslanguagemodule )
2148 {
2149668.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
2150 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
2153 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
{
21631012614.8ms my ($modulesref, $itemsref, $itemname) = @_;
2164
2165 my $infoline = "";
2166 my $languageassignmenterror = 0;
2167 my @languageassignmenterrors = ();
2168
21693151ms 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
2171 for my $oneitem (@{$itemsref})
2172 {
2173 my $itemgid = $oneitem->{'gid'};
2174
2175 my $styles = "";
2176 if ( $oneitem->{'Styles'} ) { $styles = $oneitem->{'Styles'}; }
2177244168µs if (( $itemname eq "Dirs" ) && ( ! ( $styles =~ /\bCREATE\b/ ))) { next; }
# spent 168µs making 244 calls to installer::scriptitems::CORE:match, avg 688ns/call
2178
2179 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
218682045.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
2188 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
2193 $oneitem->{'modules'} = $modulegids;
2194 $oneitem->{'haslanguagemodule'} = $haslanguagemodule;
2195
2196 # Important check: "ismultilingual" and "haslanguagemodule" must have the same value !
2197 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 }
2204 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
2213 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
{
2295941243.5ms my ($modulesref) = @_;
2296
2297 my @allparents = ();
2298
2299 my $found_root_module = 0;
2300
2301 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2302 {
2303 my $onefeature = ${$modulesref}[$i];
2304
2305 my $parentgid = "";
2306 if ( $onefeature->{'ParentID'} )
2307 {
2308 $parentgid = $onefeature->{'ParentID'};
2309 }
2310
2311 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
2321 if ( $parentgid eq "" )
2322 {
2323 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"); }
2324 $installer::globals::rootmodulegid = $onefeature->{'gid'};
2325 $found_root_module = 1;
2326 $infoline = "Setting Root Module: $installer::globals::rootmodulegid\n";
2327 push( @installer::globals::globallogfileinfo, $infoline);
2328 }
2329
2330 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
2334 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
{
2343602856.7ms my ($modulesref) = @_;
2344
2345143.4ms my $allparents = collect_all_parent_feature($modulesref);
2346
2347 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2348 {
2349 my $onefeature = ${$modulesref}[$i];
2350 my $gid = $onefeature->{'gid'};
2351
2352 # is this gid a parent?
2353
2354 if ( grep {$_ eq $gid} @{$allparents} )
2355 {
2356 $onefeature->{'has_children'} = 1;
2357 }
2358 else
2359 {
2360 $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
{
23721952234.5ms my ($modulesref) = @_;
2373
2374 # collecting all template modules
2375
2376 my %directaccess = ();
2377
2378 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2379 {
2380 my $onefeature = ${$modulesref}[$i];
2381 my $styles = "";
2382 if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
23831578844µ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
23861578730µs if ( $styles =~ /\bROOT_BRAND_PACKAGE\b/ )
# spent 730µs making 1578 calls to installer::scriptitems::CORE:match, avg 462ns/call
2387 {
2388 $installer::globals::rootbrandpackage = $onefeature->{'gid'};
2389 $installer::globals::rootbrandpackageset = 1;
2390 }
2391 }
2392
2393 # looking, where template modules are assigned
2394
2395 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2396 {
2397 my $onefeature = ${$modulesref}[$i];
2398 if ( $onefeature->{'Assigns'} )
2399 {
2400 my $templategid = $onefeature->{'Assigns'};
2401
2402 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
2409 my @items_at_modules = ("Files", "Dirs", "Unixlinks");
2410 for my $item (@items_at_modules)
2411 {
2412 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
{
2425789411.3ms my ($modulesref) = @_;
2426
2427 my @modules = ();
2428
2429 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2430 {
2431 my $onefeature = ${$modulesref}[$i];
2432 my $styles = "";
2433 if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
24341578880µs if ( $styles =~ /\bTEMPLATEMODULE\b/ ) { next; }
# spent 880µs making 1578 calls to installer::scriptitems::CORE:match, avg 557ns/call
2435
2436 push(@modules, $onefeature);
2437 }
2438
2439 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
{
244978320280ms my ($modulesref) = @_;
2450
2451 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2452 {
2453 my $onefeature = ${$modulesref}[$i];
2454 my $styles = "";
2455 if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
245615673.33ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 3.33ms making 1567 calls to installer::scriptitems::CORE:match, avg 2µs/call
2457 {
2458 if ( ! exists($onefeature->{'Language'}) ) { installer::exiter::exit_program("ERROR: \"$onefeature->{'gid'}\" has flag LANGUAGEMODULE, but does not know its language!", "collect_all_languagemodules"); }
2459 $installer::globals::alllangmodules{$onefeature->{'gid'}} = $onefeature->{'Language'};
2460 # Collecting also the english names, that are used for nsis unpack directory for language packs
2461 my $lang = $onefeature->{'Language'};
2462 my $name = "";
2463 foreach my $localkey ( keys %{$onefeature} )
2464 {
24656490029.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
{
2481213289365ms my ($modulesref) = @_;
2482
2483 for ( my $i = 0; $i <= $#{$modulesref}; $i++ )
2484 {
2485 my $onefeature = ${$modulesref}[$i];
2486 my $styles = "";
2487 if ( $onefeature->{'Styles'} ) { $styles = $onefeature->{'Styles'}; }
24883460154.6ms if ( $styles =~ /\bLANGUAGEMODULE\b/ )
# spent 54.6ms making 34601 calls to installer::scriptitems::CORE:match, avg 2µs/call
2489 {
2490 if ( ! exists($onefeature->{'Language'}) ) { installer::exiter::exit_program("ERROR: \"$onefeature->{'gid'}\" has flag LANGUAGEMODULE, but does not know its language!", "select_required_language_strings"); }
2491 my $lang = $onefeature->{'Language'};
2492
2493 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