Update ooo320-m1
[ooovba.git] / solenv / bin / make_download.pl
blob96a152a83c1e6862bfe8ee0b8507ae7591a97d13
1 #*************************************************************************
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
5 # Copyright 2008 by Sun Microsystems, Inc.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # $RCSfile: make_installer.pl,v $
11 # $Revision: 1.121 $
13 # This file is part of OpenOffice.org.
15 # OpenOffice.org is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU Lesser General Public License version 3
17 # only, as published by the Free Software Foundation.
19 # OpenOffice.org is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU Lesser General Public License version 3 for more details
23 # (a copy is included in the LICENSE file that accompanied this code).
25 # You should have received a copy of the GNU Lesser General Public License
26 # version 3 along with OpenOffice.org. If not, see
27 # <http://www.openoffice.org/license.html>
28 # for a copy of the LGPLv3 License.
30 #*************************************************************************
32 #################
33 # use
34 #################
36 use lib ("$ENV{SOLARENV}/bin/modules");
38 use Cwd;
39 use File::Copy;
40 use installer::download;
41 use installer::downloadsigner;
42 use installer::exiter;
43 use installer::followme;
44 use installer::globals;
45 use installer::logger;
46 use installer::windows::sign;
48 #################################################
49 # Main program
50 #################################################
52 installer::downloadsigner::getparameter();
53 installer::downloadsigner::checkparameter();
55 my $temppath = installer::downloadsigner::set_temp_path();
56 my $infofilelist = installer::downloadsigner::createproductlist();
57 installer::downloadsigner::publishproductlist($infofilelist);
59 foreach my $infofilename ( @{$infofilelist} )
61 installer::logger::starttime();
63 my $success = 1;
64 my $do_copy = 1;
65 my $followmeinfohash = installer::followme::read_followme_info($infofilename);
66 installer::downloadsigner::setlogfilename(); # Successful after reading followme file, resetting log file
67 if ( $installer::globals::writetotemp ) { installer::downloadsigner::set_output_pathes_to_temp($followmeinfohash, $temppath); }
68 if ( $installer::globals::useminor ) { installer::downloadsigner::set_minor_into_pathes($followmeinfohash, $temppath); }
70 if (( ! $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign ))
72 installer::logger::print_message( "... WARNING: Signing only for Windows platforms active ...\n" );
75 # installer::logger::include_header_into_logfile("Reading include pathes");
76 # installer::worker::collect_all_files_from_includepathes($followmeinfohash->{'includepatharray'});
78 if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign ))
80 $followmeinfohash->{'finalinstalldir'} = installer::windows::sign::sign_install_set($followmeinfohash, $do_copy, $temppath);
82 ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'},
83 $followmeinfohash->{'finalinstalldir'},
84 $followmeinfohash->{'installlogdir'},
85 "",
86 \$followmeinfohash->{'languagestring'},
87 $followmeinfohash->{'currentinstallnumber'});
89 if ( ! $success ) { installer::exiter::exit_program("ERROR: Signing installation set failed: $followmeinfohash->{'finalinstalldir'}", "Main"); }
92 if ( ! $installer::globals::nodownload )
94 $followmeinfohash->{'finalinstalldir'} = installer::download::create_download_sets($followmeinfohash->{'finalinstalldir'},
95 $followmeinfohash->{'includepatharray'},
96 $followmeinfohash->{'allvariableshash'},
97 $followmeinfohash->{'downloadname'},
98 \$followmeinfohash->{'languagestring'},
99 $followmeinfohash->{'languagesarray'});
101 ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'},
102 $followmeinfohash->{'finalinstalldir'},
103 $followmeinfohash->{'installlogdir'},
105 \$followmeinfohash->{'languagestring'},
106 $followmeinfohash->{'currentinstallnumber'});
108 if (( $success ) && ( $installer::globals::iswindowsbuild ) && ( $installer::globals::dosign ))
110 $do_copy = 0;
111 $followmeinfohash->{'finalinstalldir'} = installer::windows::sign::sign_install_set($followmeinfohash, $do_copy, $temppath);
113 ($success, $followmeinfohash->{'finalinstalldir'}) = installer::worker::analyze_and_save_logfile($followmeinfohash->{'loggingdir'},
114 $followmeinfohash->{'finalinstalldir'},
115 $followmeinfohash->{'installlogdir'},
117 \$followmeinfohash->{'languagestring'},
118 $followmeinfohash->{'currentinstallnumber'});
122 if ( $success )
124 installer::worker::clean_output_tree();
125 if ( $installer::globals::followme_from_directory ) { installer::downloadsigner::rename_followme_infofile($infofilename); }
128 installer::logger::stoptime();
131 ####################################
132 # Main program end
133 ####################################