1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22 23 24package installer::control; 25 26use Cwd; 27use installer::converter; 28use installer::exiter; 29use installer::files; 30use installer::globals; 31use installer::pathanalyzer; 32use installer::scriptitems; 33use installer::systemactions; 34 35our @ErrorMessages = undef; 36 37######################################################### 38# Function that can be used for additional controls. 39# Search happens in $installer::globals::patharray. 40######################################################### 41 42sub check_needed_files_in_path 43{ 44 my ( $filesref ) = @_; 45 46 my $error = 0; 47 foreach my $onefile ( @{$filesref} ) 48 { 49 $installer::logger::Info->printf("...... searching %s ...\n", $onefile); 50 51 my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $installer::globals::patharray , 0); 52 53 if ( $$fileref eq "" ) 54 { 55 $error = 1; 56 installer::logger::print_error( "$onefile not found\n" ); 57 } 58 else 59 { 60 $installer::logger::Info->print( "\tFound: $$fileref\n" ); 61 } 62 } 63 64 if ( $error ) 65 { 66 installer::exiter::exit_program("ERROR: Could not find all needed files in path!", "check_needed_files_in_path"); 67 } 68} 69 70######################################################### 71# Checking the local system 72# Checking existence of needed files in include path 73######################################################### 74 75sub check_system_path 76{ 77 # The following files have to be found in the environment variable PATH 78 # All platforms: zip 79 # Windows only: "msiinfo.exe", "msidb.exe", "uuidgen.exe", "makecab.exe", "msitran.exe", "expand.exe" for msi database and packaging 80 81 my $onefile; 82 my $error = 0; 83 my $pathvariable = $ENV{'PATH'}; 84 my $local_pathseparator = $installer::globals::pathseparator; 85 86 if( $^O =~ /cygwin/i ) 87 { # When using cygwin's perl the PATH variable is POSIX style and ... 88 $pathvariable = qx{cygpath -mp "$pathvariable"} ; 89 # has to be converted to DOS style for further use. 90 $local_pathseparator = ';'; 91 } 92 if( $^O =~ /os2/i ) 93 { 94 # has to be converted to DOS style for further use. 95 $local_pathseparator = ';'; 96 } 97 my $patharrayref = installer::converter::convert_stringlist_into_array(\$pathvariable, $local_pathseparator); 98 99 $installer::globals::patharray = $patharrayref; 100 101 my @needed_files_in_path = (); 102 103 if (($installer::globals::iswin) && ($installer::globals::iswindowsbuild)) 104 { 105 @needed_files_in_path = ("zip.exe", "msiinfo.exe", "msidb.exe", "uuidgen.exe", "makecab.exe", "msitran.exe", "expand.exe"); 106 } 107 elsif ($installer::globals::iswin || $installer::globals::isos2) 108 { 109 @needed_files_in_path = ("zip.exe"); 110 } 111 else 112 { 113 @needed_files_in_path = ("zip"); 114 } 115 116 foreach $onefile ( @needed_files_in_path ) 117 { 118 $installer::logger::Info->printf("...... searching %s ...\n", $onefile); 119 120 my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$onefile, $patharrayref , 0); 121 122 if ( $$fileref eq "" ) 123 { 124 $error = 1; 125 installer::logger::print_error( "$onefile not found\n" ); 126 } 127 else 128 { 129 $installer::logger::Info->print( "\tFound: $$fileref\n" ); 130 # Saving the absolut path for msitran.exe. This is required for the determination of the checksum. 131 if ( $onefile eq "msitran.exe" ) { $installer::globals::msitranpath = $$fileref; } 132 } 133 } 134 135 if ( $error ) 136 { 137 installer::exiter::exit_program("ERROR: Could not find all needed files in path!", "check_system_path"); 138 } 139 140 # checking for epm, which has to be in the path or in the solver 141 142 if (( $installer::globals::call_epm ) && (!($installer::globals::iswindowsbuild))) 143 { 144 my $onefile = "epm"; 145 my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$onefile, $patharrayref , 0); 146 if (!( $$fileref eq "" )) 147 { 148 $installer::globals::epm_in_path = 1; 149 150 if ( $$fileref =~ /^\s*\.\/epm\s*$/ ) 151 { 152 my $currentdir = cwd(); 153 $$fileref =~ s/\./$currentdir/; 154 } 155 156 $installer::globals::epm_path = $$fileref; 157 } 158 } 159 160 # checking, if upx can be found in path 161 162 if ( $installer::globals::iswindowsbuild ) { $installer::globals::upxfile = "upx.exe"; } 163 else { $installer::globals::upxfile = "upx"; } 164 165 my $upxfilename = $installer::globals::upxfile; 166 my $upxfileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath_classic(\$upxfilename, $patharrayref , 0); 167 168 if (!( $$upxfileref eq "" )) 169 { 170 $installer::globals::upx_in_path = 1; 171 $installer::globals::upxfile = $$upxfileref; 172 $installer::logger::Info->print( "\tFound: $$upxfileref\n" ); 173 } 174 175} 176 177###################################################################### 178# Determining the version of file makecab.exe 179###################################################################### 180 181sub get_makecab_version 182{ 183 my $makecabversion = -1; 184 185 my $systemcall = "makecab.exe |"; 186 my @makecaboutput = (); 187 188 open (CAB, $systemcall); 189 while (<CAB>) { push(@makecaboutput, $_); } 190 close (CAB); 191 192 my $returnvalue = $?; # $? contains the return value of the systemcall 193 194 if ($returnvalue) 195 { 196 $installer::logger::Global->printf("ERROR: Could not execute \"%s\"!\n", $systemcall); 197 } 198 else 199 { 200 $installer::logger::Global->printf("Success: Executed \"%s\" successfully!\n", $systemcall); 201 202 my $versionline = ""; 203 204 for ( my $i = 0; $i <= $#makecaboutput; $i++ ) 205 { 206 if ( $makecaboutput[$i] =~ /\bVersion\b/i ) 207 { 208 $versionline = $makecaboutput[$i]; 209 last; 210 } 211 } 212 213 $installer::logger::Global->printf("%s\n", $versionline); 214 215 if ( $versionline =~ /\bVersion\b\s+(\d+[\d\.]+\d+)\s+/ ) 216 { 217 $makecabversion = $1; 218 } 219 220 # Only using the first number 221 222 if ( $makecabversion =~ /^\s*(\d+?)\D*/ ) 223 { 224 $makecabversion = $1; 225 } 226 227 $installer::logger::Global->printf("Using version: %s\n", $makecabversion); 228 } 229 230 return $makecabversion; 231} 232 233###################################################################### 234# Checking the version of file makecab.exe 235###################################################################### 236 237sub check_makecab_version 238{ 239 # checking version of makecab.exe 240 # Now it is guaranteed, that makecab.exe is in the path 241 242 my $do_check = 1; 243 244 my $makecabversion = get_makecab_version(); 245 246 $installer::logger::Global->printf("Tested version: %s\n", $installer::globals::controlledmakecabversion); 247 248 if ( $makecabversion < 0 ) { $do_check = 0; } # version could not be determined 249 250 if ( $do_check ) 251 { 252 if ( $makecabversion < $installer::globals::controlledmakecabversion ) 253 { 254 # warning for OOo, error for inhouse products 255 if ( $installer::globals::isopensourceproduct ) 256 { 257 installer::logger::print_warning("Old version of makecab.exe. Found version: \"$makecabversion\", tested version: \"$installer::globals::controlledmakecabversion\"!\n"); 258 } 259 else 260 { 261 installer::exiter::exit_program("makecab.exe too old. Found version: \"$makecabversion\", required version: \"$installer::globals::controlledmakecabversion\"!", "check_makecab_version"); 262 } 263 } 264 } 265 else 266 { 267 $installer::logger::Global->print("Warning: No version check of makecab.exe\n"); 268 } 269} 270 271###################################################################### 272# Reading the environment variables for the pathes in ziplist. 273# solarpath, solarenvpath, solarcommonpath, os, osdef, pmiscpath 274###################################################################### 275 276sub check_system_environment 277{ 278 my %variables = (); 279 my $key; 280 my $error = 0; 281 282 foreach $key ( @installer::globals::environmentvariables ) 283 { 284 my $value = ""; 285 if ( $ENV{$key} ) { $value = $ENV{$key}; } 286 $variables{$key} = $value; 287 288 if ( $value eq "" ) 289 { 290 installer::logger::print_error( "$key not set in environment\n" ); 291 $error = 1; 292 } 293 } 294 295 if ( $error ) 296 { 297 installer::exiter::exit_program("ERROR: Environment variable not set!", "check_system_environment"); 298 } 299 300 return \%variables; 301} 302 303 304sub prepare_error_processing () 305{ 306 @ErrorMessages = (); 307} 308 309=item filter_log_error ($relative_time, $log_id, $process_id, $message) 310 311 Process the given log message. Returns $message unaltered. 312 313=cut 314sub filter_log_error ($$$$) 315{ 316 my ($relative_time, $log_id, $process_id, $message) = @_; 317 318 if ($message =~ /\berror\b/i) 319 { 320 # Message contains the word "error". Now we have to find out if it is relevant. 321 322 # Remove all filenames that contain the word "Error". 323 my $work_string = $message; 324 $work_string =~ s/Error\.(idt|mlf|ulf|idl|html|hpp|ipp)//g; 325 326 if ($work_string =~ /\bError\b/i) 327 { 328 # This really is an error message. 329 push @ErrorMessages, {'relative_time' => $relative_time, 330 'message' => $message}; 331 } 332 } 333 334 return $message; 335} 336 337 338 339 340sub printocessed_error_lines () 341{ 342 my $lines = []; 343 344 foreach my $line (@ErrorMessages) 345 { 346 push @$lines, sprintf(" %12.6f : %s", $line->{'relative_time'}, $line->{'message'}); 347 } 348 349 return $lines; 350} 351 352 353 354 355=item check_logfile() 356 357 Print all error messages (typically at the end) on the console. 358 359=cut 360sub check_logfile () 361{ 362 my ($logfile) = @_; 363 364 my @errors = (); 365 my @output = (); 366 367 my $ignore_errors = ( ! $installer::globals::pro ) && ( $installer::globals::ignore_error_in_logfile ); 368 my $contains_errors = scalar @ErrorMessages > 0; 369 370 # Format errors 371 if ($contains_errors) 372 { 373 push(@output, "\n"); 374 push(@output, "*********************************************************************\n"); 375 if ($ignore_errors) 376 { 377 push(@output, "The following errors in the log file were ignored:\n"); 378 } 379 else 380 { 381 push(@output, "ERROR: The following errors occured in packaging process:\n"); 382 } 383 push(@output, "\n"); 384 385 foreach my $line (@ErrorMessages) 386 { 387 push @output, sprintf(" %12.6f : %s", $line->{'relative_time'}, $line->{'message'}); 388 } 389 390 push(@output, "*********************************************************************\n"); 391 } 392 393 # Claim success if there where no errors or if errors are treated as warnings. 394 if ( ! $contains_errors || $ignore_errors) 395 { 396 push(@output, "\n"); 397 push(@output, "***********************************************************\n"); 398 push(@output, "Successful packaging process!\n"); 399 push(@output, "***********************************************************\n"); 400 } 401 402 # Print the summary. 403 installer::logger::include_header_into_logfile("Summary:"); 404 my $force = 1; # print this message even in 'quiet' mode 405 foreach my $line (@output) 406 { 407 $installer::logger::Info->print($line, $force); 408 } 409 410 # Delete the accumulated error messages. The @ErrorMessages will now contain 411 # lines caused by printing those error messages. 412 @ErrorMessages = (); 413 414 @installer::globals::errorlogfileinfo = @output; 415 416 return $contains_error && ! $ignore_error; 417} 418 419############################################################# 420# Determining the ship installation directory 421############################################################# 422 423sub determine_ship_directory 424{ 425 my ($languagesref) = @_; 426 427 if (!( $ENV{'SHIPDRIVE'} )) { installer::exiter::exit_program("ERROR: SHIPDRIVE must be set for updater!", "determine_ship_directory"); } 428 429 my $shipdrive = $ENV{'SHIPDRIVE'}; 430 431 my $languagestring = $$languagesref; 432 433 if (length($languagestring) > $installer::globals::max_lang_length ) 434 { 435 my $number_of_languages = installer::systemactions::get_number_of_langs($languagestring); 436 chomp(my $shorter = `echo $languagestring | md5sum | sed -e "s/ .*//g"`); 437 # $languagestring = $shorter; 438 my $id = substr($shorter, 0, 8); # taking only the first 8 digits 439 $languagestring = "lang_" . $number_of_languages . "_id_" . $id; 440 } 441 442 my $productstring = $installer::globals::product; 443 my $productsubdir = ""; 444 445 if ( $productstring =~ /^\s*(.+?)\_\_(.+?)\s*$/ ) 446 { 447 $productstring = $1; 448 $productsubdir = $2; 449 } 450 451 if ( $installer::globals::languagepack ) { $productstring = $productstring . "_languagepack"; } 452 if ( $installer::globals::patch ) { $productstring = $productstring . "_patch"; } 453 454 my $destdir = $shipdrive . $installer::globals::separator . $installer::globals::compiler . 455 $installer::globals::productextension . $installer::globals::separator . 456 $productstring . $installer::globals::separator; 457 458 if ( $productsubdir ) { $destdir = $destdir . $productsubdir . $installer::globals::separator; } 459 460 $destdir = $destdir . $installer::globals::installertypedir . $installer::globals::separator . 461 $installer::globals::build . "_" . $installer::globals::lastminor . "_" . 462 "native_inprogress-number_" . $languagestring . "\." . $installer::globals::buildid; 463 464 $installer::logger::Global->print("\n"); 465 $installer::logger::Global->printf("Setting ship directory: %s\n", $destdir); 466 467 return $destdir; 468} 469 470############################################################# 471# Controlling if this is an official RE pack process 472############################################################# 473 474sub check_updatepack 475{ 476 my $shipdrive = ""; 477 my $filename = ""; 478 my $infoline = ""; 479 480 if ( $ENV{'UPDATER'} ) # the environment variable UPDATER has to be set 481 { 482 $installer::logger::Global->print("\n"); 483 $installer::logger::Global->print("Environment variable UPDATER set\n"); 484 485 if ( ! $ENV{'CWS_WORK_STAMP'} ) # the environment variable CWS_WORK_STAMP must not be set (set only in CWS) 486 { 487 $installer::logger::Global->print("Environment variable CWS_WORK_STAMP not set\n"); 488 489 if ( $ENV{'SHIPDRIVE'} ) # the environment variable SHIPDRIVE must be set 490 { 491 $shipdrive = $ENV{'SHIPDRIVE'}; 492 $installer::logger::Global->printf("Ship drive defined: %s\n", $shipdrive); 493 494 if ( -d $shipdrive ) # SHIPDRIVE must be a directory 495 { 496 $installer::logger::Global->print("Ship drive exists\n"); 497 498 # try to write into $shipdrive 499 500 my $directory = $installer::globals::product . "_" . $installer::globals::compiler . "_" . $installer::globals::buildid . "_" . $installer::globals::languageproduct . "_test_$$"; 501 $directory =~ s/\,/\_/g; # for the list of languages 502 $directory =~ s/\-/\_/g; # for en-US, pt-BR, ... 503 $directory = $shipdrive . $installer::globals::separator . $directory; 504 505 $installer::logger::Global->printf("Try to create directory: %s\n", $directory); 506 507 # saving this directory for later removal 508 $installer::globals::shiptestdirectory = $directory; 509 510 if ( installer::systemactions::try_to_create_directory($directory)) 511 { 512 $installer::logger::Global->print("Write access on Ship drive\n"); 513 $installer::logger::Global->print( 514 "Ship test directory %s was successfully created\n", 515 $installer::globals::shiptestdirectory); 516 my $systemcall = "rmdir $directory"; 517 my $returnvalue = system($systemcall); 518 519 # 5th condition: No local build environment. 520 # In this case the content of SOLARENV starts with the content of SOL_TMP 521 522 my $solarenv = ""; 523 my $sol_tmp; 524 if ( $ENV{'SOLARENV'} ) { $solarenv = $ENV{'SOLARENV'}; } 525 526 $installer::logger::Global->printf("Environment variable SOLARENV: %s\n", $solarenv); 527 528 if ( $ENV{'SOL_TMP'} ) 529 { 530 $sol_tmp = $ENV{'SOL_TMP'}; 531 $infoline = "Environment variable SOL_TMP: $sol_tmp\n"; 532 } else { 533 $infoline = "Environment variable SOL_TMP not set\n"; 534 } 535 $installer::logger::Global->print($infoline); 536 537 if ( defined $sol_tmp && ( $solarenv =~ /^\s*\Q$sol_tmp\E/ )) 538 { 539 $installer::logger::Global->print("Content of SOLARENV starts with the content of SOL_TMP\: Local environment -\> No Updatepack\n"); 540 } 541 else 542 { 543 $installer::logger::Global->print("Content of SOLARENV does not start with the content of SOL_TMP: No local environment\n"); 544 545 $installer::globals::updatepack = 1; # That's it 546 } 547 548 # Additional logging information for the temporary ship directory 549 550 if ( -d $installer::globals::shiptestdirectory ) 551 { 552 $installer::logger::Global->printf( 553 "Ship test directory %s still exists. Trying removal later again.\n", 554 $installer::globals::shiptestdirectory); 555 } 556 else 557 { 558 $installer::logger::Global->printf( 559 "Ship test directory %s was successfully removed.\n", 560 $installer::globals::shiptestdirectory); 561 } 562 } 563 else 564 { 565 $installer::logger::Global->print("No write access on Ship drive\n"); 566 $installer::logger::Global->printf("Failed to create directory \n", $directory); 567 if ( defined $ENV{'BSCLIENT'} && ( uc $ENV{'BSCLIENT'} eq 'TRUE' ) ) 568 { 569 installer::exiter::exit_program("ERROR: No write access to SHIPDRIVE allthough BSCLIENT is set.", "check_updatepack"); 570 } 571 } 572 } 573 else 574 { 575 $installer::logger::Global->print("Ship drive not found: No updatepack\n"); 576 } 577 } 578 else 579 { 580 $installer::logger::Global->print("Environment variable SHIPDRIVE not set: No updatepack\n"); 581 } 582 } 583 else 584 { 585 $installer::logger::Global->print("Environment variable CWS_WORK_STAMP defined: No updatepack\n"); 586 } 587 } 588 589 if ( $installer::globals::updatepack ) 590 { 591 $installer::logger::Global->print("Setting updatepack true\n"); 592 $installer::logger::Global->print("\n"); 593 } 594 else 595 { 596 $installer::logger::Global->print("\n"); 597 $installer::logger::Global->print("No updatepack\n"); 598 } 599 600} 601 602############################################################# 603# Reading the Windows list file for language encodings 604############################################################# 605 606sub read_encodinglist 607{ 608 my ($patharrayref) = @_; 609 610 my $fileref = installer::scriptitems::get_sourcepath_from_filename_and_includepath(\$installer::globals::encodinglistname, $patharrayref , 0); 611 612 if ( $$fileref eq "" ) { installer::exiter::exit_program("ERROR: Did not find Windows encoding list $installer::globals::encodinglistname!", "read_encodinglist"); } 613 614 $installer::logger::Global->printf("Found encoding file: %s\n", $$fileref); 615 616 my $encodinglist = installer::files::read_file($$fileref); 617 618 my %msiencoding = (); 619 my %msilanguage = (); 620 621 # Controlling the encoding list 622 623 for ( my $i = 0; $i <= $#{$encodinglist}; $i++ ) 624 { 625 my $line = ${$encodinglist}[$i]; 626 627 if ( $line =~ /^\s*\#/ ) { next; } # this is a comment line 628 629 if ( $line =~ /^(.*?)(\#.*)$/ ) { $line = $1; } # removing comments after "#" 630 631 if ( $line =~ /^\s*([\w-]+)\s*(\d+)\s*(\d+)\s*$/ ) 632 { 633 my $onelanguage = $1; 634 my $codepage = $2; 635 my $windowslanguage = $3; 636 637 $msiencoding{$onelanguage} = $codepage; 638 $msilanguage{$onelanguage} = $windowslanguage; 639 } 640 else 641 { 642 installer::exiter::exit_program("ERROR: Wrong syntax in Windows encoding list $installer::globals::encodinglistname : en-US 1252 1033 !", "read_encodinglist"); 643 } 644 } 645 646 $installer::globals::msiencoding = \%msiencoding; 647 $installer::globals::msilanguage = \%msilanguage; 648 649 # my $key; 650 # foreach $key (keys %{$installer::globals::msiencoding}) { print "A Key: $key : Value: $installer::globals::msiencoding->{$key}\n"; } 651 # foreach $key (keys %{$installer::globals::msilanguage}) { print "B Key: $key : Value: $installer::globals::msilanguage->{$key}\n"; } 652 653} 654 655############################################################# 656# Only for Windows and Linux (RPM)there is currently 657# a reliable mechanism to register extensions during 658# installation process. Therefore it is for all other 659# platforms forbidden to install oxt files into that 660# directory, in which they are searched for registration. 661############################################################# 662 663sub check_oxtfiles 664{ 665 my ( $filesarray ) = @_; 666 667 for ( my $i = 0; $i <= $#{$filesarray}; $i++ ) 668 { 669 my $onefile = ${$filesarray}[$i]; 670 671 if (( $onefile->{'Name'} ) && ( $onefile->{'Dir'} )) 672 { 673 if (( $onefile->{'Name'} =~ /\.oxt\s*$/ ) && ( $onefile->{'Dir'} eq $installer::globals::extensioninstalldir )) 674 { 675 installer::exiter::exit_program("There is currently only for Linux (RPM) and Windows a reliable mechanism to register extensions during installation.\nPlease remove file \"$onefile->{'gid'}\" from your installation set!\nYou can use \"\#ifdef WNT\" and \"\#ifdef LINUX\" in scp.", "check_oxtfiles"); 676 } 677 } 678 } 679} 680 681############################################################# 682# Check if Java is available to create xpd installer 683############################################################# 684 685sub check_java_for_xpd 686{ 687 my ( $allvariables ) = @_; 688 689 if ( ! $installer::globals::solarjavaset ) { $allvariables->{'XPDINSTALLER'} = 0; } 690} 691 692#################################################################### 693# Setting global variable "$installer::globals::addchildprojects" 694#################################################################### 695 696sub set_addchildprojects 697{ 698 my ($allvariables) = @_; 699 700 if (( $allvariables->{'JAVAPRODUCT'} ) || 701 ( $allvariables->{'ADAPRODUCT'} ) || 702 ( $allvariables->{'UREPRODUCT'} ) || 703 ( $allvariables->{'ADDREQUIREDPACKAGES'} )) { $installer::globals::addchildprojects = 1; } 704 705 if ( $installer::globals::patch ) 706 { 707 $installer::globals::addchildprojects = 0; # no child projects for patches 708 } 709 710 $installer::logger::Global->printf( 711 "Value of \$installer::globals::addchildprojects: %s\n", 712 $installer::globals::addchildprojects); 713} 714 715#################################################################### 716# Setting global variable "$installer::globals::addjavainstaller" 717#################################################################### 718 719sub set_addjavainstaller 720{ 721 my ($allvariables) = @_; 722 723 if ( $allvariables->{'JAVAINSTALLER'} ) { $installer::globals::addjavainstaller = 1; } 724 725 if ( $installer::globals::patch ) { $installer::globals::addjavainstaller = 0; } 726 if ( $installer::globals::languagepack ) { $installer::globals::addjavainstaller = 0; } 727 if ( $allvariableshashref->{'XPDINSTALLER'} ) { $installer::globals::addjavainstaller = 0; } 728 729 $installer::logger::Global->printf( 730 "Value of \$installer::globals::addjavainstaller: %s\n", 731 $installer::globals::addjavainstaller); 732} 733 734####################################################################### 735# Setting global variable "$installer::globals::addsystemintegration" 736####################################################################### 737 738sub set_addsystemintegration 739{ 740 my ($allvariables) = @_; 741 742 if ( $allvariables->{'ADDSYSTEMINTEGRATION'} ) { $installer::globals::addsystemintegration = 1; } 743 744 if ( $installer::globals::patch ) { $installer::globals::addsystemintegration = 0; } 745 if ( $installer::globals::languagepack ) { $installer::globals::addsystemintegration = 0; } 746 if (( $installer::globals::packageformat eq "native" ) || ( $installer::globals::packageformat eq "portable" )) { $installer::globals::addsystemintegration = 0; } 747 748 $installer::logger::Global->printf( 749 "Value of \$installer::globals::addsystemintegration: %s\n", 750 $installer::globals::addsystemintegration); 751} 752 7531; 754