| Filename | /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer/environment.pm |
| Statements | Executed 44 statements in 1.32ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 352µs | 354µs | installer::environment::BEGIN@30 |
| 1 | 1 | 1 | 46µs | 46µs | installer::environment::create_pathvariables |
| 1 | 1 | 1 | 33µs | 35µs | installer::environment::set_global_environment_variables |
| 1 | 1 | 1 | 17µs | 19µs | installer::environment::BEGIN@31 |
| 1 | 1 | 1 | 2µs | 2µs | installer::environment::CORE:match (opcode) |
| 0 | 0 | 0 | 0s | 0s | installer::environment::check_tilde_in_directory |
| 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::environment; | ||||
| 29 | |||||
| 30 | 2 | 64µs | 2 | 357µs | # spent 354µs (352+3) within installer::environment::BEGIN@30 which was called:
# once (352µs+3µs) by installer::BEGIN@40 at line 30 # spent 354µs making 1 call to installer::environment::BEGIN@30
# spent 2µs making 1 call to UNIVERSAL::import |
| 31 | 2 | 1.16ms | 2 | 21µs | # spent 19µs (17+2) within installer::environment::BEGIN@31 which was called:
# once (17µs+2µs) by installer::BEGIN@40 at line 31 # spent 19µs making 1 call to installer::environment::BEGIN@31
# spent 2µs making 1 call to UNIVERSAL::import |
| 32 | |||||
| 33 | ###################################################### | ||||
| 34 | # Create path variables from environment variables | ||||
| 35 | ###################################################### | ||||
| 36 | |||||
| 37 | sub create_pathvariables | ||||
| 38 | # spent 46µs within installer::environment::create_pathvariables which was called:
# once (46µs+0s) by installer::run at line 149 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 39 | 1 | 2µs | my ($environment) = @_; | ||
| 40 | |||||
| 41 | 1 | 2µs | my %variables = (); | ||
| 42 | |||||
| 43 | # The following variables are needed in the path file list | ||||
| 44 | # solarpath, solarenvpath, solarcommonpath, os, osdef, pmiscpath | ||||
| 45 | |||||
| 46 | 1 | 7µs | my $solarpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension; | ||
| 47 | 1 | 2µs | $variables{'solarpath'} = $solarpath; | ||
| 48 | |||||
| 49 | 1 | 3µs | my $solarcommonpath = $environment->{'SOLARVERSION'} . $installer::globals::separator . "common" . $installer::globals::productextension; | ||
| 50 | 1 | 2µs | $variables{'solarcommonpath'} = $solarcommonpath; | ||
| 51 | |||||
| 52 | 1 | 3µs | my $osdef = lc($environment->{'GUI'}); | ||
| 53 | 1 | 2µs | $variables{'osdef'} = $osdef; | ||
| 54 | |||||
| 55 | 1 | 2µs | $variables{'os'} = $installer::globals::compiler; | ||
| 56 | |||||
| 57 | 1 | 1µs | my $solarenvpath = ""; | ||
| 58 | |||||
| 59 | 1 | 2µs | if ( $ENV{'SO_PACK'} ) { $solarenvpath = $ENV{'SO_PACK'}; } | ||
| 60 | # overriding with STAR_INSTPATH, if set | ||||
| 61 | 1 | 2µs | if ( $ENV{'STAR_INSTPATH'} ) { $solarenvpath = $ENV{'STAR_INSTPATH'}; } | ||
| 62 | |||||
| 63 | 1 | 2µs | $variables{'solarenvpath'} = $solarenvpath; | ||
| 64 | |||||
| 65 | 1 | 2µs | my $localpath = $environment->{'LOCAL_OUT'}; | ||
| 66 | 1 | 2µs | $variables{'localpath'} = $localpath; | ||
| 67 | |||||
| 68 | 1 | 2µs | my $localcommonpath = $environment->{'LOCAL_COMMON_OUT'}; | ||
| 69 | 1 | 2µs | $variables{'localcommonpath'} = $localcommonpath; | ||
| 70 | |||||
| 71 | 1 | 2µs | my $platformname = $environment->{'OUTPATH'}; | ||
| 72 | 1 | 2µs | $variables{'platformname'} = $platformname; | ||
| 73 | |||||
| 74 | 1 | 10µs | return \%variables; | ||
| 75 | } | ||||
| 76 | |||||
| 77 | ################################################## | ||||
| 78 | # Replacing tilde in paths, because of | ||||
| 79 | # problem with deep recursion (task 104830) | ||||
| 80 | ################################################## | ||||
| 81 | |||||
| 82 | sub check_tilde_in_directory | ||||
| 83 | { | ||||
| 84 | if ( $ENV{'HOME'} ) | ||||
| 85 | { | ||||
| 86 | my $home = $ENV{'HOME'}; | ||||
| 87 | $home =~ s/\Q$installer::globals::separator\E\s*$//; | ||||
| 88 | $installer::globals::localinstalldir =~ s/~/$home/; | ||||
| 89 | my $infoline = "Info: Changing LOCALINSTALLDIR to $installer::globals::localinstalldir\n"; | ||||
| 90 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 91 | } | ||||
| 92 | else | ||||
| 93 | { | ||||
| 94 | # exit, because "~" is not allowed, if HOME is not set | ||||
| 95 | my $infoline = "ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!\n"; | ||||
| 96 | push(@installer::globals::logfileinfo, $infoline); | ||||
| 97 | installer::exiter::exit_program("ERROR: If \"~\" is used in \"LOCALINSTALLDIR\", environment variable \"HOME\" needs to be defined!", "check_tilde_in_directory"); | ||||
| 98 | } | ||||
| 99 | } | ||||
| 100 | |||||
| 101 | ################################################## | ||||
| 102 | # Setting some fundamental global variables. | ||||
| 103 | # All these variables can be overwritten | ||||
| 104 | # by parameters. | ||||
| 105 | ################################################## | ||||
| 106 | |||||
| 107 | sub set_global_environment_variables | ||||
| 108 | # spent 35µs (33+2) within installer::environment::set_global_environment_variables which was called:
# once (33µs+2µs) by installer::run at line 111 of /cygdrive/c/lo/libo-master/instsetoo_native/util/C:/lo/libo-master/solenv/bin/modules/installer.pm | ||||
| 109 | 1 | 2µs | my ( $environment ) = @_; | ||
| 110 | |||||
| 111 | 1 | 2µs | $installer::globals::build = $environment->{'WORK_STAMP'}; | ||
| 112 | 1 | 2µs | $installer::globals::compiler = $environment->{'OUTPATH'}; | ||
| 113 | |||||
| 114 | 2 | 2µs | if ( $ENV{'LAST_MINOR'} ) { $installer::globals::lastminor = $ENV{'LAST_MINOR'}; } | ||
| 115 | |||||
| 116 | 2 | 2µs | if ( $ENV{'PROEXT'} ) { $installer::globals::pro = 1; } | ||
| 117 | |||||
| 118 | 1 | 2µs | if ( $ENV{'VERBOSE'} && ( (lc $ENV{'VERBOSE'}) eq "false" ) ) { $installer::globals::quiet = 1; } | ||
| 119 | 1 | 1µs | if ( $ENV{'PREPARE_WINPATCH'} ) { $installer::globals::prepare_winpatch = 1; } | ||
| 120 | 1 | 2µs | if ( $ENV{'PREVIOUS_IDT_DIR'} ) { $installer::globals::previous_idt_dir = $ENV{'PREVIOUS_IDT_DIR'}; } | ||
| 121 | 1 | 1µs | if ( $ENV{'LOCALINSTALLDIR'} ) { $installer::globals::localinstalldir = $ENV{'LOCALINSTALLDIR'}; } | ||
| 122 | 1 | 600ns | if ( $ENV{'LOCALUNPACKDIR'} ) { $installer::globals::localunpackdir = $ENV{'LOCALUNPACKDIR'}; } | ||
| 123 | 1 | 2µs | if ( $ENV{'MAX_LANG_LENGTH'} ) { $installer::globals::max_lang_length = $ENV{'MAX_LANG_LENGTH'}; } | ||
| 124 | |||||
| 125 | 1 | 1µs | if ( $ENV{'RPM'} ) { $installer::globals::rpm = $ENV{'RPM'}; } | ||
| 126 | 1 | 500ns | if ( $ENV{'DONTCOMPRESS'} ) { $installer::globals::solarisdontcompress = 1; } | ||
| 127 | 1 | 1µs | if ( $ENV{'IGNORE_ERROR_IN_LOGFILE'} ) { $installer::globals::ignore_error_in_logfile = 1; } | ||
| 128 | 1 | 2µs | if (( $ENV{'DISABLE_STRIP'} ) && ( $ENV{'DISABLE_STRIP'} ne '' )) { $installer::globals::strip = 0; } | ||
| 129 | |||||
| 130 | 1 | 1µs | if ( $installer::globals::localinstalldir ) { $installer::globals::localinstalldirset = 1; } | ||
| 131 | # Special handling, if LOCALINSTALLDIR contains "~" in the path | ||||
| 132 | 1 | 17µs | 1 | 2µs | if ( $installer::globals::localinstalldir =~ /^\s*\~/ ) { check_tilde_in_directory(); } # spent 2µs making 1 call to installer::environment::CORE:match |
| 133 | } | ||||
| 134 | |||||
| 135 | 1 | 7µs | 1; | ||
# spent 2µs within installer::environment::CORE:match which was called:
# once (2µs+0s) by installer::environment::set_global_environment_variables at line 132 |