xref: /trunk/main/solenv/bin/modules/installer/parameter.pm (revision 91144cd0085a7583d2099b982122deb2184ab956)
1#**************************************************************
2#
3#  Licensed to the Apache Software Foundation (ASF) under one
4#  or more contributor license agreements.  See the NOTICE file
5#  distributed with this work for additional information
6#  regarding copyright ownership.  The ASF licenses this file
7#  to you under the Apache License, Version 2.0 (the
8#  "License"); you may not use this file except in compliance
9#  with the License.  You may obtain a copy of the License at
10#
11#    http://www.apache.org/licenses/LICENSE-2.0
12#
13#  Unless required by applicable law or agreed to in writing,
14#  software distributed under the License is distributed on an
15#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16#  KIND, either express or implied.  See the License for the
17#  specific language governing permissions and limitations
18#  under the License.
19#
20#**************************************************************
21
22package installer::parameter;
23
24use Cwd;
25use installer::exiter;
26use installer::files;
27use installer::globals;
28use installer::logger;
29use installer::remover;
30use installer::systemactions;
31use strict;
32
33############################################
34# Parameter Operations
35############################################
36
37sub usage
38{
39    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::usage"); }
40
41    print <<Ende;
42--------------------------------------------------------------------------------
43$installer::globals::prog
44The following parameter are needed:
45-f: Path to the product list (required)
46-s: Path to the setup script (optional, if defined in product list)
47-i: Install path of the product (/opt/openofficeorg20) (optional)
48-p: Product from product list to be created (required)
49-l: Language of the product (comma and hash) (optional, defined in productlist)
50-b: Build, e.g. srx645 (optional)
51-m: Minor, e.g. m10 (optional)
52-simple: Path to do a simple install to
53-c: Compiler, e.g. wntmsci8, unxlngi5, unxsols4, ... (optional)
54-u: Path, in which zipfiles are unpacked (optional)
55-msitemplate: Source of the msi file templates (Windows compiler only)
56-msilanguage: Source of the msi file templates (Windows compiler only)
57-javalanguage: Source of the Java language files (opt., non-Windows only)
58-buildid: Current BuildID (optional)
59-pro: Product version
60-format: Package format
61-debian: Create Debian packages for Linux
62-dontunzip: do not unzip all files with flag ARCHIVE
63-dontcallepm : do not call epm to create install sets (opt., non-Windows only)
64-ispatchedepm : Usage of a patched (non-standard) epm (opt., non-Windows only)
65-copyproject : is set for projects that are only used for copying (optional)
66-languagepack : do create a languagepack, no product pack (optional)
67-patch : do create a patch (optional)
68-patchinc: Source for the patch include files (Solaris only)
69-dontstrip: No file stripping (Unix only)
70-log : Logging all available information (optional)
71-debug : Collecting debug information
72
73Examples for Windows:
74
75perl make_epmlist.pl -f zip.lst -p OfficeFAT -l en-US
76                     -u /export/unpack -buildid 8712
77                     -msitemplate /export/msi_files
78                     -msilanguage /export/msi_languages
79
80Examples for Non-Windows:
81
82perl make_epmlist.pl -f zip.lst -p OfficeFAT -l en-US -format rpm
83                     -u /export/unpack -buildid 8712 -ispatchedepm
84--------------------------------------------------------------------------------
85Ende
86    exit(-1);
87}
88
89#########################################
90# Writing all parameter into logfile
91#########################################
92
93sub saveparameter
94{
95    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::saveparameter"); }
96
97    $installer::logger::Global->printf("Command line arguments:\n");
98
99    my $index = 0;
100    foreach my $argument (@ARGV)
101    {
102        $installer::logger::Global->printf("    %2d: %s\n", $index++, $argument);
103    }
104
105    # also saving global settings:
106    $installer::logger::Global->printf("Separator: %s\n", $installer::globals::separator);
107}
108
109#####################################
110# Reading parameter
111#####################################
112
113sub getparameter
114{
115    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::getparameter"); }
116
117    while ( $#ARGV >= 0 )
118    {
119        my $param = shift(@ARGV);
120
121        if ($param eq "-f") { $installer::globals::ziplistname = shift(@ARGV); }
122        elsif ($param eq "-s") { $installer::globals::setupscriptname = shift(@ARGV); }
123        elsif ($param eq "-p") { $installer::globals::product = shift(@ARGV); }
124        elsif ($param eq "-l") { $installer::globals::languagelist = shift(@ARGV); }
125        elsif ($param eq "-b") { $installer::globals::build = shift(@ARGV); }
126        elsif ($param eq "-m") { $installer::globals::minor = shift(@ARGV); }
127        elsif ($param eq "-dontunzip") { $installer::globals::dounzip = 0; }
128        elsif ($param eq "-c") { $installer::globals::compiler = shift(@ARGV); }
129        elsif ($param eq "-pro") { $installer::globals::pro = 1; }
130        elsif ($param eq "-format") { $installer::globals::packageformat = shift(@ARGV); }
131        elsif ($param eq "-log") { $installer::globals::globallogging = 1; }
132        elsif ($param eq "-quiet") { $installer::globals::quiet = 1; }
133        elsif ($param eq "-verbose") { $installer::globals::quiet = 0; }
134        elsif ($param eq "-debug") { $installer::globals::debug = 1; }
135        elsif ($param eq "-tab") { $installer::globals::tab = 1; }
136        elsif ($param eq "-u") { $installer::globals::unpackpath = shift(@ARGV); }
137        elsif ($param eq "-i") { $installer::globals::rootpath = shift(@ARGV); }
138        elsif ($param eq "-dontcallepm") { $installer::globals::call_epm = 0; }
139        elsif ($param eq "-msitemplate") { $installer::globals::idttemplatepath = shift(@ARGV); }
140        elsif ($param eq "-msilanguage") { $installer::globals::idtlanguagepath = shift(@ARGV); }
141        elsif ($param eq "-patchinc") { $installer::globals::patchincludepath = shift(@ARGV); }
142        elsif ($param eq "-javalanguage") { $installer::globals::javalanguagepath = shift(@ARGV); }
143        elsif ($param eq "-buildid") { $installer::globals::buildid = shift(@ARGV); }
144        elsif ($param eq "-copyproject") { $installer::globals::is_copy_only_project = 1; }
145        elsif ($param eq "-languagepack") { $installer::globals::languagepack = 1; }
146        elsif ($param eq "-patch") { $installer::globals::patch = 1; }
147        elsif ($param eq "-debian") { $installer::globals::debian = 1; }
148        elsif ($param eq "-dontstrip") { $installer::globals::strip = 0; }
149        elsif ($param eq "-destdir")    # new parameter for simple installer
150        {
151            $installer::globals::rootpath ne "" && die "must set destdir before -i or -simple";
152            $installer::globals::destdir = shift @ARGV;
153        }
154        elsif ($param eq "-simple")     # new parameter for simple installer
155        {
156            $installer::globals::simple = 1;
157            $installer::globals::call_epm = 0;
158            $installer::globals::makedownload = 0;
159            $installer::globals::makejds = 0;
160            $installer::globals::strip = 0;
161            my $path = shift(@ARGV);
162            $path =~ s/^\Q$installer::globals::destdir\E//;
163            $installer::globals::rootpath = $path;
164        }
165        elsif ($param eq "-release")
166        {
167            $installer::globals::is_release = 1;
168        }
169        else
170        {
171            installer::logger::print_error( "unknown parameter: $param" );
172            usage();
173            exit(-1);
174        }
175    }
176
177    # Usage of simple installer (not for Windows):
178    # $PERL -w $SOLARENV/bin/make_installer.pl \
179    # -f openoffice.lst -l en-US -p OpenOffice \
180    # -buildid $BUILD -rpm \
181    # -destdir /tmp/nurk -simple $INSTALL_PATH
182}
183
184############################################
185# Controlling the fundamental parameter
186# (required for every process)
187############################################
188
189sub control_fundamental_parameter
190{
191    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::control_fundamental_parameter"); }
192
193    if ($installer::globals::product eq "")
194    {
195        installer::logger::print_error( "Product name not set!" );
196        usage();
197        exit(-1);
198    }
199}
200
201##########################################################
202# The path parameters can be relative or absolute.
203# This function creates absolute paths.
204##########################################################
205
206sub make_path_absolute
207{
208    my ($pathref) = @_;
209
210    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::make_path_absolute : $$pathref"); }
211
212    if ( $installer::globals::isunix )
213    {
214        if (!($$pathref =~ /^\s*\//))   # this is a relative unix path
215        {
216            $$pathref = cwd() . $installer::globals::separator . $$pathref;
217        }
218    }
219
220    if ( $installer::globals::iswin || $installer::globals::isos2 )
221    {
222        if ( $^O =~ /cygwin/i )
223        {
224            if ( $$pathref !~ /^\s*\// && $$pathref !~ /^\s*\w\:/ ) # not an absolute POSIX or DOS path
225            {
226                $$pathref = cwd() . $installer::globals::separator . $$pathref;
227            }
228            my $p = $$pathref;
229            chomp( $p );
230            my $q = '';
231            # Avoid the $(LANG) problem.
232            if ($p =~ /(\A.*)(\$\(.*\Z)/) {
233                $p = $1;
234                $q = $2;
235            }
236            $p =~ s/\\/\\\\/g;
237            chomp( $p = qx{cygpath -w "$p"} );
238            $$pathref = $p.$q;
239            # Use Windows paths, but with '/'s.
240            $$pathref =~ s/\\/\//g;
241        }
242        else
243        {
244            if (!($$pathref =~ /^\s*\w\:/)) # this is a relative Windows path (no dos drive)
245            {
246                $$pathref = cwd() . $installer::globals::separator . $$pathref;
247                if ( $installer::globals::isos2 )
248                {
249                    $$pathref =~ s/\\/\//g;
250                }
251                else
252                {
253                    $$pathref =~ s/\//\\/g;
254                }
255
256            }
257        }
258    }
259    $$pathref =~ s/[\/\\]\s*$//;    # removing ending slashes
260}
261
262##################################################
263# Setting some global parameters
264# This has to be expanded with further platforms
265##################################################
266
267sub setglobalvariables
268{
269    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::setglobalvariables"); }
270
271    # Setting the installertype directory corresponding to the environment variable PKGFORMAT
272    # The global variable $installer::globals::packageformat can only contain one package format.
273    # If PKGFORMAT contains more than one format (for example "rpm deb") this is split in the
274    # makefile calling the perl program.
275    $installer::globals::installertypedir = $installer::globals::packageformat;
276
277    if ( $installer::globals::compiler =~ /wnt(msc|gcc)[ix]/ )
278    {
279        $installer::globals::iswindowsbuild = 1;
280    }
281
282    # ... and which of the two Windows architectures.  The letter after the compiler
283    # name is the discriminator that $ENV{OUTPATH} already carries: wntmsci14 is 32 bit,
284    # wntmscx14 is 64 bit.  download.pm's get_download_architecture() keys off the same
285    # thing.
286    if ( $installer::globals::compiler =~ /wnt(msc|gcc)x/ )
287    {
288        $installer::globals::iswin64build = 1;
289    }
290
291    if ( $installer::globals::compiler =~ /unxso[lg][siux]/ )
292    {
293        $installer::globals::issolarisbuild = 1;
294        if ( $installer::globals::packageformat eq "pkg" )
295        {
296            $installer::globals::issolarispkgbuild = 1;
297            $installer::globals::epmoutpath = "packages";
298            $installer::globals::isxpdplatform = 1;
299        }
300    }
301
302    if( $installer::globals::compiler =~ /unxmac/ )
303    {
304        $installer::globals::ismacbuild = 1;
305
306        if ( $installer::globals::packageformat eq "dmg" )
307        {
308            $installer::globals::ismacdmgbuild = 1;
309        }
310    }
311
312    if ( $installer::globals::compiler =~ /unxfbsd/ )
313    {
314        $installer::globals::isfreebsdbuild = 1;
315
316        if ( $installer::globals::packageformat eq "bsd" )
317        {
318            $installer::globals::epmoutpath = "freebsd";
319            $installer::globals::isfreebsdpkgbuild = 1;
320        }
321    }
322
323    if ( $installer::globals::compiler =~ /unxso[lg]s/ ) { $installer::globals::issolarissparcbuild = 1; }
324
325    if ( $installer::globals::compiler =~ /unxso[lg]i/ ) { $installer::globals::issolarisx86build = 1; }
326
327    if ($ENV{OS} eq 'LINUX')
328    {
329        $installer::globals::islinuxbuild = 1;
330        if ( $installer::globals::packageformat eq "rpm" )
331        {
332            $installer::globals::islinuxrpmbuild = 1;
333            $installer::globals::isxpdplatform = 1;
334            $installer::globals::epmoutpath = "RPMS";
335            if ( $installer::globals::compiler =~ /unxlngi/ )
336            {
337                $installer::globals::islinuxintelrpmbuild = 1;
338            }
339            if ( $installer::globals::compiler =~ /unxlngppc/ )
340            {
341                $installer::globals::islinuxppcrpmbuild = 1;
342            }
343            if ( $installer::globals::compiler =~ /unxlngx/ )
344            {
345                $installer::globals::islinuxx86_64rpmbuild = 1;
346            }
347
348            if ( $installer::globals::rpm eq "" ) { installer::exiter::exit_program("ERROR: Environment variable \"\$RPM\" has to be defined!", "setglobalvariables"); }
349        }
350
351        # Creating Debian packages ?
352        if (( $installer::globals::packageformat eq "deb" ) || ( $installer::globals::debian ))
353        {
354            $installer::globals::debian = 1;
355            $installer::globals::packageformat = "deb";
356            my $message = "Creating Debian packages";
357            $installer::logger::Info->print($message);
358            $installer::logger::Global->print($message);
359            $installer::globals::islinuxrpmbuild = 0;
360            $installer::globals::islinuxdebbuild = 1;
361            $installer::globals::epmoutpath = "DEBS";
362            if ( $installer::globals::compiler =~ /unxlngi/ )
363            {
364                $installer::globals::islinuxinteldebbuild = 1;
365            }
366            if ( $installer::globals::compiler =~ /unxlngppc/ )
367            {
368                $installer::globals::islinuxppcdebbuild = 1;
369            }
370            if ( $installer::globals::compiler =~ /unxlngx/ )
371            {
372                $installer::globals::islinuxx86_64debbuild = 1;
373            }
374        }
375    }
376
377    # Defaulting to native package format for epm
378
379    if ( ! $installer::globals::packageformat ) { $installer::globals::packageformat = "native"; }
380
381    # extension, if $installer::globals::pro is set
382    if ($installer::globals::pro) { $installer::globals::productextension = ".pro"; }
383
384    # no languages defined as parameter
385    if ($installer::globals::languagelist eq "") { $installer::globals::languages_defined_in_productlist = 1; }
386
387    # setting and creating the unpackpath
388
389    if ($installer::globals::unpackpath eq "")  # unpackpath not set
390    {
391        $installer::globals::unpackpath = cwd();
392        if ( $installer::globals::iswin ) { $installer::globals::unpackpath =~ s/\//\\/g; }
393        if ( $installer::globals::isos2 ) { $installer::globals::unpackpath =~ s/\\/\//g; }
394    }
395
396    if ( $installer::globals::localunpackdir ne "" ) { $installer::globals::unpackpath = $installer::globals::localunpackdir; }
397
398    if (!($installer::globals::unpackpath eq ""))
399    {
400        make_path_absolute(\$installer::globals::unpackpath);
401    }
402
403    $installer::globals::unpackpath =~ s/\Q$installer::globals::separator\E\s*$//;
404
405    if (! -d $installer::globals::unpackpath )  # create unpackpath
406    {
407        installer::systemactions::create_directory($installer::globals::unpackpath);
408    }
409
410    # setting jds exclude file list
411
412    if ( $installer::globals::islinuxrpmbuild )
413    {
414        $installer::globals::jdsexcludefilename = "jds_excludefiles_linux.txt";
415    }
416    if ( $installer::globals::issolarissparcbuild )
417    {
418        $installer::globals::jdsexcludefilename = "jds_excludefiles_solaris_sparc.txt";
419    }
420    if ( $installer::globals::issolarisx86build )
421    {
422        $installer::globals::jdsexcludefilename = "jds_excludefiles_solaris_intel.txt";
423    }
424
425    # setting and creating the temppath
426
427    if (( $ENV{'TMP'} ) || ( $ENV{'TEMP'} ) || ( $ENV{'TMPDIR'} ))
428    {
429        if ( $ENV{'TMP'} ) { $installer::globals::temppath = $ENV{'TMP'}; }
430        elsif ( $ENV{'TEMP'} )  { $installer::globals::temppath = $ENV{'TEMP'}; }
431        elsif ( $ENV{'TMPDIR'} )  { $installer::globals::temppath = $ENV{'TMPDIR'}; }
432        # On macOS, $TMPDIR (like /tmp) lives under /var, which is itself a
433        # symlink to /private/var. Archive::Zip's extraction safety check
434        # refuses to extract through a symlinked path component, so resolve
435        # it here rather than let that fail deep inside packaging.
436        if ( -e $installer::globals::temppath )
437        {
438            my $resolved = Cwd::realpath($installer::globals::temppath);
439            $installer::globals::temppath = $resolved if ( $resolved );
440        }
441        $installer::globals::temppath =~ s/\Q$installer::globals::separator\E\s*$//;    # removing ending slashes and backslashes
442        $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::globaltempdirname;
443        installer::systemactions::create_directory_with_privileges($installer::globals::temppath, "777");
444        my $dirsave = $installer::globals::temppath;
445
446        if ( $installer::globals::compiler =~ /^unxmac/ )
447        {
448            my $localcall = "chmod 777 $installer::globals::temppath \>\/dev\/null 2\>\&1";
449            system($localcall);
450        }
451
452        $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . "i";
453        $installer::globals::temppath = installer::systemactions::create_pid_directory($installer::globals::temppath);
454        push(@installer::globals::removedirs, $installer::globals::temppath);
455
456        if ( ! -d $installer::globals::temppath ) { installer::exiter::exit_program("ERROR: Failed to create directory $installer::globals::temppath ! Possible reason: Wrong privileges in directory $dirsave .", "setglobalvariables"); }
457
458        $installer::globals::jdstemppath = $installer::globals::temppath;
459        $installer::globals::jdstemppath =~ s/i_/j_/;
460        push(@installer::globals::jdsremovedirs, $installer::globals::jdstemppath);
461        $installer::globals::temppath = $installer::globals::temppath . $installer::globals::separator . $installer::globals::compiler . $installer::globals::productextension;
462        installer::systemactions::create_directory($installer::globals::temppath);
463        if ( $^O =~ /cygwin/i )
464        {
465            $installer::globals::cyg_temppath = $installer::globals::temppath;
466            $installer::globals::cyg_temppath =~ s/\\/\\\\/g;
467            chomp( $installer::globals::cyg_temppath = qx{cygpath -w "$installer::globals::cyg_temppath"} );
468        }
469        $installer::globals::temppathdefined = 1;
470        $installer::globals::jdstemppathdefined = 1;
471    }
472    else
473    {
474        $installer::globals::temppathdefined = 0;
475        $installer::globals::jdstemppathdefined = 0;
476    }
477
478    # only one cab file, if Windows msp patches shall be prepared
479    if ( $installer::globals::prepare_winpatch ) { $installer::globals::number_of_cabfiles = 1; }
480
481}
482
483############################################
484# Controlling the parameters that are
485# required for special processes
486############################################
487
488sub control_required_parameter
489{
490    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::control_required_parameter"); }
491
492    if (!($installer::globals::is_copy_only_project))
493    {
494        ##############################################################################################
495        # idt template path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
496        # for the creation of the msi database.
497        ##############################################################################################
498
499        if (($installer::globals::idttemplatepath eq "") && ($installer::globals::iswindowsbuild))
500        {
501            installer::logger::print_error( "idt template path not set (-msitemplate)!" );
502            usage();
503            exit(-1);
504        }
505
506        ##############################################################################################
507        # idt language path. Only required for Windows build ($installer::globals::compiler =~ /wntmsci/)
508        # for the creation of the msi database.
509        ##############################################################################################
510
511        if (($installer::globals::idtlanguagepath eq "") && ($installer::globals::iswindowsbuild))
512        {
513            installer::logger::print_error( "idt language path not set (-msilanguage)!" );
514            usage();
515            exit(-1);
516        }
517
518        # Analyzing the idt template path
519
520        if (!($installer::globals::idttemplatepath eq ""))  # idttemplatepath set, relative or absolute?
521        {
522            make_path_absolute(\$installer::globals::idttemplatepath);
523        }
524
525        installer::remover::remove_ending_pathseparator(\$installer::globals::idttemplatepath);
526
527        # Analyzing the idt language path
528
529        if (!($installer::globals::idtlanguagepath eq ""))  # idtlanguagepath set, relative or absolute?
530        {
531            make_path_absolute(\$installer::globals::idtlanguagepath);
532        }
533
534        installer::remover::remove_ending_pathseparator(\$installer::globals::idtlanguagepath);
535
536        # In the msi template directory a files "codes.txt" has to exist, in which the ProductCode
537        # and the UpgradeCode for the product are defined.
538        # The name "codes.txt" can be overwritten in Product definition with CODEFILENAME (msiglobal.pm)
539
540        if (( $installer::globals::iswindowsbuild ) && ( $installer::globals::packageformat ne "archive" ) && ( $installer::globals::packageformat ne "installed" ))
541        {
542            $installer::globals::codefilename = $installer::globals::idttemplatepath  . $installer::globals::separator . $installer::globals::codefilename;
543            installer::files::check_file($installer::globals::codefilename);
544            $installer::globals::componentfilename = $installer::globals::idttemplatepath  . $installer::globals::separator . $installer::globals::componentfilename;
545            installer::files::check_file($installer::globals::componentfilename);
546        }
547
548    }
549
550    #######################################
551    # Patch currently only available
552    # for Solaris packages and Linux
553    #######################################
554
555    if (( $installer::globals::patch ) && ( ! $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::islinuxrpmbuild ) && ( ! $installer::globals::islinuxdebbuild ) && ( ! $installer::globals::iswindowsbuild ) && ( ! $installer::globals::ismacdmgbuild ))
556    {
557        installer::logger::print_error( "Sorry, Patch flag currently only available for Solaris pkg, Linux RPM and Windows builds!" );
558        usage();
559        exit(-1);
560    }
561
562    if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild ) && ( ! $installer::globals::patchincludepath ))
563    {
564        installer::logger::print_error( "Solaris patch requires parameter -patchinc !" );
565        usage();
566        exit(-1);
567    }
568
569    if (( $installer::globals::patch ) && ( $installer::globals::issolarispkgbuild ) && ( $installer::globals::patchincludepath ))
570    {
571        make_path_absolute(\$installer::globals::patchincludepath);
572        $installer::globals::patchincludepath = installer::converter::make_path_conform($installer::globals::patchincludepath);
573    }
574
575    #######################################
576    # Testing existence of files
577    # also for copy-only projects
578    #######################################
579
580    if ($installer::globals::ziplistname eq "")
581    {
582        installer::logger::print_error( "ERROR: Zip list file has to be defined (Parameter -f) !" );
583        usage();
584        exit(-1);
585    }
586    else
587    {
588        installer::files::check_file($installer::globals::ziplistname);
589    }
590
591    if ($installer::globals::setupscriptname eq "") { $installer::globals::setupscript_defined_in_productlist = 1; }
592    else { installer::files::check_file($installer::globals::setupscriptname); } # if the setupscript file is defined, it has to exist
593
594}
595
596################################################
597# Writing parameter to shell and into logfile
598################################################
599
600sub outputparameter ()
601{
602    if ( $installer::globals::debug ) { installer::logger::debuginfo("installer::parameter::outputparameter"); }
603
604    my @output = ();
605
606    push(@output, "\n");
607    push(@output, "########################################################\n");
608    push(@output, "$installer::globals::prog, version 1.0\n");
609    push(@output, "Product list file: $installer::globals::ziplistname\n");
610    if (!($installer::globals::setupscript_defined_in_productlist))
611    {
612        push(@output, "Setup script: $installer::globals::setupscriptname\n");
613    }
614    else
615    {
616        push(@output, "Taking setup script from solver\n");
617    }
618    push(@output, "Unpackpath: $installer::globals::unpackpath\n");
619    push(@output, "Compiler: $installer::globals::compiler\n");
620    push(@output, "Product: $installer::globals::product\n");
621    push(@output, "BuildID: $installer::globals::buildid\n");
622    push(@output, "Build: $installer::globals::build\n");
623    if ( $installer::globals::minor ) { push(@output, "Minor: $installer::globals::minor\n"); }
624    else  { push(@output, "No minor set\n"); }
625    if ( $installer::globals::pro ) { push(@output, "Product version\n"); }
626    else  { push(@output, "Non-Product version\n"); }
627    if ( $installer::globals::rootpath eq "" ) { push(@output, "Using default installpath\n"); }
628    else { push(@output, "Installpath: $installer::globals::rootpath\n"); }
629    push(@output, "Package format: $installer::globals::packageformat\n");
630    if (!($installer::globals::idttemplatepath eq ""))  { push(@output, "msi templatepath: $installer::globals::idttemplatepath\n"); }
631    if ((!($installer::globals::idttemplatepath eq "")) && (!($installer::globals::iswindowsbuild))) { push(@output, "msi template path will be ignored for non Windows builds!\n"); }
632    if (!($installer::globals::idtlanguagepath eq ""))  { push(@output, "msi languagepath: $installer::globals::idtlanguagepath\n"); }
633    if ((!($installer::globals::idtlanguagepath eq "")) && (!($installer::globals::iswindowsbuild))) { push(@output, "msi language path will be ignored for non Windows builds!\n"); }
634    if ((!($installer::globals::iswindowsbuild)) && ( $installer::globals::call_epm )) { push(@output, "Calling epm\n"); }
635    if ((!($installer::globals::iswindowsbuild)) && (!($installer::globals::call_epm))) { push(@output, "Not calling epm\n"); }
636    if (!($installer::globals::javalanguagepath eq "")) { push(@output, "Java language path: $installer::globals::javalanguagepath\n"); }
637    if ((!($installer::globals::javalanguagepath eq "")) && ($installer::globals::iswindowsbuild)) { push(@output, "Java language path will be ignored for Windows builds!\n"); }
638    if ( $installer::globals::patchincludepath ) { push(@output, "Patch include path: $installer::globals::patchincludepath\n"); }
639    if ( $installer::globals::globallogging ) { push(@output, "Complete logging activated\n"); }
640    if ( $installer::globals::debug ) { push(@output, "Debug is activated\n"); }
641    if ( $installer::globals::tab ) { push(@output, "TAB version\n"); }
642    if ( $installer::globals::strip ) { push(@output, "Stripping files\n"); }
643    else { push(@output, "No file stripping\n"); }
644    if ( $installer::globals::debian ) { push(@output, "Linux: Creating Debian packages\n"); }
645    if ( $installer::globals::dounzip ) { push(@output, "Unzip ARCHIVE files\n"); }
646    else  { push(@output, "Not unzipping ARCHIVE files\n"); }
647    if (!($installer::globals::languages_defined_in_productlist))
648    {
649        push(@output, sprintf("Languages: %s\n", $installer::globals::languageproduct));
650    }
651    else
652    {
653        push(@output, "Languages defined in $installer::globals::ziplistname\n");
654    }
655    if ( $installer::globals::is_copy_only_project ) { push(@output, "This is a copy only project!\n"); }
656    if ( $installer::globals::languagepack ) { push(@output, "Creating language pack!\n"); }
657    if ( $installer::globals::patch ) { push(@output, "Creating patch!\n"); }
658    push(@output, "########################################################\n");
659
660    # output into shell and into logfile
661
662    foreach my $line (@output)
663    {
664        $installer::logger::Info->print($line);
665    }
666}
667
6681;
669