1*7e90fac2SAndrew Rist#************************************************************** 2*7e90fac2SAndrew Rist# 3*7e90fac2SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*7e90fac2SAndrew Rist# or more contributor license agreements. See the NOTICE file 5*7e90fac2SAndrew Rist# distributed with this work for additional information 6*7e90fac2SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*7e90fac2SAndrew Rist# to you under the Apache License, Version 2.0 (the 8*7e90fac2SAndrew Rist# "License"); you may not use this file except in compliance 9*7e90fac2SAndrew Rist# with the License. You may obtain a copy of the License at 10*7e90fac2SAndrew Rist# 11*7e90fac2SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*7e90fac2SAndrew Rist# 13*7e90fac2SAndrew Rist# Unless required by applicable law or agreed to in writing, 14*7e90fac2SAndrew Rist# software distributed under the License is distributed on an 15*7e90fac2SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*7e90fac2SAndrew Rist# KIND, either express or implied. See the License for the 17*7e90fac2SAndrew Rist# specific language governing permissions and limitations 18*7e90fac2SAndrew Rist# under the License. 19*7e90fac2SAndrew Rist# 20*7e90fac2SAndrew Rist#************************************************************** 21*7e90fac2SAndrew Rist 22*7e90fac2SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir################# 25cdf0e10cSrcweir# use 26cdf0e10cSrcweir################# 27cdf0e10cSrcweir 28cdf0e10cSrcweiruse lib ("$ENV{SOLARENV}/bin/modules"); 29cdf0e10cSrcweir 30cdf0e10cSrcweiruse Cwd; 31cdf0e10cSrcweiruse File::Copy; 32cdf0e10cSrcweiruse installer::download; 33cdf0e10cSrcweiruse installer::downloadsigner; 34cdf0e10cSrcweiruse installer::exiter; 35cdf0e10cSrcweiruse installer::followme; 36cdf0e10cSrcweiruse installer::globals; 37cdf0e10cSrcweiruse installer::logger; 38cdf0e10cSrcweiruse installer::windows::sign; 39cdf0e10cSrcweir 40cdf0e10cSrcweir################################################# 41cdf0e10cSrcweir# Main program 42cdf0e10cSrcweir################################################# 43cdf0e10cSrcweir 44cdf0e10cSrcweirinstaller::downloadsigner::getparameter(); 45cdf0e10cSrcweirinstaller::downloadsigner::checkparameter(); 46cdf0e10cSrcweir 47cdf0e10cSrcweirmy $temppath = installer::downloadsigner::set_temp_path(); 48cdf0e10cSrcweirmy $infofilelist = installer::downloadsigner::createproductlist(); 49cdf0e10cSrcweirinstaller::downloadsigner::publishproductlist($infofilelist); 50cdf0e10cSrcweir 51cdf0e10cSrcweirforeach my $infofilename ( @{$infofilelist} ) 52cdf0e10cSrcweir{ 53cdf0e10cSrcweir installer::logger::starttime(); 54cdf0e10cSrcweir 55cdf0e10cSrcweir my $success = 1; 56cdf0e10cSrcweir my $do_copy = 1; 57cdf0e10cSrcweir my $followmeinfohash = installer::followme::read_followme_info($infofilename); 58cdf0e10cSrcweir installer::downloadsigner::setlogfilename(); # Successful after reading followme file, resetting log file 59cdf0e10cSrcweir if ( $installer::globals::writetotemp ) { installer::downloadsigner::set_output_pathes_to_temp($followmeinfohash, $temppath); } 60cdf0e10cSrcweir if ( $installer::globals::useminor ) { installer::downloadsigner::set_minor_into_pathes($followmeinfohash, $temppath); } 61cdf0e10cSrcweir 62cdf0e10cSrcweir if (( ! $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign )) 63cdf0e10cSrcweir { 64cdf0e10cSrcweir installer::logger::print_message( "... WARNING: Signing only for Windows platforms active ...\n" ); 65cdf0e10cSrcweir } 66cdf0e10cSrcweir 67cdf0e10cSrcweir # installer::logger::include_header_into_logfile("Reading include pathes"); 68cdf0e10cSrcweir # installer::worker::collect_all_files_from_includepathes($followmeinfohash->{'includepatharray'}); 69cdf0e10cSrcweir 70cdf0e10cSrcweir if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign )) 71cdf0e10cSrcweir { 72cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'} = installer::windows::sign::sign_install_set($followmeinfohash, $do_copy, $temppath); 73cdf0e10cSrcweir 74cdf0e10cSrcweir ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'}, 75cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'}, 76cdf0e10cSrcweir $followmeinfohash->{'installlogdir'}, 77cdf0e10cSrcweir "", 78cdf0e10cSrcweir \$followmeinfohash->{'languagestring'}, 79cdf0e10cSrcweir $followmeinfohash->{'currentinstallnumber'}); 80cdf0e10cSrcweir 81cdf0e10cSrcweir if ( ! $success ) { installer::exiter::exit_program("ERROR: Signing installation set failed: $followmeinfohash->{'finalinstalldir'}", "Main"); } 82cdf0e10cSrcweir } 83cdf0e10cSrcweir 84cdf0e10cSrcweir if ( ! $installer::globals::nodownload ) 85cdf0e10cSrcweir { 86cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'} = installer::download::create_download_sets($followmeinfohash->{'finalinstalldir'}, 87cdf0e10cSrcweir $followmeinfohash->{'includepatharray'}, 88cdf0e10cSrcweir $followmeinfohash->{'allvariableshash'}, 89cdf0e10cSrcweir $followmeinfohash->{'downloadname'}, 90cdf0e10cSrcweir \$followmeinfohash->{'languagestring'}, 91cdf0e10cSrcweir $followmeinfohash->{'languagesarray'}); 92cdf0e10cSrcweir 93cdf0e10cSrcweir ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'}, 94cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'}, 95cdf0e10cSrcweir $followmeinfohash->{'installlogdir'}, 96cdf0e10cSrcweir "", 97cdf0e10cSrcweir \$followmeinfohash->{'languagestring'}, 98cdf0e10cSrcweir $followmeinfohash->{'currentinstallnumber'}); 99cdf0e10cSrcweir 100cdf0e10cSrcweir if (( $success ) && ( $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign )) 101cdf0e10cSrcweir { 102cdf0e10cSrcweir $do_copy = 0; 103cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'} = installer::windows::sign::sign_install_set($followmeinfohash, $do_copy, $temppath); 104cdf0e10cSrcweir 105cdf0e10cSrcweir ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'}, 106cdf0e10cSrcweir $followmeinfohash->{'finalinstalldir'}, 107cdf0e10cSrcweir $followmeinfohash->{'installlogdir'}, 108cdf0e10cSrcweir "", 109cdf0e10cSrcweir \$followmeinfohash->{'languagestring'}, 110cdf0e10cSrcweir $followmeinfohash->{'currentinstallnumber'}); 111cdf0e10cSrcweir } 112cdf0e10cSrcweir } 113cdf0e10cSrcweir 114cdf0e10cSrcweir if ( $success ) 115cdf0e10cSrcweir { 116cdf0e10cSrcweir installer::worker::clean_output_tree(); 117cdf0e10cSrcweir if ( $installer::globals::followme_from_directory ) { installer::downloadsigner::rename_followme_infofile($infofilename); } 118cdf0e10cSrcweir } 119cdf0e10cSrcweir 120cdf0e10cSrcweir installer::logger::stoptime(); 121cdf0e10cSrcweir} 122cdf0e10cSrcweir 123cdf0e10cSrcweir#################################### 124cdf0e10cSrcweir# Main program end 125cdf0e10cSrcweir#################################### 126