| Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/windows/assembly.pm |
| Statements | Executed 480967 statements in 1.30s |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 53379 | 2 | 1 | 706ms | 706ms | installer::windows::assembly::CORE:match (opcode) |
| 1 | 1 | 1 | 585ms | 1.33s | installer::windows::assembly::add_assembly_condition_into_component_table |
| 1 | 1 | 1 | 18.0ms | 18.7ms | installer::windows::assembly::BEGIN@33 |
| 1 | 1 | 1 | 449µs | 168ms | installer::windows::assembly::create_msiassembly_table |
| 1 | 1 | 1 | 405µs | 409µs | installer::windows::assembly::BEGIN@30 |
| 1 | 1 | 1 | 313µs | 1.06ms | installer::windows::assembly::create_msiassemblyname_table |
| 30 | 3 | 1 | 224µs | 224µs | installer::windows::assembly::get_msiassembly_component |
| 10 | 1 | 1 | 158µs | 554µs | installer::windows::assembly::get_msiassembly_feature |
| 10 | 1 | 1 | 58µs | 58µs | installer::windows::assembly::get_msiassembly_attributes |
| 10 | 1 | 1 | 55µs | 55µs | installer::windows::assembly::get_msiassembly_filemanifest |
| 10 | 1 | 1 | 40µs | 40µs | installer::windows::assembly::get_msiassembly_fileapplication |
| 1 | 1 | 1 | 16µs | 18µs | installer::windows::assembly::BEGIN@31 |
| 1 | 1 | 1 | 15µs | 16µs | installer::windows::assembly::BEGIN@32 |
| 0 | 0 | 0 | 0s | 0s | installer::windows::assembly::get_msiassembly_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 | |||||
| 28 | package installer::windows::assembly; | ||||
| 29 | |||||
| 30 | 2 | 68µs | 2 | 413µs | # spent 409µs (405+4) within installer::windows::assembly::BEGIN@30 which was called:
# once (405µs+4µs) by installer::BEGIN@61 at line 30 # spent 409µs making 1 call to installer::windows::assembly::BEGIN@30
# spent 4µs making 1 call to UNIVERSAL::import |
| 31 | 2 | 59µs | 2 | 20µs | # spent 18µs (16+2) within installer::windows::assembly::BEGIN@31 which was called:
# once (16µs+2µs) by installer::BEGIN@61 at line 31 # spent 18µs making 1 call to installer::windows::assembly::BEGIN@31
# spent 2µs making 1 call to UNIVERSAL::import |
| 32 | 2 | 53µs | 2 | 18µs | # spent 16µs (15+1) within installer::windows::assembly::BEGIN@32 which was called:
# once (15µs+1µs) by installer::BEGIN@61 at line 32 # spent 16µs making 1 call to installer::windows::assembly::BEGIN@32
# spent 2µs making 1 call to UNIVERSAL::import |
| 33 | 2 | 3.49ms | 2 | 18.7ms | # spent 18.7ms (18.0+689µs) within installer::windows::assembly::BEGIN@33 which was called:
# once (18.0ms+689µs) by installer::BEGIN@61 at line 33 # spent 18.7ms making 1 call to installer::windows::assembly::BEGIN@33
# spent 8µs making 1 call to UNIVERSAL::import |
| 34 | |||||
| 35 | ############################################################## | ||||
| 36 | # Returning the first module of a file from the | ||||
| 37 | # comma separated list of modules. | ||||
| 38 | ############################################################## | ||||
| 39 | |||||
| 40 | sub get_msiassembly_feature | ||||
| 41 | # spent 554µs (158+396) within installer::windows::assembly::get_msiassembly_feature which was called 10 times, avg 55µs/call:
# 10 times (158µs+396µs) by installer::windows::assembly::create_msiassembly_table at line 173, avg 55µs/call | ||||
| 42 | 60 | 168µs | my ( $onefile ) = @_; | ||
| 43 | |||||
| 44 | my $module = ""; | ||||
| 45 | |||||
| 46 | if ( $onefile->{'modules'} ) { $module = $onefile->{'modules'}; } | ||||
| 47 | |||||
| 48 | # If modules contains a list of modules, only taking the first one. | ||||
| 49 | |||||
| 50 | 10 | 11µs | if ( $module =~ /^\s*(.*?)\,/ ) { $module = $1; } # spent 11µs making 10 calls to installer::windows::assembly::CORE:match, avg 1µs/call | ||
| 51 | |||||
| 52 | # Attention: Maximum feature length is 38! | ||||
| 53 | 10 | 385µs | installer::windows::idtglobal::shorten_feature_gid(\$module); # spent 385µs making 10 calls to installer::windows::idtglobal::shorten_feature_gid, avg 38µs/call | ||
| 54 | |||||
| 55 | return $module; | ||||
| 56 | } | ||||
| 57 | |||||
| 58 | ############################################################## | ||||
| 59 | # Returning the component of a file. | ||||
| 60 | ############################################################## | ||||
| 61 | |||||
| 62 | sub get_msiassembly_component | ||||
| 63 | # spent 224µs within installer::windows::assembly::get_msiassembly_component which was called 30 times, avg 7µs/call:
# 10 times (118µs+0s) by installer::windows::assembly::add_assembly_condition_into_component_table at line 276, avg 12µs/call
# 10 times (57µs+0s) by installer::windows::assembly::create_msiassembly_table at line 172, avg 6µs/call
# 10 times (49µs+0s) by installer::windows::assembly::create_msiassemblyname_table at line 213, avg 5µs/call | ||||
| 64 | 120 | 285µs | my ( $onefile ) = @_; | ||
| 65 | |||||
| 66 | my $component = ""; | ||||
| 67 | |||||
| 68 | $component = $onefile->{'componentname'}; | ||||
| 69 | |||||
| 70 | return $component; | ||||
| 71 | } | ||||
| 72 | |||||
| 73 | ############################################################## | ||||
| 74 | # Returning the file name as manifest file | ||||
| 75 | ############################################################## | ||||
| 76 | |||||
| 77 | sub get_msiassembly_filemanifest | ||||
| 78 | # spent 55µs within installer::windows::assembly::get_msiassembly_filemanifest which was called 10 times, avg 5µs/call:
# 10 times (55µs+0s) by installer::windows::assembly::create_msiassembly_table at line 174, avg 5µs/call | ||||
| 79 | 40 | 77µs | my ( $onefile ) = @_; | ||
| 80 | |||||
| 81 | my $filemanifest = ""; | ||||
| 82 | |||||
| 83 | $filemanifest = $onefile->{'uniquename'}; | ||||
| 84 | |||||
| 85 | return $filemanifest; | ||||
| 86 | } | ||||
| 87 | |||||
| 88 | |||||
| 89 | ############################################################## | ||||
| 90 | # Returning the file application | ||||
| 91 | ############################################################## | ||||
| 92 | |||||
| 93 | sub get_msiassembly_fileapplication | ||||
| 94 | # spent 40µs within installer::windows::assembly::get_msiassembly_fileapplication which was called 10 times, avg 4µs/call:
# 10 times (40µs+0s) by installer::windows::assembly::create_msiassembly_table at line 175, avg 4µs/call | ||||
| 95 | 30 | 63µs | my ( $onefile ) = @_; | ||
| 96 | |||||
| 97 | my $fileapplication = ""; | ||||
| 98 | |||||
| 99 | return $fileapplication; | ||||
| 100 | } | ||||
| 101 | |||||
| 102 | ############################################################## | ||||
| 103 | # Returning the file attributes | ||||
| 104 | ############################################################## | ||||
| 105 | |||||
| 106 | sub get_msiassembly_attributes | ||||
| 107 | # spent 58µs within installer::windows::assembly::get_msiassembly_attributes which was called 10 times, avg 6µs/call:
# 10 times (58µs+0s) by installer::windows::assembly::create_msiassembly_table at line 176, avg 6µs/call | ||||
| 108 | 40 | 81µs | my ( $onefile ) = @_; | ||
| 109 | |||||
| 110 | my $fileattributes = ""; | ||||
| 111 | |||||
| 112 | if ( $onefile->{'Attributes'} ne "" ) { $fileattributes = $onefile->{'Attributes'}; } | ||||
| 113 | |||||
| 114 | return $fileattributes; | ||||
| 115 | } | ||||
| 116 | |||||
| 117 | ############################################################## | ||||
| 118 | # Returning the file object for the msiassembly table. | ||||
| 119 | ############################################################## | ||||
| 120 | |||||
| 121 | sub get_msiassembly_file | ||||
| 122 | { | ||||
| 123 | my ( $filesref, $filename ) = @_; | ||||
| 124 | |||||
| 125 | my $foundfile = 0; | ||||
| 126 | my $onefile; | ||||
| 127 | |||||
| 128 | for ( my $i = 0; $i <= $#{$filesref}; $i++ ) | ||||
| 129 | { | ||||
| 130 | $onefile = ${$filesref}[$i]; | ||||
| 131 | my $name = $onefile->{'Name'}; | ||||
| 132 | |||||
| 133 | if ( $name eq $filename ) | ||||
| 134 | { | ||||
| 135 | $foundfile = 1; | ||||
| 136 | last; | ||||
| 137 | } | ||||
| 138 | } | ||||
| 139 | |||||
| 140 | # It does not need to exist. For example products that do not contain the libraries. | ||||
| 141 | if (! $foundfile ) { $onefile = ""; } | ||||
| 142 | |||||
| 143 | return $onefile; | ||||
| 144 | } | ||||
| 145 | |||||
| 146 | #################################################################################### | ||||
| 147 | # Creating the file MsiAssembly.idt dynamically | ||||
| 148 | # Content: | ||||
| 149 | # Component_ Feature_ File_Manifest File_Application Attributes | ||||
| 150 | # s72 s38 S72 S72 I2 | ||||
| 151 | # MsiAssembly Component_ | ||||
| 152 | #################################################################################### | ||||
| 153 | |||||
| 154 | sub create_msiassembly_table | ||||
| 155 | # spent 168ms (449µs+167) within installer::windows::assembly::create_msiassembly_table which was called:
# once (449µs+167ms) by installer::run at line 1534 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 156 | 99 | 312µs | my ($filesref, $basedir) = @_; | ||
| 157 | |||||
| 158 | 1 | 165ms | $installer::globals::msiassemblyfiles = installer::worker::collect_all_items_with_special_flag($filesref, "ASSEMBLY"); # spent 165ms making 1 call to installer::worker::collect_all_items_with_special_flag | ||
| 159 | |||||
| 160 | my @msiassemblytable = (); | ||||
| 161 | |||||
| 162 | 1 | 32µs | installer::windows::idtglobal::write_idt_header(\@msiassemblytable, "msiassembly"); # spent 32µs making 1 call to installer::windows::idtglobal::write_idt_header | ||
| 163 | |||||
| 164 | # Registering all libraries listed in $installer::globals::msiassemblyfiles | ||||
| 165 | |||||
| 166 | for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ ) | ||||
| 167 | { | ||||
| 168 | my $onefile = ${$installer::globals::msiassemblyfiles}[$i]; | ||||
| 169 | |||||
| 170 | my %msiassembly = (); | ||||
| 171 | |||||
| 172 | 10 | 57µs | $msiassembly{'Component_'} = get_msiassembly_component($onefile); # spent 57µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 6µs/call | ||
| 173 | 10 | 554µs | $msiassembly{'Feature_'} = get_msiassembly_feature($onefile); # spent 554µs making 10 calls to installer::windows::assembly::get_msiassembly_feature, avg 55µs/call | ||
| 174 | 10 | 55µs | $msiassembly{'File_Manifest'} = get_msiassembly_filemanifest($onefile); # spent 55µs making 10 calls to installer::windows::assembly::get_msiassembly_filemanifest, avg 5µs/call | ||
| 175 | 10 | 40µs | $msiassembly{'File_Application'} = get_msiassembly_fileapplication($onefile); # spent 40µs making 10 calls to installer::windows::assembly::get_msiassembly_fileapplication, avg 4µs/call | ||
| 176 | 10 | 58µs | $msiassembly{'Attributes'} = get_msiassembly_attributes($onefile); # spent 58µs making 10 calls to installer::windows::assembly::get_msiassembly_attributes, avg 6µs/call | ||
| 177 | |||||
| 178 | my $oneline = $msiassembly{'Component_'} . "\t" . $msiassembly{'Feature_'} . "\t" . | ||||
| 179 | $msiassembly{'File_Manifest'} . "\t" . $msiassembly{'File_Application'} . "\t" . | ||||
| 180 | $msiassembly{'Attributes'} . "\n"; | ||||
| 181 | |||||
| 182 | push(@msiassemblytable, $oneline); | ||||
| 183 | } | ||||
| 184 | |||||
| 185 | # Saving the file | ||||
| 186 | |||||
| 187 | my $msiassemblytablename = $basedir . $installer::globals::separator . "MsiAssem.idt"; | ||||
| 188 | 1 | 1.15ms | installer::files::save_file($msiassemblytablename ,\@msiassemblytable); # spent 1.15ms making 1 call to installer::files::save_file | ||
| 189 | my $infoline = "Created idt file: $msiassemblytablename\n"; | ||||
| 190 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 191 | } | ||||
| 192 | |||||
| 193 | #################################################################################### | ||||
| 194 | # Creating the file MsiAssemblyName.idt dynamically | ||||
| 195 | # Content: | ||||
| 196 | # Component_ Name Value | ||||
| 197 | # s72 s255 s255 | ||||
| 198 | # MsiAssemblyName Component_ Name | ||||
| 199 | #################################################################################### | ||||
| 200 | |||||
| 201 | sub create_msiassemblyname_table | ||||
| 202 | # spent 1.06ms (313µs+751µs) within installer::windows::assembly::create_msiassemblyname_table which was called:
# once (313µs+751µs) by installer::run at line 1535 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 203 | 188 | 283µs | my ($filesref, $basedir) = @_; | ||
| 204 | |||||
| 205 | my @msiassemblynametable = (); | ||||
| 206 | |||||
| 207 | 1 | 18µs | installer::windows::idtglobal::write_idt_header(\@msiassemblynametable, "msiassemblyname"); # spent 18µs making 1 call to installer::windows::idtglobal::write_idt_header | ||
| 208 | |||||
| 209 | for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ ) | ||||
| 210 | { | ||||
| 211 | my $onefile = ${$installer::globals::msiassemblyfiles}[$i]; | ||||
| 212 | |||||
| 213 | 10 | 49µs | my $component = get_msiassembly_component($onefile); # spent 49µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 5µs/call | ||
| 214 | my $oneline = ""; | ||||
| 215 | |||||
| 216 | # Order: (Assembly)name, publicKeyToken, version, culture. | ||||
| 217 | |||||
| 218 | if ( $onefile->{'Assemblyname'} ) | ||||
| 219 | { | ||||
| 220 | $oneline = $component . "\t" . "name" . "\t" . $onefile->{'Assemblyname'} . "\n"; | ||||
| 221 | push(@msiassemblynametable, $oneline); | ||||
| 222 | } | ||||
| 223 | |||||
| 224 | if ( $onefile->{'PublicKeyToken'} ) | ||||
| 225 | { | ||||
| 226 | $oneline = $component . "\t" . "publicKeyToken" . "\t" . $onefile->{'PublicKeyToken'} . "\n"; | ||||
| 227 | push(@msiassemblynametable, $oneline); | ||||
| 228 | } | ||||
| 229 | |||||
| 230 | if ( $onefile->{'Version'} ) | ||||
| 231 | { | ||||
| 232 | $oneline = $component . "\t" . "version" . "\t" . $onefile->{'Version'} . "\n"; | ||||
| 233 | push(@msiassemblynametable, $oneline); | ||||
| 234 | } | ||||
| 235 | |||||
| 236 | if ( $onefile->{'Culture'} ) | ||||
| 237 | { | ||||
| 238 | $oneline = $component . "\t" . "culture" . "\t" . $onefile->{'Culture'} . "\n"; | ||||
| 239 | push(@msiassemblynametable, $oneline); | ||||
| 240 | } | ||||
| 241 | |||||
| 242 | if ( $onefile->{'ProcessorArchitecture'} ) | ||||
| 243 | { | ||||
| 244 | $oneline = $component . "\t" . "processorArchitecture" . "\t" . $onefile->{'ProcessorArchitecture'} . "\n"; | ||||
| 245 | push(@msiassemblynametable, $oneline); | ||||
| 246 | } | ||||
| 247 | } | ||||
| 248 | |||||
| 249 | # Saving the file | ||||
| 250 | |||||
| 251 | my $msiassemblynametablename = $basedir . $installer::globals::separator . "MsiAsseN.idt"; | ||||
| 252 | 1 | 684µs | installer::files::save_file($msiassemblynametablename ,\@msiassemblynametable); # spent 684µs making 1 call to installer::files::save_file | ||
| 253 | my $infoline = "Created idt file: $msiassemblynametablename\n"; | ||||
| 254 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 255 | |||||
| 256 | } | ||||
| 257 | |||||
| 258 | #################################################################################### | ||||
| 259 | # setting an installation condition for the assembly libraries saved in | ||||
| 260 | # @installer::globals::msiassemblynamecontent | ||||
| 261 | #################################################################################### | ||||
| 262 | |||||
| 263 | sub add_assembly_condition_into_component_table | ||||
| 264 | # spent 1.33s (585ms+749ms) within installer::windows::assembly::add_assembly_condition_into_component_table which was called:
# once (585ms+749ms) by installer::run at line 1536 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 265 | 480381 | 1.29s | my ($filesref, $basedir) = @_; | ||
| 266 | |||||
| 267 | my $componenttablename = $basedir . $installer::globals::separator . "Componen.idt"; | ||||
| 268 | 1 | 39.7ms | my $componenttable = installer::files::read_file($componenttablename); # spent 39.7ms making 1 call to installer::files::read_file | ||
| 269 | my $changed = 0; | ||||
| 270 | my $infoline = ""; | ||||
| 271 | |||||
| 272 | for ( my $i = 0; $i <= $#{$installer::globals::msiassemblyfiles}; $i++ ) | ||||
| 273 | { | ||||
| 274 | my $onefile = ${$installer::globals::msiassemblyfiles}[$i]; | ||||
| 275 | |||||
| 276 | 10 | 118µs | my $filecomponent = get_msiassembly_component($onefile); # spent 118µs making 10 calls to installer::windows::assembly::get_msiassembly_component, avg 12µs/call | ||
| 277 | |||||
| 278 | for ( my $j = 0; $j <= $#{$componenttable}; $j++ ) | ||||
| 279 | { | ||||
| 280 | my $oneline = ${$componenttable}[$j]; | ||||
| 281 | |||||
| 282 | 53369 | 706ms | if ( $oneline =~ /(.*)\t(.*)\t(.*)\t(.*)\t(.*)\t(.*)/ ) # spent 706ms making 53369 calls to installer::windows::assembly::CORE:match, avg 13µs/call | ||
| 283 | { | ||||
| 284 | my $component = $1; | ||||
| 285 | my $componentid = $2; | ||||
| 286 | my $directory = $3; | ||||
| 287 | my $attributes = $4; | ||||
| 288 | my $condition = $5; | ||||
| 289 | my $keypath = $6; | ||||
| 290 | |||||
| 291 | if ( $component eq $filecomponent ) | ||||
| 292 | { | ||||
| 293 | # setting the condition | ||||
| 294 | |||||
| 295 | $condition = "DOTNET_SUFFICIENT=1"; | ||||
| 296 | $oneline = $component . "\t" . $componentid . "\t" . $directory . "\t" . $attributes . "\t" . $condition . "\t" . $keypath . "\n"; | ||||
| 297 | ${$componenttable}[$j] = $oneline; | ||||
| 298 | $changed = 1; | ||||
| 299 | $infoline = "Changing $componenttablename :\n"; | ||||
| 300 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 301 | $infoline = $oneline; | ||||
| 302 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 303 | last; | ||||
| 304 | } | ||||
| 305 | } | ||||
| 306 | } | ||||
| 307 | } | ||||
| 308 | |||||
| 309 | if ( $changed ) | ||||
| 310 | { | ||||
| 311 | # Saving the file | ||||
| 312 | 1 | 4.00ms | installer::files::save_file($componenttablename ,$componenttable); # spent 4.00ms making 1 call to installer::files::save_file | ||
| 313 | $infoline = "Saved idt file: $componenttablename\n"; | ||||
| 314 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 315 | } | ||||
| 316 | } | ||||
| 317 | |||||
| 318 | 1 | 7µs | 1; | ||
# spent 706ms within installer::windows::assembly::CORE:match which was called 53379 times, avg 13µs/call:
# 53369 times (706ms+0s) by installer::windows::assembly::add_assembly_condition_into_component_table at line 282, avg 13µs/call
# 10 times (11µs+0s) by installer::windows::assembly::get_msiassembly_feature at line 50, avg 1µs/call |