2004-04-20 06:24:55 -05:00
#*************************************************************************
#
2008-04-10 10:51:36 -05:00
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2004-04-20 06:24:55 -05:00
#
2010-02-12 08:01:35 -06:00
# Copyright 2000, 2010 Oracle and/or its affiliates.
2004-04-20 06:24:55 -05:00
#
2008-04-10 10:51:36 -05:00
# OpenOffice.org - a multi-platform office productivity suite
2004-04-20 06:24:55 -05:00
#
2008-04-10 10:51:36 -05:00
# This file is part of OpenOffice.org.
2004-04-20 06:24:55 -05:00
#
2008-04-10 10:51:36 -05:00
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
2004-04-20 06:24:55 -05:00
#
2008-04-10 10:51:36 -05:00
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
2004-04-20 06:24:55 -05:00
#
2008-04-10 10:51:36 -05:00
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
2004-04-20 06:24:55 -05:00
#
#*************************************************************************
#################
# use
#################
use lib ( "$ENV{SOLARENV}/bin/modules" ) ;
use Cwd ;
use File::Copy ;
use installer::archivefiles ;
use installer::control ;
use installer::converter ;
use installer::copyproject ;
2004-12-16 03:43:05 -06:00
use installer::download ;
2004-04-20 06:24:55 -05:00
use installer::environment ;
use installer::epmfile ;
use installer::exiter ;
use installer::files ;
2009-02-26 03:17:08 -06:00
use installer::followme ;
2004-04-20 06:24:55 -05:00
use installer::globals ;
2010-12-13 13:56:37 -06:00
use installer::helppack ;
2004-06-11 12:13:58 -05:00
use installer::languagepack ;
2004-04-20 06:24:55 -05:00
use installer::languages ;
use installer::logger ;
2004-06-11 12:13:58 -05:00
use installer::mail ;
2004-04-20 06:24:55 -05:00
use installer::packagelist ;
2009-02-26 04:06:13 -06:00
use installer::packagepool ;
2004-04-20 06:24:55 -05:00
use installer::parameter ;
2004-10-18 07:51:13 -05:00
use installer::pathanalyzer ;
2004-04-20 06:24:55 -05:00
use installer::profiles ;
2004-11-18 02:10:54 -06:00
use installer::regmerge ;
2004-04-20 06:24:55 -05:00
use installer::scppatchsoname ;
use installer::scpzipfiles ;
use installer::scriptitems ;
use installer::servicesfile ;
use installer::setupscript ;
2006-10-13 04:36:00 -05:00
use installer::simplepackage ;
2004-04-20 06:24:55 -05:00
use installer::sorter ;
use installer::strip ;
2008-07-16 10:04:27 -05:00
use installer::substfilenamefiles ;
2007-03-26 06:43:58 -05:00
use installer::upx ;
2004-04-20 06:24:55 -05:00
use installer::systemactions ;
2004-07-12 07:09:08 -05:00
use installer::windows::assembly ;
2004-06-11 12:13:58 -05:00
use installer::windows::binary ;
2004-04-20 06:24:55 -05:00
use installer::windows::component ;
use installer::windows::createfolder ;
use installer::windows::directory ;
use installer::windows::feature ;
use installer::windows::featurecomponent ;
use installer::windows::file ;
use installer::windows::font ;
use installer::windows::icon ;
use installer::windows::idtglobal ;
2005-04-29 02:47:37 -05:00
use installer::windows::inifile ;
2005-06-17 08:06:21 -05:00
use installer::windows::java ;
2004-04-20 06:24:55 -05:00
use installer::windows::media ;
2007-11-23 06:33:45 -06:00
use installer::windows::mergemodule ;
2004-04-20 06:24:55 -05:00
use installer::windows::msiglobal ;
2008-10-16 08:30:38 -05:00
use installer::windows::msp ;
2005-06-17 08:06:21 -05:00
use installer::windows::patch ;
2004-04-20 06:24:55 -05:00
use installer::windows::property ;
use installer::windows::removefile ;
use installer::windows::registry ;
2004-06-11 12:13:58 -05:00
use installer::windows::selfreg ;
2004-04-20 06:24:55 -05:00
use installer::windows::shortcut ;
2007-03-26 08:14:54 -05:00
use installer::windows::strip ;
2008-08-18 04:47:11 -05:00
use installer::windows::update ;
2004-04-20 06:24:55 -05:00
use installer::windows::upgrade ;
2007-01-02 08:22:34 -06:00
use installer::worker ;
use installer::xpdinstaller ;
2004-04-20 06:24:55 -05:00
use installer::ziplist ;
#################################################
# Main program
#################################################
#################################################
# Part 1: The platform independent part
#################################################
#################################################
# Part 1a: The language independent part
#################################################
2004-09-08 09:05:37 -05:00
installer::logger:: starttime ( ) ;
2004-04-20 06:24:55 -05:00
#########################################
# Checking the environment and setting
# most important variables
#########################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... checking environment variables ...\n" ) ;
2004-04-20 06:24:55 -05:00
my $ environmentvariableshashref = installer::control:: check_system_environment ( ) ;
installer::environment:: set_global_environment_variables ( $ environmentvariableshashref ) ;
#################################
# Check and output of parameter
#################################
installer::parameter:: saveparameter ( ) ;
installer::parameter:: getparameter ( ) ;
# debugging can start after function "getparameter"
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 1: The platform independent part\n" ) ; }
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 1a: The language independent part\n" ) ; }
installer::parameter:: control_fundamental_parameter ( ) ;
installer::parameter:: setglobalvariables ( ) ;
installer::parameter:: control_required_parameter ( ) ;
if ( ! ( $ installer:: globals:: languages_defined_in_productlist ) ) { installer::languages:: analyze_languagelist ( ) ; }
installer::parameter:: outputparameter ( ) ;
2004-06-11 12:13:58 -05:00
installer::control:: check_updatepack ( ) ;
2004-04-20 06:24:55 -05:00
$ installer:: globals:: build = uc ( $ installer:: globals:: build ) ; # using "SRC680" instead of "src680"
######################################
# Creating the log directory
######################################
my $ loggingdir = installer::systemactions:: create_directories ( "logging" , "" ) ;
$ loggingdir = $ loggingdir . $ installer:: globals:: separator ;
$ installer:: globals:: exitlog = $ loggingdir ;
2004-10-18 07:51:13 -05:00
my $ installdir = "" ;
2009-02-26 04:06:13 -06:00
my $ currentdir = cwd ( ) ;
2004-10-18 07:51:13 -05:00
my $ shipinstalldir = "" ;
my $ current_install_number = "" ;
2004-04-20 06:24:55 -05:00
######################################
# Checking the system requirements
######################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... checking required files ...\n" ) ;
2004-04-20 06:24:55 -05:00
installer::control:: check_system_path ( ) ;
my $ pathvariableshashref = installer::environment:: create_pathvariables ( $ environmentvariableshashref ) ;
2007-05-10 04:58:06 -05:00
###############################################
# Checking saved setting for Windows patches
###############################################
if ( ( $ installer:: globals:: iswindowsbuild ) && ( $ installer:: globals:: prepare_winpatch ) ) { installer::windows::msiglobal:: read_saved_mappings ( ) ; }
2004-04-20 06:24:55 -05:00
###################################################
# Analyzing the settings and variables in zip.lst
###################################################
installer::logger:: globallog ( "zip list file: $installer::globals::ziplistname" ) ;
my $ ziplistref = installer::files:: read_file ( $ installer:: globals:: ziplistname ) ;
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing $installer::globals::ziplistname ... \n" ) ;
2004-04-20 06:24:55 -05:00
2008-07-02 03:32:30 -05:00
my ( $ productblockref , $ parent ) = installer::ziplist:: getproductblock ( $ ziplistref , $ installer:: globals:: product , 1 ) ; # product block from zip.lst
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "productblock.log" , $ productblockref ) ; }
2008-07-02 03:32:30 -05:00
my ( $ settingsblockref , undef ) = installer::ziplist:: getproductblock ( $ productblockref , "Settings" , 0 ) ; # settings block from zip.lst
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "settingsblock1.log" , $ settingsblockref ) ; }
$ settingsblockref = installer::ziplist:: analyze_settings_block ( $ settingsblockref ) ; # select data from settings block in zip.lst
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "settingsblock2.log" , $ settingsblockref ) ; }
my $ allsettingsarrayref = installer::ziplist:: get_settings_from_ziplist ( $ settingsblockref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allsettings1.log" , $ allsettingsarrayref ) ; }
my $ allvariablesarrayref = installer::ziplist:: get_variables_from_ziplist ( $ settingsblockref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allvariables1.log" , $ allvariablesarrayref ) ; }
2008-07-02 03:32:30 -05:00
my ( $ globalproductblockref , undef ) = installer::ziplist:: getproductblock ( $ ziplistref , $ installer:: globals:: globalblock , 0 ) ; # global product block from zip.lst
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "globalproductblock.log" , $ globalproductblockref ) ; }
while ( defined $ parent )
{
my $ parentproductblockref ;
( $ parentproductblockref , $ parent ) = installer::ziplist:: getproductblock (
$ ziplistref , $ parent , 1 ) ;
my ( $ parentsettingsblockref , undef ) = installer::ziplist:: getproductblock (
$ parentproductblockref , "Settings" , 0 ) ;
$ parentsettingsblockref = installer::ziplist:: analyze_settings_block (
$ parentsettingsblockref ) ;
my $ allparentsettingsarrayref =
installer::ziplist:: get_settings_from_ziplist ( $ parentsettingsblockref ) ;
my $ allparentvariablesarrayref =
installer::ziplist:: get_variables_from_ziplist ( $ parentsettingsblockref ) ;
$ allsettingsarrayref =
installer::converter:: combine_arrays_from_references_first_win (
$ allsettingsarrayref , $ allparentsettingsarrayref )
if $# { $ allparentsettingsarrayref } > - 1 ;
$ allvariablesarrayref =
installer::converter:: combine_arrays_from_references_first_win (
$ allvariablesarrayref , $ allparentvariablesarrayref )
if $# { $ allparentvariablesarrayref } > - 1 ;
}
2007-07-11 08:40:12 -05:00
if ( $# { $ globalproductblockref } > - 1 )
{
2008-07-02 03:32:30 -05:00
my ( $ globalsettingsblockref , undef ) = installer::ziplist:: getproductblock ( $ globalproductblockref , "Settings" , 0 ) ; # settings block from zip.lst
2007-07-11 08:40:12 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "globalsettingsblock1.log" , $ globalsettingsblockref ) ; }
$ globalsettingsblockref = installer::ziplist:: analyze_settings_block ( $ globalsettingsblockref ) ; # select data from settings block in zip.lst
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "globalsettingsblock2.log" , $ globalsettingsblockref ) ; }
my $ allglobalsettingsarrayref = installer::ziplist:: get_settings_from_ziplist ( $ globalsettingsblockref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allglobalsettings1.log" , $ allglobalsettingsarrayref ) ; }
my $ allglobalvariablesarrayref = installer::ziplist:: get_variables_from_ziplist ( $ globalsettingsblockref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allglobalvariables1.log" , $ allglobalvariablesarrayref ) ; }
2008-05-14 06:59:16 -05:00
if ( $# { $ allglobalsettingsarrayref } > - 1 ) { $ allsettingsarrayref = installer::converter:: combine_arrays_from_references_first_win ( $ allsettingsarrayref , $ allglobalsettingsarrayref ) ; }
if ( $# { $ allglobalvariablesarrayref } > - 1 ) { $ allvariablesarrayref = installer::converter:: combine_arrays_from_references_first_win ( $ allvariablesarrayref , $ allglobalvariablesarrayref ) ; }
2007-07-11 08:40:12 -05:00
}
2004-04-20 06:24:55 -05:00
$ allsettingsarrayref = installer::ziplist:: remove_multiples_from_ziplist ( $ allsettingsarrayref ) ; # the settings from the zip.lst
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allsettings2.log" , $ allsettingsarrayref ) ; }
$ allvariablesarrayref = installer::ziplist:: remove_multiples_from_ziplist ( $ allvariablesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allvariables2.log" , $ allvariablesarrayref ) ; }
2004-07-29 05:09:48 -05:00
installer::ziplist:: replace_variables_in_ziplist_variables ( $ allvariablesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allvariables2a.log" , $ allvariablesarrayref ) ; }
2004-04-20 06:24:55 -05:00
my $ allvariableshashref = installer::converter:: convert_array_to_hash ( $ allvariablesarrayref ) ; # the variables from the zip.lst
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables3.log" , $ allvariableshashref ) ; }
installer::ziplist:: set_default_productversion_if_required ( $ allvariableshashref ) ;
2004-11-18 02:10:54 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables3a.log" , $ allvariableshashref ) ; }
2004-04-20 06:24:55 -05:00
2005-03-29 08:35:29 -06:00
installer::ziplist:: add_variables_to_allvariableshashref ( $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables3b.log" , $ allvariableshashref ) ; }
2010-03-25 11:21:13 -05:00
installer::ziplist:: overwrite_ooovendor ( $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables3c.log" , $ allvariableshashref ) ; }
2006-10-13 04:36:00 -05:00
########################################################
# Check if this is simple packaging mechanism
########################################################
installer::simplepackage:: check_simple_packager_project ( $ allvariableshashref ) ;
2007-09-06 03:50:44 -05:00
####################################################################
# setting global variables
####################################################################
installer::control:: set_addchildprojects ( $ allvariableshashref ) ;
installer::control:: set_addsystemintegration ( $ allvariableshashref ) ;
2006-10-13 04:36:00 -05:00
########################################################
# Re-define logging dir, after all variables are set
########################################################
my $ oldloggingdir = $ loggingdir ;
installer::systemactions:: remove_empty_directory ( $ oldloggingdir ) ;
$ loggingdir = installer::systemactions:: create_directories ( "logging" , "" ) ;
$ loggingdir = $ loggingdir . $ installer:: globals:: separator ;
$ installer:: globals:: exitlog = $ loggingdir ;
2004-04-20 06:24:55 -05:00
# checking, whether this is an opensource product
if ( ! ( $ installer:: globals:: is_copy_only_project ) ) { installer::ziplist:: set_manufacturer ( $ allvariableshashref ) ; }
2006-07-05 15:03:17 -05:00
##############################################
# Checking version of makecab.exe
##############################################
if ( $ installer:: globals:: iswindowsbuild ) { installer::control:: check_makecab_version ( ) ; }
2004-04-20 06:24:55 -05:00
##########################################################
# Getting the include path from the settings in zip list
##########################################################
my $ includepathref = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "include" ) ;
if ( $$ includepathref eq "" )
{
installer::exiter:: exit_program ( "ERROR: Definition for \"include\" not found in $installer::globals::ziplistname" , "Main" ) ;
}
my $ includepatharrayref = installer::converter:: convert_stringlist_into_array ( $ includepathref , "," ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray1.log" , $ includepatharrayref ) ; }
installer::ziplist:: replace_all_variables_in_pathes ( $ includepatharrayref , $ pathvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray2.log" , $ includepatharrayref ) ; }
installer::ziplist:: replace_minor_in_pathes ( $ includepatharrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray3.log" , $ includepatharrayref ) ; }
2006-01-13 08:00:56 -06:00
installer::ziplist:: replace_packagetype_in_pathes ( $ includepatharrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray3a.log" , $ includepatharrayref ) ; }
2004-06-16 09:05:05 -05:00
installer::ziplist:: resolve_relative_pathes ( $ includepatharrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray3b.log" , $ includepatharrayref ) ; }
2004-06-16 09:05:05 -05:00
installer::ziplist:: remove_ending_separator ( $ includepatharrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray3c.log" , $ includepatharrayref ) ; }
2006-10-11 03:03:33 -05:00
##############################################
# Collecting all files from all include
# pathes in global hashes.
##############################################
installer::worker:: collect_all_files_from_includepathes ( $ includepatharrayref ) ;
2004-04-20 06:24:55 -05:00
##############################################
# Analyzing languages in zip.lst if required
2007-09-06 03:50:44 -05:00
# Probably no longer used.
2004-04-20 06:24:55 -05:00
##############################################
if ( $ installer:: globals:: languages_defined_in_productlist ) { installer::languages:: get_info_about_languages ( $ allsettingsarrayref ) ; }
2004-10-18 07:51:13 -05:00
#####################################
# Windows requires the encoding list
#####################################
if ( $ installer:: globals:: iswindowsbuild ) { installer::control:: read_encodinglist ( $ includepatharrayref ) ; }
2006-03-09 03:47:09 -06:00
#####################################################################
# Including additional inc files for variable settings, if defined
#####################################################################
if ( $ allvariableshashref - > { 'ADD_INCLUDE_FILES' } ) { installer::worker:: add_variables_from_inc_to_hashref ( $ allvariableshashref , $ includepatharrayref ) ; }
2007-07-03 05:45:11 -05:00
################################################
# Disable xpd installer, if SOLAR_JAVA not set
################################################
installer::control:: check_java_for_xpd ( $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
#####################################
# Analyzing the setup script
#####################################
if ( $ installer:: globals:: setupscript_defined_in_productlist ) { installer::setupscript:: set_setupscript_name ( $ allsettingsarrayref , $ includepatharrayref ) ; }
installer::logger:: globallog ( "setup script file: $installer::globals::setupscriptname" ) ;
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing script: $installer::globals::setupscriptname ... \n" ) ;
2004-04-20 06:24:55 -05:00
2004-07-06 08:55:15 -05:00
my $ setupscriptref = installer::files:: read_file ( $ installer:: globals:: setupscriptname ) ; # Reading the setup script file
2004-04-20 06:24:55 -05:00
# Resolving variables defined in the zip list file into setup script
# All the variables are defined in $allvariablesarrayref
2005-02-24 09:19:10 -06:00
installer::scpzipfiles:: replace_all_ziplistvariables_in_file ( $ setupscriptref , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscript1.log" , $ setupscriptref ) ; }
# Resolving %variables defined in the installation object
my $ allscriptvariablesref = installer::setupscript:: get_all_scriptvariables_from_installation_object ( $ setupscriptref ) ;
2004-11-18 02:10:54 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscriptvariables1.log" , $ allscriptvariablesref ) ; }
installer::setupscript:: add_lowercase_productname_setupscriptvariable ( $ allscriptvariablesref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscriptvariables2.log" , $ allscriptvariablesref ) ; }
2004-04-20 06:24:55 -05:00
2007-01-02 08:22:34 -06:00
installer::setupscript:: resolve_lowercase_productname_setupscriptvariable ( $ allscriptvariablesref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscriptvariables3.log" , $ allscriptvariablesref ) ; }
2009-03-05 07:32:16 -06:00
$ setupscriptref = installer::setupscript:: replace_all_setupscriptvariables_in_script ( $ setupscriptref , $ allscriptvariablesref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscript2.log" , $ setupscriptref ) ; }
# Adding all variables defined in the installation object into the hash of all variables.
# This is needed if variables are defined in the installation object, but not in the zip list file.
# If there is a definition in the zip list file and in the installation object, the installation object is more important
installer::setupscript:: add_installationobject_to_variables ( $ allvariableshashref , $ allscriptvariablesref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables4.log" , $ allvariableshashref ) ; }
2007-11-02 06:55:00 -05:00
# Adding also all variables, that must be included into the $allvariableshashref.
installer::setupscript:: add_forced_properties ( $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables5.log" , $ allvariableshashref ) ; }
2010-01-28 07:40:57 -06:00
# Replacing preset properties, not using the default mechanisms (for example for UNIXPRODUCTNAME)
installer::setupscript:: replace_preset_properties ( $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_hash ( $ loggingdir . "allvariables6.log" , $ allvariableshashref ) ; }
2008-03-18 06:57:37 -05:00
installer::scpzipfiles:: replace_all_ziplistvariables_in_file ( $ setupscriptref , $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "setupscript3.log" , $ setupscriptref ) ; }
2010-01-28 07:40:57 -06:00
2005-01-31 03:43:53 -06:00
installer::logger:: log_hashref ( $ allvariableshashref ) ;
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing directories ... \n" ) ;
2004-04-20 06:24:55 -05:00
# Collect all directories in the script to get the destination dirs
my $ dirsinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Directory" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories1.log" , $ dirsinproductarrayref ) ; }
2008-07-01 16:50:31 -05:00
2009-08-26 01:41:14 -05:00
if ( $ installer:: globals:: languagepack ) { installer::scriptitems:: use_langpack_hostname ( $ dirsinproductarrayref ) ; }
if ( $ installer:: globals:: patch ) { installer::scriptitems:: use_patch_hostname ( $ dirsinproductarrayref ) ; }
2008-07-01 16:50:31 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories1a.log" , $ dirsinproductarrayref ) ; }
2009-08-26 01:41:14 -05:00
if ( $ allvariableshashref - > { 'SHIFT_BASIS_INTO_BRAND_LAYER' } ) { $ dirsinproductarrayref = installer::scriptitems:: shift_basis_directory_parents ( $ dirsinproductarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories1b.log" , $ dirsinproductarrayref ) ; }
2009-06-05 08:08:32 -05:00
if ( $ allvariableshashref - > { 'OFFICEDIRECTORYNAME' } ) { installer::scriptitems:: set_officedirectory_name ( $ dirsinproductarrayref , $ allvariableshashref - > { 'OFFICEDIRECTORYNAME' } ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories1b.log" , $ dirsinproductarrayref ) ; }
2004-04-20 06:24:55 -05:00
installer::scriptitems:: resolve_all_directory_names ( $ dirsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories2.log" , $ dirsinproductarrayref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing files ... \n" ) ;
2004-04-20 06:24:55 -05:00
my $ filesinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "File" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles1.log" , $ filesinproductarrayref ) ; }
$ filesinproductarrayref = installer::scriptitems:: remove_delete_only_files_from_productlists ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2.log" , $ filesinproductarrayref ) ; }
2007-07-19 01:16:05 -05:00
if ( ( ! $ installer:: globals:: iswindowsbuild ) &&
2010-10-13 09:19:49 -05:00
( ! $ installer:: globals:: isrpmbuild ) &&
( ! $ installer:: globals:: isdebbuild ) &&
2007-07-19 01:16:05 -05:00
( ! $ installer:: globals:: issolarispkgbuild ) &&
( $ installer:: globals:: packageformat ne "installed" ) &&
2008-04-15 08:46:27 -05:00
( $ installer:: globals:: packageformat ne "dmg" ) &&
2007-07-19 01:16:05 -05:00
( $ installer:: globals:: packageformat ne "archive" ) )
{ installer::control:: check_oxtfiles ( $ filesinproductarrayref ) ; }
2007-01-22 07:46:32 -06:00
2005-01-21 06:05:17 -06:00
if ( $ installer:: globals:: product =~ /suite/i ) { $ filesinproductarrayref = installer::scriptitems:: remove_notinsuite_files_from_productlists ( $ filesinproductarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2aa.log" , $ filesinproductarrayref ) ; }
2004-11-18 02:10:54 -06:00
if ( ! $ installer:: globals:: languagepack )
{
$ filesinproductarrayref = installer::scriptitems:: remove_Languagepacklibraries_from_Installset ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2b.log" , $ filesinproductarrayref ) ; }
}
2010-12-13 13:56:37 -06:00
if ( ! $ installer:: globals:: helppack )
{
$ filesinproductarrayref = installer::scriptitems:: remove_Helppacklibraries_from_Installset ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2b2.log" , $ filesinproductarrayref ) ; }
}
2005-04-20 05:44:33 -05:00
if ( ! $ installer:: globals:: patch )
{
$ filesinproductarrayref = installer::scriptitems:: remove_patchonlyfiles_from_Installset ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2c.log" , $ filesinproductarrayref ) ; }
}
2005-11-09 02:08:51 -06:00
if ( ! $ installer:: globals:: tab )
{
$ filesinproductarrayref = installer::scriptitems:: remove_tabonlyfiles_from_Installset ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2c.log" , $ filesinproductarrayref ) ; }
}
2008-05-14 06:59:16 -05:00
if ( ( $ installer:: globals:: packageformat ne "installed" ) && ( $ installer:: globals:: packageformat ne "archive" ) )
{
$ filesinproductarrayref = installer::scriptitems:: remove_installedproductonlyfiles_from_Installset ( $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2cc.log" , $ filesinproductarrayref ) ; }
}
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing scpactions ... \n" ) ;
2004-04-20 06:24:55 -05:00
my $ scpactionsinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "ScpAction" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions1.log" , $ scpactionsinproductarrayref ) ; }
2007-02-19 06:48:07 -06:00
if ( ( ! $ allvariableshashref - > { 'XPDINSTALLER' } ) || ( ! $ installer:: globals:: isxpdplatform ) )
2007-01-02 08:22:34 -06:00
{
2008-08-27 05:29:48 -05:00
$ scpactionsinproductarrayref = installer::scriptitems:: remove_Xpdonly_Items ( $ scpactionsinproductarrayref ) ;
2007-01-02 08:22:34 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions1a.log" , $ scpactionsinproductarrayref ) ; }
}
2009-08-26 01:41:14 -05:00
if ( $ installer:: globals:: languagepack ) { installer::scriptitems:: use_langpack_copy_scpaction ( $ scpactionsinproductarrayref ) ; }
2010-12-17 14:07:53 -06:00
if ( $ installer:: globals:: helppack ) { installer::scriptitems:: use_langpack_copy_scpaction ( $ scpactionsinproductarrayref ) ; }
2009-08-26 01:41:14 -05:00
if ( $ installer:: globals:: patch ) { installer::scriptitems:: use_patch_copy_scpaction ( $ scpactionsinproductarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions1b.log" , $ scpactionsinproductarrayref ) ; }
2005-05-13 01:52:12 -05:00
# $scpactionsinproductarrayref = installer::scriptitems::remove_scpactions_without_name($scpactionsinproductarrayref);
# if ( $installer::globals::globallogging ) { installer::files::save_array_of_hashes($loggingdir . "productscpactions2.log", $scpactionsinproductarrayref); }
2004-04-20 06:24:55 -05:00
installer::scriptitems:: change_keys_of_scpactions ( $ scpactionsinproductarrayref ) ;
2005-05-13 01:52:12 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions2.log" , $ scpactionsinproductarrayref ) ; }
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing shortcuts ... \n" ) ;
2004-04-20 06:24:55 -05:00
my $ linksinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Shortcut" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks1.log" , $ linksinproductarrayref ) ; }
2007-07-12 05:15:22 -05:00
installer::logger:: print_message ( "... analyzing unix links ... \n" ) ;
my $ unixlinksinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Unixlink" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks1.log" , $ unixlinksinproductarrayref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing profile ... \n" ) ;
2004-04-20 06:24:55 -05:00
my $ profilesinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Profile" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profiles1.log" , $ profilesinproductarrayref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing profileitems ... \n" ) ;
2004-04-20 06:24:55 -05:00
my $ profileitemsinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "ProfileItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profileitems1.log" , $ profileitemsinproductarrayref ) ; }
my $ folderinproductarrayref ;
my $ folderitemsinproductarrayref ;
my $ registryitemsinproductarrayref ;
2005-12-21 06:02:45 -06:00
my $ windowscustomactionsarrayref ;
2007-11-23 06:33:45 -06:00
my $ mergemodulesarrayref ;
2004-04-20 06:24:55 -05:00
2005-12-21 06:02:45 -06:00
if ( $ installer:: globals:: iswindowsbuild ) # Windows specific items: Folder, FolderItem, RegistryItem, WindowsCustomAction
2004-04-20 06:24:55 -05:00
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing folders ... \n" ) ;
2004-04-20 06:24:55 -05:00
$ folderinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Folder" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folder1.log" , $ folderinproductarrayref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing folderitems ... \n" ) ;
2004-04-20 06:24:55 -05:00
$ folderitemsinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "FolderItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folderitems1.log" , $ folderitemsinproductarrayref ) ; }
2004-06-11 12:13:58 -05:00
installer::setupscript:: add_predefined_folder ( $ folderitemsinproductarrayref , $ folderinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folder1b.log" , $ folderinproductarrayref ) ; }
2007-07-26 02:47:55 -05:00
installer::setupscript:: prepare_non_advertised_files ( $ folderitemsinproductarrayref , $ filesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles2d.log" , $ filesinproductarrayref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing registryitems ... \n" ) ;
2004-04-20 06:24:55 -05:00
$ registryitemsinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "RegistryItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems1.log" , $ registryitemsinproductarrayref ) ; }
2004-06-11 12:13:58 -05:00
$ registryitemsinproductarrayref = installer::scriptitems:: remove_uninstall_regitems_from_script ( $ registryitemsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems1b.log" , $ registryitemsinproductarrayref ) ; }
2005-12-21 06:02:45 -06:00
installer::logger:: print_message ( "... analyzing Windows custom actions ... \n" ) ;
$ windowscustomactionsarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "WindowsCustomAction" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "windowscustomactions1.log" , $ windowscustomactionsarrayref ) ; }
2007-11-23 06:33:45 -06:00
installer::logger:: print_message ( "... analyzing Windows merge modules ... \n" ) ;
$ mergemodulesarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "MergeModule" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "mergemodules1.log" , $ mergemodulesarrayref ) ; }
2004-04-20 06:24:55 -05:00
}
my $ modulesinproductarrayref ;
if ( ! ( $ installer:: globals:: is_copy_only_project ) )
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing modules ... \n" ) ;
2004-04-20 06:24:55 -05:00
$ modulesinproductarrayref = installer::setupscript:: get_all_items_from_script ( $ setupscriptref , "Module" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules1.log" , $ modulesinproductarrayref ) ; }
2008-08-27 05:29:48 -05:00
if ( ( ! $ allvariableshashref - > { 'XPDINSTALLER' } ) || ( ! $ installer:: globals:: isxpdplatform ) )
{
$ modulesinproductarrayref = installer::scriptitems:: remove_Xpdonly_Items ( $ modulesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules1a.log" , $ modulesinproductarrayref ) ; }
}
2008-01-04 09:55:25 -06:00
installer::scriptitems:: resolve_assigned_modules ( $ modulesinproductarrayref ) ;
2005-02-24 09:19:10 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules1b.log" , $ modulesinproductarrayref ) ; }
2008-01-04 09:55:25 -06:00
$ modulesinproductarrayref = installer::scriptitems:: remove_template_modules ( $ modulesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules1c.log" , $ modulesinproductarrayref ) ; }
installer::scriptitems:: set_children_flag ( $ modulesinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules1d.log" , $ modulesinproductarrayref ) ; }
installer::scriptitems:: collect_all_languagemodules ( $ modulesinproductarrayref ) ;
2004-04-20 06:24:55 -05:00
# Assigning the modules to the items
installer::scriptitems:: assigning_modules_to_items ( $ modulesinproductarrayref , $ filesinproductarrayref , "Files" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles3.log" , $ filesinproductarrayref ) ; }
2007-07-12 05:15:22 -05:00
installer::scriptitems:: assigning_modules_to_items ( $ modulesinproductarrayref , $ unixlinksinproductarrayref , "Unixlinks" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks2.log" , $ unixlinksinproductarrayref ) ; }
2008-03-18 06:57:37 -05:00
installer::scriptitems:: assigning_modules_to_items ( $ modulesinproductarrayref , $ dirsinproductarrayref , "Dirs" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories2aa.log" , $ dirsinproductarrayref ) ; }
2004-04-20 06:24:55 -05:00
}
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nEnd of part 1a: The language independent part\n" ) ; }
# saving debug info, before staring part 1b
if ( $ installer:: globals:: debug ) { installer::logger:: savedebug ( $ installer:: globals:: exitlog ) ; }
#################################################
# Part 1b: The language dependent part
# (still platform independent)
#################################################
# Now starts the language dependent part, if more than one product is defined on the command line
2007-09-06 03:50:44 -05:00
# Example -l en-US,de#es,fr,it defines two multilingual products
2004-04-20 06:24:55 -05:00
###############################################################################
# Beginning of language dependent part
# The for iterates over all products, separated by an # in the language list
###############################################################################
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 1b: The language dependent part\n" ) ; }
for ( my $ n = 0 ; $ n <= $# installer:: globals:: languageproducts ; $ n + + )
{
2005-06-24 05:37:33 -05:00
my $ languagesarrayref = installer::languages:: get_all_languages_for_one_product ( $ installer:: globals:: languageproducts [ $ n ] , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "languages.log" , $ languagesarrayref ) ; }
2008-01-04 09:55:25 -06:00
$ installer:: globals:: alllanguagesinproductarrayref = $ languagesarrayref ;
2004-04-20 06:24:55 -05:00
my $ languagestringref = installer::languages:: get_language_string ( $ languagesarrayref ) ;
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "------------------------------------\n" ) ;
installer::logger:: print_message ( "... languages $$languagestringref ... \n" ) ;
2004-04-20 06:24:55 -05:00
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: patch )
{
$ installer:: globals:: addlicensefile = 0 ; # no license files for patches
$ installer:: globals:: makedownload = 0 ;
2005-05-13 03:40:50 -05:00
$ installer:: globals:: makejds = 0 ;
2005-04-04 04:10:04 -05:00
}
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: languagepack )
2005-04-04 04:10:04 -05:00
{
$ installer:: globals:: addchildprojects = 0 ;
$ installer:: globals:: addsystemintegration = 0 ;
2005-05-13 03:40:50 -05:00
$ installer:: globals:: makejds = 0 ;
2005-04-04 04:10:04 -05:00
$ installer:: globals:: addlicensefile = 0 ;
2006-03-06 02:28:21 -06:00
if ( $ allvariableshashref - > { 'OPENSOURCE' } ) { $ installer:: globals:: makedownload = 1 ; }
else { $ installer:: globals:: makedownload = 0 ; }
2004-10-18 07:51:13 -05:00
}
2010-12-13 13:56:37 -06:00
if ( $ installer:: globals:: helppack )
{
$ installer:: globals:: addchildprojects = 0 ;
$ installer:: globals:: addsystemintegration = 0 ;
$ installer:: globals:: makejds = 0 ;
$ installer:: globals:: addlicensefile = 0 ;
if ( $ allvariableshashref - > { 'OPENSOURCE' } ) { $ installer:: globals:: makedownload = 1 ; }
else { $ installer:: globals:: makedownload = 0 ; }
}
2004-04-20 06:24:55 -05:00
############################################################
# Beginning of language specific logging mechanism
# Until now only global logging into default: logfile.txt
############################################################
2008-01-04 09:55:25 -06:00
@ installer:: globals:: logfileinfo = ( ) ; # new logfile array and new logfile name
installer::logger:: copy_globalinfo_into_logfile ( ) ;
$ installer:: globals:: globalinfo_copied = 1 ;
2004-10-18 07:51:13 -05:00
2004-08-12 02:55:07 -05:00
my $ logminor = "" ;
if ( $ installer:: globals:: updatepack ) { $ logminor = $ installer:: globals:: lastminor ; }
else { $ logminor = $ installer:: globals:: minor ; }
2004-04-20 06:24:55 -05:00
2004-10-18 07:51:13 -05:00
my $ loglanguagestring = $$ languagestringref ;
2006-07-05 15:03:17 -05:00
my $ loglanguagestring_orig = $ loglanguagestring ;
2007-04-02 06:21:20 -05:00
if ( length ( $ loglanguagestring ) > $ installer:: globals:: max_lang_length )
2006-07-05 15:03:17 -05:00
{
2010-07-02 08:48:55 -05:00
my $ number_of_languages = installer::systemactions:: get_number_of_langs ( $ loglanguagestring ) ;
2006-12-19 11:33:42 -06:00
chomp ( my $ shorter = `echo $loglanguagestring | md5sum | sed -e "s/ .*//g"` ) ;
2010-07-02 08:48:55 -05:00
my $ id = substr ( $ shorter , 0 , 8 ) ; # taking only the first 8 digits
$ loglanguagestring = "lang_" . $ number_of_languages . "_id_" . $ id ;
2006-07-05 15:03:17 -05:00
}
2004-10-18 07:51:13 -05:00
2007-04-02 06:21:20 -05:00
$ installer:: globals:: logfilename = "log_" . $ installer:: globals:: build ;
if ( $ logminor ne "" ) { $ installer:: globals:: logfilename . = "_" . $ logminor ; }
2010-07-02 08:48:55 -05:00
$ installer:: globals:: logfilename . = "_" . $ loglanguagestring ;
2007-04-02 06:21:20 -05:00
$ installer:: globals:: logfilename . = ".log" ;
2008-01-04 09:55:25 -06:00
$ loggingdir = $ loggingdir . $ loglanguagestring . $ installer:: globals:: separator ;
2004-04-20 06:24:55 -05:00
installer::systemactions:: create_directory ( $ loggingdir ) ;
2006-07-05 15:03:17 -05:00
if ( $ loglanguagestring ne $ loglanguagestring_orig ) {
( my $ dir = $ loggingdir ) =~ s!/$!! ;
open ( my $ F1 , "> $dir.dir" ) ;
open ( my $ F2 , "> " . $ loggingdir . $ installer:: globals:: logfilename . '.file' ) ;
my @ s = map { "$_\n" } split ( '_' , $ loglanguagestring_orig ) ;
print $ F1 @ s ;
print $ F2 @ s ;
}
2004-07-13 03:09:35 -05:00
$ installer:: globals:: exitlog = $ loggingdir ;
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
##############################################################
# Determining the ship location, if this is an update pack
##############################################################
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: updatepack ) { $ shipinstalldir = installer::control:: determine_ship_directory ( $ languagestringref ) ; }
2004-06-11 12:13:58 -05:00
2008-08-18 04:47:11 -05:00
###################################################################
# Reading an existing msi database, to prepare update and patch
###################################################################
my $ refdatabase = "" ;
my $ uniquefilename = "" ;
my $ revuniquefilename = "" ;
my $ revshortfilename = "" ;
my $ allupdatesequences = "" ;
2008-10-02 03:34:45 -05:00
my $ allupdatecomponents = "" ;
2008-08-18 04:47:11 -05:00
my $ allupdatefileorder = "" ;
2008-10-02 03:34:45 -05:00
my $ allupdatecomponentorder = "" ;
2008-08-18 04:47:11 -05:00
my $ shortdirname = "" ;
my $ componentid = "" ;
my $ componentidkeypath = "" ;
my $ alloldproperties = "" ;
my $ allupdatelastsequences = "" ;
my $ allupdatediskids = "" ;
if ( $ installer:: globals:: iswindowsbuild )
{
if ( $ allvariableshashref - > { 'UPDATE_DATABASE' } )
{
installer::logger:: print_message ( "... analyzing update database ...\n" ) ;
2008-10-16 08:30:38 -05:00
$ refdatabase = installer::windows::update:: readdatabase ( $ allvariableshashref , $ languagestringref , $ includepatharrayref ) ;
2008-08-18 04:47:11 -05:00
2008-10-16 08:30:38 -05:00
if ( $ installer:: globals:: updatedatabase )
{
( $ uniquefilename , $ revuniquefilename , $ revshortfilename , $ allupdatesequences , $ allupdatecomponents , $ allupdatefileorder , $ allupdatecomponentorder , $ shortdirname , $ componentid , $ componentidkeypath , $ alloldproperties , $ allupdatelastsequences , $ allupdatediskids ) = installer::windows::update:: create_database_hashes ( $ refdatabase ) ;
if ( $ mergemodulesarrayref > - 1 ) { installer::windows::update:: readmergedatabase ( $ mergemodulesarrayref , $ languagestringref , $ includepatharrayref ) ; }
}
2008-08-18 04:47:11 -05:00
}
}
2004-04-20 06:24:55 -05:00
##############################################
# Setting global code variables for Windows
##############################################
if ( ! ( $ installer:: globals:: is_copy_only_project ) )
{
2010-07-02 08:48:55 -05:00
if ( ( $ installer:: globals:: iswindowsbuild ) && ( $ installer:: globals:: packageformat ne "archive" ) && ( $ installer:: globals:: packageformat ne "installed" ) )
2004-04-20 06:24:55 -05:00
{
2008-08-18 04:47:11 -05:00
installer::windows::msiglobal:: set_global_code_variables ( $ languagesarrayref , $ languagestringref , $ allvariableshashref , $ alloldproperties ) ;
2004-04-20 06:24:55 -05:00
}
}
################################################
# Resolving include paths (language dependent)
################################################
$ includepatharrayref_lang = installer::ziplist:: replace_languages_in_pathes ( $ includepatharrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "allpatharray4.log" , $ includepatharrayref_lang ) ; }
2006-10-11 03:03:33 -05:00
if ( $ installer:: globals:: refresh_includepathes ) { installer::worker:: collect_all_files_from_includepathes ( $ includepatharrayref_lang ) ; }
2004-04-20 06:24:55 -05:00
2006-10-11 03:03:33 -05:00
installer::ziplist:: list_all_files_from_include_path ( $ includepatharrayref_lang ) ;
2004-04-20 06:24:55 -05:00
2008-07-01 09:12:39 -05:00
##############################################
# Analyzing spellchecker languages
##############################################
if ( $ allvariableshashref - > { 'SPELLCHECKERFILE' } ) { installer::worker:: set_spellcheckerlanguages ( $ languagesarrayref , $ allvariableshashref ) ; }
2004-04-20 06:24:55 -05:00
#####################################
# Language dependent directory part
#####################################
my $ dirsinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ dirsinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories3.log" , $ dirsinproductlanguageresolvedarrayref ) ; }
2004-06-16 09:05:05 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories2a.log" , $ dirsinproductarrayref ) ; }
2004-04-20 06:24:55 -05:00
# A new directory array is needed ($dirsinproductlanguageresolvedarrayref instead of $dirsinproductarrayref)
# because $dirsinproductarrayref is needed in get_Destination_Directory_For_Item_From_Directorylist
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ dirsinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productdirectories4.log" , $ dirsinproductlanguageresolvedarrayref ) ; }
2005-07-01 06:10:36 -05:00
installer::scriptitems:: checking_directories_with_corrupt_hostname ( $ dirsinproductlanguageresolvedarrayref , $ languagesarrayref ) ;
2004-12-16 03:43:05 -06:00
2008-07-16 10:04:27 -05:00
installer::scriptitems:: set_global_directory_hostnames ( $ dirsinproductlanguageresolvedarrayref , $ allvariableshashref ) ;
2008-03-18 06:57:37 -05:00
2004-04-20 06:24:55 -05:00
#####################################
# files part, language dependent
#####################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing files ...\n" ) ;
2004-04-20 06:24:55 -05:00
my $ filesinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ filesinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles4.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2005-06-24 05:37:33 -05:00
if ( ! $ installer:: globals:: set_office_start_language )
{
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_office_start_language_files ( $ filesinproductlanguageresolvedarrayref ) ;
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles4b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2005-06-24 05:37:33 -05:00
}
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ filesinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles5.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2005-02-24 09:19:10 -06:00
if ( $ installer:: globals:: iswin and $^O =~ /MSWin/i ) { installer::converter:: convert_slash_to_backslash ( $ filesinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles6.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_non_existent_languages_in_productlists ( $ filesinproductlanguageresolvedarrayref , $ languagestringref , "Name" , "file" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles7.log" , $ filesinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: get_Destination_Directory_For_Item_From_Directorylist ( $ filesinproductlanguageresolvedarrayref , $ dirsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles8.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2004-12-16 03:43:05 -06:00
installer::scriptitems:: get_Source_Directory_For_Files_From_Includepathlist ( $ filesinproductlanguageresolvedarrayref , $ includepatharrayref_lang , $ dirsinproductlanguageresolvedarrayref , "Files" ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles9.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_Files_Without_Sourcedirectory ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2004-10-18 07:51:13 -05:00
if ( $ installer:: globals:: languagepack )
{
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_Files_For_Languagepacks ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10c.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2008-03-18 06:57:37 -05:00
if ( ! $ allvariableshashref - > { 'NO_README_IN_ROOTDIR' } )
2005-04-04 04:10:04 -05:00
{
2008-03-18 06:57:37 -05:00
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: add_License_Files_into_Installdir ( $ filesinproductlanguageresolvedarrayref , $ dirsinproductlanguageresolvedarrayref , $ languagesarrayref ) ;
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2004-06-11 12:13:58 -05:00
2005-04-20 05:44:33 -05:00
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_onlyasialanguage_files_from_productlists ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10d.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_onlywesternlanguage_files_from_productlists ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10e.log" , $ filesinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: make_filename_language_specific ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles10f.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2004-07-06 08:55:15 -05:00
# print "... calculating checksums ...\n";
# my $checksumfile = installer::worker::make_checksum_file($filesinproductlanguageresolvedarrayref, $includepatharrayref);
# if ( $installer::globals::globallogging ) { installer::files::save_file($loggingdir . $installer::globals::checksumfilename, $checksumfile); }
2004-04-20 06:24:55 -05:00
######################################################################################
# Unzipping files with flag ARCHIVE and putting all included files into the file list
######################################################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing files with flag ARCHIVE ...\n" ) ;
2004-04-20 06:24:55 -05:00
my @ additional_paths_from_zipfiles = ( ) ;
$ filesinproductlanguageresolvedarrayref = installer::archivefiles:: resolving_archive_flag ( $ filesinproductlanguageresolvedarrayref , \ @ additional_paths_from_zipfiles , $ languagestringref , $ loggingdir ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles11.log" , $ filesinproductlanguageresolvedarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_file ( $ loggingdir . "additional_paths.log" , \ @ additional_paths_from_zipfiles ) ; }
2005-11-09 02:08:51 -06:00
# packed files sometimes contain a "$" in their name: HighlightText$1.class. For epm the "$" has to be quoted by "$$"
2004-04-20 06:24:55 -05:00
2006-04-26 14:43:36 -05:00
if ( ! ( $ installer:: globals:: iswindowsbuild || $ installer:: globals:: simple ) )
2004-04-20 06:24:55 -05:00
{
2005-11-09 02:08:51 -06:00
installer::scriptitems:: quoting_illegal_filenames ( $ filesinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles12.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2008-07-16 10:04:27 -05:00
#####################################
# Files with flag SUBST_FILENAME
#####################################
installer::logger:: print_message ( "... analyzing files with flag SUBST_FILENAME ...\n" ) ;
installer::substfilenamefiles:: resolving_subst_filename_flag ( $ filesinproductlanguageresolvedarrayref , $ allvariableshashref , $ languagestringref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles12d.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
#####################################
# Files with flag SCPZIP_REPLACE
#####################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing files with flag SCPZIP_REPLACE ...\n" ) ;
2004-04-20 06:24:55 -05:00
# Editing files with flag SCPZIP_REPLACE.
2005-02-24 09:19:10 -06:00
installer::scpzipfiles:: resolving_scpzip_replace_flag ( $ filesinproductlanguageresolvedarrayref , $ allvariableshashref , "File" , $ languagestringref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles13.log" , $ filesinproductlanguageresolvedarrayref ) ; }
#####################################
# Files with flag PATCH_SO_NAME
#####################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing files with flag PATCH_SO_NAME ...\n" ) ;
2004-04-20 06:24:55 -05:00
# Editing files with flag PATCH_SO_NAME.
2004-06-11 12:13:58 -05:00
installer::scppatchsoname:: resolving_patchsoname_flag ( $ filesinproductlanguageresolvedarrayref , $ allvariableshashref , "File" , $ languagestringref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles13b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2007-05-10 07:56:19 -05:00
#####################################
# Files with flag HIDDEN
#####################################
installer::logger:: print_message ( "... analyzing files with flag HIDDEN ...\n" ) ;
installer::worker:: resolving_hidden_flag ( $ filesinproductlanguageresolvedarrayref , $ allvariableshashref , "File" , $ languagestringref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles13c.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
#####################################
# Creating services.rdb
#####################################
2005-04-20 05:44:33 -05:00
if ( $ allvariableshashref - > { 'SERVICESPROJEKT' } )
2004-04-20 06:24:55 -05:00
{
2010-12-13 13:56:37 -06:00
if ( ! $ installer:: globals:: languagepack && ! $ installer:: globals:: helppack )
2004-06-11 12:13:58 -05:00
{
2004-10-18 07:51:13 -05:00
# ATTENTION: For creating the services.rdb it is necessary to execute the native file
# "regcomp" or "regcomp.exe". Therefore this function can only be executed on the
# corresponding platform.
2004-06-11 12:13:58 -05:00
2004-10-18 07:51:13 -05:00
if ( $ installer:: globals:: servicesrdb_can_be_created )
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating preregistered services.rdb ...\n" ) ;
2004-10-18 07:51:13 -05:00
2007-10-15 06:37:37 -05:00
installer::servicesfile:: create_services_rdb ( $ allvariableshashref , $ filesinproductlanguageresolvedarrayref , $ includepatharrayref , $ languagestringref ) ;
2004-10-18 07:51:13 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles14.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2004-06-11 12:13:58 -05:00
}
2004-04-20 06:24:55 -05:00
}
2004-11-18 02:10:54 -06:00
#####################################
# Calls of regmerge
#####################################
if ( ! ( $ installer:: globals:: is_copy_only_project ) )
{
2010-12-13 13:56:37 -06:00
if ( ! $ installer:: globals:: languagepack && ! $ installer:: globals:: helppack )
2004-11-18 02:10:54 -06:00
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... merging files into registry database ...\n" ) ;
2004-11-18 02:10:54 -06:00
2007-10-15 06:37:37 -05:00
installer::regmerge:: merge_registration_files ( $ filesinproductlanguageresolvedarrayref , $ includepatharrayref , $ languagestringref , $ allvariableshashref ) ;
2004-11-18 02:10:54 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles14b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
}
2004-04-20 06:24:55 -05:00
############################################
# Collecting directories for epm list file
############################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing all directories for this product ...\n" ) ;
2004-04-20 06:24:55 -05:00
# There are two ways for a directory to be included into the epm directory list:
# 1. Looking for all destination paths in the files array
# 2. Looking for directories with CREATE flag in the directory array
# Advantage: Many pathes are hidden in zip files, they are not defined in the setup script.
# It will be possible, that in the setup script only those directoies have to be defined,
# that have a CREATE flag. All other directories are created, if they contain at least one file.
2008-03-18 06:57:37 -05:00
my ( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_from_filesarray ( $ filesinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist1.log" , $ directoriesforepmarrayref ) ; }
2008-03-18 06:57:37 -05:00
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_with_create_flag_from_directoryarray ( $ dirsinproductlanguageresolvedarrayref , $ alldirectoryhash ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist2.log" , $ directoriesforepmarrayref ) ; }
#########################################################
# language dependent scpactions part
#########################################################
my $ scpactionsinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ scpactionsinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions3.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ scpactionsinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions4.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
2004-12-16 03:43:05 -06:00
installer::scriptitems:: get_Source_Directory_For_Files_From_Includepathlist ( $ scpactionsinproductlanguageresolvedarrayref , $ includepatharrayref_lang , $ dirsinproductlanguageresolvedarrayref , "ScpActions" ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions5.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
2009-07-15 09:31:28 -05:00
# Editing scpactions with flag SCPZIP_REPLACE and PATCH_SO_NAME.
2004-04-20 06:24:55 -05:00
2005-02-24 09:19:10 -06:00
installer::scpzipfiles:: resolving_scpzip_replace_flag ( $ scpactionsinproductlanguageresolvedarrayref , $ allvariableshashref , "ScpAction" , $ languagestringref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions6.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
2009-07-15 09:31:28 -05:00
installer::scppatchsoname:: resolving_patchsoname_flag ( $ scpactionsinproductlanguageresolvedarrayref , $ allvariableshashref , "ScpAction" , $ languagestringref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions6a.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
#########################################################
# language dependent links part
#########################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing links ...\n" ) ;
2004-04-20 06:24:55 -05:00
my $ linksinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ linksinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks2.log" , $ linksinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ linksinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks3.log" , $ linksinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: get_destination_file_path_for_links ( $ linksinproductlanguageresolvedarrayref , $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks4.log" , $ linksinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: get_Destination_Directory_For_Item_From_Directorylist ( $ linksinproductlanguageresolvedarrayref , $ dirsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks5.log" , $ linksinproductlanguageresolvedarrayref ) ; }
# Now taking all links that have no FileID but a ShortcutID, linking to another link
installer::scriptitems:: get_destination_link_path_for_links ( $ linksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks6.log" , $ linksinproductlanguageresolvedarrayref ) ; }
$ linksinproductlanguageresolvedarrayref = installer::scriptitems:: remove_workstation_only_items ( $ linksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks7.log" , $ linksinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: resolve_links_with_flag_relative ( $ linksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks8.log" , $ linksinproductlanguageresolvedarrayref ) ; }
2007-07-12 05:15:22 -05:00
#########################################################
# language dependent unix links part
#########################################################
installer::logger:: print_message ( "... analyzing unix links ...\n" ) ;
my $ unixlinksinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ unixlinksinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks3.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ unixlinksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks4.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: get_Destination_Directory_For_Item_From_Directorylist ( $ unixlinksinproductlanguageresolvedarrayref , $ dirsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks5.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
#########################################################
# language dependent part for profiles and profileitems
#########################################################
my $ profilesinproductlanguageresolvedarrayref ;
my $ profileitemsinproductlanguageresolvedarrayref ;
2010-12-13 13:56:37 -06:00
if ( ( ! ( $ installer:: globals:: is_copy_only_project ) ) && ( ! ( $ installer:: globals:: product =~ /ada/i ) ) && ( ! ( $ installer:: globals:: languagepack ) ) && ( ! ( $ installer:: globals:: helppack ) ) )
2004-04-20 06:24:55 -05:00
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating profiles ...\n" ) ;
2004-04-20 06:24:55 -05:00
$ profilesinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ profilesinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profiles2.log" , $ profilesinproductlanguageresolvedarrayref ) ; }
$ profileitemsinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ profileitemsinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profileitems2.log" , $ profilesinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ profilesinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profiles3.log" , $ profilesinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ profileitemsinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profileitems3.log" , $ profileitemsinproductlanguageresolvedarrayref ) ; }
installer::scriptitems:: replace_setup_variables ( $ profileitemsinproductlanguageresolvedarrayref , $ languagestringref , $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profileitems4.log" , $ profileitemsinproductlanguageresolvedarrayref ) ; }
2008-01-16 05:48:41 -06:00
if ( $ installer:: globals:: patch_user_dir )
2006-10-13 04:36:00 -05:00
{
installer::scriptitems:: replace_userdir_variable ( $ profileitemsinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profileitems4a.log" , $ profileitemsinproductlanguageresolvedarrayref ) ; }
}
2004-04-20 06:24:55 -05:00
installer::scriptitems:: get_Destination_Directory_For_Item_From_Directorylist ( $ profilesinproductlanguageresolvedarrayref , $ dirsinproductarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "profiles4.log" , $ profilesinproductlanguageresolvedarrayref ) ; }
# Now the Profiles can be created
2007-11-26 09:17:46 -06:00
installer::profiles:: create_profiles ( $ profilesinproductlanguageresolvedarrayref , $ profileitemsinproductlanguageresolvedarrayref , $ filesinproductlanguageresolvedarrayref , $ languagestringref , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles15.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
my $ registryitemsinproductlanguageresolvedarrayref ; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )"
my $ folderinproductlanguageresolvedarrayref ; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )"
my $ folderitemsinproductlanguageresolvedarrayref ; # cannot be defined in the following "if ( $installer::globals::iswindowsbuild )"
if ( $ installer:: globals:: iswindowsbuild ) # Windows specific items: Folder, FolderItem, RegistryItem
{
#########################################################
# language dependent part for folder
#########################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing folder ...\n" ) ;
2004-04-20 06:24:55 -05:00
$ folderinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ folderinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folder2.log" , $ folderinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ folderinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folder3.log" , $ folderinproductlanguageresolvedarrayref ) ; }
#########################################################
# language dependent part for folderitems
#########################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing folderitems ...\n" ) ;
2004-04-20 06:24:55 -05:00
$ folderitemsinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ folderitemsinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folderitems2.log" , $ folderitemsinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ folderitemsinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folderitems3.log" , $ folderitemsinproductlanguageresolvedarrayref ) ; }
#########################################################
# language dependent part for registryitems
#########################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing registryitems ...\n" ) ;
2004-04-20 06:24:55 -05:00
$ registryitemsinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ registryitemsinproductarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems2.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ registryitemsinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems3.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
}
#########################################################
# language dependent part for modules
#########################################################
my $ modulesinproductlanguageresolvedarrayref ;
if ( ! ( $ installer:: globals:: is_copy_only_project ) )
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... analyzing modules ...\n" ) ;
2004-04-20 06:24:55 -05:00
$ modulesinproductlanguageresolvedarrayref = installer::scriptitems:: resolving_all_languages_in_productlists ( $ modulesinproductarrayref , $ languagesarrayref ) ;
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes_modules ( $ loggingdir . "modules2.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
$ modulesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_not_required_language_modules ( $ modulesinproductlanguageresolvedarrayref , $ languagesarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes_modules ( $ loggingdir . "modules2a.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
2004-04-20 06:24:55 -05:00
2008-07-01 09:12:39 -05:00
if ( $ installer:: globals:: analyze_spellcheckerlanguage )
{
$ modulesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_not_required_spellcheckerlanguage_modules ( $ modulesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes_modules ( $ loggingdir . "modules3.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
$ filesinproductlanguageresolvedarrayref = installer::scriptitems:: remove_not_required_spellcheckerlanguage_files ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles15b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2004-11-18 02:10:54 -06:00
installer::scriptitems:: changing_name_of_language_dependent_keys ( $ modulesinproductlanguageresolvedarrayref ) ;
2008-07-01 09:12:39 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes_modules ( $ loggingdir . "modules3a.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
2008-04-24 13:27:44 -05:00
2008-08-01 05:14:16 -05:00
installer::scriptitems:: select_required_language_strings ( $ modulesinproductlanguageresolvedarrayref ) ; # using english strings
2004-04-20 06:24:55 -05:00
}
# Copy-only projects can now start to copy all items File and ScpAction
2004-06-11 12:13:58 -05:00
if ( $ installer:: globals:: is_copy_only_project ) { installer::copyproject:: copy_project ( $ filesinproductlanguageresolvedarrayref , $ scpactionsinproductlanguageresolvedarrayref , $ loggingdir , $ languagestringref , $ shipinstalldir , $ allsettingsarrayref ) ; }
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
# Language pack projects can now start to select the required information
if ( $ installer:: globals:: languagepack )
{
$ filesinproductlanguageresolvedarrayref = installer::languagepack:: select_language_items ( $ filesinproductlanguageresolvedarrayref , $ languagesarrayref , "File" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ scpactionsinproductlanguageresolvedarrayref = installer::languagepack:: select_language_items ( $ scpactionsinproductlanguageresolvedarrayref , $ languagesarrayref , "ScpAction" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions6b.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
$ linksinproductlanguageresolvedarrayref = installer::languagepack:: select_language_items ( $ linksinproductlanguageresolvedarrayref , $ languagesarrayref , "Shortcut" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks8b.log" , $ linksinproductlanguageresolvedarrayref ) ; }
2007-07-12 05:15:22 -05:00
$ unixlinksinproductlanguageresolvedarrayref = installer::languagepack:: select_language_items ( $ unixlinksinproductlanguageresolvedarrayref , $ languagesarrayref , "Unixlink" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks5.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
@ { $ folderitemsinproductlanguageresolvedarrayref } = ( ) ; # no folderitems in languagepacks
2005-04-20 05:44:33 -05:00
# Collecting the directories again, to include only the language specific directories
2008-03-18 06:57:37 -05:00
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_from_filesarray ( $ filesinproductlanguageresolvedarrayref ) ;
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3alangpack.log" , $ directoriesforepmarrayref ) ; }
2008-03-18 06:57:37 -05:00
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_with_create_flag_from_directoryarray ( $ dirsinproductlanguageresolvedarrayref , $ alldirectoryhash ) ;
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3blangpack.log" , $ directoriesforepmarrayref ) ; }
installer::sorter:: sorting_array_of_hashes ( $ directoriesforepmarrayref , "HostName" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3clangpack.log" , $ directoriesforepmarrayref ) ; }
2005-06-17 08:06:21 -05:00
if ( $ installer:: globals:: iswindowsbuild )
{
$ registryitemsinproductlanguageresolvedarrayref = installer::worker:: select_langpack_items ( $ registryitemsinproductlanguageresolvedarrayref , "RegistryItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems3aa.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
}
2004-06-11 12:13:58 -05:00
}
2004-04-20 06:24:55 -05:00
2010-12-13 13:56:37 -06:00
# Help pack projects can now start to select the required information
if ( $ installer:: globals:: helppack )
{
$ filesinproductlanguageresolvedarrayref = installer::helppack:: select_help_items ( $ filesinproductlanguageresolvedarrayref , $ languagesarrayref , "File" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16b2.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ scpactionsinproductlanguageresolvedarrayref = installer::helppack:: select_help_items ( $ scpactionsinproductlanguageresolvedarrayref , $ languagesarrayref , "ScpAction" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions6b2.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
$ linksinproductlanguageresolvedarrayref = installer::helppack:: select_help_items ( $ linksinproductlanguageresolvedarrayref , $ languagesarrayref , "Shortcut" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks8b2.log" , $ linksinproductlanguageresolvedarrayref ) ; }
$ unixlinksinproductlanguageresolvedarrayref = installer::helppack:: select_help_items ( $ unixlinksinproductlanguageresolvedarrayref , $ languagesarrayref , "Unixlink" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks5b2.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
@ { $ folderitemsinproductlanguageresolvedarrayref } = ( ) ; # no folderitems in helppacks
# Collecting the directories again, to include only the language specific directories
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_from_filesarray ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3ahelppack.log" , $ directoriesforepmarrayref ) ; }
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_with_create_flag_from_directoryarray ( $ dirsinproductlanguageresolvedarrayref , $ alldirectoryhash ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3bhelppack.log" , $ directoriesforepmarrayref ) ; }
installer::sorter:: sorting_array_of_hashes ( $ directoriesforepmarrayref , "HostName" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist3chelppack.log" , $ directoriesforepmarrayref ) ; }
if ( $ installer:: globals:: iswindowsbuild )
{
$ registryitemsinproductlanguageresolvedarrayref = installer::worker:: select_helppack_items ( $ registryitemsinproductlanguageresolvedarrayref , "RegistryItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems3aa2.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
}
}
2005-12-21 06:02:45 -06:00
# Collecting all files without flag PATCH (for maintenance reasons)
if ( $ installer:: globals:: patch ) { installer::worker:: collect_all_files_without_patch_flag ( $ filesinproductlanguageresolvedarrayref ) ; }
2005-04-04 04:10:04 -05:00
# Patch projects can now start to select the required information
2005-04-20 05:44:33 -05:00
if ( ( $ installer:: globals:: patch ) && ( ( $ installer:: globals:: issolarispkgbuild ) || ( $ installer:: globals:: iswindowsbuild ) ) )
2005-04-04 04:10:04 -05:00
{
$ filesinproductlanguageresolvedarrayref = installer::worker:: select_patch_items ( $ filesinproductlanguageresolvedarrayref , "File" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16patch.log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ scpactionsinproductlanguageresolvedarrayref = installer::worker:: select_patch_items ( $ scpactionsinproductlanguageresolvedarrayref , "ScpAction" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productscpactions6patch.log" , $ scpactionsinproductlanguageresolvedarrayref ) ; }
$ linksinproductlanguageresolvedarrayref = installer::worker:: select_patch_items ( $ linksinproductlanguageresolvedarrayref , "Shortcut" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productlinks8patch.log" , $ linksinproductlanguageresolvedarrayref ) ; }
2007-07-12 05:15:22 -05:00
$ unixlinksinproductlanguageresolvedarrayref = installer::worker:: select_patch_items ( $ unixlinksinproductlanguageresolvedarrayref , "Unixlink" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks6patch.log" , $ unixlinksinproductlanguageresolvedarrayref ) ; }
2005-11-09 02:08:51 -06:00
$ folderitemsinproductlanguageresolvedarrayref = installer::worker:: select_patch_items ( $ folderitemsinproductlanguageresolvedarrayref , "FolderItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfolderitems1patch.log" , $ folderitemsinproductlanguageresolvedarrayref ) ; }
# @{$folderitemsinproductlanguageresolvedarrayref} = (); # no folderitems in languagepacks
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: iswindowsbuild )
{
$ registryitemsinproductlanguageresolvedarrayref = installer::worker:: select_patch_items_without_name ( $ registryitemsinproductlanguageresolvedarrayref , "RegistryItem" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems3a.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
2005-09-28 07:11:05 -05:00
installer::worker:: prepare_windows_patchfiles ( $ filesinproductlanguageresolvedarrayref , $ languagestringref , $ allvariableshashref ) ;
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16bpatch.log" , $ filesinproductlanguageresolvedarrayref ) ; }
# For Windows patches, the directories can now be collected again
2008-03-18 06:57:37 -05:00
( $ directoriesforepmarrayref , $ alldirectoryhash ) = installer::scriptitems:: collect_directories_from_filesarray ( $ filesinproductlanguageresolvedarrayref ) ;
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist4_patch.log" , $ directoriesforepmarrayref ) ; }
installer::sorter:: sorting_array_of_hashes ( $ directoriesforepmarrayref , "HostName" ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforepmlist5_patch.log" , $ directoriesforepmarrayref ) ; }
}
2005-04-04 04:10:04 -05:00
}
2005-05-13 01:52:12 -05:00
#########################################################
# Collecting all scp actions
#########################################################
installer::worker:: collect_scpactions ( $ scpactionsinproductlanguageresolvedarrayref ) ;
2005-04-04 04:10:04 -05:00
#########################################################
# creating inf files for user system integration
#########################################################
2005-04-20 05:44:33 -05:00
if ( ( $ installer:: globals:: iswindowsbuild ) && ( ! $ installer:: globals:: patch ) ) # Windows specific items: Folder, FolderItem, RegistryItem
2005-04-04 04:10:04 -05:00
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating inf files ...\n" ) ;
2005-04-04 04:10:04 -05:00
installer::worker:: create_inf_file ( $ filesinproductlanguageresolvedarrayref , $ registryitemsinproductlanguageresolvedarrayref , $ folderinproductlanguageresolvedarrayref , $ folderitemsinproductlanguageresolvedarrayref , $ modulesinproductlanguageresolvedarrayref , $ languagesarrayref , $ languagestringref , $ allvariableshashref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16c.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2007-03-26 06:43:58 -05:00
###########################################
# Using upx, to decrease file size
# Currently only for Windows.
###########################################
if ( $ allvariableshashref - > { 'UPXPRODUCT' } )
{
installer::upx:: upx_on_libraries ( $ filesinproductlanguageresolvedarrayref , $ languagestringref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16d.log" , $ filesinproductlanguageresolvedarrayref ) ; }
}
2006-10-13 04:36:00 -05:00
###########################################################
# Simple package projects can now start to create the
# installation structure by creating Directories, Files
# Links and ScpActions. This is the last platform
# independent part.
###########################################################
if ( $ installer:: globals:: is_simple_packager_project )
{
2008-01-04 09:55:25 -06:00
installer::simplepackage:: create_simple_package ( $ filesinproductlanguageresolvedarrayref , $ directoriesforepmarrayref , $ scpactionsinproductlanguageresolvedarrayref , $ linksinproductlanguageresolvedarrayref , $ unixlinksinproductlanguageresolvedarrayref , $ loggingdir , $ languagestringref , $ shipinstalldir , $ allsettingsarrayref , $ allvariableshashref , $ includepatharrayref ) ;
2006-10-13 04:36:00 -05:00
next ; # ! leaving the current loop, because no further packaging required.
}
2007-09-06 03:50:44 -05:00
###########################################################
# Analyzing the package structure
###########################################################
installer::logger:: print_message ( "... analyzing package list ...\n" ) ;
my $ packages = installer::packagelist:: collectpackages ( $ modulesinproductlanguageresolvedarrayref , $ languagesarrayref ) ;
installer::packagelist:: check_packagelist ( $ packages ) ;
2008-01-04 09:55:25 -06:00
$ packages = installer::packagelist:: analyze_list ( $ packages , $ modulesinproductlanguageresolvedarrayref ) ;
installer::packagelist:: remove_multiple_modules_packages ( $ packages ) ;
2007-09-06 03:50:44 -05:00
# printing packages content:
installer::packagelist:: log_packages_content ( $ packages ) ;
2008-03-18 06:57:37 -05:00
installer::packagelist:: create_module_destination_hash ( $ packages , $ allvariableshashref ) ;
2007-09-06 03:50:44 -05:00
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nEnd of part 1b: The language dependent part\n" ) ; }
# saving debug info, before starting part 2
if ( $ installer:: globals:: debug ) { installer::logger:: savedebug ( $ installer:: globals:: exitlog ) ; }
#################################################
# Part 2: The platform dependent part
#################################################
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 2: The platform dependent part\n" ) ; }
#################################################
# Part 2a: All non-Windows platforms
#################################################
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 2a: All non-Windows platforms\n" ) ; }
#########################################################
# ... creating epm list file ...
# Only for non-Windows platforms
#########################################################
if ( ! ( $ installer:: globals:: iswindowsbuild ) )
{
####################################################
# Writing log file before packages are packed
####################################################
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating log file " . $ loggingdir . $ installer:: globals:: logfilename . "\n" ) ;
2004-04-20 06:24:55 -05:00
installer::files:: save_file ( $ loggingdir . $ installer:: globals:: logfilename , \ @ installer:: globals:: logfileinfo ) ;
2004-06-11 12:13:58 -05:00
####################################################
# Creating directories
####################################################
2010-11-03 15:20:18 -05:00
if ( $ allvariableshashref - > { 'OOODOWNLOADNAME' } ) { installer::download:: set_download_filename ( $ languagestringref , $ allvariableshashref ) ; }
else { installer::download:: resolve_variables_in_downloadname ( $ allvariableshashref , "" , $ languagestringref ) ; }
2008-01-04 09:55:25 -06:00
$ installdir = installer::worker:: create_installation_directory ( $ shipinstalldir , $ languagestringref , \ $ current_install_number ) ;
2004-06-11 12:13:58 -05:00
2004-07-06 08:55:15 -05:00
my $ listfiledir = installer::systemactions:: create_directories ( "listfile" , $ languagestringref ) ;
my $ installlogdir = installer::systemactions:: create_directory_next_to_directory ( $ installdir , "log" ) ;
2004-06-11 12:13:58 -05:00
2008-12-01 10:05:35 -06:00
####################################################
# Reading for Solaris all package descriptions
# from file defined in property PACKAGEMAP
####################################################
if ( $ installer:: globals:: issolarisbuild ) { installer::epmfile:: read_packagemap ( $ allvariableshashref , $ includepatharrayref , $ languagesarrayref ) ; }
2004-06-11 12:13:58 -05:00
my $ epmexecutable = "" ;
my $ found_epm = 0 ;
2009-02-26 04:06:13 -06:00
# shuffle array to reduce parallel packaging process in pool
installer::worker:: shuffle_array ( $ packages ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
# iterating over all packages
2004-04-20 06:24:55 -05:00
for ( my $ k = 0 ; $ k <= $# { $ packages } ; $ k + + )
{
my $ onepackage = $ { $ packages } [ $ k ] ;
2004-06-11 12:13:58 -05:00
# checking, if this is a language pack or a project pack.
# Creating language packs only, if $installer::globals::languagepack is set. Parameter: -languagepack
if ( $ installer:: globals:: languagepack ) { installer::languagepack:: replace_languagestring_variable ( $ onepackage , $ languagestringref ) ; }
2010-12-13 13:56:37 -06:00
# checking, if this is a help pack
# Creating help packs only, if $installer::globals::helppack is set. Parameter: -helppack
if ( $ installer:: globals:: helppack ) { installer::helppack:: replace_languagestring_variable ( $ onepackage , $ languagestringref ) ; }
2004-04-20 06:24:55 -05:00
my $ onepackagename = $ onepackage - > { 'module' } ; # name of the top module (required)
2005-04-20 05:44:33 -05:00
2004-04-20 06:24:55 -05:00
my $ shellscriptsfilename = "" ;
if ( $ onepackage - > { 'script' } ) { $ shellscriptsfilename = $ onepackage - > { 'script' } ; }
2005-04-04 04:10:04 -05:00
# no scripts for Solaris patches!
2005-04-20 05:44:33 -05:00
if ( ( $ installer:: globals:: patch ) && ( $ installer:: globals:: issolarispkgbuild ) ) { $ shellscriptsfilename = "" ; }
2004-04-20 06:24:55 -05:00
###########################
# package name
###########################
my $ packagename = "" ;
if ( $ installer:: globals:: issolarisbuild ) # only for Solaris
{
if ( $ onepackage - > { 'solarispackagename' } ) { $ packagename = $ onepackage - > { 'solarispackagename' } ; }
}
else # not Solaris
{
if ( $ onepackage - > { 'packagename' } ) { $ packagename = $ onepackage - > { 'packagename' } ; }
}
2004-06-11 12:13:58 -05:00
if ( ! ( $ packagename eq "" ) )
{
2008-01-04 09:55:25 -06:00
installer::packagelist:: resolve_packagevariables ( \ $ packagename , $ allvariableshashref , 0 ) ;
2004-06-11 12:13:58 -05:00
}
2010-04-07 04:33:56 -05:00
# Debian allows no underline in package name
if ( $ installer:: globals:: debian ) { $ packagename =~ s/_/-/g ; }
2010-05-05 09:28:18 -05:00
# Debian allows no underline in package name
if ( $ installer:: globals:: debian ) { $ packagename =~ s/_/-/g ; }
2005-04-04 04:10:04 -05:00
my $ linkaddon = "" ;
2007-01-02 08:22:34 -06:00
my $ linkpackage = 0 ;
2005-04-20 05:44:33 -05:00
$ installer:: globals:: add_required_package = "" ;
2005-08-18 06:46:58 -05:00
$ installer:: globals:: linuxlinkrpmprocess = 0 ;
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: makelinuxlinkrpm )
{
my $ oldpackagename = $ packagename ;
2005-04-20 05:44:33 -05:00
$ installer:: globals:: add_required_package = $ oldpackagename ; # the link rpm requires the non-linked version
if ( $ installer:: globals:: languagepack ) { $ packagename = $ packagename . "_u" ; }
2010-12-13 13:56:37 -06:00
elsif ( $ installer:: globals:: helppack ) { $ packagename = $ packagename . "_v" ; } # wtf...
2005-04-20 05:44:33 -05:00
else { $ packagename = $ packagename . "u" ; }
2005-04-04 04:10:04 -05:00
my $ savestring = $ oldpackagename . "\t" . $ packagename ;
push ( @ installer:: globals:: linkrpms , $ savestring ) ;
$ linkaddon = "_links" ;
2005-08-18 06:46:58 -05:00
$ installer:: globals:: linuxlinkrpmprocess = 1 ;
2007-01-02 08:22:34 -06:00
$ linkpackage = 1 ;
2005-04-04 04:10:04 -05:00
}
2009-02-26 04:06:13 -06:00
####################################################
# Header for this package into log file
####################################################
installer::logger:: include_header_into_logfile ( "Creating package: $packagename ($k)" ) ;
####################################################
# Pool check: If package is created at the moment
# try it again later.
####################################################
2010-03-24 08:13:19 -05:00
if ( ( $ installer:: globals:: patch ) ||
( $ installer:: globals:: languagepack ) ||
2010-12-13 13:56:37 -06:00
( $ installer:: globals:: helppack ) ||
2010-03-24 08:13:19 -05:00
( $ installer:: globals:: packageformat eq "native" ) ||
( $ installer:: globals:: packageformat eq "portable" ) ||
( $ installer:: globals:: packageformat eq "osx" ) ) { $ allvariableshashref - > { 'POOLPRODUCT' } = 0 ; }
2009-02-26 04:06:13 -06:00
if ( $ allvariableshashref - > { 'POOLPRODUCT' } )
{
if ( ! $ installer:: globals:: sessionidset ) { installer::packagepool:: set_sessionid ( ) ; }
if ( ! $ installer:: globals:: poolpathset ) { installer::packagepool:: set_pool_path ( ) ; }
if ( ( ! $ installer:: globals:: getuidpathset ) && ( $ installer:: globals:: issolarisbuild ) ) { installer::worker:: set_getuid_path ( $ includepatharrayref ) ; }
my $ package_is_creatable = installer::packagepool:: check_package_availability ( $ packagename ) ;
if ( ( ! $ package_is_creatable ) && ( ! exists ( $ installer:: globals:: poolshiftedpackages { $ packagename } ) ) )
{
splice ( @ { $ packages } , $ k , 1 ) ; # removing package ...
push ( @ { $ packages } , $ onepackage ) ; # ... and adding it to the end
$ installer:: globals:: poolshiftedpackages { $ packagename } = 1 ; # only shifting each package once
$ k - - ; # decreasing the counter
my $ localinfoline = "Pool: Package \"$packagename\" cannot be created at the moment. Trying again later (1).\n" ;
installer::logger:: print_message ( $ localinfoline ) ;
push ( @ installer:: globals:: logfileinfo , $ localinfoline ) ;
next ; # repeating this iteration with new package
}
}
2004-04-20 06:24:55 -05:00
###########################################
# Root path, can be defined as parameter
###########################################
my $ packagerootpath = "" ;
if ( $ installer:: globals:: rootpath eq "" )
{
$ packagerootpath = $ onepackage - > { 'destpath' } ;
installer::packagelist:: resolve_packagevariables ( \ $ packagerootpath , $ allvariableshashref , 1 ) ;
2010-10-21 09:44:03 -05:00
# we put branding and common stuff into the same prefix on unixes => $packagerootpath must be the whole prefix, including the product name
if ( $ installer:: globals:: isunix ) { $ packagerootpath . = "/$allvariableshashref->{'UNIXBASISROOTNAME'}" ; }
2005-04-04 04:10:04 -05:00
if ( $^O =~ /darwin/i ) { $ packagerootpath =~ s/\/opt\//\/Applications\// ; }
2004-04-20 06:24:55 -05:00
}
else
{
$ packagerootpath = $ installer:: globals:: rootpath ;
}
#############################################
# copying the collectors for each package
#############################################
my $ filesinpackage = installer::converter:: copy_collector ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files1_" . $ packagename . ".log" , $ filesinpackage ) ; }
my $ linksinpackage = installer::converter:: copy_collector ( $ linksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "links1_" . $ packagename . ".log" , $ linksinpackage ) ; }
2007-07-12 05:15:22 -05:00
my $ unixlinksinpackage = installer::converter:: copy_collector ( $ unixlinksinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks1_" . $ packagename . ".log" , $ unixlinksinpackage ) ; }
2004-04-20 06:24:55 -05:00
my $ dirsinpackage = installer::converter:: copy_collector ( $ directoriesforepmarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "dirs1_" . $ packagename . ".log" , $ dirsinpackage ) ; }
###########################################
# setting the root path for the packages
###########################################
installer::scriptitems:: add_rootpath_to_directories ( $ dirsinpackage , $ packagerootpath ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "dirs2_" . $ packagename . ".log" , $ dirsinpackage ) ; }
installer::scriptitems:: add_rootpath_to_files ( $ filesinpackage , $ packagerootpath ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files2_" . $ packagename . ".log" , $ filesinpackage ) ; }
installer::scriptitems:: add_rootpath_to_links ( $ linksinpackage , $ packagerootpath ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "links2_" . $ packagename . ".log" , $ linksinpackage ) ; }
2007-07-12 05:15:22 -05:00
installer::scriptitems:: add_rootpath_to_files ( $ unixlinksinpackage , $ packagerootpath ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks2_" . $ packagename . ".log" , $ unixlinksinpackage ) ; }
2004-04-20 06:24:55 -05:00
#################################
# collecting items for package
#################################
$ filesinpackage = installer::packagelist:: find_files_for_package ( $ filesinpackage , $ onepackage ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files3_" . $ packagename . ".log" , $ filesinpackage ) ; }
2007-07-12 05:15:22 -05:00
$ unixlinksinpackage = installer::packagelist:: find_files_for_package ( $ unixlinksinpackage , $ onepackage ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "unixlinks3_" . $ packagename . ".log" , $ unixlinksinpackage ) ; }
2004-04-20 06:24:55 -05:00
$ linksinpackage = installer::packagelist:: find_links_for_package ( $ linksinpackage , $ filesinpackage ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "links3_" . $ packagename . ".log" , $ linksinpackage ) ; }
2008-03-18 06:57:37 -05:00
$ dirsinpackage = installer::packagelist:: find_dirs_for_package ( $ dirsinpackage , $ onepackage ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "dirs3_" . $ packagename . ".log" , $ dirsinpackage ) ; }
2005-01-31 03:43:53 -06:00
###############################################
# nothing to do, if $filesinpackage is empty
###############################################
if ( ! ( $# { $ filesinpackage } > - 1 ) )
{
push ( @ installer:: globals:: emptypackages , $ packagename ) ;
2005-04-20 05:44:33 -05:00
$ infoline = "\n\nNo file in package: $packagename \-\> Skipping\n\n" ;
2005-01-31 03:43:53 -06:00
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
2005-04-04 04:10:04 -05:00
next ; # next package, end of loop !
2005-01-31 03:43:53 -06:00
}
2005-04-20 05:44:33 -05:00
#################################################################
# nothing to do for Linux patches, if no file has flag PATCH
#################################################################
2008-04-18 03:27:00 -05:00
# Linux Patch: The complete RPM has to be built, if one file in the RPM has the flag PATCH (also for DEBs)
2010-10-13 09:19:49 -05:00
if ( ( $ installer:: globals:: patch ) && ( ( $ installer:: globals:: isrpmbuild ) || ( $ installer:: globals:: isdebbuild ) ) )
2005-04-20 05:44:33 -05:00
{
my $ patchfiles = installer::worker:: collect_all_items_with_special_flag ( $ filesinpackage , "PATCH" ) ;
if ( ! ( $# { $ patchfiles } > - 1 ) )
{
$ infoline = "\n\nLinux Patch: No patch file in package: $packagename \-\> Skipping\n\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
next ;
}
}
2004-04-20 06:24:55 -05:00
###########################################
# Stripping libraries
###########################################
# Building for non Windows platforms in cws requires, that all files are stripped before packaging:
# 1. copy all files that need to be stripped locally
# 2. strip all these files
2005-09-28 07:11:05 -05:00
if ( $ installer:: globals:: strip )
{
installer::strip:: strip_libraries ( $ filesinpackage , $ languagestringref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . $ packagename . "_files.log" , $ filesinpackage ) ; }
}
2004-04-20 06:24:55 -05:00
2005-04-04 04:10:04 -05:00
###############################################################
# Searching for files in $filesinpackage with flag LINUXLINK
###############################################################
2005-08-18 06:46:58 -05:00
if ( ( $ installer:: globals:: islinuxbuild ) && ( ! $ installer:: globals:: simple ) ) # for rpms and debian packages
2005-04-04 04:10:04 -05:00
{
2005-04-20 05:44:33 -05:00
# special handling for all RPMs in $installer::globals::linuxlinkrpms
2005-04-04 04:10:04 -05:00
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: linuxlinkrpms =~ /\b$onepackagename\b/ )
2005-04-04 04:10:04 -05:00
{
2005-04-20 05:44:33 -05:00
my $ run = 0 ;
if ( ( $ installer:: globals:: makelinuxlinkrpm ) && ( ! $ run ) )
2005-04-04 04:10:04 -05:00
{
2005-04-20 05:44:33 -05:00
$ filesinpackage = \ @ installer:: globals:: linuxpatchfiles ;
2005-04-04 04:10:04 -05:00
$ linksinpackage = \ @ installer:: globals:: linuxlinks ;
$ installer:: globals:: makelinuxlinkrpm = 0 ;
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: patch ) { $ installer:: globals:: call_epm = 1 ; } # enabling packing again
$ run = 1 ;
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files3b_" . $ packagename . ".log" , $ filesinpackage ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "links3b_" . $ packagename . ".log" , $ linksinpackage ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "dirs3b_" . $ packagename . ".log" , $ dirsinpackage ) ; }
}
2005-04-20 05:44:33 -05:00
if ( ( ! $ installer:: globals:: makelinuxlinkrpm ) && ( ! $ run ) )
2005-04-04 04:10:04 -05:00
{
2005-04-20 05:44:33 -05:00
$ filesinpackage = installer::worker:: prepare_linuxlinkfiles ( $ filesinpackage ) ;
2006-12-12 09:03:41 -06:00
$ linksinpackage = installer::worker:: prepare_forced_linuxlinkfiles ( $ linksinpackage ) ;
2005-04-04 04:10:04 -05:00
$ installer:: globals:: makelinuxlinkrpm = 1 ;
2006-05-04 03:27:31 -05:00
if ( $ allvariableshashref - > { 'OPENSOURCE' } ) { $ installer:: globals:: add_required_package = $ packagename . "u" ; }
2005-04-20 05:44:33 -05:00
if ( $ installer:: globals:: patch ) { $ installer:: globals:: call_epm = 0 ; } # no packing of core module in patch
$ shellscriptsfilename = "" ; # shell scripts only need to be included into the link rpm
$ run = 1 ;
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files3a_" . $ packagename . ".log" , $ filesinpackage ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "links3a_" . $ packagename . ".log" , $ linksinpackage ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "dirs3a_" . $ packagename . ".log" , $ dirsinpackage ) ; }
}
}
}
2004-12-16 03:43:05 -06:00
###########################################
# Simple installation mechanism
###########################################
2007-10-15 06:37:37 -05:00
if ( $ installer:: globals:: simple ) { installer::worker:: install_simple ( $ onepackagename , $$ languagestringref , $ dirsinpackage , $ filesinpackage , $ linksinpackage , $ unixlinksinpackage ) ; }
2004-12-16 03:43:05 -06:00
2009-02-26 04:06:13 -06:00
###########################################
# Checking epm state
###########################################
if ( ( $ installer:: globals:: call_epm ) && ( ! $ found_epm ) )
{
$ epmexecutable = installer::epmfile:: find_epm_on_system ( $ includepatharrayref ) ;
installer::epmfile:: set_patch_state ( $ epmexecutable ) ; # setting $installer::globals::is_special_epm
$ found_epm = 1 ; # searching only once
}
2004-04-20 06:24:55 -05:00
###########################################
# Creating epm list file
###########################################
2009-02-26 04:06:13 -06:00
if ( ! $ installer:: globals:: simple )
2004-12-16 03:43:05 -06:00
{
# epm list file format:
# type mode owner group destination source options
# Example for a file: f 755 root sys /usr/bin/foo foo
# Example for a directory: d 755 root sys /var/spool/foo -
# Example for a link: l 000 root sys /usr/bin/linkname filename
# The source field specifies the file to link to
2004-04-20 06:24:55 -05:00
2008-10-02 03:34:45 -05:00
my $ epmfilename = "epm_" . $ onepackagename . $ linkaddon . ".lst" ;
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating epm list file $epmfilename ... \n" ) ;
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
my $ completeepmfilename = $ listfiledir . $ installer:: globals:: separator . $ epmfilename ;
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
my @ epmfile = ( ) ;
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
my $ epmheaderref = installer::epmfile:: create_epm_header ( $ allvariableshashref , $ filesinproductlanguageresolvedarrayref , $ languagesarrayref , $ onepackage ) ;
installer::epmfile:: adding_header_to_epm_file ( \ @ epmfile , $ epmheaderref ) ;
2004-04-20 06:24:55 -05:00
2005-04-20 05:44:33 -05:00
if ( ( $ installer:: globals:: patch ) && ( $ installer:: globals:: issolarispkgbuild ) )
2005-04-04 04:10:04 -05:00
{
$ filesinpackage = installer::worker:: analyze_patch_files ( $ filesinpackage ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "files4_" . $ packagename . ".log" , $ filesinpackage ) ; }
if ( ! ( $# { $ filesinpackage } > - 1 ) )
{
push ( @ installer:: globals:: emptypackages , $ packagename ) ;
$ infoline = "\nNo file in package: $packagename \-\> Skipping\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
next ; # next package, end of loop !
}
}
2004-12-16 03:43:05 -06:00
# adding directories, files and links into epm file
2004-04-20 06:24:55 -05:00
2008-03-18 06:57:37 -05:00
installer::epmfile:: put_directories_into_epmfile ( $ dirsinpackage , \ @ epmfile , $ allvariableshashref , $ packagerootpath ) ;
2004-12-16 03:43:05 -06:00
installer::epmfile:: put_files_into_epmfile ( $ filesinpackage , \ @ epmfile ) ;
installer::epmfile:: put_links_into_epmfile ( $ linksinpackage , \ @ epmfile ) ;
2007-07-12 05:15:22 -05:00
installer::epmfile:: put_unixlinks_into_epmfile ( $ unixlinksinpackage , \ @ epmfile ) ;
2004-04-20 06:24:55 -05:00
2006-10-27 06:08:27 -05:00
if ( ( ! ( $ shellscriptsfilename eq "" ) ) && ( ! ( $ installer:: globals:: iswindowsbuild ) ) ) { installer::epmfile:: adding_shellscripts_to_epm_file ( \ @ epmfile , $ shellscriptsfilename , $ packagerootpath , $ allvariableshashref , $ filesinpackage ) ; }
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
installer::files:: save_file ( $ completeepmfilename , \ @ epmfile ) ;
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
# ... splitting the rootpath into a relocatable part and a static part, if possible
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
my $ staticpath = "" ;
my $ relocatablepath = "" ;
2006-12-12 08:49:04 -06:00
# relocatable path can be defined in package list
if ( $ onepackage - > { 'relocatablepath' } ) { $ relocatablepath = $ onepackage - > { 'relocatablepath' } ; }
# setting fix part and variable part of destination path
2008-03-18 06:57:37 -05:00
installer::epmfile:: analyze_rootpath ( $ packagerootpath , \ $ staticpath , \ $ relocatablepath , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
# ... replacing the variable PRODUCTDIRECTORYNAME in the shellscriptfile by $staticpath
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
installer::epmfile:: resolve_path_in_epm_list_before_packaging ( \ @ epmfile , $ completeepmfilename , "PRODUCTDIRECTORYNAME" , $ staticpath ) ;
2008-05-14 06:59:16 -05:00
installer::epmfile:: resolve_path_in_epm_list_before_packaging ( \ @ epmfile , $ completeepmfilename , "SOLSUREPACKAGEPREFIX" , $ allvariableshashref - > { 'SOLSUREPACKAGEPREFIX' } ) ;
installer::epmfile:: resolve_path_in_epm_list_before_packaging ( \ @ epmfile , $ completeepmfilename , "UREPACKAGEPREFIX" , $ allvariableshashref - > { 'UREPACKAGEPREFIX' } ) ;
2004-12-16 03:43:05 -06:00
installer::files:: save_file ( $ completeepmfilename , \ @ epmfile ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
#######################################################
# Now the complete content of the package is known,
# including variables and shell scripts.
# Create the package or using the package pool?
#######################################################
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
my $ use_package_from_pool = 0 ;
if ( $ allvariableshashref - > { 'POOLPRODUCT' } ) { $ use_package_from_pool = installer::packagepool:: package_is_up_to_date ( $ allvariableshashref , $ onepackage , $ packagename , \ @ epmfile , $ filesinpackage , $ installdir , $ installer:: globals:: epmoutpath , $ languagestringref ) ; }
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
if ( $ use_package_from_pool == 3 ) # repeat this package later
{
my $ package_is_creatable = installer::packagepool:: check_package_availability ( $ packagename ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
if ( ( ! $ package_is_creatable ) && ( ! exists ( $ installer:: globals:: poolshiftedpackages { $ packagename } ) ) )
{
splice ( @ { $ packages } , $ k , 1 ) ; # removing package ...
push ( @ { $ packages } , $ onepackage ) ; # ... and adding it to the end
$ installer:: globals:: poolshiftedpackages { $ packagename } = 1 ; # only shifting each package once
$ k - - ; # decreasing the counter
my $ localinfoline = "\nPool: Package \"$packagename\" cannot be created at the moment. Trying again later (2).\n" ;
installer::logger:: print_message ( $ localinfoline ) ;
push ( @ installer:: globals:: logfileinfo , $ localinfoline ) ;
next ; # repeating this iteration with new package
}
}
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
if ( $ use_package_from_pool == 4 ) # There was a problem with pooling. Repeat this package immediately.
2004-12-16 03:43:05 -06:00
{
2009-02-26 04:06:13 -06:00
$ k - - ; # decreasing the counter
my $ localinfoline = "\nPool: Package \"$packagename\" had pooling problems. Repeating packaging immediately (3).\n" ;
installer::logger:: print_message ( $ localinfoline ) ;
push ( @ installer:: globals:: logfileinfo , $ localinfoline ) ;
next ; # repeating this iteration
2004-12-16 03:43:05 -06:00
}
2004-06-11 12:13:58 -05:00
2009-02-26 04:06:13 -06:00
if ( $ use_package_from_pool == 0 )
2004-04-20 06:24:55 -05:00
{
2009-02-26 04:06:13 -06:00
# changing into the "install" directory to create installation sets
$ currentdir = cwd ( ) ; # $currentdir is global in this file
chdir ( $ installdir ) ; # changing into install directory ($installdir is global in this file)
###########################################
# Starting epm
###########################################
# With a patched epm, it is now possible to set the relocatable directory, change
# the directory in which the packages are created, setting "requires" and "provides"
# (Linux) or creating the "depend" file (Solaris) and finally to begin
# the packaging process with standard tooling and standard parameter
# Linux: Adding into the spec file: Prefix: /opt
# Solaris: Adding into the pkginfo file: BASEDIR=/opt
# Attention: Changing of the path can influence the shell scripts
2010-10-13 09:19:49 -05:00
if ( ( $ installer:: globals:: is_special_epm ) && ( ( $ installer:: globals:: isrpmbuild ) || ( $ installer:: globals:: issolarispkgbuild ) ) ) # special handling only for Linux RPMs and Solaris Packages
2004-12-16 03:43:05 -06:00
{
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: call_epm ) # only do something, if epm is really executed
{
# ... now epm can be started, to create the installation sets
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
installer::logger:: print_message ( "... starting patched epm ... \n" ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
installer::epmfile:: call_epm ( $ epmexecutable , $ completeepmfilename , $ packagename , $ includepatharrayref ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
my $ newepmdir = installer::epmfile:: prepare_packages ( $ loggingdir , $ packagename , $ staticpath , $ relocatablepath , $ onepackage , $ allvariableshashref , $ filesinpackage , $ languagestringref ) ; # adding the line for Prefix / Basedir, include rpmdir
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
installer::epmfile:: create_packages_without_epm ( $ newepmdir , $ packagename , $ includepatharrayref , $ allvariableshashref , $ languagestringref ) ; # start to package
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
# finally removing all temporary files
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
installer::epmfile:: remove_temporary_epm_files ( $ newepmdir , $ loggingdir , $ packagename ) ;
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
# Installation:
# Install: pkgadd -a myAdminfile -d ./SUNWso8m34.pkg
# Install: rpm -i --prefix=/opt/special --nodeps so8m35.rpm
2004-06-11 12:13:58 -05:00
2009-02-26 04:06:13 -06:00
installer::epmfile:: create_new_directory_structure ( $ newepmdir ) ;
$ installer:: globals:: postprocess_specialepm = 1 ;
2007-01-25 09:23:08 -06:00
2009-07-07 02:03:34 -05:00
# solaris patch not needed anymore
2009-02-26 04:06:13 -06:00
}
2004-06-11 12:13:58 -05:00
}
2009-02-26 04:06:13 -06:00
else # this is the standard epm (not relocatable) or ( nonlinux and nonsolaris )
2004-12-16 03:43:05 -06:00
{
2009-02-26 04:06:13 -06:00
installer::epmfile:: resolve_path_in_epm_list_before_packaging ( \ @ epmfile , $ completeepmfilename , "\$\$PRODUCTINSTALLLOCATION" , $ relocatablepath ) ;
installer::files:: save_file ( $ completeepmfilename , \ @ epmfile ) ; # Warning for pool, content of epm file is changed.
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: call_epm )
{
# ... now epm can be started, to create the installation sets
2004-06-11 12:13:58 -05:00
2009-02-26 04:06:13 -06:00
installer::logger:: print_message ( "... starting unpatched epm ... \n" ) ;
2004-06-11 12:13:58 -05:00
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: call_epm ) { installer::epmfile:: call_epm ( $ epmexecutable , $ completeepmfilename , $ packagename , $ includepatharrayref ) ; }
2010-10-13 09:19:49 -05:00
if ( ( $ installer:: globals:: isrpmbuild ) || ( $ installer:: globals:: issolarispkgbuild ) || ( $ installer:: globals:: debian ) )
2009-02-26 04:06:13 -06:00
{
$ installer:: globals:: postprocess_standardepm = 1 ;
}
2004-06-11 12:13:58 -05:00
}
}
2004-04-20 06:24:55 -05:00
2009-02-26 04:06:13 -06:00
if ( $ allvariableshashref - > { 'POOLPRODUCT' } ) { installer::packagepool:: put_content_into_pool ( $ packagename , $ installdir , $ installer:: globals:: epmoutpath , $ filesinpackage , \ @ epmfile ) ; }
chdir ( $ currentdir ) ; # changing back into start directory
} # end of "if ( ! $use_package_from_pool )
2004-12-16 03:43:05 -06:00
2009-02-26 04:06:13 -06:00
} # end of "if ( ! $installer::globals::simple )
###########################################
# xpd installation mechanism
###########################################
2007-01-02 08:22:34 -06:00
2009-02-26 04:06:13 -06:00
# Creating the xpd file for the package. This has to happen always, not determined by $use_package_from_pool
2008-01-07 05:31:24 -06:00
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: isxpdplatform )
{
2010-12-13 13:56:37 -06:00
if ( ( ! $ installer:: globals:: languagepack ) && ( ! $ installer:: globals:: helppack ) && ( ! $ installer:: globals:: patch ) )
2007-01-02 08:22:34 -06:00
{
2009-02-26 04:06:13 -06:00
if ( ( $ allvariableshashref - > { 'XPDINSTALLER' } ) && ( $ installer:: globals:: call_epm != 0 ) )
2007-01-02 08:22:34 -06:00
{
2009-02-26 04:06:13 -06:00
installer::xpdinstaller:: create_xpd_file ( $ onepackage , $ packages , $ languagestringref , $ allvariableshashref , $ modulesinproductarrayref , $ installdir , $ installer:: globals:: epmoutpath , $ linkpackage , \ % installer:: globals:: xpdpackageinfo ) ;
$ installer:: globals:: xpd_files_prepared = 1 ;
% installer:: globals:: xpdpackageinfo = ( ) ;
2007-01-02 08:22:34 -06:00
}
}
2009-02-26 04:06:13 -06:00
}
2004-04-20 06:24:55 -05:00
2005-04-04 04:10:04 -05:00
if ( $ installer:: globals:: makelinuxlinkrpm ) { $ k - - ; } # decreasing the counter to create the link rpm!
2007-01-02 08:22:34 -06:00
} # end of "for ( my $k = 0; $k <= $#{$packages}; $k++ )"
2004-06-11 12:13:58 -05:00
2009-02-26 04:06:13 -06:00
installer::packagepool:: log_pool_statistics ( ) ;
2005-04-04 04:10:04 -05:00
##############################################################
# Post epm functionality, after the last package is packed
##############################################################
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: postprocess_specialepm )
2005-04-04 04:10:04 -05:00
{
installer::logger:: include_header_into_logfile ( "Post EPM processes (Patched EPM):" ) ;
chdir ( $ installdir ) ;
# Copying the cde, kde and gnome packages into the installation set
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: addsystemintegration ) { installer::epmfile:: put_systemintegration_into_installset ( $ installer:: globals:: epmoutpath , $ includepatharrayref , $ allvariableshashref , $ modulesinproductarrayref ) ; }
2005-04-04 04:10:04 -05:00
# Adding license and readme into installation set
2005-05-13 01:52:12 -05:00
if ( $ installer:: globals:: addlicensefile ) { installer::worker:: put_scpactions_into_installset ( "." ) ; }
2005-04-04 04:10:04 -05:00
# Adding child projects to installation dynamically
2009-02-26 04:06:13 -06:00
if ( $ installer:: globals:: addchildprojects ) { installer::epmfile:: put_childprojects_into_installset ( $ installer:: globals:: epmoutpath , $ allvariableshashref , $ modulesinproductarrayref , $ includepatharrayref ) ; }
2005-04-04 04:10:04 -05:00
2008-07-25 05:50:36 -05:00
# Adding license file into setup
if ( $ allvariableshashref - > { 'PUT_LICENSE_INTO_SETUP' } ) { installer::worker:: put_license_into_setup ( "." , $ includepatharrayref ) ; }
2005-04-04 04:10:04 -05:00
# Creating installation set for Unix language packs, that are not part of multi lingual installation sets
2009-02-26 04:06:13 -06:00
if ( ( $ installer:: globals:: languagepack ) && ( ! $ installer:: globals:: debian ) && ( ! $ installer:: globals:: makedownload ) ) { installer::languagepack:: build_installer_for_languagepack ( $ installer:: globals:: epmoutpath , $ allvariableshashref , $ includepatharrayref , $ languagesarrayref , $ languagestringref ) ; }
2005-04-04 04:10:04 -05:00
2010-12-17 14:07:53 -06:00
# Creating installation set for Unix help packs, that are not part of multi lingual installation sets
if ( ( $ installer:: globals:: helppack ) && ( ! $ installer:: globals:: debian ) && ( ! $ installer:: globals:: makedownload ) ) { installer::helppack:: build_installer_for_helppack ( $ installer:: globals:: epmoutpath , $ allvariableshashref , $ includepatharrayref , $ languagesarrayref , $ languagestringref ) ; }
2005-04-04 04:10:04 -05:00
# Finalizing patch installation sets
2009-02-26 04:06:13 -06:00
if ( ( $ installer:: globals:: patch ) && ( $ installer:: globals:: issolarispkgbuild ) ) { installer::epmfile:: finalize_patch ( $ installer:: globals:: epmoutpath , $ allvariableshashref ) ; }
2010-10-13 09:19:49 -05:00
if ( ( $ installer:: globals:: patch ) && ( $ installer:: globals:: isrpmbuild ) ) { installer::epmfile:: finalize_linux_patch ( $ installer:: globals:: epmoutpath , $ allvariableshashref , $ includepatharrayref ) ; }
2005-04-04 04:10:04 -05:00
2007-01-02 08:22:34 -06:00
# Copying the xpd installer into the installation set
2007-07-03 05:45:11 -05:00
if ( ( $ allvariableshashref - > { 'XPDINSTALLER' } ) && ( $ installer:: globals:: isxpdplatform ) && ( $ installer:: globals:: xpd_files_prepared ) )
2007-01-02 08:22:34 -06:00
{
2008-03-18 06:57:37 -05:00
installer::xpdinstaller:: create_xpd_installer ( $ installdir , $ allvariableshashref , $ languagestringref ) ;
2007-01-02 08:22:34 -06:00
}
2005-04-04 04:10:04 -05:00
chdir ( $ currentdir ) ; # changing back into start directory
}
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: postprocess_standardepm )
2005-04-04 04:10:04 -05:00
{
installer::logger:: include_header_into_logfile ( "Post EPM processes (Standard EPM):" ) ;
chdir ( $ installdir ) ;
# determine the destination directory
my $ newepmdir = installer::epmfile:: determine_installdir_ooo ( ) ;
# Copying the cde, kde and gnome packages into the installation set
2007-01-02 08:22:34 -06:00
if ( $ installer:: globals:: addsystemintegration ) { installer::epmfile:: put_systemintegration_into_installset ( $ newepmdir , $ includepatharrayref , $ allvariableshashref , $ modulesinproductarrayref ) ; }
2005-04-04 04:10:04 -05:00
# Adding license and readme into installation set
2005-05-13 01:52:12 -05:00
if ( $ installer:: globals:: addlicensefile ) { installer::worker:: put_scpactions_into_installset ( "." ) ; }
2005-04-04 04:10:04 -05:00
2008-07-25 05:50:36 -05:00
# Adding license file into setup
if ( $ allvariableshashref - > { 'PUT_LICENSE_INTO_SETUP' } ) { installer::worker:: put_license_into_setup ( "." , $ includepatharrayref ) ; }
2005-04-04 04:10:04 -05:00
# Creating installation set for Unix language packs, that are not part of multi lingual installation sets
2008-03-18 06:57:37 -05:00
if ( ( $ installer:: globals:: languagepack ) && ( ! $ installer:: globals:: debian ) && ( ! $ installer:: globals:: makedownload ) ) { installer::languagepack:: build_installer_for_languagepack ( $ newepmdir , $ allvariableshashref , $ includepatharrayref , $ languagesarrayref , $ languagestringref ) ; }
2005-04-04 04:10:04 -05:00
2010-12-17 14:07:53 -06:00
# Creating installation set for Unix help packs, that are not part of multi lingual installation sets
if ( ( $ installer:: globals:: helppack ) && ( ! $ installer:: globals:: debian ) && ( ! $ installer:: globals:: makedownload ) ) { installer::helppack:: build_installer_for_helpepack ( $ newepmdir , $ allvariableshashref , $ includepatharrayref , $ languagesarrayref , $ languagestringref ) ; }
2005-04-04 04:10:04 -05:00
chdir ( $ currentdir ) ; # changing back into start directory
}
2009-04-22 07:11:50 -05:00
if ( ( $ installer:: globals:: issolarispkgbuild ) && ( $ allvariableshashref - > { 'COLLECT_PKGMAP' } ) ) { installer::worker:: collectpackagemaps ( $ installdir , $ languagestringref , $ allvariableshashref ) ; }
2004-06-11 12:13:58 -05:00
#######################################################
# Analyzing the log file
#######################################################
2004-12-16 03:43:05 -06:00
my $ is_success = 0 ;
my $ finalinstalldir = "" ;
2008-01-04 09:55:25 -06:00
installer::worker:: clean_output_tree ( ) ; # removing directories created in the output tree
( $ is_success , $ finalinstalldir ) = installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ installdir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
2009-02-26 03:17:08 -06:00
my $ downloadname = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "downloadname" ) ;
if ( $ is_success ) { installer::followme:: save_followme_info ( $ finalinstalldir , $ includepatharrayref , $ allvariableshashref , $$ downloadname , $ languagestringref , $ languagesarrayref , $ current_install_number , $ loggingdir , $ installlogdir ) ; }
2004-12-16 03:43:05 -06:00
#######################################################
# Creating download installation set
#######################################################
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: makedownload )
2004-12-16 03:43:05 -06:00
{
2005-04-04 04:10:04 -05:00
my $ create_download = 0 ;
if ( $$ downloadname ne "" ) { $ create_download = 1 ; }
2006-07-19 03:52:50 -05:00
if ( ( $ is_success ) && ( $ create_download ) && ( $ ENV { 'ENABLE_DOWNLOADSETS' } ) )
2005-04-04 04:10:04 -05:00
{
2006-03-06 02:28:21 -06:00
my $ downloaddir = installer::download:: create_download_sets ( $ finalinstalldir , $ includepatharrayref , $ allvariableshashref , $$ downloadname , $ languagestringref , $ languagesarrayref ) ;
2005-04-04 04:10:04 -05:00
installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ downloaddir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
}
2004-10-18 07:51:13 -05:00
}
2004-06-11 12:13:58 -05:00
2005-05-13 03:40:50 -05:00
#######################################################
# Creating jds installation set
#######################################################
2008-01-04 09:55:25 -06:00
if ( $ installer:: globals:: makejds )
2005-05-13 03:40:50 -05:00
{
my $ create_jds = 0 ;
if ( $ allvariableshashref - > { 'JDSBUILD' } ) { $ create_jds = 1 ; }
2008-04-21 05:54:52 -05:00
if ( ! $ installer:: globals:: issolarispkgbuild ) { $ create_jds = 0 ; }
2005-05-13 03:40:50 -05:00
if ( ( $ is_success ) && ( $ create_jds ) )
{
2007-01-25 08:22:58 -06:00
if ( ! $ installer:: globals:: jds_language_controlled )
{
my $ correct_language = installer::worker:: check_jds_language ( $ allvariableshashref , $ languagestringref ) ;
$ installer:: globals:: correct_jds_language = $ correct_language ;
$ installer:: globals:: jds_language_controlled = 1 ;
}
2005-05-13 03:40:50 -05:00
2007-01-25 08:22:58 -06:00
if ( $ installer:: globals:: correct_jds_language )
2005-05-13 03:40:50 -05:00
{
my $ jdsdir = installer::worker:: create_jds_sets ( $ finalinstalldir , $ allvariableshashref , $ languagestringref , $ languagesarrayref , $ includepatharrayref ) ;
2007-01-25 08:22:58 -06:00
installer::worker:: clean_jds_temp_dirs ( ) ;
2005-05-13 03:40:50 -05:00
installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ jdsdir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
}
}
}
2004-06-11 12:13:58 -05:00
} # end of "if (!( $installer::globals::iswindowsbuild ))"
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nEnd of part 2a: All non-Windows platforms\n" ) ; }
#################################################
# Part 2b: The Windows platform
#################################################
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nPart 2b: The Windows platform\n" ) ; }
#####################################################################
# ... creating idt files ...
# Only for Windows builds ($installer::globals::compiler is wntmsci)
#####################################################################
if ( $ installer:: globals:: iswindowsbuild )
{
2007-03-26 08:14:54 -05:00
###########################################
# Stripping libraries
###########################################
# Building for gcc build in cws requires, that all files are stripped before packaging:
# 1. copy all files that need to be stripped locally
# 2. strip all these files
if ( $ installer:: globals:: compiler =~ /wntgcci/ )
{
installer::windows::strip:: strip_binaries ( $ filesinproductlanguageresolvedarrayref , $ languagestringref ) ;
2007-05-10 04:58:06 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles16e.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2007-03-26 08:14:54 -05:00
}
2004-10-18 07:51:13 -05:00
$ installdir = installer::worker:: create_installation_directory ( $ shipinstalldir , $ languagestringref , \ $ current_install_number ) ;
2004-06-11 12:13:58 -05:00
2004-07-06 08:55:15 -05:00
my $ idtdirbase = installer::systemactions:: create_directories ( "idt_files" , $ languagestringref ) ;
2005-04-04 04:10:04 -05:00
$ installer:: globals:: infodirectory = installer::systemactions:: create_directories ( "info_files" , $ languagestringref ) ;
2004-06-11 12:13:58 -05:00
my $ installlogdir = installer::systemactions:: create_directory_next_to_directory ( $ installdir , "log" ) ;
2007-09-06 03:50:44 -05:00
#################################################################################
# Preparing cabinet files from package definitions
#################################################################################
installer::packagelist:: prepare_cabinet_files ( $ packages , $ allvariableshashref ) ;
# printing packages content:
installer::packagelist:: log_cabinet_assignments ( ) ;
2005-11-09 02:08:51 -06:00
#################################################################################
# Begin of functions that are used for the creation of idt files (Windows only)
#################################################################################
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating idt files ...\n" ) ;
2004-04-20 06:24:55 -05:00
installer::logger:: include_header_into_logfile ( "Creating idt files:" ) ;
my $ newidtdir = $ idtdirbase . $ installer:: globals:: separator . "00" ; # new files into language independent directory "00"
installer::systemactions:: create_directory ( $ newidtdir ) ;
my @ allfilecomponents = ( ) ;
my @ allregistrycomponents = ( ) ;
2004-12-16 03:43:05 -06:00
# Collecting all files with flag "BINARYTABLE"
my $ binarytablefiles = installer::worker:: collect_all_items_with_special_flag ( $ filesinproductlanguageresolvedarrayref , "BINARYTABLE" ) ;
2005-02-24 09:19:10 -06:00
# Removing all files with flag "BINARYTABLE_ONLY"
2005-04-20 05:44:33 -05:00
@ installer:: globals:: binarytableonlyfiles = ( ) ;
2005-02-24 09:19:10 -06:00
$ filesinproductlanguageresolvedarrayref = installer::worker:: remove_all_items_with_special_flag ( $ filesinproductlanguageresolvedarrayref , "BINARYTABLE_ONLY" ) ;
2006-01-24 08:47:10 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles17.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2005-02-24 09:19:10 -06:00
2005-04-29 02:47:37 -05:00
# Collecting all profileitems with flag "INIFILETABLE" for table "IniFile"
my $ inifiletableentries = installer::worker:: collect_all_items_with_special_flag ( $ profileitemsinproductlanguageresolvedarrayref , "INIFILETABLE" ) ;
2004-04-20 06:24:55 -05:00
# Creating the important dynamic idt files
2005-04-04 04:10:04 -05:00
installer::windows::msiglobal:: set_msiproductversion ( $ allvariableshashref ) ;
2005-07-01 06:10:36 -05:00
installer::windows::msiglobal:: put_msiproductversion_into_bootstrapfile ( $ filesinproductlanguageresolvedarrayref ) ;
2005-04-04 04:10:04 -05:00
2007-09-06 03:50:44 -05:00
# Add cabinet assignments to files
installer::windows::file:: assign_cab_to_files ( $ filesinproductlanguageresolvedarrayref ) ;
2006-01-24 08:47:10 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles17a.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2007-09-06 03:50:44 -05:00
installer::windows::file:: assign_sequencenumbers_to_files ( $ filesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles17b.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2008-03-18 06:57:37 -05:00
# Collection all available directory trees
installer::windows::directory:: collectdirectorytrees ( $ directoriesforepmarrayref ) ;
2008-10-02 03:34:45 -05:00
$ filesinproductlanguageresolvedarrayref = installer::windows::file:: create_files_table ( $ filesinproductlanguageresolvedarrayref , \ @ allfilecomponents , $ newidtdir , $ allvariableshashref , $ uniquefilename , $ allupdatesequences , $ allupdatecomponents , $ allupdatefileorder ) ;
2007-09-06 03:50:44 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles17c.log" , $ filesinproductlanguageresolvedarrayref ) ; }
2008-10-02 03:34:45 -05:00
if ( $ installer:: globals:: updatedatabase ) { installer::windows::file:: check_file_sequences ( $ allupdatefileorder , $ allupdatecomponentorder ) ; }
2004-04-20 06:24:55 -05:00
2011-01-12 08:22:21 -06:00
# Attention: The table "Director.idt" contains language specific strings -> parameter: $languagesarrayref !
installer::windows::directory:: create_directory_table ( $ directoriesforepmarrayref , $ languagesarrayref , $ newidtdir , $ allvariableshashref , $ shortdirname , $ loggingdir ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles18.log" , $ filesinproductlanguageresolvedarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "directoriesforidt1.log" , $ directoriesforepmarrayref ) ; }
# Attention: The table "Registry.idt" contains language specific strings -> parameter: $languagesarrayref !
2005-04-20 05:44:33 -05:00
installer::windows::registry:: create_registry_table ( $ registryitemsinproductlanguageresolvedarrayref , \ @ allregistrycomponents , $ newidtdir , $ languagesarrayref , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems4.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
2008-08-18 04:47:11 -05:00
installer::windows::component:: create_component_table ( $ filesinproductlanguageresolvedarrayref , $ registryitemsinproductlanguageresolvedarrayref , $ directoriesforepmarrayref , \ @ allfilecomponents , \ @ allregistrycomponents , $ newidtdir , $ componentid , $ componentidkeypath ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles19.log" , $ filesinproductlanguageresolvedarrayref ) ; }
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "registryitems5.log" , $ registryitemsinproductlanguageresolvedarrayref ) ; }
# Attention: The table "Feature.idt" contains language specific strings -> parameter: $languagesarrayref !
2007-09-06 03:50:44 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules4.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
installer::windows::feature:: add_uniquekey ( $ modulesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules4a.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
$ modulesinproductlanguageresolvedarrayref = installer::windows::feature:: sort_feature ( $ modulesinproductlanguageresolvedarrayref ) ;
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "modules4b.log" , $ modulesinproductlanguageresolvedarrayref ) ; }
2004-11-18 02:10:54 -06:00
installer::windows::feature:: create_feature_table ( $ modulesinproductlanguageresolvedarrayref , $ newidtdir , $ languagesarrayref , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
installer::windows::featurecomponent:: create_featurecomponent_table ( $ filesinproductlanguageresolvedarrayref , $ registryitemsinproductlanguageresolvedarrayref , $ newidtdir ) ;
2008-08-18 04:47:11 -05:00
installer::windows::media:: create_media_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir , $ allvariableshashref , $ allupdatelastsequences , $ allupdatediskids ) ;
2004-04-20 06:24:55 -05:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles20.log" , $ filesinproductlanguageresolvedarrayref ) ; }
installer::windows::font:: create_font_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
# Attention: The table "Shortcut.idt" contains language specific strings -> parameter: $languagesarrayref !
# Attention: Shortcuts (Folderitems) have icon files, that have to be copied into the Icon directory (last parameter)
my @ iconfilecollector = ( ) ;
2005-04-04 04:10:04 -05:00
installer::windows::shortcut:: create_shortcut_table ( $ filesinproductlanguageresolvedarrayref , $ linksinproductlanguageresolvedarrayref , $ folderinproductlanguageresolvedarrayref , $ folderitemsinproductlanguageresolvedarrayref , $ directoriesforepmarrayref , $ newidtdir , $ languagesarrayref , $ includepatharrayref , \ @ iconfilecollector ) ;
2004-11-18 02:10:54 -06:00
if ( $ installer:: globals:: globallogging ) { installer::files:: save_array_of_hashes ( $ loggingdir . "folderitems4.log" , $ folderitemsinproductlanguageresolvedarrayref ) ; }
2004-06-11 12:13:58 -05:00
2005-04-29 02:47:37 -05:00
installer::windows::inifile:: create_inifile_table ( $ inifiletableentries , $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
2004-11-18 02:10:54 -06:00
installer::windows::icon:: create_icon_table ( \ @ iconfilecollector , $ newidtdir ) ; # creating the icon table with all iconfiles used as shortcuts (FolderItems)
2004-04-20 06:24:55 -05:00
2005-06-17 08:06:21 -05:00
installer::windows::createfolder:: create_createfolder_table ( $ directoriesforepmarrayref , $ filesinproductlanguageresolvedarrayref , $ newidtdir , $ allvariableshashref ) ;
2008-10-29 08:27:59 -05:00
installer::windows::upgrade:: create_upgrade_table ( $ newidtdir , $ allvariableshashref ) ;
2010-12-17 14:07:53 -06:00
if ( ( ! $ installer:: globals:: languagepack ) && ( ! $ installer:: globals:: helppack ) ) # the following tables not for language packs or help packs
2004-11-18 02:10:54 -06:00
{
2007-02-19 06:48:07 -06:00
installer::windows::removefile:: create_removefile_table ( $ folderitemsinproductlanguageresolvedarrayref , $ newidtdir ) ;
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
installer::windows::selfreg:: create_selfreg_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
2004-04-20 06:24:55 -05:00
2004-07-12 07:09:08 -05:00
# Adding Assemblies into the tables MsiAssembly and MsiAssemblyName dynamically
2004-10-18 07:51:13 -05:00
installer::windows::assembly:: create_msiassembly_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
installer::windows::assembly:: create_msiassemblyname_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
installer::windows::assembly:: add_assembly_condition_into_component_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir ) ;
2004-06-11 12:13:58 -05:00
}
2004-04-20 06:24:55 -05:00
$ infoline = "\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
# Localizing the language dependent idt files
# For every language there will be a localized msi database
# For multilingual installation sets, the differences of this
# databases have to be stored in transforms.
for ( my $ m = 0 ; $ m <= $# { $ languagesarrayref } ; $ m + + )
{
my $ onelanguage = $ { $ languagesarrayref } [ $ m ] ;
2009-02-19 08:20:37 -06:00
my $ is_bidi = 0 ;
if ( installer::existence:: exists_in_array ( $ onelanguage , \ @ installer:: globals:: bidilanguages ) ) { $ is_bidi = 1 ; }
2004-04-20 06:24:55 -05:00
my $ languageidtdir = $ idtdirbase . $ installer:: globals:: separator . $ onelanguage ;
2005-06-17 08:06:21 -05:00
if ( - d $ languageidtdir ) { installer::systemactions:: remove_complete_directory ( $ languageidtdir , 1 ) ; }
2004-04-20 06:24:55 -05:00
installer::systemactions:: create_directory ( $ languageidtdir ) ;
# Copy the template idt files and the new created idt files into this language directory
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... copying idt files ...\n" ) ;
2004-04-20 06:24:55 -05:00
installer::logger:: include_header_into_logfile ( "Copying idt files to $languageidtdir:" ) ;
2006-10-05 03:18:23 -05:00
installer::windows::idtglobal:: prepare_language_idt_directory ( $ languageidtdir , $ newidtdir , $ onelanguage , $ filesinproductlanguageresolvedarrayref , \ @ iconfilecollector , $ binarytablefiles , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
2010-12-13 13:56:37 -06:00
if ( ! $ installer:: globals:: languagepack && ! $ installer:: globals:: helppack )
2008-09-04 01:14:36 -05:00
{
# For multilingual installation sets, the dialog for the language selection can now be prepared, with
# a checkbox for each available language. This has to happen before the following translation.
# The new controls have to be added into the Control.idt
my $ controlidttablename = $ languageidtdir . $ installer:: globals:: separator . "Control.idt" ;
my $ controlidttable = installer::files:: read_file ( $ controlidttablename ) ;
installer::windows::idtglobal:: add_language_checkboxes_to_database ( $ controlidttable , $ languagesarrayref ) ;
installer::files:: save_file ( $ controlidttablename , $ controlidttable ) ;
$ infoline = "Added checkboxes for language selection dialog into table $controlidttablename\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
}
2008-03-18 06:57:37 -05:00
2004-04-20 06:24:55 -05:00
# Now all files are copied into a language specific directory
# The template idt files can be translated
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... localizing idt files (language: $onelanguage) ...\n" ) ;
2004-04-20 06:24:55 -05:00
installer::logger:: include_header_into_logfile ( "Localizing idt files (Language: $onelanguage):" ) ;
my @ translationfiles = ( ) ; # all idt files, that need a translation
push ( @ translationfiles , "ActionTe.idt" ) ;
push ( @ translationfiles , "Control.idt" ) ;
2005-07-01 06:10:36 -05:00
push ( @ translationfiles , "CustomAc.idt" ) ;
2004-04-20 06:24:55 -05:00
push ( @ translationfiles , "Error.idt" ) ;
2004-11-18 02:10:54 -06:00
push ( @ translationfiles , "LaunchCo.idt" ) ;
2004-04-20 06:24:55 -05:00
push ( @ translationfiles , "RadioBut.idt" ) ;
push ( @ translationfiles , "Property.idt" ) ;
push ( @ translationfiles , "UIText.idt" ) ;
my $ oneidtfilename ;
my $ oneidtfile ;
foreach $ oneidtfilename ( @ translationfiles )
{
my $ languagefilename = installer::windows::idtglobal:: get_languagefilename ( $ oneidtfilename , $ installer:: globals:: idtlanguagepath ) ;
my $ languagefile = installer::files:: read_file ( $ languagefilename ) ;
$ oneidtfilename = $ languageidtdir . $ installer:: globals:: separator . $ oneidtfilename ;
$ oneidtfile = installer::files:: read_file ( $ oneidtfilename ) ;
# Now the substitution can start
installer::windows::idtglobal:: translate_idtfile ( $ oneidtfile , $ languagefile , $ onelanguage ) ;
installer::files:: save_file ( $ oneidtfilename , $ oneidtfile ) ;
$ infoline = "Translated idt file: $oneidtfilename into language $onelanguage\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
2004-10-18 07:51:13 -05:00
$ infoline = "Used languagefile: $languagefilename\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
2004-04-20 06:24:55 -05:00
}
2004-10-18 07:51:13 -05:00
# setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE)
installer::windows::idtglobal:: setencoding ( $ languageidtdir , $ onelanguage ) ;
2009-02-19 08:20:37 -06:00
# setting bidi attributes, if required
if ( $ is_bidi ) { installer::windows::idtglobal:: setbidiattributes ( $ languageidtdir , $ onelanguage ) ; }
2008-02-05 06:35:00 -06:00
# setting the encoding in every table (replacing WINDOWSENCODINGTEMPLATE)
installer::windows::idtglobal:: set_multilanguageonly_condition ( $ languageidtdir ) ;
2004-04-20 06:24:55 -05:00
# include the license text into the table Control.idt
2010-05-05 09:28:18 -05:00
if ( ! $ allvariableshashref - > { 'HIDELICENSEDIALOG' } )
{
my $ licensefilesource = installer::windows::idtglobal:: get_rtflicensefilesource ( $ onelanguage , $ includepatharrayref_lang ) ;
my $ licensefile = installer::files:: read_file ( $ licensefilesource ) ;
installer::scpzipfiles:: replace_all_ziplistvariables_in_rtffile ( $ licensefile , $ allvariablesarrayref , $ onelanguage , $ loggingdir ) ;
my $ controltablename = $ languageidtdir . $ installer:: globals:: separator . "Control.idt" ;
my $ controltable = installer::files:: read_file ( $ controltablename ) ;
installer::windows::idtglobal:: add_licensefile_to_database ( $ licensefile , $ controltable ) ;
installer::files:: save_file ( $ controltablename , $ controltable ) ;
$ infoline = "Added licensefile $licensefilesource into database $controltablename\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
}
2004-04-20 06:24:55 -05:00
2006-09-15 08:35:41 -05:00
# include a component into environment table if required
installer::windows::component:: set_component_in_environment_table ( $ languageidtdir , $ filesinproductlanguageresolvedarrayref ) ;
2004-04-20 06:24:55 -05:00
# include the ProductCode and the UpgradeCode from codes-file into the Property.idt
installer::windows::property:: set_codes_in_property_table ( $ languageidtdir ) ;
# the language specific properties can now be set in the Property.idt
2004-12-16 03:43:05 -06:00
installer::windows::property:: update_property_table ( $ languageidtdir , $ onelanguage , $ allvariableshashref , $ languagestringref ) ;
2004-04-20 06:24:55 -05:00
2008-08-27 05:45:45 -05:00
# replacing variables in RegLocat.idt
installer::windows::msiglobal:: update_reglocat_table ( $ languageidtdir , $ allvariableshashref ) ;
2009-02-19 08:20:37 -06:00
# replacing variables in RemoveRe.idt (RemoveRegistry.idt)
installer::windows::msiglobal:: update_removere_table ( $ languageidtdir ) ;
2004-04-20 06:24:55 -05:00
# adding language specific properties for multilingual installation sets
installer::windows::property:: set_languages_in_property_table ( $ languageidtdir , $ languagesarrayref ) ;
2008-04-18 03:27:00 -05:00
# adding settings into CheckBox.idt
installer::windows::property:: update_checkbox_table ( $ languageidtdir , $ allvariableshashref ) ;
2004-06-11 12:13:58 -05:00
# adding the files from the binary directory into the binary table
2004-12-16 03:43:05 -06:00
installer::windows::binary:: update_binary_table ( $ languageidtdir , $ filesinproductlanguageresolvedarrayref , $ binarytablefiles ) ;
2004-06-11 12:13:58 -05:00
2005-06-17 08:06:21 -05:00
# setting patch codes to detect installed products
2010-12-13 13:56:37 -06:00
if ( ( $ installer:: globals:: patch ) || ( $ installer:: globals:: languagepack ) || ( $ installer:: globals:: helppack ) || ( $ allvariableshashref - > { 'PDFCONVERTER' } ) ) { installer::windows::patch:: update_patch_tables ( $ languageidtdir , $ allvariableshashref ) ; }
2005-06-17 08:06:21 -05:00
2005-12-21 06:02:45 -06:00
# Adding Windows Installer CustomActions
2005-07-01 06:10:36 -05:00
2005-12-21 06:02:45 -06:00
installer::windows::idtglobal:: addcustomactions ( $ languageidtdir , $ windowscustomactionsarrayref , $ filesinproductlanguageresolvedarrayref ) ;
2004-06-11 12:13:58 -05:00
2005-11-09 02:08:51 -06:00
# Adding child projects if specified
2004-06-11 12:13:58 -05:00
if ( $ installer:: globals:: addchildprojects )
{
2005-11-09 02:08:51 -06:00
# Adding child projects to installation dynamically (also in feature table)
installer::windows::idtglobal:: add_childprojects ( $ languageidtdir , $ filesinproductlanguageresolvedarrayref , $ allvariableshashref ) ;
# setting Java variables for Java products
if ( $ allvariableshashref - > { 'JAVAPRODUCT' } ) { installer::windows::java:: update_java_tables ( $ languageidtdir , $ allvariableshashref ) ; }
2004-06-11 12:13:58 -05:00
}
2004-04-20 06:24:55 -05:00
# Then the language specific msi database can be created
if ( $ installer:: globals:: iswin ) # only possible on a Windows platform
{
my $ msidatabasename = installer::windows::msiglobal:: get_msidatabasename ( $ allvariableshashref , $ onelanguage ) ;
my $ msifilename = $ languageidtdir . $ installer:: globals:: separator . $ msidatabasename ;
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating msi database (language $onelanguage) ... \n" ) ;
2004-04-20 06:24:55 -05:00
2008-03-18 06:57:37 -05:00
installer::windows::msiglobal:: set_uuid_into_component_table ( $ languageidtdir , $ allvariableshashref ) ; # setting new GUID for the components using the tool uuidgen.exe
2004-04-20 06:24:55 -05:00
installer::windows::msiglobal:: create_msi_database ( $ languageidtdir , $ msifilename ) ;
# validating the database # ToDo
2004-10-18 07:51:13 -05:00
my $ languagefile = installer::files:: read_file ( $ installer:: globals:: idtlanguagepath . $ installer:: globals:: separator . "SIS.mlf" ) ;
2004-04-20 06:24:55 -05:00
2005-02-24 09:19:10 -06:00
installer::windows::msiglobal:: write_summary_into_msi_database ( $ msifilename , $ onelanguage , $ languagefile , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
2007-11-23 06:33:45 -06:00
# if there are Merge Modules, they have to be integrated now
2008-08-18 04:47:11 -05:00
$ filesinproductlanguageresolvedarrayref = installer::windows::mergemodule:: merge_mergemodules_into_msi_database ( $ mergemodulesarrayref , $ filesinproductlanguageresolvedarrayref , $ msifilename , $ languagestringref , $ onelanguage , $ languagefile , $ allvariableshashref , $ includepatharrayref , $ allupdatesequences , $ allupdatelastsequences , $ allupdatediskids ) ;
if ( ( $ installer:: globals:: globallogging ) && ( $ installer:: globals:: globalloggingform21 ) ) { installer::files:: save_array_of_hashes ( $ loggingdir . "productfiles21_" . $ onelanguage . ".log" , $ filesinproductlanguageresolvedarrayref ) ; }
$ installer:: globals:: globalloggingform21 = 0 ;
if ( $ installer:: globals:: use_packages_for_cabs ) { installer::windows::media:: create_media_table ( $ filesinproductlanguageresolvedarrayref , $ newidtdir , $ allvariableshashref , $ allupdatelastsequences , $ allupdatediskids ) ; }
2007-11-23 06:33:45 -06:00
2004-04-20 06:24:55 -05:00
# copy msi database into installation directory
my $ msidestfilename = $ installdir . $ installer:: globals:: separator . $ msidatabasename ;
installer::systemactions:: copy_one_file ( $ msifilename , $ msidestfilename ) ;
}
}
# Creating transforms, if the installation set has more than one language
# renaming the msi database and generating the setup.ini file
my $ defaultlanguage = installer::languages:: get_default_language ( $ languagesarrayref ) ;
if ( $ installer:: globals:: iswin ) # only possible on a Windows platform
{
if ( $# { $ languagesarrayref } > 0 )
{
installer::windows::msiglobal:: create_transforms ( $ languagesarrayref , $ defaultlanguage , $ installdir , $ allvariableshashref ) ;
}
installer::windows::msiglobal:: rename_msi_database_in_installset ( $ defaultlanguage , $ installdir , $ allvariableshashref ) ;
2007-11-26 09:17:46 -06:00
if ( $ allvariableshashref - > { 'ADDLANGUAGEINDATABASENAME' } ) { installer::windows::msiglobal:: add_language_to_msi_database ( $ defaultlanguage , $ installdir , $ allvariableshashref ) ; }
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... generating setup.ini ...\n" ) ;
2004-04-20 06:24:55 -05:00
2007-11-26 09:17:46 -06:00
if ( ! $ allvariableshashref - > { 'NOLOADERREQUIRED' } ) { installer::windows::msiglobal:: create_setup_ini ( $ languagesarrayref , $ defaultlanguage , $ installdir , $ allvariableshashref ) ; }
2004-04-20 06:24:55 -05:00
}
# Analyzing the ScpActions and copying the files into the installation set
2009-05-15 09:12:42 -05:00
# At least the loader.exe
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... copying files into installation set ...\n" ) ;
2004-04-20 06:24:55 -05:00
2005-05-13 01:52:12 -05:00
installer::worker:: put_scpactions_into_installset ( $ installdir ) ;
2004-04-20 06:24:55 -05:00
2009-05-15 09:12:42 -05:00
# ... copying the setup.exe
2004-04-20 06:24:55 -05:00
2007-11-26 09:17:46 -06:00
installer::windows::msiglobal:: copy_windows_installer_files_into_installset ( $ installdir , $ includepatharrayref , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
2007-11-23 06:33:45 -06:00
# ... copying MergeModules into installation set
2008-08-18 04:47:11 -05:00
if ( ! $ installer:: globals:: fix_number_of_cab_files ) { installer::windows::msiglobal:: copy_merge_modules_into_installset ( $ installdir ) ; }
2007-11-23 06:33:45 -06:00
2004-06-11 12:13:58 -05:00
# ... copying the child projects
if ( $ installer:: globals:: addchildprojects )
{
2005-03-15 05:58:41 -06:00
installer::windows::msiglobal:: copy_child_projects_into_installset ( $ installdir , $ allvariableshashref ) ;
2004-06-11 12:13:58 -05:00
}
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating ddf files ...\n" ) ;
2004-04-20 06:24:55 -05:00
# Creating all needed ddf files and generating a list
# for the package process containing all system calls
my $ ddfdir = installer::systemactions:: create_directories ( "ddf" , $ languagestringref ) ;
2006-03-06 07:00:43 -06:00
$ installer:: globals:: packjobref = installer::windows::msiglobal:: generate_cab_file_list ( $ filesinproductlanguageresolvedarrayref , $ installdir , $ ddfdir , $ allvariableshashref ) ;
2004-04-20 06:24:55 -05:00
2005-04-04 04:10:04 -05:00
# Update and patch reasons the pack order needs to be saved
2007-09-06 03:50:44 -05:00
installer::windows::msiglobal:: save_packorder ( ) ;
2005-04-04 04:10:04 -05:00
2004-04-20 06:24:55 -05:00
$ infoline = "\n" ;
push ( @ installer:: globals:: logfileinfo , $ infoline ) ;
2004-06-11 12:13:58 -05:00
####################################
# Writing log file
# before cab files are packed
####################################
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... creating log file $installer::globals::logfilename \n" ) ;
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
installer::files:: save_file ( $ loggingdir . $ installer:: globals:: logfilename , \ @ installer:: globals:: logfileinfo ) ;
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
#######################################################
# Finally really create the installation packages,
# Only for Windows and only on a windows platform.
#######################################################
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
if ( $ installer:: globals:: iswin ) # only possible on a Windows platform
{
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "... packaging installation set ... \n" ) ;
2006-03-06 07:00:43 -06:00
installer::windows::msiglobal:: execute_packaging ( $ installer:: globals:: packjobref , $ loggingdir , $ allvariableshashref ) ;
2005-02-24 09:19:10 -06:00
if ( $ installer:: globals:: include_cab_in_msi ) { installer::windows::msiglobal:: include_cabs_into_msi ( $ installdir ) ; }
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
####################################
# Writing log file
# after cab files are packed
####################################
2004-04-20 06:24:55 -05:00
2005-04-11 03:01:12 -05:00
installer::logger:: print_message ( "\n... creating log file $installer::globals::logfilename \n" ) ;
2004-06-11 12:13:58 -05:00
installer::files:: save_file ( $ loggingdir . $ installer:: globals:: logfilename , \ @ installer:: globals:: logfileinfo ) ;
}
2004-04-20 06:24:55 -05:00
2004-06-11 12:13:58 -05:00
#######################################################
# Analyzing the log file
#######################################################
2004-04-20 06:24:55 -05:00
2004-12-16 03:43:05 -06:00
my $ is_success = 0 ;
my $ finalinstalldir = "" ;
2004-07-06 08:55:15 -05:00
installer::worker:: clean_output_tree ( ) ; # removing directories created in the output tree
2004-12-16 03:43:05 -06:00
( $ is_success , $ finalinstalldir ) = installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ installdir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
2004-06-11 12:13:58 -05:00
2008-10-16 08:30:38 -05:00
#######################################################
# Creating Windows msp patches
#######################################################
2009-05-18 10:53:14 -05:00
if ( ( $ is_success ) && ( $ installer:: globals:: updatedatabase ) && ( $ allvariableshashref - > { 'CREATE_MSP_INSTALLSET' } ) )
2008-10-16 08:30:38 -05:00
{
# Required:
# Temp path for administrative installations: $installer::globals::temppath
# Path of new installation set: $finalinstalldir
# Path of old installation set: $installer::globals::updatedatabasepath
2009-07-16 09:59:24 -05:00
my $ mspdir = installer::windows::msp:: create_msp_patch ( $ finalinstalldir , $ includepatharrayref , $ allvariableshashref , $ languagestringref , $ languagesarrayref , $ filesinproductlanguageresolvedarrayref ) ;
2008-10-16 08:30:38 -05:00
( $ is_success , $ finalinstalldir ) = installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ mspdir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
installer::worker:: clean_output_tree ( ) ; # removing directories created in the output tree
}
2004-12-16 03:43:05 -06:00
#######################################################
# Creating download installation set
#######################################################
my $ create_download = 0 ;
my $ downloadname = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "downloadname" ) ;
2005-06-17 08:06:21 -05:00
if ( $ installer:: globals:: languagepack ) { $ downloadname = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "langpackdownloadname" ) ; }
2010-12-13 13:56:37 -06:00
if ( $ installer:: globals:: helppack ) { $ downloadname = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "helppackdownloadname" ) ; }
2005-07-01 06:10:36 -05:00
if ( $ installer:: globals:: patch ) { $ downloadname = installer::ziplist:: getinfofromziplist ( $ allsettingsarrayref , "patchdownloadname" ) ; }
2005-01-31 03:43:53 -06:00
2009-02-26 03:17:08 -06:00
if ( $ is_success ) { installer::followme:: save_followme_info ( $ finalinstalldir , $ includepatharrayref , $ allvariableshashref , $$ downloadname , $ languagestringref , $ languagesarrayref , $ current_install_number , $ loggingdir , $ installlogdir ) ; }
2004-12-16 03:43:05 -06:00
if ( $$ downloadname ne "" ) { $ create_download = 1 ; }
2006-07-19 03:52:50 -05:00
if ( ( $ is_success ) && ( $ create_download ) && ( $ ENV { 'ENABLE_DOWNLOADSETS' } ) )
2004-12-16 03:43:05 -06:00
{
2006-03-06 02:28:21 -06:00
my $ downloaddir = installer::download:: create_download_sets ( $ finalinstalldir , $ includepatharrayref , $ allvariableshashref , $$ downloadname , $ languagestringref , $ languagesarrayref ) ;
2004-12-16 03:43:05 -06:00
installer::worker:: analyze_and_save_logfile ( $ loggingdir , $ downloaddir , $ installlogdir , $ allsettingsarrayref , $ languagestringref , $ current_install_number ) ;
}
2004-06-11 12:13:58 -05:00
} # end of "if ( $installer::globals::iswindowsbuild )"
if ( $ installer:: globals:: debug ) { installer::logger:: debuginfo ( "\nEnd of part 2b: The Windows platform\n" ) ; }
2004-04-20 06:24:55 -05:00
2007-12-05 10:35:47 -06:00
# saving file_info file for later analysis
my $ speciallogfilename = "fileinfo_" . $ installer:: globals:: product . "\.log" ;
installer::files:: save_array_of_hashes ( $ loggingdir . $ speciallogfilename , $ filesinproductlanguageresolvedarrayref ) ;
2004-12-16 03:43:05 -06:00
2004-04-20 06:24:55 -05:00
} # end of iteration for one language group
# saving debug info at end
if ( $ installer:: globals:: debug ) { installer::logger:: savedebug ( $ installer:: globals:: exitlog ) ; }
2004-12-16 03:43:05 -06:00
#######################################################
# Stopping time
#######################################################
2004-09-08 09:05:37 -05:00
installer::logger:: stoptime ( ) ;
2004-04-20 06:24:55 -05:00
####################################
# Main program end
####################################