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 24################# 25# use 26################# 27 28use lib ("$ENV{SOLARENV}/bin/modules"); 29 30use Cwd; 31use File::Copy; 32use installer::archivefiles; 33use installer::control; 34use installer::converter; 35use installer::copyproject; 36use installer::download; 37use installer::environment; 38use installer::epmfile; 39use installer::exiter; 40use installer::files; 41use installer::followme; 42use installer::globals; 43use installer::javainstaller; 44use installer::languagepack; 45use installer::languages; 46use installer::logger; 47use installer::mail; 48use installer::packagelist; 49use installer::packagepool; 50use installer::parameter; 51use installer::pathanalyzer; 52use installer::profiles; 53use installer::scppatchsoname; 54use installer::scpzipfiles; 55use installer::scriptitems; 56use installer::setupscript; 57use installer::simplepackage; 58use installer::sorter; 59use installer::strip; 60use installer::substfilenamefiles; 61use installer::upx; 62use installer::systemactions; 63use installer::windows::assembly; 64use installer::windows::binary; 65use installer::windows::component; 66use installer::windows::createfolder; 67use installer::windows::directory; 68use installer::windows::feature; 69use installer::windows::featurecomponent; 70use installer::windows::file; 71use installer::windows::font; 72use installer::windows::icon; 73use installer::windows::idtglobal; 74use installer::windows::inifile; 75use installer::windows::java; 76use installer::windows::media; 77use installer::windows::msiglobal; 78use installer::windows::patch; 79use installer::windows::property; 80use installer::windows::removefile; 81use installer::windows::registry; 82use installer::windows::selfreg; 83use installer::windows::shortcut; 84use installer::windows::strip; 85use installer::windows::upgrade; 86use installer::worker; 87use installer::xpdinstaller; 88use installer::ziplist; 89 90use strict; 91 92sub GetSetupScriptLines ($$$) 93{ 94 my ($allsettingsarrayref, $allvariableshashref, $includepatharrayref) = @_; 95 96 if ($installer::globals::setupscript_defined_in_productlist) 97 { 98 installer::setupscript::set_setupscript_name($allsettingsarrayref, $includepatharrayref); 99 } 100 101 $installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" ); 102 installer::logger::globallog("setup script file: $installer::globals::setupscriptname"); 103 $installer::logger::Info->print( "... analyzing script: $installer::globals::setupscriptname ... \n" ); 104 105 # Reading the setup script file 106 my $setupscriptref = installer::files::read_file($installer::globals::setupscriptname); 107 108 # Resolving variables defined in the zip list file into setup 109 # script. All the variables are defined in $allvariablesarrayref 110 installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref); 111 112 # Resolving %variables defined in the installation object 113 my $allscriptvariablesref = installer::setupscript::get_all_scriptvariables_from_installation_object( 114 $setupscriptref, 115 $installer::globals::setupscriptname); 116 installer::setupscript::add_lowercase_productname_setupscriptvariable($allscriptvariablesref); 117 installer::setupscript::resolve_lowercase_productname_setupscriptvariable($allscriptvariablesref); 118 119 $setupscriptref = installer::setupscript::replace_all_setupscriptvariables_in_script( 120 $setupscriptref, 121 $allscriptvariablesref); 122 123 # Adding all variables defined in the installation object into the 124 # hash of all variables. This is needed if variables are defined 125 # in the installation object, but not in the zip list file. If 126 # there is a definition in the zip list file and in the 127 # installation object, the installation object is more important 128 installer::setupscript::add_installationobject_to_variables($allvariableshashref, $allscriptvariablesref); 129 130 # Adding also all variables, that must be included into the $allvariableshashref. 131 installer::setupscript::add_forced_properties($allvariableshashref); 132 133 # Replacing preset properties, not using the default mechanisms (for example for UNIXPRODUCTNAME) 134 installer::setupscript::replace_preset_properties($allvariableshashref); 135 136 # We did this already. Can this or the other one be removed. 137 installer::scpzipfiles::replace_all_ziplistvariables_in_file($setupscriptref, $allvariableshashref); 138 139 return $setupscriptref; 140} 141 142 143 144=head2 MakeWindowsBuild (...) 145 146 Create an MSI installation set for Windows that is based on IDT tables. 147 148=cut 149sub MakeWindowsBuild ($$$$$$$$$$$$$$$$$$$$) 150{ 151 my ( 152 $allvariableshashref, 153 $allsettingsarrayref, 154 $current_install_number, 155 $directoriesforepmarrayref, 156 $filesinproductlanguageresolvedarrayref, 157 $folderitemsinproductlanguageresolvedarrayref, 158 $includepatharrayref, 159 $includepatharrayref_lang, 160 $installdir, 161 $languagesarrayref, 162 $languagestringref, 163 $linksinproductlanguageresolvedarrayref, 164 $loggingdir, 165 $modulesinproductlanguageresolvedarrayref, 166 $packages, 167 $profileitemsinproductlanguageresolvedarrayref, 168 $registryitemsinproductlanguageresolvedarrayref, 169 $shipinstalldir, 170 $windowscustomactionsarrayref, 171 $folderinproductlanguageresolvedarrayref) = @_; 172 173 ########################################### 174 # Stripping libraries 175 ########################################### 176 177 # Building for gcc build in cws requires, that all files are stripped before packaging: 178 # 1. copy all files that need to be stripped locally 179 # 2. strip all these files 180 181 if ( $installer::globals::compiler =~ /wntgcci/ ) 182 { 183 installer::windows::strip::strip_binaries($filesinproductlanguageresolvedarrayref, $languagestringref); 184 } 185 186 $installdir = installer::worker::create_installation_directory($shipinstalldir, $languagestringref, \$current_install_number); 187 188 my $idtdirbase = installer::systemactions::create_directories("idt_files", $languagestringref); 189 $installer::globals::infodirectory = installer::systemactions::create_directories("info_files", $languagestringref); 190 my $installlogdir = installer::systemactions::create_directory_next_to_directory($installdir, "log"); 191 # my $installchecksumdir = installer::systemactions::create_directory_next_to_directory($installdir, "checksum"); 192 193 ################################################################################# 194 # Preparing cabinet files from package definitions 195 ################################################################################# 196 197 # installer::packagelist::prepare_cabinet_files($packages, $allvariableshashref, $$languagestringref); 198 installer::packagelist::prepare_cabinet_files($packages, $allvariableshashref); 199 # printing packages content: 200 installer::packagelist::log_cabinet_assignments(); 201 202 ################################################################################# 203 # Begin of functions that are used for the creation of idt files (Windows only) 204 ################################################################################# 205 206 $installer::logger::Info->print( "... creating idt files ...\n" ); 207 208 installer::logger::include_header_into_logfile("Creating idt files:"); 209 210 my $newidtdir = $idtdirbase . $installer::globals::separator . "00"; # new files into language independent directory "00" 211 installer::systemactions::create_directory($newidtdir); 212 213 my @allfilecomponents = (); 214 my @allregistrycomponents = (); 215 216 # Collecting all files with flag "BINARYTABLE" 217 my $binarytablefiles = installer::worker::collect_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE"); 218 219 # Removing all files with flag "BINARYTABLE_ONLY" 220 @installer::globals::binarytableonlyfiles = (); 221 $filesinproductlanguageresolvedarrayref = installer::worker::remove_all_items_with_special_flag($filesinproductlanguageresolvedarrayref ,"BINARYTABLE_ONLY"); 222 223 # Collecting all profileitems with flag "INIFILETABLE" for table "IniFile" 224 my $inifiletableentries = installer::worker::collect_all_items_with_special_flag($profileitemsinproductlanguageresolvedarrayref ,"INIFILETABLE"); 225 226 # Creating the important dynamic idt files 227 installer::windows::msiglobal::set_msiproductversion($allvariableshashref); 228 installer::windows::msiglobal::put_msiproductversion_into_bootstrapfile($filesinproductlanguageresolvedarrayref); 229 230 # Add cabinet assignments to files 231 installer::windows::file::assign_cab_to_files($filesinproductlanguageresolvedarrayref); 232 installer::windows::file::assign_sequencenumbers_to_files($filesinproductlanguageresolvedarrayref); 233 234 # Collection all available directory trees 235 installer::windows::directory::collectdirectorytrees($directoriesforepmarrayref); 236 237 $filesinproductlanguageresolvedarrayref = installer::windows::file::create_files_table( 238 $filesinproductlanguageresolvedarrayref, 239 \@allfilecomponents, 240 $newidtdir, 241 $allvariableshashref); 242 243 installer::windows::directory::create_directory_table( 244 $directoriesforepmarrayref, 245 $newidtdir, 246 $allvariableshashref, 247 $loggingdir); 248 249 # Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref ! 250 installer::windows::registry::create_registry_table($registryitemsinproductlanguageresolvedarrayref, \@allregistrycomponents, $newidtdir, $languagesarrayref, $allvariableshashref); 251 252 installer::windows::component::create_component_table($filesinproductlanguageresolvedarrayref, $registryitemsinproductlanguageresolvedarrayref, $directoriesforepmarrayref, \@allfilecomponents, \@allregistrycomponents, $newidtdir, $allvariableshashref); 253 254 # Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref ! 255 installer::windows::feature::add_uniquekey($modulesinproductlanguageresolvedarrayref); 256 $modulesinproductlanguageresolvedarrayref = installer::windows::feature::sort_feature($modulesinproductlanguageresolvedarrayref); 257 installer::windows::feature::create_feature_table($modulesinproductlanguageresolvedarrayref, $newidtdir, $languagesarrayref, $allvariableshashref); 258 259 installer::windows::featurecomponent::create_featurecomponent_table( 260 $filesinproductlanguageresolvedarrayref, 261 $registryitemsinproductlanguageresolvedarrayref, 262 $newidtdir); 263 264 installer::windows::media::create_media_table( 265 $filesinproductlanguageresolvedarrayref, 266 $newidtdir, 267 $allvariableshashref); 268 269 installer::windows::font::create_font_table( 270 $filesinproductlanguageresolvedarrayref, 271 $newidtdir); 272 273 # Attention: The table "Shortcut.idt" contains language specific strings -> parameter: $languagesarrayref ! 274 # Attention: Shortcuts (Folderitems) have icon files, that have to be copied into the Icon directory (last parameter) 275 my @iconfilecollector = (); 276 277 installer::windows::shortcut::create_shortcut_table( 278 $filesinproductlanguageresolvedarrayref, 279 $linksinproductlanguageresolvedarrayref, 280 $folderinproductlanguageresolvedarrayref, 281 $folderitemsinproductlanguageresolvedarrayref, 282 $directoriesforepmarrayref, 283 $newidtdir, 284 $languagesarrayref, 285 $includepatharrayref, 286 \@iconfilecollector); 287 288 installer::windows::inifile::create_inifile_table( 289 $inifiletableentries, 290 $filesinproductlanguageresolvedarrayref, 291 $newidtdir); 292 293 installer::windows::icon::create_icon_table( 294 \@iconfilecollector, 295 $newidtdir); # creating the icon table with all iconfiles used as shortcuts (FolderItems) 296 297 installer::windows::createfolder::create_createfolder_table( 298 $directoriesforepmarrayref, 299 $filesinproductlanguageresolvedarrayref, 300 $newidtdir, 301 $allvariableshashref); 302 303 installer::windows::upgrade::create_upgrade_table( 304 $newidtdir, 305 $allvariableshashref); 306 307 if ( ! $installer::globals::languagepack ) # the following tables not for language packs 308 { 309 installer::windows::removefile::create_removefile_table($folderitemsinproductlanguageresolvedarrayref, $newidtdir); 310 311 installer::windows::selfreg::create_selfreg_table($filesinproductlanguageresolvedarrayref, $newidtdir); 312 313 # Adding Assemblies into the tables MsiAssembly and MsiAssemblyName dynamically 314 installer::windows::assembly::create_msiassembly_table($filesinproductlanguageresolvedarrayref, $newidtdir); 315 installer::windows::assembly::create_msiassemblyname_table($filesinproductlanguageresolvedarrayref, $newidtdir); 316 installer::windows::assembly::add_assembly_condition_into_component_table($filesinproductlanguageresolvedarrayref, $newidtdir); 317 } 318 319 $installer::logger::Lang->print("\n"); 320 321 # Localizing the language dependent idt files 322 # For every language there will be a localized msi database 323 # For multilingual installation sets, the differences of this 324 # databases have to be stored in transforms. 325 326 for ( my $m = 0; $m <= $#{$languagesarrayref}; $m++ ) 327 { 328 my $onelanguage = ${$languagesarrayref}[$m]; 329 330 my $is_bidi = 0; 331 if ( installer::existence::exists_in_array($onelanguage, \@installer::globals::bidilanguages) ) { $is_bidi = 1; } 332 333 my $languageidtdir = $idtdirbase . $installer::globals::separator . $onelanguage; 334 if ( -d $languageidtdir ) { installer::systemactions::remove_complete_directory($languageidtdir, 1); } 335 installer::systemactions::create_directory($languageidtdir); 336 337 # Copy the template idt files and the new created idt files into this language directory 338 339 $installer::logger::Info->print( "... copying idt files ...\n" ); 340 341 installer::logger::include_header_into_logfile("Copying idt files to $languageidtdir:"); 342 343 installer::windows::idtglobal::prepare_language_idt_directory($languageidtdir, $newidtdir, $onelanguage, $filesinproductlanguageresolvedarrayref, \@iconfilecollector, $binarytablefiles, $allvariableshashref); 344 345 if (( ! $installer::globals::languagepack ) && ( ! $allvariableshashref->{'NOLANGUAGESELECTIONPRODUCT'} )) 346 { 347 # For multilingual installation sets, the dialog for the language selection can now be prepared, with 348 # a checkbox for each available language. This has to happen before the following translation. 349 # The new controls have to be added into the Control.idt 350 351 my $controlidttablename = $languageidtdir . $installer::globals::separator . "Control.idt"; 352 my $controlidttable = installer::files::read_file($controlidttablename); 353 installer::windows::idtglobal::add_language_checkboxes_to_database($controlidttable, $languagesarrayref); 354 installer::files::save_file($controlidttablename, $controlidttable); 355 $installer::logger::Lang->printf("Added checkboxes for language selection dialog into table %s\n", 356 $controlidttablename); 357 } 358 359 # Now all files are copied into a language specific directory 360 # The template idt files can be translated 361 362 $installer::logger::Info->print( "... localizing idt files (language: $onelanguage) ...\n" ); 363 364 installer::logger::include_header_into_logfile("Localizing idt files (Language: $onelanguage):"); 365 366 my @translationfiles = (); # all idt files, that need a translation 367 push(@translationfiles, "ActionTe.idt"); 368 push(@translationfiles, "Control.idt"); 369 push(@translationfiles, "CustomAc.idt"); 370 push(@translationfiles, "Error.idt"); 371 push(@translationfiles, "LaunchCo.idt"); 372 push(@translationfiles, "RadioBut.idt"); 373 push(@translationfiles, "Property.idt"); 374 push(@translationfiles, "UIText.idt"); 375 376 my $oneidtfilename; 377 my $oneidtfile; 378 379 foreach $oneidtfilename (@translationfiles) 380 { 381 my $languagefilename = installer::windows::idtglobal::get_languagefilename($oneidtfilename, $installer::globals::idtlanguagepath); 382 my $languagefile = installer::files::read_file($languagefilename); 383 384 $oneidtfilename = $languageidtdir . $installer::globals::separator . $oneidtfilename; 385 $oneidtfile = installer::files::read_file($oneidtfilename); 386 387 # Now the substitution can start 388 installer::windows::idtglobal::translate_idtfile($oneidtfile, $languagefile, $onelanguage); 389 390 installer::files::save_file($oneidtfilename, $oneidtfile); 391 392 $installer::logger::Lang->printf("Translated idt file: %s into language %s\n", 393 $oneidtfilename, 394 $onelanguage); 395 $installer::logger::Lang->printf("Used languagefile: %s\n", $languagefilename); 396 } 397 398 # setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE) 399 400 installer::windows::idtglobal::setencoding($languageidtdir, $onelanguage); 401 402 # setting bidi attributes, if required 403 404 if ( $is_bidi ) { installer::windows::idtglobal::setbidiattributes($languageidtdir, $onelanguage); } 405 406 # setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE) 407 installer::windows::idtglobal::set_multilanguageonly_condition($languageidtdir); 408 409 # include the license text into the table Control.idt 410 411 if ( ! $allvariableshashref->{'HIDELICENSEDIALOG'} ) 412 { 413 my $licensefilesource = installer::windows::idtglobal::get_rtflicensefilesource($onelanguage, $includepatharrayref_lang); 414 my $licensefile = installer::files::read_file($licensefilesource); 415 installer::scpzipfiles::replace_all_ziplistvariables_in_rtffile( 416 $licensefile, 417 $allvariableshashref); 418 my $controltablename = $languageidtdir . $installer::globals::separator . "Control.idt"; 419 my $controltable = installer::files::read_file($controltablename); 420 installer::windows::idtglobal::add_licensefile_to_database($licensefile, $controltable); 421 installer::files::save_file($controltablename, $controltable); 422 423 $installer::logger::Lang->printf("Added licensefile %s into database %s\n", 424 $licensefilesource, 425 $controltablename); 426 } 427 428 # include a component into environment table if required 429 430 installer::windows::component::set_component_in_environment_table($languageidtdir, $filesinproductlanguageresolvedarrayref); 431 432 # include the ProductCode and the UpgradeCode from codes-file into the Property.idt 433 434 installer::windows::property::set_codes_in_property_table($languageidtdir); 435 436 # the language specific properties can now be set in the Property.idt 437 438 installer::windows::property::update_property_table($languageidtdir, $onelanguage, $allvariableshashref, $languagestringref); 439 440 # replacing variables in RegLocat.idt 441 442 installer::windows::msiglobal::update_reglocat_table($languageidtdir, $allvariableshashref); 443 444 # replacing variables in RemoveRe.idt (RemoveRegistry.idt) 445 446 installer::windows::msiglobal::update_removere_table($languageidtdir); 447 448 # adding language specific properties for multilingual installation sets 449 450 installer::windows::property::set_languages_in_property_table($languageidtdir, $languagesarrayref); 451 452 # adding settings into CheckBox.idt 453 installer::windows::property::update_checkbox_table($languageidtdir, $allvariableshashref); 454 455 # adding the files from the binary directory into the binary table 456 installer::windows::binary::update_binary_table($languageidtdir, $filesinproductlanguageresolvedarrayref, $binarytablefiles); 457 458 # setting patch codes to detect installed products 459 460 if (( $installer::globals::patch ) || ( $installer::globals::languagepack ) || ( $allvariableshashref->{'PDFCONVERTER'} )) { installer::windows::patch::update_patch_tables($languageidtdir, $allvariableshashref); } 461 462 # Adding Windows Installer CustomActions 463 464 installer::windows::idtglobal::addcustomactions($languageidtdir, $windowscustomactionsarrayref, $filesinproductlanguageresolvedarrayref); 465 466 # Adding child projects if specified 467 468 if ($installer::globals::addchildprojects) 469 { 470 # Adding child projects to installation dynamically (also in feature table) 471 installer::windows::idtglobal::add_childprojects($languageidtdir, $filesinproductlanguageresolvedarrayref, $allvariableshashref); 472 # setting Java variables for Java products 473 if ( $allvariableshashref->{'JAVAPRODUCT'} ) { installer::windows::java::update_java_tables($languageidtdir, $allvariableshashref); } 474 } 475 476 # Then the language specific msi database can be created 477 478 if ( $installer::globals::iswin ) # only possible on a Windows platform 479 { 480 my $msidatabasename = installer::windows::msiglobal::get_msidatabasename($allvariableshashref, $onelanguage); 481 my $msifilename = $languageidtdir . $installer::globals::separator . $msidatabasename; 482 483 $installer::logger::Info->print( "... creating msi database (language $onelanguage) ... \n" ); 484 485 installer::windows::msiglobal::set_uuid_into_component_table($languageidtdir, $allvariableshashref); # setting new GUID for the components using the tool uuidgen.exe 486 installer::windows::msiglobal::prepare_64bit_database($languageidtdir, $allvariableshashref); # making last 64 bit changes 487 installer::windows::msiglobal::create_msi_database($languageidtdir ,$msifilename); 488 489 # validating the database # ToDo 490 491 my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.mlf"); 492 # my $languagefile = installer::files::read_file($installer::globals::idtlanguagepath . $installer::globals::separator . "SIS.ulf"); 493 494 installer::windows::msiglobal::write_summary_into_msi_database($msifilename, $onelanguage, $languagefile, $allvariableshashref); 495 496 # copy msi database into installation directory 497 498 my $msidestfilename = $installdir . $installer::globals::separator . $msidatabasename; 499 installer::systemactions::copy_one_file($msifilename, $msidestfilename); 500 } 501 } 502 503 # Creating transforms, if the installation set has more than one language 504 # renaming the msi database and generating the setup.ini file 505 506 my $defaultlanguage = installer::languages::get_default_language($languagesarrayref); 507 508 if ( $installer::globals::iswin ) # only possible on a Windows platform 509 { 510 if ( $#{$languagesarrayref} > 0 ) 511 { 512 installer::windows::msiglobal::create_transforms($languagesarrayref, $defaultlanguage, $installdir, $allvariableshashref); 513 } 514 515 installer::windows::msiglobal::rename_msi_database_in_installset($defaultlanguage, $installdir, $allvariableshashref); 516 517 if ( $allvariableshashref->{'ADDLANGUAGEINDATABASENAME'} ) { installer::windows::msiglobal::add_language_to_msi_database($defaultlanguage, $installdir, $allvariableshashref); } 518 519 $installer::logger::Info->print( "... generating setup.ini ...\n" ); 520 521 if ( ! $allvariableshashref->{'NOLOADERREQUIRED'} ) { installer::windows::msiglobal::create_setup_ini($languagesarrayref, $defaultlanguage, $installdir, $allvariableshashref); } 522 } 523 524 # Analyzing the ScpActions and copying the files into the installation set 525 # At least the loader.exe 526 527 $installer::logger::Info->print( "... copying files into installation set ...\n" ); 528 529 # installer::windows::msiglobal::copy_scpactions_into_installset($defaultlanguage, $installdir, $scpactionsinproductlanguageresolvedarrayref); 530 installer::worker::put_scpactions_into_installset($installdir); 531 532 # ... copying the setup.exe 533 534 installer::windows::msiglobal::copy_windows_installer_files_into_installset($installdir, $includepatharrayref, $allvariableshashref); 535 536 # ... copying the child projects 537 538 if ($installer::globals::addchildprojects) 539 { 540 installer::windows::msiglobal::copy_child_projects_into_installset($installdir, $allvariableshashref); 541 } 542 543 $installer::logger::Info->print( "... creating ddf files ...\n" ); 544 545 # Creating all needed ddf files and generating a list 546 # for the package process containing all system calls 547 548 my $ddfdir = installer::systemactions::create_directories("ddf", $languagestringref); 549 550 $installer::globals::packjobref = installer::windows::msiglobal::generate_cab_file_list($filesinproductlanguageresolvedarrayref, $installdir, $ddfdir, $allvariableshashref); 551 552 $installer::logger::Info->print("\n"); 553 554 ####################################################### 555 # Finally really create the installation packages, 556 # Only for Windows and only on a windows platform. 557 ####################################################### 558 559 if ( $installer::globals::iswin ) # only possible on a Windows platform 560 { 561 $installer::logger::Info->print( "... packaging installation set ... \n" ); 562 installer::windows::msiglobal::execute_packaging($installer::globals::packjobref, $loggingdir, $allvariableshashref); 563 if ( $installer::globals::include_cab_in_msi ) { installer::windows::msiglobal::include_cabs_into_msi($installdir); } 564 } 565 566 ####################################################### 567 # Analyzing the log file 568 ####################################################### 569 570 my $is_success = 0; 571 my $finalinstalldir = ""; 572 installer::worker::clean_output_tree(); # removing directories created in the output tree 573 ($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $installdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); 574 575 ####################################################### 576 # Creating download installation set 577 ####################################################### 578 579 my $create_download = 0; 580 my $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname"); 581 if ( $installer::globals::languagepack ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "langpackdownloadname"); } 582 if ( $installer::globals::patch ) { $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "patchdownloadname"); } 583 584 if ( $is_success ) { installer::followme::save_followme_info($finalinstalldir, $includepatharrayref, $allvariableshashref, $$downloadname, $languagestringref, $languagesarrayref, $current_install_number, $loggingdir, $installlogdir); } 585 586 if ( $$downloadname ne "" ) { $create_download = 1; } 587 if (( $is_success ) && ( $create_download ) && ( $ENV{'ENABLE_DOWNLOADSETS'} )) 588 { 589 my $downloaddir = installer::download::create_download_sets($finalinstalldir, $includepatharrayref, $allvariableshashref, $$downloadname, $languagestringref, $languagesarrayref); 590 installer::worker::analyze_and_save_logfile($loggingdir, $downloaddir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); 591 } 592 593} 594 595 596 597 598=head2 MakeNonWindowsBuild (...) 599 600 Create an installation set for non-windows platforms based on EPM files. 601 602=cut 603sub MakeNonWindowsBuild ($$$$$$$$$$$$$$$) 604{ 605 my ( 606 $allvariableshashref, 607 $allsettingsarrayref, 608 $current_install_number, 609 $directoriesforepmarrayref, 610 $filesinproductlanguageresolvedarrayref, 611 $includepatharrayref, 612 $languagesarrayref, 613 $languagestringref, 614 $linksinproductlanguageresolvedarrayref, 615 $unixlinksinproductlanguageresolvedarrayref, 616 $loggingdir, 617 $modulesinproductarrayref, 618 $packages, 619 $shipinstalldir, 620 $currentdir 621 ) = @_; 622 623 #################################################### 624 # Creating directories 625 #################################################### 626 627 my $installdir = installer::worker::create_installation_directory($shipinstalldir, $languagestringref, \$current_install_number); 628 629 my $listfiledir = installer::systemactions::create_directories("listfile", $languagestringref); 630 my $installlogdir = installer::systemactions::create_directory_next_to_directory($installdir, "log"); 631 632 #################################################### 633 # Reading for Solaris all package descriptions 634 # from file defined in property PACKAGEMAP 635 #################################################### 636 637 if ( $installer::globals::issolarisbuild ) { installer::epmfile::read_packagemap($allvariableshashref, $includepatharrayref, $languagesarrayref); } 638 639 my $epmexecutable = ""; 640 my $found_epm = 0; 641 642 # shuffle array to reduce parallel packaging process in pool 643 installer::worker::shuffle_array($packages); 644 645 # iterating over all packages 646 for ( my $k = 0; $k <= $#{$packages}; $k++ ) 647 { 648 my $onepackage = ${$packages}[$k]; 649 650 # checking, if this is a language pack or a project pack. 651 # Creating language packs only, if $installer::globals::languagepack is set. Parameter: -languagepack 652 653 if ( $installer::globals::languagepack ) { installer::languagepack::replace_languagestring_variable($onepackage, $languagestringref); } 654 655 my $onepackagename = $onepackage->{'module'}; # name of the top module (required) 656 657 my $shellscriptsfilename = ""; 658 if ( $onepackage->{'script'} ) { $shellscriptsfilename = $onepackage->{'script'}; } 659 # no scripts for Solaris patches! 660 if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild )) { $shellscriptsfilename = ""; } 661 662 ########################### 663 # package name 664 ########################### 665 666 my $packagename = ""; 667 668 if ( $installer::globals::issolarisbuild ) # only for Solaris 669 { 670 if ( $onepackage->{'solarispackagename'} ) { $packagename = $onepackage->{'solarispackagename'}; } 671 } 672 else # not Solaris 673 { 674 if ( $onepackage->{'packagename'} ) { $packagename = $onepackage->{'packagename'}; } 675 } 676 677 if (!($packagename eq "")) 678 { 679 installer::packagelist::resolve_packagevariables(\$packagename, $allvariableshashref, 0); 680 } 681 682 # Debian allows no underline in package name 683 if ( $installer::globals::debian ) { $packagename =~ s/_/-/g; } 684 685 # Debian allows no underline in package name 686 if ( $installer::globals::debian ) { $packagename =~ s/_/-/g; } 687 688 my $linkaddon = ""; 689 my $linkpackage = 0; 690 $installer::globals::add_required_package = ""; 691 $installer::globals::linuxlinkrpmprocess = 0; 692 693 if ( $installer::globals::makelinuxlinkrpm ) 694 { 695 my $oldpackagename = $packagename; 696 $installer::globals::add_required_package = $oldpackagename; # the link rpm requires the non-linked version 697 if ( $installer::globals::languagepack ) { $packagename = $packagename . "_u"; } 698 else { $packagename = $packagename . "u"; } 699 my $savestring = $oldpackagename . "\t" . $packagename; 700 push(@installer::globals::linkrpms, $savestring); 701 $linkaddon = "_links"; 702 $installer::globals::linuxlinkrpmprocess = 1; 703 $linkpackage = 1; 704 } 705 706 #################################################### 707 # Header for this package into log file 708 #################################################### 709 710 installer::logger::include_header_into_logfile("Creating package: $packagename ($k)"); 711 712 #################################################### 713 # Pool check: If package is created at the moment 714 # try it again later. 715 #################################################### 716 717 if (( $installer::globals::patch ) || 718 ( $installer::globals::languagepack ) || 719 ( $installer::globals::packageformat eq "native" ) || 720 ( $installer::globals::packageformat eq "portable" ) || 721 ( $installer::globals::packageformat eq "osx" )) { $allvariableshashref->{'POOLPRODUCT'} = 0; } 722 723 if ( $allvariableshashref->{'POOLPRODUCT'} ) 724 { 725 if ( ! $installer::globals::sessionidset ) { installer::packagepool::set_sessionid(); } 726 if ( ! $installer::globals::poolpathset ) { installer::packagepool::set_pool_path(); } 727 if (( ! $installer::globals::getuidpathset ) && ( $installer::globals::issolarisbuild )) { installer::worker::set_getuid_path($includepatharrayref); } 728 729 my $package_is_creatable = installer::packagepool::check_package_availability($packagename); 730 731 if (( ! $package_is_creatable ) && ( ! exists($installer::globals::poolshiftedpackages{$packagename}) )) 732 { 733 splice(@{$packages}, $k, 1); # removing package ... 734 push(@{$packages}, $onepackage); # ... and adding it to the end 735 $installer::globals::poolshiftedpackages{$packagename} = 1; # only shifting each package once 736 $k--; # decreasing the counter 737 $installer::logger::Info->printf("Pool: Package \"%s\" cannot be created at the moment. Trying again later (1).\n", $packagename); 738 $installer::logger::Lang->printf("Pool: Package \"%s\" cannot be created at the moment. Trying again later (1).\n", $packagename); 739 next; # repeating this iteration with new package 740 } 741 } 742 743 ########################################### 744 # Root path, can be defined as parameter 745 ########################################### 746 747 my $packagerootpath = ""; 748 749 if ($installer::globals::rootpath eq "") 750 { 751 $packagerootpath = $onepackage->{'destpath'}; 752 installer::packagelist::resolve_packagevariables(\$packagerootpath, $allvariableshashref, 1); 753 if ( $^O =~ /darwin/i ) { $packagerootpath =~ s/\/opt\//\/Applications\//; } 754 } 755 else 756 { 757 $packagerootpath = $installer::globals::rootpath; 758 } 759 760 ############################################# 761 # copying the collectors for each package 762 ############################################# 763 764 my $filesinpackage = installer::converter::copy_collector($filesinproductlanguageresolvedarrayref); 765 my $linksinpackage = installer::converter::copy_collector($linksinproductlanguageresolvedarrayref); 766 my $unixlinksinpackage = installer::converter::copy_collector($unixlinksinproductlanguageresolvedarrayref); 767 my $dirsinpackage = installer::converter::copy_collector($directoriesforepmarrayref); 768 769 ########################################### 770 # setting the root path for the packages 771 ########################################### 772 773 installer::scriptitems::add_rootpath_to_directories($dirsinpackage, $packagerootpath); 774 installer::scriptitems::add_rootpath_to_files($filesinpackage, $packagerootpath); 775 installer::scriptitems::add_rootpath_to_links($linksinpackage, $packagerootpath); 776 installer::scriptitems::add_rootpath_to_files($unixlinksinpackage, $packagerootpath); 777 778 ################################# 779 # collecting items for package 780 ################################# 781 782 $filesinpackage = installer::packagelist::find_files_for_package($filesinpackage, $onepackage); 783 $unixlinksinpackage = installer::packagelist::find_files_for_package($unixlinksinpackage, $onepackage); 784 $linksinpackage = installer::packagelist::find_links_for_package($linksinpackage, $filesinpackage); 785 $dirsinpackage = installer::packagelist::find_dirs_for_package($dirsinpackage, $onepackage); 786 787 ############################################### 788 # nothing to do, if $filesinpackage is empty 789 ############################################### 790 791 if ( ! ( $#{$filesinpackage} > -1 )) 792 { 793 push(@installer::globals::emptypackages, $packagename); 794 $installer::logger::Lang->print("\n"); 795 $installer::logger::Lang->print("\n"); 796 $installer::logger::Lang->print("No file in package: %s \-\> Skipping\n\n", $packagename); 797 next; # next package, end of loop ! 798 } 799 800 ################################################################# 801 # nothing to do for Linux patches, if no file has flag PATCH 802 ################################################################# 803 804 # Linux Patch: The complete RPM has to be built, if one file in the RPM has the flag PATCH (also for DEBs) 805 if (( $installer::globals::patch ) && (( $installer::globals::islinuxrpmbuild ) || ( $installer::globals::islinuxdebbuild ))) 806 { 807 my $patchfiles = installer::worker::collect_all_items_with_special_flag($filesinpackage ,"PATCH"); 808 if ( ! ( $#{$patchfiles} > -1 )) 809 { 810 $installer::logger::Lang->print("\n"); 811 $installer::logger::Lang->print("\n"); 812 $installer::logger::Lang->print("Linux Patch: No patch file in package: %s \-\> Skipping\n\n", 813 $packagename); 814 next; 815 } 816 } 817 818 ########################################### 819 # Stripping libraries 820 ########################################### 821 822 # Building for non Windows platforms in cws requires, that all files are stripped before packaging: 823 # 1. copy all files that need to be stripped locally 824 # 2. strip all these files 825 826 if ( $installer::globals::strip ) 827 { 828 installer::strip::strip_libraries($filesinpackage, $languagestringref); 829 } 830 831 ############################################################### 832 # Searching for files in $filesinpackage with flag LINUXLINK 833 ############################################################### 834 835 if (( $installer::globals::islinuxbuild ) && ( ! $installer::globals::simple )) # for rpms and debian packages 836 { 837 # special handling for all RPMs in $installer::globals::linuxlinkrpms 838 839 # if (( $installer::globals::linuxlinkrpms =~ /\b$onepackagename\b/ ) || ( $installer::globals::languagepack )) 840 if ( $installer::globals::linuxlinkrpms =~ /\b$onepackagename\b/ ) 841 { 842 my $run = 0; 843 844 if (( $installer::globals::makelinuxlinkrpm ) && ( ! $run )) 845 { 846 $filesinpackage = \@installer::globals::linuxpatchfiles; 847 $linksinpackage = \@installer::globals::linuxlinks; 848 $installer::globals::makelinuxlinkrpm = 0; 849 if ( $installer::globals::patch ) { $installer::globals::call_epm = 1; } # enabling packing again 850 $run = 1; 851 } 852 853 if (( ! $installer::globals::makelinuxlinkrpm ) && ( ! $run )) 854 { 855 $filesinpackage = installer::worker::prepare_linuxlinkfiles($filesinpackage); 856 $linksinpackage = installer::worker::prepare_forced_linuxlinkfiles($linksinpackage); 857 $installer::globals::makelinuxlinkrpm = 1; 858 if ( $allvariableshashref->{'OPENSOURCE'} ) { $installer::globals::add_required_package = $packagename . "u"; } 859 if ( $installer::globals::patch ) { $installer::globals::call_epm = 0; } # no packing of core module in patch 860 $shellscriptsfilename = ""; # shell scripts only need to be included into the link rpm 861 $run = 1; 862 } 863 } 864 } 865 866 ########################################### 867 # Simple installation mechanism 868 ########################################### 869 870 if ( $installer::globals::simple ) { installer::worker::install_simple($onepackagename, $$languagestringref, $dirsinpackage, $filesinpackage, $linksinpackage, $unixlinksinpackage); } 871 872 ########################################### 873 # Checking epm state 874 ########################################### 875 876 if (( $installer::globals::call_epm ) && ( ! $found_epm )) 877 { 878 $epmexecutable = installer::epmfile::find_epm_on_system($includepatharrayref); 879 installer::epmfile::set_patch_state($epmexecutable); # setting $installer::globals::is_special_epm 880 $found_epm = 1; # searching only once 881 } 882 883 ########################################### 884 # Creating epm list file 885 ########################################### 886 887 if ( ! $installer::globals::simple ) 888 { 889 # epm list file format: 890 # type mode owner group destination source options 891 # Example for a file: f 755 root sys /usr/bin/foo foo 892 # Example for a directory: d 755 root sys /var/spool/foo - 893 # Example for a link: l 000 root sys /usr/bin/linkname filename 894 # The source field specifies the file to link to 895 896 my $epmfilename = "epm_" . $onepackagename . $linkaddon . ".lst"; 897 898 $installer::logger::Info->print( "... creating epm list file $epmfilename ... \n" ); 899 900 my $completeepmfilename = $listfiledir . $installer::globals::separator . $epmfilename; 901 902 my @epmfile = (); 903 904 my $epmheaderref = installer::epmfile::create_epm_header($allvariableshashref, $filesinproductlanguageresolvedarrayref, $languagesarrayref, $onepackage); 905 installer::epmfile::adding_header_to_epm_file(\@epmfile, $epmheaderref); 906 907 if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild )) 908 { 909 $filesinpackage = installer::worker::analyze_patch_files($filesinpackage); 910 911 if ( ! ( $#{$filesinpackage} > -1 )) 912 { 913 push(@installer::globals::emptypackages, $packagename); 914 $installer::logger::Lang->print("\n"); 915 $installer::logger::Lang->print("No file in package: %s \-\> Skipping\n", $packagename); 916 next; # next package, end of loop ! 917 } 918 } 919 920 # adding directories, files and links into epm file 921 922 installer::epmfile::put_directories_into_epmfile($dirsinpackage, \@epmfile, $allvariableshashref, $packagerootpath); 923 installer::epmfile::put_files_into_epmfile($filesinpackage, \@epmfile ); 924 installer::epmfile::put_links_into_epmfile($linksinpackage, \@epmfile ); 925 installer::epmfile::put_unixlinks_into_epmfile($unixlinksinpackage, \@epmfile ); 926 927 if ((!( $shellscriptsfilename eq "" )) && (!($installer::globals::iswindowsbuild))) { installer::epmfile::adding_shellscripts_to_epm_file(\@epmfile, $shellscriptsfilename, $packagerootpath, $allvariableshashref, $filesinpackage); } 928 929 installer::files::save_file($completeepmfilename ,\@epmfile); 930 931 # ... splitting the rootpath into a relocatable part and a static part, if possible 932 933 my $staticpath = ""; 934 my $relocatablepath = ""; 935 # relocatable path can be defined in package list 936 if ( $onepackage->{'relocatablepath'} ) { $relocatablepath = $onepackage->{'relocatablepath'}; } 937 # setting fix part and variable part of destination path 938 installer::epmfile::analyze_rootpath($packagerootpath, \$staticpath, \$relocatablepath, $allvariableshashref); 939 940 # ... replacing the variable PRODUCTDIRECTORYNAME in the shellscriptfile by $staticpath 941 942 installer::epmfile::resolve_path_in_epm_list_before_packaging(\@epmfile, $completeepmfilename, "PRODUCTDIRECTORYNAME", $staticpath); 943 installer::epmfile::resolve_path_in_epm_list_before_packaging(\@epmfile, $completeepmfilename, "SOLSUREPACKAGEPREFIX", $allvariableshashref->{'SOLSUREPACKAGEPREFIX'}); 944 installer::epmfile::resolve_path_in_epm_list_before_packaging(\@epmfile, $completeepmfilename, "UREPACKAGEPREFIX", $allvariableshashref->{'UREPACKAGEPREFIX'}); 945 # installer::epmfile::resolve_path_in_epm_list_before_packaging(\@epmfile, $completeepmfilename, "BASISDIRECTORYVERSION", $allvariableshashref->{'OOOBASEVERSION'}); 946 installer::files::save_file($completeepmfilename ,\@epmfile); 947 948 ####################################################### 949 # Now the complete content of the package is known, 950 # including variables and shell scripts. 951 # Create the package or using the package pool? 952 ####################################################### 953 954 my $use_package_from_pool = 0; 955 if ( $allvariableshashref->{'POOLPRODUCT'} ) { $use_package_from_pool = installer::packagepool::package_is_up_to_date($allvariableshashref, $onepackage, $packagename, \@epmfile, $filesinpackage, $installdir, $installer::globals::epmoutpath, $languagestringref); } 956 957 if ( $use_package_from_pool == 3 ) # repeat this package later 958 { 959 my $package_is_creatable = installer::packagepool::check_package_availability($packagename); 960 961 if (( ! $package_is_creatable ) && ( ! exists($installer::globals::poolshiftedpackages{$packagename}) )) 962 { 963 splice(@{$packages}, $k, 1); # removing package ... 964 push(@{$packages}, $onepackage); # ... and adding it to the end 965 $installer::globals::poolshiftedpackages{$packagename} = 1; # only shifting each package once 966 $k--; # decreasing the counter 967 $installer::logger::Info->print("\n"); 968 $installer::logger::Info->print("Pool: Package \"%s\" cannot be created at the moment. Trying again later (2).\n", $packagename); 969 $installer::logger::Lang->print("\n"); 970 $installer::logger::Lang->print("Pool: Package \"%s\" cannot be created at the moment. Trying again later (2).\n", $packagename); 971 next; # repeating this iteration with new package 972 } 973 } 974 975 if ( $use_package_from_pool == 4 ) # There was a problem with pooling. Repeat this package immediately. 976 { 977 $k--; # decreasing the counter 978 $installer::logger::Info->print("\n"); 979 $installer::logger::Info->print("Pool: Package \"%s\" had pooling problems. Repeating packaging immediately (3).\n", $packagename); 980 $installer::logger::Lang->print("\n"); 981 $installer::logger::Lang->print("Pool: Package \"%s\" had pooling problems. Repeating packaging immediately (3).\n", $packagename); 982 next; # repeating this iteration 983 } 984 985 if ( $use_package_from_pool == 0 ) 986 { 987 # changing into the "install" directory to create installation sets 988 989 my $currentdir = cwd(); # $currentdir is global in this file 990 991 chdir($installdir); # changing into install directory ($installdir is global in this file) 992 993 ########################################### 994 # Starting epm 995 ########################################### 996 997 # With a patched epm, it is now possible to set the relocatable directory, change 998 # the directory in which the packages are created, setting "requires" and "provides" 999 # (Linux) or creating the "depend" file (Solaris) and finally to begin 1000 # the packaging process with standard tooling and standard parameter 1001 # Linux: Adding into the spec file: Prefix: /opt 1002 # Solaris: Adding into the pkginfo file: BASEDIR=/opt 1003 # Attention: Changing of the path can influence the shell scripts 1004 1005 if (( $installer::globals::is_special_epm ) && ( ($installer::globals::islinuxrpmbuild) || ($installer::globals::issolarispkgbuild) )) # special handling only for Linux RPMs and Solaris Packages 1006 { 1007 if ( $installer::globals::call_epm ) # only do something, if epm is really executed 1008 { 1009 # ... now epm can be started, to create the installation sets 1010 1011 $installer::logger::Info->print( "... starting patched epm ... \n" ); 1012 1013 installer::epmfile::call_epm($epmexecutable, $completeepmfilename, $packagename, $includepatharrayref); 1014 1015 my $newepmdir = installer::epmfile::prepare_packages($loggingdir, $packagename, $staticpath, $relocatablepath, $onepackage, $allvariableshashref, $filesinpackage, $languagestringref); # adding the line for Prefix / Basedir, include rpmdir 1016 1017 installer::epmfile::create_packages_without_epm($newepmdir, $packagename, $includepatharrayref, $allvariableshashref, $languagestringref); # start to package 1018 1019 # finally removing all temporary files 1020 1021 installer::epmfile::remove_temporary_epm_files($newepmdir, $loggingdir, $packagename); 1022 1023 # Installation: 1024 # Install: pkgadd -a myAdminfile -d ./SUNWso8m34.pkg 1025 # Install: rpm -i --prefix=/opt/special --nodeps so8m35.rpm 1026 1027 installer::epmfile::create_new_directory_structure($newepmdir); 1028 $installer::globals::postprocess_specialepm = 1; 1029 1030 # solaris patch not needed anymore 1031 # if (( $installer::globals::patch ) && ( $installer::globals::issolarisx86build )) { installer::worker::fix2_solaris_x86_patch($packagename, $installer::globals::epmoutpath); } 1032 } 1033 } 1034 else # this is the standard epm (not relocatable) or ( nonlinux and nonsolaris ) 1035 { 1036 installer::epmfile::resolve_path_in_epm_list_before_packaging(\@epmfile, $completeepmfilename, "\$\$PRODUCTINSTALLLOCATION", $relocatablepath); 1037 installer::files::save_file($completeepmfilename ,\@epmfile); # Warning for pool, content of epm file is changed. 1038 1039 if ( $installer::globals::call_epm ) 1040 { 1041 # ... now epm can be started, to create the installation sets 1042 1043 $installer::logger::Info->print( "... starting unpatched epm ... \n" ); 1044 1045 if ( $installer::globals::call_epm ) { installer::epmfile::call_epm($epmexecutable, $completeepmfilename, $packagename, $includepatharrayref); } 1046 1047 if (($installer::globals::islinuxrpmbuild) || ($installer::globals::issolarispkgbuild) || ($installer::globals::debian)) 1048 { 1049 $installer::globals::postprocess_standardepm = 1; 1050 } 1051 } 1052 } 1053 1054 if ( $allvariableshashref->{'POOLPRODUCT'} ) { installer::packagepool::put_content_into_pool($packagename, $installdir, $installer::globals::epmoutpath, $filesinpackage, \@epmfile); } 1055 1056 chdir($currentdir); # changing back into start directory 1057 1058 } # end of "if ( ! $use_package_from_pool ) 1059 1060 } # end of "if ( ! $installer::globals::simple ) 1061 1062 ########################################### 1063 # xpd installation mechanism 1064 ########################################### 1065 1066 # Creating the xpd file for the package. This has to happen always, not determined by $use_package_from_pool 1067 1068 if ( $installer::globals::isxpdplatform ) 1069 { 1070 if (( ! $installer::globals::languagepack ) && ( ! $installer::globals::patch )) 1071 { 1072 if (( $allvariableshashref->{'XPDINSTALLER'} ) && ( $installer::globals::call_epm != 0 )) 1073 { 1074 installer::xpdinstaller::create_xpd_file($onepackage, $packages, $languagestringref, $allvariableshashref, $modulesinproductarrayref, $installdir, $installer::globals::epmoutpath, $linkpackage, \%installer::globals::xpdpackageinfo); 1075 $installer::globals::xpd_files_prepared = 1; 1076 %installer::globals::xpdpackageinfo = (); 1077 } 1078 } 1079 } 1080 1081 if ( $installer::globals::makelinuxlinkrpm ) { $k--; } # decreasing the counter to create the link rpm! 1082 1083 } # end of "for ( my $k = 0; $k <= $#{$packages}; $k++ )" 1084 1085 installer::packagepool::log_pool_statistics(); 1086 1087 ############################################################## 1088 # Post epm functionality, after the last package is packed 1089 ############################################################## 1090 1091 if ( $installer::globals::postprocess_specialepm ) 1092 { 1093 installer::logger::include_header_into_logfile("Post EPM processes (Patched EPM):"); 1094 1095 chdir($installdir); 1096 1097 # Copying the cde, kde and gnome packages into the installation set 1098 if ( $installer::globals::addsystemintegration ) { installer::epmfile::put_systemintegration_into_installset($installer::globals::epmoutpath, $includepatharrayref, $allvariableshashref, $modulesinproductarrayref); } 1099 1100 # Adding license and readme into installation set 1101 # if ($installer::globals::addlicensefile) { installer::epmfile::put_installsetfiles_into_installset($installer::globals::epmoutpath); } 1102 if ($installer::globals::addlicensefile) { installer::worker::put_scpactions_into_installset("."); } 1103 1104 # Adding child projects to installation dynamically 1105 if ($installer::globals::addchildprojects) { installer::epmfile::put_childprojects_into_installset($installer::globals::epmoutpath, $allvariableshashref, $modulesinproductarrayref, $includepatharrayref); } 1106 1107 # Adding license file into setup 1108 if ( $allvariableshashref->{'PUT_LICENSE_INTO_SETUP'} ) { installer::worker::put_license_into_setup(".", $includepatharrayref); } 1109 1110 # Creating installation set for Unix language packs, that are not part of multi lingual installation sets 1111 if ( ( $installer::globals::languagepack ) && ( ! $installer::globals::debian ) && ( ! $installer::globals::makedownload ) ) { installer::languagepack::build_installer_for_languagepack($installer::globals::epmoutpath, $allvariableshashref, $includepatharrayref, $languagesarrayref, $languagestringref); } 1112 1113 # Finalizing patch installation sets 1114 if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild )) { installer::epmfile::finalize_patch($installer::globals::epmoutpath, $allvariableshashref); } 1115 if (( $installer::globals::patch ) && ( $installer::globals::islinuxrpmbuild )) { installer::epmfile::finalize_linux_patch($installer::globals::epmoutpath, $allvariableshashref, $includepatharrayref); } 1116 1117 # Copying the xpd installer into the installation set 1118 if (( $allvariableshashref->{'XPDINSTALLER'} ) && ( $installer::globals::isxpdplatform ) && ( $installer::globals::xpd_files_prepared )) 1119 { 1120 installer::xpdinstaller::create_xpd_installer($installdir, $allvariableshashref, $languagestringref); 1121 $installer::globals::addjavainstaller = 0; # only one java installer possible 1122 } 1123 1124 # Copying the java installer into the installation set 1125 chdir($currentdir); # changing back into start directory 1126 if ( $installer::globals::addjavainstaller ) { installer::javainstaller::create_java_installer($installdir, $installer::globals::epmoutpath, $languagestringref, $languagesarrayref, $allvariableshashref, $includepatharrayref, $modulesinproductarrayref); } 1127 } 1128 1129 if ( $installer::globals::postprocess_standardepm ) 1130 { 1131 installer::logger::include_header_into_logfile("Post EPM processes (Standard EPM):"); 1132 1133 chdir($installdir); 1134 1135 # determine the destination directory 1136 my $newepmdir = installer::epmfile::determine_installdir_ooo(); 1137 1138 # Copying the cde, kde and gnome packages into the installation set 1139 if ( $installer::globals::addsystemintegration ) { installer::epmfile::put_systemintegration_into_installset($newepmdir, $includepatharrayref, $allvariableshashref, $modulesinproductarrayref); } 1140 1141 # Adding license and readme into installation set 1142 # if ($installer::globals::addlicensefile) { installer::epmfile::put_installsetfiles_into_installset($newepmdir); } 1143 if ($installer::globals::addlicensefile) { installer::worker::put_scpactions_into_installset("."); } 1144 1145 # Adding license file into setup 1146 if ( $allvariableshashref->{'PUT_LICENSE_INTO_SETUP'} ) { installer::worker::put_license_into_setup(".", $includepatharrayref); } 1147 1148 # Creating installation set for Unix language packs, that are not part of multi lingual installation sets 1149 if ( ( $installer::globals::languagepack ) && ( ! $installer::globals::debian ) && ( ! $installer::globals::makedownload ) ) { installer::languagepack::build_installer_for_languagepack($newepmdir, $allvariableshashref, $includepatharrayref, $languagesarrayref, $languagestringref); } 1150 1151 chdir($currentdir); # changing back into start directory 1152 } 1153 1154 if (( $installer::globals::issolarispkgbuild ) && ( $allvariableshashref->{'COLLECT_PKGMAP'} )) { installer::worker::collectpackagemaps($installdir, $languagestringref, $allvariableshashref); } 1155 1156 ####################################################### 1157 # Analyzing the log file 1158 ####################################################### 1159 1160 my $is_success = 0; 1161 my $finalinstalldir = ""; 1162 1163 installer::worker::clean_output_tree(); # removing directories created in the output tree 1164 ($is_success, $finalinstalldir) = installer::worker::analyze_and_save_logfile($loggingdir, $installdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); 1165 my $downloadname = installer::ziplist::getinfofromziplist($allsettingsarrayref, "downloadname"); 1166 if ( $is_success ) { installer::followme::save_followme_info($finalinstalldir, $includepatharrayref, $allvariableshashref, $$downloadname, $languagestringref, $languagesarrayref, $current_install_number, $loggingdir, $installlogdir); } 1167 1168 ####################################################### 1169 # Creating download installation set 1170 ####################################################### 1171 1172 if ( $installer::globals::makedownload ) 1173 { 1174 my $create_download = 0; 1175 if ( $$downloadname ne "" ) { $create_download = 1; } 1176 if (( $is_success ) && ( $create_download ) && ( $ENV{'ENABLE_DOWNLOADSETS'} )) 1177 { 1178 my $downloaddir = installer::download::create_download_sets($finalinstalldir, $includepatharrayref, $allvariableshashref, $$downloadname, $languagestringref, $languagesarrayref); 1179 installer::worker::analyze_and_save_logfile($loggingdir, $downloaddir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); 1180 } 1181 } 1182 1183 ####################################################### 1184 # Creating jds installation set 1185 ####################################################### 1186 1187 if ( $installer::globals::makejds ) 1188 { 1189 my $create_jds = 0; 1190 1191 if ( $allvariableshashref->{'JDSBUILD'} ) { $create_jds = 1; } 1192 if (! $installer::globals::issolarispkgbuild ) { $create_jds = 0; } 1193 1194 if (( $is_success ) && ( $create_jds )) 1195 { 1196 if ( ! $installer::globals::jds_language_controlled ) 1197 { 1198 my $correct_language = installer::worker::check_jds_language($allvariableshashref, $languagestringref); 1199 $installer::globals::correct_jds_language = $correct_language; 1200 $installer::globals::jds_language_controlled = 1; 1201 } 1202 1203 if ( $installer::globals::correct_jds_language ) 1204 { 1205 my $jdsdir = installer::worker::create_jds_sets($finalinstalldir, $allvariableshashref, $languagestringref, $languagesarrayref, $includepatharrayref); 1206 installer::worker::clean_jds_temp_dirs(); 1207 installer::worker::analyze_and_save_logfile($loggingdir, $jdsdir, $installlogdir, $allsettingsarrayref, $languagestringref, $current_install_number); 1208 } 1209 } 1210 } 1211} 1212 1213 1214################################################# 1215# Main program 1216################################################# 1217 1218################################################# 1219# Part 1: The platform independent part 1220################################################# 1221 1222################################################# 1223# Part 1a: The language independent part 1224################################################# 1225 1226installer::logger::starttime(); 1227$installer::logger::Global->add_timestamp("starting logging"); 1228 1229# While there is no language set and logger::Lang is not yet tied to a log file, 1230# forward its output to logger::Global. 1231$installer::logger::Lang->set_forward($installer::logger::Global); 1232$installer::logger::Info->set_forward($installer::logger::Global); 1233 1234######################################### 1235# Checking the environment and setting 1236# most important variables 1237######################################### 1238 1239$installer::logger::Info->print( "... checking environment variables ...\n" ); 1240my $environmentvariableshashref = installer::control::check_system_environment(); 1241 1242installer::environment::set_global_environment_variables($environmentvariableshashref); 1243 1244################################# 1245# Check and output of parameter 1246################################# 1247 1248installer::parameter::saveparameter(); 1249installer::parameter::getparameter(); 1250 1251# debugging can start after function "getparameter" 1252 1253installer::parameter::control_fundamental_parameter(); 1254installer::parameter::setglobalvariables(); 1255installer::parameter::control_required_parameter(); 1256 1257if (!($installer::globals::languages_defined_in_productlist)) { installer::languages::analyze_languagelist(); } 1258installer::parameter::outputparameter(); 1259 1260installer::control::check_updatepack(); 1261 1262$installer::globals::build = uc($installer::globals::build); # using "SRC680" instead of "src680" 1263 1264###################################### 1265# Creating the log directory 1266###################################### 1267 1268my $loggingdir = installer::systemactions::create_directories("logging", ""); 1269$loggingdir = $loggingdir . $installer::globals::separator; 1270$installer::globals::exitlog = $loggingdir; 1271 1272my $installdir = ""; 1273my $currentdir = cwd(); 1274my $shipinstalldir = ""; 1275my $current_install_number = ""; 1276 1277###################################### 1278# Checking the system requirements 1279###################################### 1280 1281$installer::logger::Info->print("... checking required files ...\n"); 1282installer::control::check_system_path(); 1283 1284my $pathvariableshashref = installer::environment::create_pathvariables($environmentvariableshashref); 1285 1286################################################### 1287# Analyzing the settings and variables in zip.lst 1288################################################### 1289 1290$installer::logger::Info->print( "... analyzing $installer::globals::ziplistname ... \n" ); 1291 1292my ($allvariableshashref, 1293 $allsettingsarrayref) 1294 = installer::ziplist::read_openoffice_lst_file( 1295 $installer::globals::ziplistname, 1296 $installer::globals::product, 1297 $loggingdir); 1298$installer::logger::Lang->printf("variables:\n"); 1299foreach my $key (sort keys %$allvariableshashref) 1300{ 1301 $installer::logger::Global->printf(" %s -> %s\n", $key, $allvariableshashref->{$key}); 1302} 1303 1304 1305######################################################## 1306# Check if this is simple packaging mechanism 1307######################################################## 1308 1309installer::simplepackage::check_simple_packager_project($allvariableshashref); 1310 1311#################################################################### 1312# setting global variables 1313#################################################################### 1314 1315installer::control::set_addchildprojects($allvariableshashref); 1316installer::control::set_addjavainstaller($allvariableshashref); 1317installer::control::set_addsystemintegration($allvariableshashref); 1318 1319######################################################## 1320# Re-define logging dir, after all variables are set 1321######################################################## 1322 1323my $oldloggingdir = $loggingdir; 1324installer::systemactions::remove_empty_directory($oldloggingdir); 1325$loggingdir = installer::systemactions::create_directories("logging", ""); 1326$loggingdir = $loggingdir . $installer::globals::separator; 1327$installer::globals::exitlog = $loggingdir; 1328 1329# checking, whether this is an opensource product 1330 1331if (!($installer::globals::is_copy_only_project)) { installer::ziplist::set_manufacturer($allvariableshashref); } 1332 1333############################################## 1334# Checking version of makecab.exe 1335############################################## 1336 1337if ( $installer::globals::iswindowsbuild ) { installer::control::check_makecab_version(); } 1338 1339########################################################## 1340# Getting the include path from the settings in zip list 1341########################################################## 1342 1343my $includepathref = installer::ziplist::getinfofromziplist($allsettingsarrayref, "include"); 1344if ( $$includepathref eq "" ) 1345{ 1346 installer::exiter::exit_program("ERROR: Definition for \"include\" not found in $installer::globals::ziplistname", "Main"); 1347} 1348 1349my $includepatharrayref = installer::converter::convert_stringlist_into_array($includepathref, ","); 1350 1351installer::ziplist::replace_all_variables_in_pathes($includepatharrayref, $pathvariableshashref); 1352 1353installer::ziplist::replace_minor_in_pathes($includepatharrayref); 1354 1355installer::ziplist::replace_packagetype_in_pathes($includepatharrayref); 1356 1357installer::ziplist::resolve_relative_pathes($includepatharrayref); 1358 1359installer::ziplist::remove_ending_separator($includepatharrayref); 1360 1361############################################## 1362# Collecting all files from all include 1363# pathes in global hashes. 1364############################################## 1365 1366installer::worker::collect_all_files_from_includepathes($includepatharrayref); 1367 1368############################################## 1369# Analyzing languages in zip.lst if required 1370# Probably no longer used. 1371############################################## 1372 1373if ($installer::globals::languages_defined_in_productlist) { installer::languages::get_info_about_languages($allsettingsarrayref); } 1374 1375##################################### 1376# Windows requires the encoding list 1377##################################### 1378 1379if ( $installer::globals::iswindowsbuild ) { installer::control::read_encodinglist($includepatharrayref); } 1380 1381#################################################################### 1382# MacOS dmg build requires special DS_Store file to arrange icons 1383#################################################################### 1384if (($installer::globals::ismacdmgbuild) && ($installer::globals::product =~ /OpenOffice_Dev/)) { $installer::globals::devsnapshotbuild = 1; } 1385 1386##################################################################### 1387# Including additional inc files for variable settings, if defined 1388##################################################################### 1389 1390if ( $allvariableshashref->{'ADD_INCLUDE_FILES'} ) { installer::worker::add_variables_from_inc_to_hashref($allvariableshashref, $includepatharrayref); } 1391 1392################################################ 1393# Disable xpd installer, if SOLAR_JAVA not set 1394################################################ 1395 1396installer::control::check_java_for_xpd($allvariableshashref); 1397 1398##################################### 1399# Analyzing the setup script 1400##################################### 1401 1402my $setupscriptref = GetSetupScriptLines($allsettingsarrayref, $allvariableshashref, $includepatharrayref); 1403 1404installer::logger::log_hashref($allvariableshashref); 1405 1406$installer::logger::Info->print( "... analyzing directories ... \n" ); 1407 1408# Collect all directories in the script to get the destination dirs 1409 1410my $dirsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Directory"); 1411 1412if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_hostname($dirsinproductarrayref); } 1413if ( $installer::globals::patch ) { installer::scriptitems::use_patch_hostname($dirsinproductarrayref); } 1414 1415if ( $allvariableshashref->{'SHIFT_BASIS_INTO_BRAND_LAYER'} ) { $dirsinproductarrayref = installer::scriptitems::shift_basis_directory_parents($dirsinproductarrayref); } 1416if ( $allvariableshashref->{'OFFICEDIRECTORYNAME'} ) { installer::scriptitems::set_officedirectory_name($dirsinproductarrayref, $allvariableshashref->{'OFFICEDIRECTORYNAME'}); } 1417 1418 1419installer::scriptitems::resolve_all_directory_names($dirsinproductarrayref); 1420 1421$installer::logger::Info->print( "... analyzing files ... \n" ); 1422 1423my $filesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "File"); 1424 1425$filesinproductarrayref = installer::scriptitems::remove_delete_only_files_from_productlists($filesinproductarrayref); 1426 1427if (( ! $installer::globals::iswindowsbuild ) && 1428 ( ! $installer::globals::islinuxrpmbuild ) && 1429 ( ! $installer::globals::islinuxdebbuild ) && 1430 ( ! $installer::globals::issolarispkgbuild ) && 1431 ( $installer::globals::packageformat ne "installed" ) && 1432 ( $installer::globals::packageformat ne "dmg" ) && 1433 ( $installer::globals::packageformat ne "archive" )) 1434 { installer::control::check_oxtfiles($filesinproductarrayref); } 1435 1436if ($installer::globals::product =~ /suite/i ) { $filesinproductarrayref = installer::scriptitems::remove_notinsuite_files_from_productlists($filesinproductarrayref); } 1437 1438if (! $installer::globals::languagepack) 1439{ 1440 $filesinproductarrayref = installer::scriptitems::remove_Languagepacklibraries_from_Installset($filesinproductarrayref); 1441} 1442 1443if (! $installer::globals::patch) 1444{ 1445 $filesinproductarrayref = installer::scriptitems::remove_patchonlyfiles_from_Installset($filesinproductarrayref); 1446} 1447 1448if (! $installer::globals::tab) 1449{ 1450 $filesinproductarrayref = installer::scriptitems::remove_tabonlyfiles_from_Installset($filesinproductarrayref); 1451} 1452 1453if (( $installer::globals::packageformat ne "installed" ) && ( $installer::globals::packageformat ne "archive" )) 1454{ 1455 $filesinproductarrayref = installer::scriptitems::remove_installedproductonlyfiles_from_Installset($filesinproductarrayref); 1456} 1457 1458$installer::logger::Info->print( "... analyzing scpactions ... \n" ); 1459 1460my $scpactionsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ScpAction"); 1461 1462if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isxpdplatform )) 1463{ 1464 $scpactionsinproductarrayref = installer::scriptitems::remove_Xpdonly_Items($scpactionsinproductarrayref); 1465} 1466 1467if ( $installer::globals::languagepack ) { installer::scriptitems::use_langpack_copy_scpaction($scpactionsinproductarrayref); } 1468if ( $installer::globals::patch ) { installer::scriptitems::use_patch_copy_scpaction($scpactionsinproductarrayref); } 1469if (($installer::globals::devsnapshotbuild)) { installer::scriptitems::use_dev_copy_scpaction($scpactionsinproductarrayref); } 1470 1471# $scpactionsinproductarrayref = installer::scriptitems::remove_scpactions_without_name($scpactionsinproductarrayref); 1472 1473installer::scriptitems::change_keys_of_scpactions($scpactionsinproductarrayref); 1474 1475$installer::logger::Info->print( "... analyzing shortcuts ... \n" ); 1476 1477my $linksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Shortcut"); 1478 1479$installer::logger::Info->print( "... analyzing unix links ... \n" ); 1480 1481my $unixlinksinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Unixlink"); 1482 1483# $unixlinksinproductarrayref = installer::scriptitems::filter_layerlinks_from_unixlinks($unixlinksinproductarrayref); 1484 1485$installer::logger::Info->print( "... analyzing profile ... \n" ); 1486 1487my $profilesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Profile"); 1488 1489$installer::logger::Info->print( "... analyzing profileitems ... \n" ); 1490 1491my $profileitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "ProfileItem"); 1492 1493my $folderinproductarrayref; 1494my $folderitemsinproductarrayref; 1495my $registryitemsinproductarrayref; 1496my $windowscustomactionsarrayref; 1497 1498if ( $installer::globals::iswindowsbuild ) # Windows specific items: Folder, FolderItem, RegistryItem, WindowsCustomAction 1499{ 1500 $installer::logger::Info->print( "... analyzing folders ... \n" ); 1501 1502 $folderinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Folder"); 1503 1504 $installer::logger::Info->print( "... analyzing folderitems ... \n" ); 1505 1506 $folderitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "FolderItem"); 1507 1508 installer::setupscript::add_predefined_folder($folderitemsinproductarrayref, $folderinproductarrayref); 1509 1510 installer::setupscript::prepare_non_advertised_files($folderitemsinproductarrayref, $filesinproductarrayref); 1511 1512 $installer::logger::Info->print( "... analyzing registryitems ... \n" ); 1513 1514 $registryitemsinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "RegistryItem"); 1515 1516 $registryitemsinproductarrayref = installer::scriptitems::remove_uninstall_regitems_from_script($registryitemsinproductarrayref); 1517 1518 $installer::logger::Info->print( "... analyzing Windows custom actions ... \n" ); 1519 1520 $windowscustomactionsarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "WindowsCustomAction"); 1521} 1522 1523my $modulesinproductarrayref; 1524 1525if (!($installer::globals::is_copy_only_project)) 1526{ 1527 $installer::logger::Info->print( "... analyzing modules ... \n" ); 1528 1529 $modulesinproductarrayref = installer::setupscript::get_all_items_from_script($setupscriptref, "Module"); 1530 1531 if (( ! $allvariableshashref->{'XPDINSTALLER'} ) || ( ! $installer::globals::isxpdplatform )) 1532 { 1533 $modulesinproductarrayref = installer::scriptitems::remove_Xpdonly_Items($modulesinproductarrayref); 1534 } 1535 1536 installer::scriptitems::resolve_assigned_modules($modulesinproductarrayref); 1537 1538 $modulesinproductarrayref = installer::scriptitems::remove_template_modules($modulesinproductarrayref); 1539 1540 installer::scriptitems::set_children_flag($modulesinproductarrayref); 1541 1542 installer::scriptitems::collect_all_languagemodules($modulesinproductarrayref); 1543 1544 # Assigning the modules to the items 1545 1546 installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $filesinproductarrayref, "Files"); 1547 1548 installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $unixlinksinproductarrayref, "Unixlinks"); 1549 1550 installer::scriptitems::assigning_modules_to_items($modulesinproductarrayref, $dirsinproductarrayref, "Dirs"); 1551} 1552 1553 1554# saving debug info, before staring part 1b 1555if ( $installer::globals::debug ) { installer::logger::savedebug($installer::globals::exitlog); } 1556 1557################################################# 1558# Part 1b: The language dependent part 1559# (still platform independent) 1560################################################# 1561 1562# Now starts the language dependent part, if more than one product is defined on the command line 1563# Example -l en-US,de#es,fr,it defines two multilingual products 1564 1565############################################################################### 1566# Beginning of language dependent part 1567# The for iterates over all products, separated by an # in the language list 1568############################################################################### 1569 1570 1571# Run the following code block exactly once. 1572# This strange version of a do{}while(false) loop exists only to allow (legacy) next statements. 1573for (;1;last) 1574{ 1575 my $languagesarrayref = installer::languages::get_all_languages_for_one_product($installer::globals::languageproduct, $allvariableshashref); 1576 1577 $installer::globals::alllanguagesinproductarrayref = $languagesarrayref; 1578 my $languagestringref = installer::languages::get_language_string($languagesarrayref); 1579 $installer::logger::Info->print( "------------------------------------\n" ); 1580 $installer::logger::Info->print( "... languages $$languagestringref ... \n" ); 1581 1582 if ( $installer::globals::patch ) 1583 { 1584 $installer::globals::addlicensefile = 0; # no license files for patches 1585 $installer::globals::makedownload = 0; 1586 $installer::globals::makejds = 0; 1587 } 1588 1589 if ( $installer::globals::languagepack ) 1590 { 1591 $installer::globals::addchildprojects = 0; 1592 $installer::globals::addsystemintegration = 0; 1593 $installer::globals::makejds = 0; 1594 $installer::globals::addlicensefile = 0; 1595 1596 if ( $allvariableshashref->{'OPENSOURCE'} ) { $installer::globals::makedownload = 1; } 1597 else { $installer::globals::makedownload = 0; } 1598 } 1599 1600 ############################################################ 1601 # Beginning of language specific logging mechanism 1602 # Until now only global logging into default: logfile.txt 1603 ############################################################ 1604 1605 installer::logger::copy_globalinfo_into_logfile(); 1606 $installer::globals::globalinfo_copied = 1; 1607 1608 my $logminor = ""; 1609 if ( $installer::globals::updatepack ) { $logminor = $installer::globals::lastminor; } 1610 else { $logminor = $installer::globals::minor; } 1611 1612 my $loglanguagestring_orig = $$languagestringref; 1613 my $loglanguagestring = installer::languages::get_language_directory_name($$languagestringref); 1614 1615 # Setup the directory where the language dependent log file will be stored. 1616 $loggingdir = $loggingdir . $loglanguagestring . $installer::globals::separator; 1617 installer::systemactions::create_directory($loggingdir); 1618 1619 # Set language dependent logging. 1620 $installer::globals::logfilename = sprintf("log_%s%s_%s.log", 1621 $installer::globals::build, 1622 $logminor ne "" ? "_" . $logminor : "", 1623 $loglanguagestring); 1624 $installer::logger::Lang->set_filename($loggingdir . $installer::globals::logfilename); 1625 $installer::logger::Lang->copy_lines_from($installer::logger::Global); 1626 $installer::logger::Lang->set_filter(\&installer::control::filter_log_error); 1627 installer::control::prepare_error_processing(); 1628 # All logging to the console is also forwarded to the language dependen log. 1629 $installer::logger::Lang->set_forward(undef); 1630 $installer::logger::Info->set_forward($installer::logger::Lang); 1631 # Scan all log lines for error messages. 1632 $installer::logger::Lang->add_timestamp("starting log for language ".$loglanguagestring); 1633 1634 if ($loglanguagestring ne $loglanguagestring_orig) { 1635 (my $dir = $loggingdir) =~ s!/$!!; 1636 open(my $F1, "> $dir.dir"); 1637 open(my $F2, "> " . $loggingdir . $installer::globals::logfilename . '.file'); 1638 my @s = map { "$_\n" } split('_', $loglanguagestring_orig); 1639 print $F1 @s; 1640 print $F2 @s; 1641 } 1642 1643 $installer::globals::exitlog = $loggingdir; 1644 1645 ############################################################## 1646 # Determining the ship location, if this is an update pack 1647 ############################################################## 1648 1649 if ( $installer::globals::updatepack ) { $shipinstalldir = installer::control::determine_ship_directory($languagestringref); } 1650 1651 ############################################## 1652 # Setting global code variables for Windows 1653 ############################################## 1654 1655 if (!($installer::globals::is_copy_only_project)) 1656 { 1657 if (( $installer::globals::iswindowsbuild ) 1658 && ( $installer::globals::packageformat ne "archive" ) 1659 && ( $installer::globals::packageformat ne "installed" )) 1660 { 1661 installer::windows::msiglobal::set_global_code_variables( 1662 $languagesarrayref, 1663 $allvariableshashref); 1664 } 1665 } 1666 1667 ################################################ 1668 # Resolving include paths (language dependent) 1669 ################################################ 1670 1671 my $includepatharrayref_lang = installer::ziplist::replace_languages_in_pathes($includepatharrayref, $languagesarrayref); 1672 1673 if ( $installer::globals::refresh_includepathes ) { installer::worker::collect_all_files_from_includepathes($includepatharrayref_lang); } 1674 1675 installer::ziplist::list_all_files_from_include_path($includepatharrayref_lang); 1676 1677 ############################################## 1678 # Analyzing spellchecker languages 1679 ############################################## 1680 1681 if ( $allvariableshashref->{'SPELLCHECKERFILE'} ) { installer::worker::set_spellcheckerlanguages($languagesarrayref, $allvariableshashref); } 1682 1683 ##################################### 1684 # Language dependent directory part 1685 ##################################### 1686 1687 my $dirsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($dirsinproductarrayref, $languagesarrayref); 1688 1689 # A new directory array is needed ($dirsinproductlanguageresolvedarrayref instead of $dirsinproductarrayref) 1690 # because $dirsinproductarrayref is needed in get_Destination_Directory_For_Item_From_Directorylist 1691 1692 installer::scriptitems::changing_name_of_language_dependent_keys($dirsinproductlanguageresolvedarrayref); 1693 1694 installer::scriptitems::checking_directories_with_corrupt_hostname($dirsinproductlanguageresolvedarrayref, $languagesarrayref); 1695 1696 installer::scriptitems::set_global_directory_hostnames($dirsinproductlanguageresolvedarrayref, $allvariableshashref); 1697 1698 ##################################### 1699 # files part, language dependent 1700 ##################################### 1701 1702 $installer::logger::Info->print( "... analyzing files ...\n" ); 1703 1704 my $filesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($filesinproductarrayref, $languagesarrayref); 1705 1706 if ( ! $installer::globals::set_office_start_language ) 1707 { 1708 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_office_start_language_files($filesinproductlanguageresolvedarrayref); 1709 } 1710 1711 installer::scriptitems::changing_name_of_language_dependent_keys($filesinproductlanguageresolvedarrayref); 1712 if ( $installer::globals::iswin and $^O =~ /MSWin/i ) { installer::converter::convert_slash_to_backslash($filesinproductlanguageresolvedarrayref); } 1713 1714 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_non_existent_languages_in_productlists($filesinproductlanguageresolvedarrayref, $languagestringref, "Name", "file"); 1715 1716 installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist($filesinproductlanguageresolvedarrayref, $includepatharrayref_lang, $dirsinproductlanguageresolvedarrayref, "Files"); 1717 1718 $filesinproductlanguageresolvedarrayref = installer::scriptitems::add_bundled_extension_blobs( $filesinproductlanguageresolvedarrayref); 1719 ($filesinproductlanguageresolvedarrayref,$dirsinproductarrayref) = installer::scriptitems::add_bundled_prereg_extensions( 1720 $filesinproductlanguageresolvedarrayref, $dirsinproductarrayref); 1721 1722 installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($filesinproductlanguageresolvedarrayref, $dirsinproductarrayref); 1723 1724 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_Files_Without_Sourcedirectory($filesinproductlanguageresolvedarrayref); 1725 1726 if ($installer::globals::languagepack) 1727 { 1728 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_Files_For_Languagepacks($filesinproductlanguageresolvedarrayref); 1729 } 1730 1731 1732 if ( ! $allvariableshashref->{'NO_README_IN_ROOTDIR'} ) 1733 { 1734 $filesinproductlanguageresolvedarrayref = installer::scriptitems::add_License_Files_into_Installdir($filesinproductlanguageresolvedarrayref, $dirsinproductlanguageresolvedarrayref, $languagesarrayref); 1735 } 1736 1737 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlyasialanguage_files_from_productlists($filesinproductlanguageresolvedarrayref); 1738 1739 $filesinproductlanguageresolvedarrayref = installer::scriptitems::remove_onlywesternlanguage_files_from_productlists($filesinproductlanguageresolvedarrayref); 1740 1741 installer::scriptitems::make_filename_language_specific($filesinproductlanguageresolvedarrayref); 1742 1743 ###################################################################################### 1744 # Unzipping files with flag ARCHIVE and putting all included files into the file list 1745 ###################################################################################### 1746 1747 $installer::logger::Info->print( "... analyzing files with flag ARCHIVE ...\n" ); 1748 1749 my @additional_paths_from_zipfiles = (); 1750 1751 $filesinproductlanguageresolvedarrayref = installer::archivefiles::resolving_archive_flag($filesinproductlanguageresolvedarrayref, \@additional_paths_from_zipfiles, $languagestringref, $loggingdir); 1752 1753 # packed files sometimes contain a "$" in their name: HighlightText$1.class. For epm the "$" has to be quoted by "$$" 1754 1755 if (!( $installer::globals::iswindowsbuild || $installer::globals::simple ) ) 1756 { 1757 installer::scriptitems::quoting_illegal_filenames($filesinproductlanguageresolvedarrayref); 1758 } 1759 1760 ##################################### 1761 # Files with flag SUBST_FILENAME 1762 ##################################### 1763 1764 $installer::logger::Info->print( "... analyzing files with flag SUBST_FILENAME ...\n" ); 1765 1766 installer::substfilenamefiles::resolving_subst_filename_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, $languagestringref); 1767 1768 ##################################### 1769 # Files with flag SCPZIP_REPLACE 1770 ##################################### 1771 1772 $installer::logger::Info->print( "... analyzing files with flag SCPZIP_REPLACE ...\n" ); 1773 1774 # Editing files with flag SCPZIP_REPLACE. 1775 1776 installer::scpzipfiles::resolving_scpzip_replace_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref); 1777 1778 ##################################### 1779 # Files with flag PATCH_SO_NAME 1780 ##################################### 1781 1782 $installer::logger::Info->print( "... analyzing files with flag PATCH_SO_NAME ...\n" ); 1783 1784 # Editing files with flag PATCH_SO_NAME. 1785 1786 installer::scppatchsoname::resolving_patchsoname_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref); 1787 1788 ##################################### 1789 # Files with flag HIDDEN 1790 ##################################### 1791 1792 $installer::logger::Info->print( "... analyzing files with flag HIDDEN ...\n" ); 1793 1794 installer::worker::resolving_hidden_flag($filesinproductlanguageresolvedarrayref, $allvariableshashref, "File", $languagestringref); 1795 1796 ############################################ 1797 # Collecting directories for epm list file 1798 ############################################ 1799 1800 $installer::logger::Info->print( "... analyzing all directories for this product ...\n" ); 1801 1802 # There are two ways for a directory to be included into the epm directory list: 1803 # 1. Looking for all destination paths in the files array 1804 # 2. Looking for directories with CREATE flag in the directory array 1805 # Advantage: Many pathes are hidden in zip files, they are not defined in the setup script. 1806 # It will be possible, that in the setup script only those directoies have to be defined, 1807 # that have a CREATE flag. All other directories are created, if they contain at least one file. 1808 1809 my ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref); 1810 1811 ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash); 1812 1813 # installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName"); 1814 # if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "directoriesforepmlist3.log", $directoriesforepmarrayref); } 1815 1816 ######################################################### 1817 # language dependent scpactions part 1818 ######################################################### 1819 1820 my $scpactionsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($scpactionsinproductarrayref, $languagesarrayref); 1821 1822 installer::scriptitems::changing_name_of_language_dependent_keys($scpactionsinproductlanguageresolvedarrayref); 1823 1824 installer::scriptitems::get_Source_Directory_For_Files_From_Includepathlist($scpactionsinproductlanguageresolvedarrayref, $includepatharrayref_lang, $dirsinproductlanguageresolvedarrayref, "ScpActions"); 1825 1826 # Editing scpactions with flag SCPZIP_REPLACE and PATCH_SO_NAME. 1827 1828 installer::scpzipfiles::resolving_scpzip_replace_flag($scpactionsinproductlanguageresolvedarrayref, $allvariableshashref, "ScpAction", $languagestringref); 1829 1830 installer::scppatchsoname::resolving_patchsoname_flag($scpactionsinproductlanguageresolvedarrayref, $allvariableshashref, "ScpAction", $languagestringref); 1831 1832 ######################################################### 1833 # language dependent links part 1834 ######################################################### 1835 1836 $installer::logger::Info->print( "... analyzing links ...\n" ); 1837 1838 my $linksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($linksinproductarrayref, $languagesarrayref); 1839 1840 installer::scriptitems::changing_name_of_language_dependent_keys($linksinproductlanguageresolvedarrayref); 1841 1842 installer::scriptitems::get_destination_file_path_for_links($linksinproductlanguageresolvedarrayref, $filesinproductlanguageresolvedarrayref); 1843 1844 installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($linksinproductlanguageresolvedarrayref, $dirsinproductarrayref); 1845 1846 # Now taking all links that have no FileID but a ShortcutID, linking to another link 1847 1848 installer::scriptitems::get_destination_link_path_for_links($linksinproductlanguageresolvedarrayref); 1849 1850 $linksinproductlanguageresolvedarrayref = installer::scriptitems::remove_workstation_only_items($linksinproductlanguageresolvedarrayref); 1851 1852 installer::scriptitems::resolve_links_with_flag_relative($linksinproductlanguageresolvedarrayref); 1853 1854 ######################################################### 1855 # language dependent unix links part 1856 ######################################################### 1857 1858 $installer::logger::Info->print( "... analyzing unix links ...\n" ); 1859 1860 my $unixlinksinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($unixlinksinproductarrayref, $languagesarrayref); 1861 1862 installer::scriptitems::changing_name_of_language_dependent_keys($unixlinksinproductlanguageresolvedarrayref); 1863 1864 installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($unixlinksinproductlanguageresolvedarrayref, $dirsinproductarrayref); 1865 1866 ######################################################### 1867 # language dependent part for profiles and profileitems 1868 ######################################################### 1869 1870 my $profilesinproductlanguageresolvedarrayref; 1871 my $profileitemsinproductlanguageresolvedarrayref; 1872 1873 if ((!($installer::globals::is_copy_only_project)) && (!($installer::globals::product =~ /ada/i )) && (!($installer::globals::languagepack))) 1874 { 1875 $installer::logger::Info->print( "... creating profiles ...\n" ); 1876 1877 $profilesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($profilesinproductarrayref, $languagesarrayref); 1878 1879 $profileitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($profileitemsinproductarrayref, $languagesarrayref); 1880 1881 installer::scriptitems::changing_name_of_language_dependent_keys($profilesinproductlanguageresolvedarrayref); 1882 1883 installer::scriptitems::changing_name_of_language_dependent_keys($profileitemsinproductlanguageresolvedarrayref); 1884 1885 installer::scriptitems::replace_setup_variables($profileitemsinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref); 1886 1887 if ( $installer::globals::patch_user_dir ) 1888 { 1889 installer::scriptitems::replace_userdir_variable( 1890 $profileitemsinproductlanguageresolvedarrayref, 1891 $allvariableshashref); 1892 } 1893 1894 installer::scriptitems::get_Destination_Directory_For_Item_From_Directorylist($profilesinproductlanguageresolvedarrayref, $dirsinproductarrayref); 1895 1896 # Now the Profiles can be created 1897 1898 installer::profiles::create_profiles($profilesinproductlanguageresolvedarrayref, $profileitemsinproductlanguageresolvedarrayref, $filesinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref); 1899 } 1900 1901 my $registryitemsinproductlanguageresolvedarrayref; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )" 1902 my $folderinproductlanguageresolvedarrayref; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )" 1903 my $folderitemsinproductlanguageresolvedarrayref; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )" 1904 1905 if ( $installer::globals::iswindowsbuild ) # Windows specific items: Folder, FolderItem, RegistryItem 1906 { 1907 ######################################################### 1908 # language dependent part for folder 1909 ######################################################### 1910 1911 $installer::logger::Info->print( "... analyzing folder ...\n" ); 1912 1913 $folderinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderinproductarrayref, $languagesarrayref); 1914 1915 installer::scriptitems::changing_name_of_language_dependent_keys($folderinproductlanguageresolvedarrayref); 1916 1917 ######################################################### 1918 # language dependent part for folderitems 1919 ######################################################### 1920 1921 $installer::logger::Info->print( "... analyzing folderitems ...\n" ); 1922 1923 $folderitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($folderitemsinproductarrayref, $languagesarrayref); 1924 1925 installer::scriptitems::changing_name_of_language_dependent_keys($folderitemsinproductlanguageresolvedarrayref); 1926 1927 ######################################################### 1928 # language dependent part for registryitems 1929 ######################################################### 1930 1931 $installer::logger::Info->print( "... analyzing registryitems ...\n" ); 1932 1933 $registryitemsinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($registryitemsinproductarrayref, $languagesarrayref); 1934 1935 installer::scriptitems::changing_name_of_language_dependent_keys($registryitemsinproductlanguageresolvedarrayref); 1936 } 1937 1938 ######################################################### 1939 # language dependent part for modules 1940 ######################################################### 1941 1942 my $modulesinproductlanguageresolvedarrayref; 1943 1944 if (!($installer::globals::is_copy_only_project)) 1945 { 1946 $installer::logger::Info->print( "... analyzing modules ...\n" ); 1947 1948 $modulesinproductlanguageresolvedarrayref = installer::scriptitems::resolving_all_languages_in_productlists($modulesinproductarrayref, $languagesarrayref); 1949 1950 $modulesinproductlanguageresolvedarrayref = installer::scriptitems::remove_not_required_language_modules($modulesinproductlanguageresolvedarrayref, $languagesarrayref); 1951 1952 installer::scriptitems::changing_name_of_language_dependent_keys($modulesinproductlanguageresolvedarrayref); 1953 1954 # installer::scriptitems::collect_language_specific_names($modulesinproductlanguageresolvedarrayref); 1955 installer::scriptitems::select_required_language_strings($modulesinproductlanguageresolvedarrayref); # using english strings 1956 } 1957 1958 # Copy-only projects can now start to copy all items File and ScpAction 1959 if ( $installer::globals::is_copy_only_project ) { installer::copyproject::copy_project($filesinproductlanguageresolvedarrayref, $scpactionsinproductlanguageresolvedarrayref, $loggingdir, $languagestringref, $shipinstalldir, $allsettingsarrayref); } 1960 1961 # Language pack projects can now start to select the required information 1962 if ( $installer::globals::languagepack ) 1963 { 1964 $filesinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($filesinproductlanguageresolvedarrayref, $languagesarrayref, "File"); 1965 $scpactionsinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($scpactionsinproductlanguageresolvedarrayref, $languagesarrayref, "ScpAction"); 1966 $linksinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($linksinproductlanguageresolvedarrayref, $languagesarrayref, "Shortcut"); 1967 $unixlinksinproductlanguageresolvedarrayref = installer::languagepack::select_language_items($unixlinksinproductlanguageresolvedarrayref, $languagesarrayref, "Unixlink"); 1968 @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks 1969 1970 # Collecting the directories again, to include only the language specific directories 1971 ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref); 1972 ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_with_create_flag_from_directoryarray($dirsinproductlanguageresolvedarrayref, $alldirectoryhash); 1973 installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName"); 1974 1975 if ( $installer::globals::iswindowsbuild ) 1976 { 1977 $registryitemsinproductlanguageresolvedarrayref = installer::worker::select_langpack_items($registryitemsinproductlanguageresolvedarrayref, "RegistryItem"); 1978 } 1979 1980 } 1981 1982 # Collecting all files without flag PATCH (for maintenance reasons) 1983 if ( $installer::globals::patch ) { installer::worker::collect_all_files_without_patch_flag($filesinproductlanguageresolvedarrayref); } 1984 1985 # Patch projects can now start to select the required information 1986 if (( $installer::globals::patch ) && (( $installer::globals::issolarispkgbuild ) || ( $installer::globals::iswindowsbuild ))) 1987 { 1988 $filesinproductlanguageresolvedarrayref = installer::worker::select_patch_items($filesinproductlanguageresolvedarrayref, "File"); 1989 $scpactionsinproductlanguageresolvedarrayref = installer::worker::select_patch_items($scpactionsinproductlanguageresolvedarrayref, "ScpAction"); 1990 $linksinproductlanguageresolvedarrayref = installer::worker::select_patch_items($linksinproductlanguageresolvedarrayref, "Shortcut"); 1991 $unixlinksinproductlanguageresolvedarrayref = installer::worker::select_patch_items($unixlinksinproductlanguageresolvedarrayref, "Unixlink"); 1992 $folderitemsinproductlanguageresolvedarrayref = installer::worker::select_patch_items($folderitemsinproductlanguageresolvedarrayref, "FolderItem"); 1993 # @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks 1994 1995 if ( $installer::globals::iswindowsbuild ) 1996 { 1997 $registryitemsinproductlanguageresolvedarrayref = installer::worker::select_patch_items_without_name($registryitemsinproductlanguageresolvedarrayref, "RegistryItem"); 1998 1999 installer::worker::prepare_windows_patchfiles($filesinproductlanguageresolvedarrayref, $languagestringref, $allvariableshashref); 2000 2001 # For Windows patches, the directories can now be collected again 2002 ($directoriesforepmarrayref, $alldirectoryhash) = installer::scriptitems::collect_directories_from_filesarray($filesinproductlanguageresolvedarrayref); 2003 2004 installer::sorter::sorting_array_of_hashes($directoriesforepmarrayref, "HostName"); 2005 } 2006 } 2007 2008 ######################################################### 2009 # Collecting all scp actions 2010 ######################################################### 2011 2012 installer::worker::collect_scpactions($scpactionsinproductlanguageresolvedarrayref); 2013 2014 ######################################################### 2015 # creating inf files for user system integration 2016 ######################################################### 2017 2018 if (( $installer::globals::iswindowsbuild ) && ( ! $installer::globals::patch )) # Windows specific items: Folder, FolderItem, RegistryItem 2019 { 2020 $installer::logger::Info->print( "... creating inf files ...\n" ); 2021 installer::worker::create_inf_file( 2022 $filesinproductlanguageresolvedarrayref, 2023 $registryitemsinproductlanguageresolvedarrayref, 2024 $folderinproductlanguageresolvedarrayref, 2025 $folderitemsinproductlanguageresolvedarrayref, 2026 $modulesinproductlanguageresolvedarrayref, 2027 $languagesarrayref, 2028 $languagestringref, 2029 $allvariableshashref); 2030 } 2031 2032 ########################################### 2033 # Using upx, to decrease file size 2034 # Currently only for Windows. 2035 ########################################### 2036 2037 if ( $allvariableshashref->{'UPXPRODUCT'} ) 2038 { 2039 installer::upx::upx_on_libraries($filesinproductlanguageresolvedarrayref, $languagestringref); 2040 } 2041 2042 ########################################################### 2043 # Simple package projects can now start to create the 2044 # installation structure by creating Directories, Files 2045 # Links and ScpActions. This is the last platform 2046 # independent part. 2047 ########################################################### 2048 2049 if ( $installer::globals::is_simple_packager_project ) 2050 { 2051 installer::simplepackage::create_simple_package($filesinproductlanguageresolvedarrayref, $directoriesforepmarrayref, $scpactionsinproductlanguageresolvedarrayref, $linksinproductlanguageresolvedarrayref, $unixlinksinproductlanguageresolvedarrayref, $loggingdir, $languagestringref, $shipinstalldir, $allsettingsarrayref, $allvariableshashref, $includepatharrayref); 2052 next; # ! leaving the current loop, because no further packaging required. 2053 } 2054 2055 ########################################################### 2056 # Analyzing the package structure 2057 ########################################################### 2058 2059 $installer::logger::Info->print( "... analyzing package list ...\n" ); 2060 2061 my $packages = installer::packagelist::collectpackages($modulesinproductlanguageresolvedarrayref, $languagesarrayref); 2062 installer::packagelist::check_packagelist($packages); 2063 2064 $packages = installer::packagelist::analyze_list($packages, $modulesinproductlanguageresolvedarrayref); 2065 installer::packagelist::remove_multiple_modules_packages($packages); 2066 2067 # printing packages content: 2068 installer::packagelist::log_packages_content($packages); 2069 installer::packagelist::create_module_destination_hash($packages, $allvariableshashref); 2070 2071 ################################################# 2072 # Part 2: The platform dependent part 2073 ################################################# 2074 2075 if ( $installer::globals::iswindowsbuild ) 2076 { 2077 # Create .idt tables and a .msi file. 2078 MakeWindowsBuild( 2079 $allvariableshashref, 2080 $allsettingsarrayref, 2081 $current_install_number, 2082 $directoriesforepmarrayref, 2083 $filesinproductlanguageresolvedarrayref, 2084 $folderitemsinproductlanguageresolvedarrayref, 2085 $includepatharrayref, 2086 $includepatharrayref_lang, 2087 $installdir, 2088 $languagesarrayref, 2089 $languagestringref, 2090 $linksinproductlanguageresolvedarrayref, 2091 $loggingdir, 2092 $modulesinproductlanguageresolvedarrayref, 2093 $packages, 2094 $profileitemsinproductlanguageresolvedarrayref, 2095 $registryitemsinproductlanguageresolvedarrayref, 2096 $shipinstalldir, 2097 $windowscustomactionsarrayref, 2098 $folderinproductlanguageresolvedarrayref); 2099 } 2100 else 2101 { 2102 # Creating epm list file. 2103 MakeNonWindowsBuild( 2104 $allvariableshashref, 2105 $allsettingsarrayref, 2106 $current_install_number, 2107 $directoriesforepmarrayref, 2108 $filesinproductlanguageresolvedarrayref, 2109 $includepatharrayref, 2110 $languagesarrayref, 2111 $languagestringref, 2112 $linksinproductlanguageresolvedarrayref, 2113 $unixlinksinproductlanguageresolvedarrayref, 2114 $loggingdir, 2115 $modulesinproductarrayref, 2116 $packages, 2117 $shipinstalldir, 2118 $currentdir); 2119 } 2120 2121 # saving file_info file for later analysis 2122 my $speciallogfilename = "fileinfo_" . $installer::globals::product . "\.log"; 2123 installer::files::save_array_of_hashes($loggingdir . $speciallogfilename, $filesinproductlanguageresolvedarrayref); 2124} 2125 2126# saving debug info at end 2127if ( $installer::globals::debug ) { installer::logger::savedebug($installer::globals::exitlog); } 2128 2129####################################################### 2130# Stopping time 2131####################################################### 2132 2133installer::logger::stoptime(); 2134 2135#################################### 2136# Main program end 2137#################################### 2138