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