Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/registry.pm |
Statements | Executed 19777828 statements in 41.8s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 13.6s | 114s | create_registry_table | installer::windows::registry::
139193 | 1 | 1 | 8.14s | 10.5s | get_registry_component_name | installer::windows::registry::
139193 | 1 | 1 | 7.53s | 9.29s | get_registry_identifier | installer::windows::registry::
4176008 | 31 | 1 | 4.51s | 4.51s | CORE:subst (opcode) | installer::windows::registry::
139193 | 1 | 1 | 2.84s | 52.2s | get_registry_value | installer::windows::registry::
139193 | 1 | 1 | 1.31s | 11.8s | get_registry_component | installer::windows::registry::
139193 | 1 | 1 | 1.18s | 24.3s | get_registry_key | installer::windows::registry::
139193 | 1 | 1 | 1.08s | 1.16s | get_registry_name | installer::windows::registry::
139193 | 1 | 1 | 940ms | 940ms | get_registry_root | installer::windows::registry::
1253173 | 10 | 1 | 687ms | 687ms | CORE:match (opcode) | installer::windows::registry::
109 | 1 | 1 | 17.7ms | 17.7ms | add_userregs_to_registry_table | installer::windows::registry::
1 | 1 | 1 | 376µs | 379µs | BEGIN@30 | installer::windows::registry::
1 | 1 | 1 | 16µs | 18µs | BEGIN@32 | installer::windows::registry::
1 | 1 | 1 | 14µs | 15µs | BEGIN@33 | installer::windows::registry::
1 | 1 | 1 | 14µs | 16µs | BEGIN@31 | installer::windows::registry::
0 | 0 | 0 | 0s | 0s | generate_new_short_registrycomponentname | installer::windows::registry::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | #************************************************************************* | ||||
2 | # | ||||
3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||||
4 | # | ||||
5 | # Copyright 2000, 2010 Oracle and/or its affiliates. | ||||
6 | # | ||||
7 | # OpenOffice.org - a multi-platform office productivity suite | ||||
8 | # | ||||
9 | # This file is part of OpenOffice.org. | ||||
10 | # | ||||
11 | # OpenOffice.org is free software: you can redistribute it and/or modify | ||||
12 | # it under the terms of the GNU Lesser General Public License version 3 | ||||
13 | # only, as published by the Free Software Foundation. | ||||
14 | # | ||||
15 | # OpenOffice.org is distributed in the hope that it will be useful, | ||||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
18 | # GNU Lesser General Public License version 3 for more details | ||||
19 | # (a copy is included in the LICENSE file that accompanied this code). | ||||
20 | # | ||||
21 | # You should have received a copy of the GNU Lesser General Public License | ||||
22 | # version 3 along with OpenOffice.org. If not, see | ||||
23 | # <http://www.openoffice.org/license.html> | ||||
24 | # for a copy of the LGPLv3 License. | ||||
25 | # | ||||
26 | #************************************************************************* | ||||
27 | |||||
28 | package installer::windows::registry; | ||||
29 | |||||
30 | 2 | 61µs | 2 | 382µs | # spent 379µs (376+3) within installer::windows::registry::BEGIN@30 which was called:
# once (376µs+3µs) by installer::BEGIN@79 at line 30 # spent 379µs making 1 call to installer::windows::registry::BEGIN@30
# spent 3µs making 1 call to UNIVERSAL::import |
31 | 2 | 54µs | 2 | 19µs | # spent 16µs (14+3) within installer::windows::registry::BEGIN@31 which was called:
# once (14µs+3µs) by installer::BEGIN@79 at line 31 # spent 16µs making 1 call to installer::windows::registry::BEGIN@31
# spent 3µs making 1 call to UNIVERSAL::import |
32 | 2 | 56µs | 2 | 21µs | # spent 18µs (16+2) within installer::windows::registry::BEGIN@32 which was called:
# once (16µs+2µs) by installer::BEGIN@79 at line 32 # spent 18µs making 1 call to installer::windows::registry::BEGIN@32
# spent 2µs making 1 call to UNIVERSAL::import |
33 | 2 | 3.81ms | 2 | 17µs | # spent 15µs (14+1) within installer::windows::registry::BEGIN@33 which was called:
# once (14µs+1µs) by installer::BEGIN@79 at line 33 # spent 15µs making 1 call to installer::windows::registry::BEGIN@33
# spent 2µs making 1 call to UNIVERSAL::import |
34 | |||||
35 | ##################################################### | ||||
36 | # Generating the component name from a registryitem | ||||
37 | ##################################################### | ||||
38 | |||||
39 | sub get_registry_component_name | ||||
40 | # spent 10.5s (8.14+2.35) within installer::windows::registry::get_registry_component_name which was called 139193 times, avg 75µs/call:
# 139193 times (8.14s+2.35s) by installer::windows::registry::get_registry_component at line 299, avg 75µs/call | ||||
41 | 139193 | 92.8ms | my ($registryref, $allvariables) = @_; | ||
42 | |||||
43 | # In this function exists the rule to create components from registryitems | ||||
44 | # Rule: | ||||
45 | # The componentname can be directly taken from the ModuleID. | ||||
46 | # All registryitems belonging to one module can get the same component. | ||||
47 | |||||
48 | 139193 | 68.2ms | my $componentname = ""; | ||
49 | 139193 | 58.8ms | my $isrootmodule = 0; | ||
50 | |||||
51 | 139193 | 127ms | if ( $registryref->{'ModuleID'} ) { $componentname = $registryref->{'ModuleID'}; } | ||
52 | |||||
53 | 139193 | 545ms | 139193 | 99.4ms | $componentname =~ s/\\/\_/g; # spent 99.4ms making 139193 calls to installer::windows::registry::CORE:subst, avg 714ns/call |
54 | 139193 | 460ms | 139193 | 70.7ms | $componentname =~ s/\//\_/g; # spent 70.7ms making 139193 calls to installer::windows::registry::CORE:subst, avg 508ns/call |
55 | 139193 | 463ms | 139193 | 69.6ms | $componentname =~ s/\-/\_/g; # spent 69.6ms making 139193 calls to installer::windows::registry::CORE:subst, avg 500ns/call |
56 | 139193 | 766ms | 139193 | 346ms | $componentname =~ s/\_\s*$//g; # spent 346ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call |
57 | |||||
58 | 139193 | 99.5ms | $componentname = lc($componentname); # componentnames always lowercase | ||
59 | |||||
60 | 139193 | 67.4ms | if ( $componentname eq "gid_module_root" ) { $isrootmodule = 1; } | ||
61 | |||||
62 | # Attention: Maximum length for the componentname is 72 | ||||
63 | |||||
64 | # identifying this component as registryitem component | ||||
65 | 139193 | 240ms | $componentname = "registry_" . $componentname; | ||
66 | |||||
67 | 139193 | 1.11s | 139193 | 645ms | $componentname =~ s/gid_module_/g_m_/g; # spent 645ms making 139193 calls to installer::windows::registry::CORE:subst, avg 5µs/call |
68 | 139193 | 549ms | 139193 | 142ms | $componentname =~ s/_optional_/_o_/g; # spent 142ms making 139193 calls to installer::windows::registry::CORE:subst, avg 1µs/call |
69 | 139193 | 482ms | 139193 | 91.1ms | $componentname =~ s/_javafilter_/_jf_/g; # spent 91.1ms making 139193 calls to installer::windows::registry::CORE:subst, avg 654ns/call |
70 | |||||
71 | # This componentname must be more specific | ||||
72 | 139193 | 71.9ms | my $addon = "_"; | ||
73 | 139193 | 144ms | if ( $allvariables->{'PRODUCTNAME'} ) { $addon = $addon . $allvariables->{'PRODUCTNAME'}; } | ||
74 | 139193 | 105ms | if ( $allvariables->{'PRODUCTVERSION'} ) { $addon = $addon . $allvariables->{'PRODUCTVERSION'}; } | ||
75 | 139193 | 82.9ms | $addon = lc($addon); | ||
76 | 139193 | 480ms | 139193 | 76.0ms | $addon =~ s/ //g; # spent 76.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 546ns/call |
77 | 139193 | 460ms | 139193 | 72.2ms | $addon =~ s/-//g; # spent 72.2ms making 139193 calls to installer::windows::registry::CORE:subst, avg 519ns/call |
78 | 139193 | 938ms | 139193 | 504ms | $addon =~ s/\.//g; # spent 504ms making 139193 calls to installer::windows::registry::CORE:subst, avg 4µs/call |
79 | |||||
80 | 139193 | 72.4ms | my $styles = ""; | ||
81 | 139193 | 95.6ms | if ( $registryref->{'Styles'} ) { $styles = $registryref->{'Styles'}; } | ||
82 | |||||
83 | # Layer links must have unique Component GUID for all products. This is necessary, because only the | ||||
84 | # uninstallation of the last product has to delete registry keys. | ||||
85 | 139193 | 488ms | 139193 | 67.6ms | if ( $styles =~ /\bLAYER_REGISTRY\b/ ) # spent 67.6ms making 139193 calls to installer::windows::registry::CORE:match, avg 486ns/call |
86 | { | ||||
87 | 218 | 252µs | $componentname = "g_m_root_registry_layer_ooo_reglayer"; | ||
88 | # Styles USE_URELAYERVERSION, USE_PRODUCTVERSION | ||||
89 | 218 | 1.23ms | 218 | 368µs | if ( $styles =~ /\bUSE_URELAYERVERSION\b/ ) { $addon = "_ure_" . $allvariables->{'URELAYERVERSION'}; } # spent 368µs making 218 calls to installer::windows::registry::CORE:match, avg 2µs/call |
90 | 218 | 1.15ms | 218 | 347µs | if ( $styles =~ /\bUSE_PRODUCTVERSION\b/ ) { $addon = "_basis_" . $allvariables->{'PRODUCTVERSION'}; } # spent 347µs making 218 calls to installer::windows::registry::CORE:match, avg 2µs/call |
91 | 218 | 1.26ms | 218 | 480µs | $addon =~ s/\.//g; # spent 480µs making 218 calls to installer::windows::registry::CORE:subst, avg 2µs/call |
92 | } | ||||
93 | |||||
94 | 139193 | 137ms | $componentname = $componentname . $addon; | ||
95 | |||||
96 | 139193 | 856ms | 278386 | 113ms | if (( $styles =~ /\bLANGUAGEPACK\b/ ) && ( $installer::globals::languagepack )) { $componentname = $componentname . "_lang"; } # spent 113ms making 278386 calls to installer::windows::registry::CORE:match, avg 405ns/call |
97 | elsif (( $styles =~ /\bHELPPACK\b/ ) && ( $installer::globals::helppack )) { $componentname = $componentname . "_help"; } | ||||
98 | 139193 | 453ms | 139193 | 57.2ms | if ( $styles =~ /\bALWAYS_REQUIRED\b/ ) { $componentname = $componentname . "_forced"; } # spent 57.2ms making 139193 calls to installer::windows::registry::CORE:match, avg 411ns/call |
99 | |||||
100 | # Attention: Maximum length for the componentname is 72 | ||||
101 | # %installer::globals::allregistrycomponents_in_this_database_ : resetted for each database | ||||
102 | # %installer::globals::allregistrycomponents_ : not resetted for each database | ||||
103 | # Component strings must be unique for the complete product, because they are used for | ||||
104 | # the creation of the globally unique identifier. | ||||
105 | |||||
106 | 139193 | 75.4ms | my $fullname = $componentname; # This can be longer than 72 | ||
107 | |||||
108 | 139193 | 211ms | if (( exists($installer::globals::allregistrycomponents_{$fullname}) ) && ( ! exists($installer::globals::allregistrycomponents_in_this_database_{$fullname}) )) | ||
109 | { | ||||
110 | # This is not allowed: One component cannot be installed with different packages. | ||||
111 | installer::exiter::exit_program("ERROR: Windows registry component \"$fullname\" is already included into another package. This is not allowed.", "get_registry_component_name"); | ||||
112 | } | ||||
113 | |||||
114 | 139193 | 182ms | if ( exists($installer::globals::allregistrycomponents_{$fullname}) ) | ||
115 | { | ||||
116 | $componentname = $installer::globals::allregistrycomponents_{$fullname}; | ||||
117 | } | ||||
118 | else | ||||
119 | { | ||||
120 | 45 | 33µs | if ( length($componentname) > 60 ) | ||
121 | { | ||||
122 | $componentname = generate_new_short_registrycomponentname($componentname); # This has to be unique for the complete product, not only one package | ||||
123 | } | ||||
124 | |||||
125 | 45 | 112µs | $installer::globals::allregistrycomponents_{$fullname} = $componentname; | ||
126 | 45 | 62µs | $installer::globals::allregistrycomponents_in_this_database_{$fullname} = 1; | ||
127 | } | ||||
128 | |||||
129 | 147368 | 62.4ms | if ( $isrootmodule ) { $installer::globals::registryrootcomponent = $componentname; } | ||
130 | |||||
131 | 139193 | 729ms | return $componentname; | ||
132 | } | ||||
133 | |||||
134 | ######################################################### | ||||
135 | # Create a shorter version of a long component name, | ||||
136 | # because maximum length in msi database is 72. | ||||
137 | # Attention: In multi msi installation sets, the short | ||||
138 | # names have to be unique over all packages, because | ||||
139 | # this string is used to create the globally unique id | ||||
140 | # -> no resetting of | ||||
141 | # %installer::globals::allshortregistrycomponents | ||||
142 | # after a package was created. | ||||
143 | ######################################################### | ||||
144 | |||||
145 | sub generate_new_short_registrycomponentname | ||||
146 | { | ||||
147 | my ($componentname) = @_; | ||||
148 | |||||
149 | my $shortcomponentname = ""; | ||||
150 | my $counter = 1; | ||||
151 | |||||
152 | my $startversion = substr($componentname, 0, 60); # taking only the first 60 characters | ||||
153 | $startversion = $startversion . "_"; | ||||
154 | |||||
155 | $shortcomponentname = $startversion . $counter; | ||||
156 | |||||
157 | while ( exists($installer::globals::allshortregistrycomponents{$shortcomponentname}) ) | ||||
158 | { | ||||
159 | $counter++; | ||||
160 | $shortcomponentname = $startversion . $counter; | ||||
161 | } | ||||
162 | |||||
163 | $installer::globals::allshortregistrycomponents{$shortcomponentname} = 1; | ||||
164 | |||||
165 | return $shortcomponentname; | ||||
166 | } | ||||
167 | |||||
168 | ############################################################## | ||||
169 | # Returning identifier for registry table. | ||||
170 | ############################################################## | ||||
171 | |||||
172 | sub get_registry_identifier | ||||
173 | # spent 9.29s (7.53+1.76) within installer::windows::registry::get_registry_identifier which was called 139193 times, avg 67µs/call:
# 139193 times (7.53s+1.76s) by installer::windows::registry::create_registry_table at line 370, avg 67µs/call | ||||
174 | 139193 | 96.8ms | my ($registry) = @_; | ||
175 | |||||
176 | 139193 | 69.3ms | my $identifier = ""; | ||
177 | |||||
178 | 139193 | 152ms | if ( $registry->{'gid'} ) { $identifier = $registry->{'gid'}; } | ||
179 | |||||
180 | 139193 | 101ms | $identifier = lc($identifier); # always lower case | ||
181 | |||||
182 | # Attention: Maximum length is 72 | ||||
183 | |||||
184 | 139193 | 882ms | 139193 | 368ms | $identifier =~ s/gid_regitem_/g_r_/; # spent 368ms making 139193 calls to installer::windows::registry::CORE:subst, avg 3µs/call |
185 | 139193 | 511ms | 139193 | 100ms | $identifier =~ s/_soffice_/_s_/; # spent 100ms making 139193 calls to installer::windows::registry::CORE:subst, avg 722ns/call |
186 | 139193 | 517ms | 139193 | 110ms | $identifier =~ s/_clsid_/_c_/; # spent 110ms making 139193 calls to installer::windows::registry::CORE:subst, avg 789ns/call |
187 | 139193 | 480ms | 139193 | 80.8ms | $identifier =~ s/_currentversion_/_cv_/; # spent 80.8ms making 139193 calls to installer::windows::registry::CORE:subst, avg 581ns/call |
188 | 139193 | 475ms | 139193 | 80.9ms | $identifier =~ s/_microsoft_/_ms_/; # spent 80.9ms making 139193 calls to installer::windows::registry::CORE:subst, avg 582ns/call |
189 | 139193 | 489ms | 139193 | 91.0ms | $identifier =~ s/_manufacturer_/_mf_/; # spent 91.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 653ns/call |
190 | 139193 | 482ms | 139193 | 88.0ms | $identifier =~ s/_productname_/_pn_/; # spent 88.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 632ns/call |
191 | 139193 | 475ms | 139193 | 85.6ms | $identifier =~ s/_productversion_/_pv_/; # spent 85.6ms making 139193 calls to installer::windows::registry::CORE:subst, avg 615ns/call |
192 | 139193 | 471ms | 139193 | 73.8ms | $identifier =~ s/_staroffice_/_so_/; # spent 73.8ms making 139193 calls to installer::windows::registry::CORE:subst, avg 530ns/call |
193 | 139193 | 496ms | 139193 | 96.3ms | $identifier =~ s/_software_/_sw_/; # spent 96.3ms making 139193 calls to installer::windows::registry::CORE:subst, avg 692ns/call |
194 | 139193 | 471ms | 139193 | 80.0ms | $identifier =~ s/_capabilities_/_cap_/; # spent 80.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 575ns/call |
195 | 139193 | 473ms | 139193 | 70.5ms | $identifier =~ s/_classpath_/_cp_/; # spent 70.5ms making 139193 calls to installer::windows::registry::CORE:subst, avg 507ns/call |
196 | 139193 | 459ms | 139193 | 71.0ms | $identifier =~ s/_extension_/_ex_/; # spent 71.0ms making 139193 calls to installer::windows::registry::CORE:subst, avg 510ns/call |
197 | 139193 | 471ms | 139193 | 77.7ms | $identifier =~ s/_fileassociations_/_fa_/; # spent 77.7ms making 139193 calls to installer::windows::registry::CORE:subst, avg 558ns/call |
198 | 139193 | 468ms | 139193 | 70.9ms | $identifier =~ s/_propertysheethandlers_/_psh_/; # spent 70.9ms making 139193 calls to installer::windows::registry::CORE:subst, avg 509ns/call |
199 | 139193 | 627ms | 139193 | 215ms | $identifier =~ s/__/_/g; # spent 215ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call |
200 | |||||
201 | # Saving this in the registry collector | ||||
202 | |||||
203 | 139193 | 131ms | $registry->{'uniquename'} = $identifier; | ||
204 | |||||
205 | 139193 | 740ms | return $identifier; | ||
206 | } | ||||
207 | |||||
208 | ################################################################## | ||||
209 | # Returning root value for registry table. | ||||
210 | ################################################################## | ||||
211 | |||||
212 | sub get_registry_root | ||||
213 | # spent 940ms within installer::windows::registry::get_registry_root which was called 139193 times, avg 7µs/call:
# 139193 times (940ms+0s) by installer::windows::registry::create_registry_table at line 371, avg 7µs/call | ||||
214 | 139193 | 109ms | my ($registry) = @_; | ||
215 | |||||
216 | 139193 | 62.7ms | my $rootvalue = 0; # Default: Parent is KKEY_CLASSES_ROOT | ||
217 | 139193 | 67.1ms | my $scproot = ""; | ||
218 | |||||
219 | 139193 | 136ms | if ( $registry->{'ParentID'} ) { $scproot = $registry->{'ParentID'}; } | ||
220 | |||||
221 | 139193 | 72.2ms | if ( $scproot eq "PREDEFINED_HKEY_LOCAL_MACHINE" ) { $rootvalue = -1; } | ||
222 | |||||
223 | 139193 | 78.6ms | if ( $scproot eq "PREDEFINED_HKEY_CLASSES_ROOT" ) { $rootvalue = 0; } | ||
224 | |||||
225 | 139193 | 55.1ms | if ( $scproot eq "PREDEFINED_HKEY_CURRENT_USER_ONLY" ) { $rootvalue = 1; } | ||
226 | |||||
227 | 139193 | 49.7ms | if ( $scproot eq "PREDEFINED_HKEY_LOCAL_MACHINE_ONLY" ) { $rootvalue = 2; } | ||
228 | |||||
229 | 139193 | 581ms | return $rootvalue; | ||
230 | } | ||||
231 | |||||
232 | ############################################################## | ||||
233 | # Returning key for registry table. | ||||
234 | ############################################################## | ||||
235 | |||||
236 | sub get_registry_key | ||||
237 | # spent 24.3s (1.18+23.2) within installer::windows::registry::get_registry_key which was called 139193 times, avg 175µs/call:
# 139193 times (1.18s+23.2s) by installer::windows::registry::create_registry_table at line 372, avg 175µs/call | ||||
238 | 139193 | 111ms | my ($registry, $allvariableshashref) = @_; | ||
239 | |||||
240 | 139193 | 70.5ms | my $key = ""; | ||
241 | |||||
242 | 139193 | 126ms | if ( $registry->{'Subkey'} ) { $key = $registry->{'Subkey'}; } | ||
243 | |||||
244 | 139193 | 601ms | 148785 | 23.2s | if ( $key =~ /\%/ ) { $key = installer::worker::replace_variables_in_string($key, $allvariableshashref); } # spent 23.0s making 9592 calls to installer::worker::replace_variables_in_string, avg 2.40ms/call
# spent 129ms making 139193 calls to installer::windows::registry::CORE:match, avg 927ns/call |
245 | |||||
246 | 139193 | 623ms | return $key; | ||
247 | } | ||||
248 | |||||
249 | ############################################################## | ||||
250 | # Returning name for registry table. | ||||
251 | ############################################################## | ||||
252 | |||||
253 | sub get_registry_name | ||||
254 | # spent 1.16s (1.08+77.9ms) within installer::windows::registry::get_registry_name which was called 139193 times, avg 8µs/call:
# 139193 times (1.08s+77.9ms) by installer::windows::registry::create_registry_table at line 373, avg 8µs/call | ||||
255 | 139193 | 114ms | my ($registry, $allvariableshashref) = @_; | ||
256 | |||||
257 | 139193 | 66.5ms | my $name = ""; | ||
258 | |||||
259 | 139193 | 105ms | if ( $registry->{'Name'} ) { $name = $registry->{'Name'}; } | ||
260 | |||||
261 | 139193 | 506ms | 139193 | 77.9ms | if ( $name =~ /\%/ ) { $name = installer::worker::replace_variables_in_string($name, $allvariableshashref); } # spent 77.9ms making 139193 calls to installer::windows::registry::CORE:match, avg 560ns/call |
262 | |||||
263 | 139193 | 611ms | return $name; | ||
264 | } | ||||
265 | |||||
266 | ############################################################## | ||||
267 | # Returning value for registry table. | ||||
268 | ############################################################## | ||||
269 | |||||
270 | sub get_registry_value | ||||
271 | # spent 52.2s (2.84+49.4) within installer::windows::registry::get_registry_value which was called 139193 times, avg 375µs/call:
# 139193 times (2.84s+49.4s) by installer::windows::registry::create_registry_table at line 374, avg 375µs/call | ||||
272 | 139193 | 110ms | my ($registry, $allvariableshashref) = @_; | ||
273 | |||||
274 | 139193 | 63.5ms | my $value = ""; | ||
275 | |||||
276 | 139193 | 140ms | if ( $registry->{'Value'} ) { $value = $registry->{'Value'}; } | ||
277 | |||||
278 | 139193 | 698ms | 139193 | 252ms | $value =~ s/\\\"/\"/g; # no more masquerading of '"' # spent 252ms making 139193 calls to installer::windows::registry::CORE:subst, avg 2µs/call |
279 | 139193 | 481ms | 139193 | 89.1ms | $value =~ s/\\\\\s*$/\\/g; # making "\\" at end of value to "\" # spent 89.1ms making 139193 calls to installer::windows::registry::CORE:subst, avg 640ns/call |
280 | 139193 | 577ms | 139193 | 182ms | $value =~ s/\<progpath\>/\[INSTALLLOCATION\]/; # spent 182ms making 139193 calls to installer::windows::registry::CORE:subst, avg 1µs/call |
281 | 139193 | 504ms | 139193 | 114ms | $value =~ s/\[INSTALLLOCATION\]\\/\[INSTALLLOCATION\]/; # removing "\" after "[INSTALLLOCATION]" # spent 114ms making 139193 calls to installer::windows::registry::CORE:subst, avg 818ns/call |
282 | |||||
283 | 139193 | 575ms | 159467 | 48.7s | if ( $value =~ /\%/ ) { $value = installer::worker::replace_variables_in_string($value, $allvariableshashref); } # spent 48.6s making 20274 calls to installer::worker::replace_variables_in_string, avg 2.40ms/call
# spent 111ms making 139193 calls to installer::windows::registry::CORE:match, avg 796ns/call |
284 | |||||
285 | 139193 | 644ms | return $value; | ||
286 | } | ||||
287 | |||||
288 | ############################################################## | ||||
289 | # Returning component for registry table. | ||||
290 | ############################################################## | ||||
291 | |||||
292 | sub get_registry_component | ||||
293 | # spent 11.8s (1.31+10.5) within installer::windows::registry::get_registry_component which was called 139193 times, avg 85µs/call:
# 139193 times (1.31s+10.5s) by installer::windows::registry::create_registry_table at line 375, avg 85µs/call | ||||
294 | 139193 | 117ms | my ($registry, $allvariables) = @_; | ||
295 | |||||
296 | # All registry items belonging to one module can | ||||
297 | # be included into one component | ||||
298 | |||||
299 | 139193 | 400ms | 139193 | 10.5s | my $componentname = get_registry_component_name($registry, $allvariables); # spent 10.5s making 139193 calls to installer::windows::registry::get_registry_component_name, avg 75µs/call |
300 | |||||
301 | # saving componentname in the registryitem collector | ||||
302 | |||||
303 | 139193 | 167ms | $registry->{'componentname'} = $componentname; | ||
304 | |||||
305 | 139193 | 596ms | return $componentname; | ||
306 | } | ||||
307 | |||||
308 | ###################################################### | ||||
309 | # Adding the content of | ||||
310 | # @installer::globals::userregistrycollector | ||||
311 | # to the registry table. The content was collected | ||||
312 | # in create_files_table() in file.pm. | ||||
313 | ###################################################### | ||||
314 | |||||
315 | sub add_userregs_to_registry_table | ||||
316 | # spent 17.7ms within installer::windows::registry::add_userregs_to_registry_table which was called 109 times, avg 162µs/call:
# 109 times (17.7ms+0s) by installer::windows::registry::create_registry_table at line 416, avg 162µs/call | ||||
317 | 109 | 162µs | my ( $registrytable, $allvariables ) = @_; | ||
318 | |||||
319 | 109 | 1.99ms | for ( my $i = 0; $i <= $#installer::globals::userregistrycollector; $i++ ) | ||
320 | { | ||||
321 | 872 | 721µs | my $onefile = $installer::globals::userregistrycollector[$i]; | ||
322 | |||||
323 | 872 | 476µs | my %registry = (); | ||
324 | |||||
325 | 872 | 1.74ms | $registry{'Registry'} = $onefile->{'userregkeypath'}; | ||
326 | 872 | 863µs | $registry{'Root'} = "1"; # always HKCU | ||
327 | 872 | 1.79ms | $registry{'Key'} = "Software\\$allvariables->{'MANUFACTURER'}\\$allvariables->{'PRODUCTNAME'} $allvariables->{'PRODUCTVERSION'}\\"; | ||
328 | 872 | 1.33ms | if ( $onefile->{'needs_user_registry_key'} ) { $registry{'Key'} = $registry{'Key'} . "StartMenu"; } | ||
329 | 872 | 1.61ms | $registry{'Name'} = $onefile->{'Name'}; | ||
330 | 872 | 859µs | $registry{'Value'} = "1"; | ||
331 | 872 | 1.45ms | $registry{'Component_'} = $onefile->{'componentname'}; | ||
332 | |||||
333 | 872 | 1.90ms | my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t" | ||
334 | . $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n"; | ||||
335 | |||||
336 | 872 | 3.10ms | push(@{$registrytable}, $oneline); | ||
337 | } | ||||
338 | } | ||||
339 | |||||
340 | ###################################################### | ||||
341 | # Creating the file Registry.idt dynamically | ||||
342 | # Content: | ||||
343 | # Registry Root Key Name Value Component_ | ||||
344 | ###################################################### | ||||
345 | |||||
346 | sub create_registry_table | ||||
347 | # spent 114s (13.6+100) within installer::windows::registry::create_registry_table which was called:
# once (13.6s+100s) by installer::run at line 1500 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
348 | 1 | 7µs | my ($registryref, $allregistrycomponentsref, $basedir, $languagesarrayref, $allvariableshashref) = @_; | ||
349 | |||||
350 | 1 | 462µs | for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ ) | ||
351 | { | ||||
352 | 109 | 291µs | my $onelanguage = ${$languagesarrayref}[$m]; | ||
353 | |||||
354 | 109 | 202µs | my @registrytable = (); | ||
355 | |||||
356 | 109 | 845µs | 109 | 3.08ms | installer::windows::idtglobal::write_idt_header(\@registrytable, "registry"); # spent 3.08ms making 109 calls to installer::windows::idtglobal::write_idt_header, avg 28µs/call |
357 | |||||
358 | 109 | 1.31s | for ( my $i = 0; $i <= $#{$registryref}; $i++ ) | ||
359 | { | ||||
360 | 1940309 | 1.12s | my $oneregistry = ${$registryref}[$i]; | ||
361 | |||||
362 | # Controlling the language! | ||||
363 | # Only language independent folderitems or folderitems with the correct language | ||||
364 | # will be included into the table | ||||
365 | |||||
366 | 3741425 | 3.07s | if (! (!(( $oneregistry->{'ismultilingual'} )) || ( $oneregistry->{'specificlanguage'} eq $onelanguage )) ) { next; } | ||
367 | |||||
368 | 139193 | 91.0ms | my %registry = (); | ||
369 | |||||
370 | 139193 | 454ms | 139193 | 9.29s | $registry{'Registry'} = get_registry_identifier($oneregistry); # spent 9.29s making 139193 calls to installer::windows::registry::get_registry_identifier, avg 67µs/call |
371 | 139193 | 388ms | 139193 | 940ms | $registry{'Root'} = get_registry_root($oneregistry); # spent 940ms making 139193 calls to installer::windows::registry::get_registry_root, avg 7µs/call |
372 | 139193 | 403ms | 139193 | 24.3s | $registry{'Key'} = get_registry_key($oneregistry, $allvariableshashref); # spent 24.3s making 139193 calls to installer::windows::registry::get_registry_key, avg 175µs/call |
373 | 139193 | 429ms | 139193 | 1.16s | $registry{'Name'} = get_registry_name($oneregistry, $allvariableshashref); # spent 1.16s making 139193 calls to installer::windows::registry::get_registry_name, avg 8µs/call |
374 | 139193 | 429ms | 139193 | 52.2s | $registry{'Value'} = get_registry_value($oneregistry, $allvariableshashref); # spent 52.2s making 139193 calls to installer::windows::registry::get_registry_value, avg 375µs/call |
375 | 139193 | 429ms | 139193 | 11.8s | $registry{'Component_'} = get_registry_component($oneregistry, $allvariableshashref); # spent 11.8s making 139193 calls to installer::windows::registry::get_registry_component, avg 85µs/call |
376 | |||||
377 | # Collecting all components | ||||
378 | 139193 | 1.40s | if (! grep {$_ eq $registry{'Component_'}} @{$allregistrycomponentsref}) | ||
379 | { | ||||
380 | push(@{$allregistrycomponentsref}, $registry{'Component_'}); | ||||
381 | } | ||||
382 | |||||
383 | # Collecting all components with DONT_DELETE style | ||||
384 | 139193 | 70.2ms | my $style = ""; | ||
385 | 139193 | 79.4ms | if ( $oneregistry->{'Styles'} ) { $style = $oneregistry->{'Styles'}; } | ||
386 | 139193 | 538ms | 139193 | 75.0ms | if ( $style =~ /\bDONT_DELETE\b/ ) { $installer::globals::dontdeletecomponents{$registry{'Component_'}} = 1; } # spent 75.0ms making 139193 calls to installer::windows::registry::CORE:match, avg 539ns/call |
387 | |||||
388 | # Collecting all registry components with ALWAYS_REQUIRED style | ||||
389 | 139193 | 752ms | 139193 | 56.0ms | if ( ! ( $style =~ /\bALWAYS_REQUIRED\b/ )) # spent 56.0ms making 139193 calls to installer::windows::registry::CORE:match, avg 403ns/call |
390 | { | ||||
391 | # Setting a component condition for unforced registry components! | ||||
392 | # Only write into registry, if WRITE_REGISTRY is set. | ||||
393 | if ( $oneregistry->{'ComponentCondition'} ) { $oneregistry->{'ComponentCondition'} = "(" . $oneregistry->{'ComponentCondition'} . ") AND (WRITE_REGISTRY=1)"; } | ||||
394 | 17617 | 25.5ms | else { $oneregistry->{'ComponentCondition'} = "WRITE_REGISTRY=1"; } | ||
395 | } | ||||
396 | |||||
397 | # Collecting all component conditions | ||||
398 | 139193 | 168ms | if ( $oneregistry->{'ComponentCondition'} ) | ||
399 | { | ||||
400 | if ( ! exists($installer::globals::componentcondition{$registry{'Component_'}})) | ||||
401 | { | ||||
402 | $installer::globals::componentcondition{$registry{'Component_'}} = $oneregistry->{'ComponentCondition'}; | ||||
403 | } | ||||
404 | } | ||||
405 | |||||
406 | 139193 | 436ms | my $oneline = $registry{'Registry'} . "\t" . $registry{'Root'} . "\t" . $registry{'Key'} . "\t" | ||
407 | . $registry{'Name'} . "\t" . $registry{'Value'} . "\t" . $registry{'Component_'} . "\n"; | ||||
408 | |||||
409 | 139193 | 606ms | push(@registrytable, $oneline); | ||
410 | } | ||||
411 | |||||
412 | # If there are added user registry keys for files collected in | ||||
413 | # @installer::globals::userregistrycollector (file.pm), then | ||||
414 | # this registry keys have to be added now. | ||||
415 | |||||
416 | 109 | 591µs | 109 | 17.7ms | if ( $installer::globals::addeduserregitrykeys ) { add_userregs_to_registry_table(\@registrytable, $allvariableshashref); } # spent 17.7ms making 109 calls to installer::windows::registry::add_userregs_to_registry_table, avg 162µs/call |
417 | |||||
418 | # Saving the file | ||||
419 | |||||
420 | 109 | 324µs | my $registrytablename = $basedir . $installer::globals::separator . "Registry.idt" . "." . $onelanguage; | ||
421 | 109 | 642µs | 109 | 234ms | installer::files::save_file($registrytablename ,\@registrytable); # spent 234ms making 109 calls to installer::files::save_file, avg 2.15ms/call |
422 | 109 | 383µs | my $infoline = "Created idt file: $registrytablename\n"; | ||
423 | 109 | 51.7ms | push(@installer::globals::logfileinfo, $infoline); | ||
424 | } | ||||
425 | } | ||||
426 | |||||
427 | 1 | 7µs | 1; | ||
# spent 687ms within installer::windows::registry::CORE:match which was called 1253173 times, avg 548ns/call:
# 278386 times (113ms+0s) by installer::windows::registry::get_registry_component_name at line 96, avg 405ns/call
# 139193 times (129ms+0s) by installer::windows::registry::get_registry_key at line 244, avg 927ns/call
# 139193 times (111ms+0s) by installer::windows::registry::get_registry_value at line 283, avg 796ns/call
# 139193 times (77.9ms+0s) by installer::windows::registry::get_registry_name at line 261, avg 560ns/call
# 139193 times (75.0ms+0s) by installer::windows::registry::create_registry_table at line 386, avg 539ns/call
# 139193 times (67.6ms+0s) by installer::windows::registry::get_registry_component_name at line 85, avg 486ns/call
# 139193 times (57.2ms+0s) by installer::windows::registry::get_registry_component_name at line 98, avg 411ns/call
# 139193 times (56.0ms+0s) by installer::windows::registry::create_registry_table at line 389, avg 403ns/call
# 218 times (368µs+0s) by installer::windows::registry::get_registry_component_name at line 89, avg 2µs/call
# 218 times (347µs+0s) by installer::windows::registry::get_registry_component_name at line 90, avg 2µs/call | |||||
# spent 4.51s within installer::windows::registry::CORE:subst which was called 4176008 times, avg 1µs/call:
# 139193 times (645ms+0s) by installer::windows::registry::get_registry_component_name at line 67, avg 5µs/call
# 139193 times (504ms+0s) by installer::windows::registry::get_registry_component_name at line 78, avg 4µs/call
# 139193 times (368ms+0s) by installer::windows::registry::get_registry_identifier at line 184, avg 3µs/call
# 139193 times (346ms+0s) by installer::windows::registry::get_registry_component_name at line 56, avg 2µs/call
# 139193 times (252ms+0s) by installer::windows::registry::get_registry_value at line 278, avg 2µs/call
# 139193 times (215ms+0s) by installer::windows::registry::get_registry_identifier at line 199, avg 2µs/call
# 139193 times (182ms+0s) by installer::windows::registry::get_registry_value at line 280, avg 1µs/call
# 139193 times (142ms+0s) by installer::windows::registry::get_registry_component_name at line 68, avg 1µs/call
# 139193 times (114ms+0s) by installer::windows::registry::get_registry_value at line 281, avg 818ns/call
# 139193 times (110ms+0s) by installer::windows::registry::get_registry_identifier at line 186, avg 789ns/call
# 139193 times (100ms+0s) by installer::windows::registry::get_registry_identifier at line 185, avg 722ns/call
# 139193 times (99.4ms+0s) by installer::windows::registry::get_registry_component_name at line 53, avg 714ns/call
# 139193 times (96.3ms+0s) by installer::windows::registry::get_registry_identifier at line 193, avg 692ns/call
# 139193 times (91.1ms+0s) by installer::windows::registry::get_registry_component_name at line 69, avg 654ns/call
# 139193 times (91.0ms+0s) by installer::windows::registry::get_registry_identifier at line 189, avg 653ns/call
# 139193 times (89.1ms+0s) by installer::windows::registry::get_registry_value at line 279, avg 640ns/call
# 139193 times (88.0ms+0s) by installer::windows::registry::get_registry_identifier at line 190, avg 632ns/call
# 139193 times (85.6ms+0s) by installer::windows::registry::get_registry_identifier at line 191, avg 615ns/call
# 139193 times (80.9ms+0s) by installer::windows::registry::get_registry_identifier at line 188, avg 582ns/call
# 139193 times (80.8ms+0s) by installer::windows::registry::get_registry_identifier at line 187, avg 581ns/call
# 139193 times (80.0ms+0s) by installer::windows::registry::get_registry_identifier at line 194, avg 575ns/call
# 139193 times (77.7ms+0s) by installer::windows::registry::get_registry_identifier at line 197, avg 558ns/call
# 139193 times (76.0ms+0s) by installer::windows::registry::get_registry_component_name at line 76, avg 546ns/call
# 139193 times (73.8ms+0s) by installer::windows::registry::get_registry_identifier at line 192, avg 530ns/call
# 139193 times (72.2ms+0s) by installer::windows::registry::get_registry_component_name at line 77, avg 519ns/call
# 139193 times (71.0ms+0s) by installer::windows::registry::get_registry_identifier at line 196, avg 510ns/call
# 139193 times (70.9ms+0s) by installer::windows::registry::get_registry_identifier at line 198, avg 509ns/call
# 139193 times (70.7ms+0s) by installer::windows::registry::get_registry_component_name at line 54, avg 508ns/call
# 139193 times (70.5ms+0s) by installer::windows::registry::get_registry_identifier at line 195, avg 507ns/call
# 139193 times (69.6ms+0s) by installer::windows::registry::get_registry_component_name at line 55, avg 500ns/call
# 218 times (480µs+0s) by installer::windows::registry::get_registry_component_name at line 91, avg 2µs/call |