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