Subversion Repositories DevTools

Rev

Rev 1530 | Rev 1534 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1530 Rev 1532
Line 37... Line 37...
37
use Cwd;
37
use Cwd;
38
use Carp;
38
use Carp;
39
use DBI;
39
use DBI;
40
use LWP::UserAgent;
40
use LWP::UserAgent;
41
use DeployUtils::Logger;
41
use DeployUtils::Logger;
42
use DeployUtils::BuildFile;
-
 
43
use DeployUtils::RmPkgInfo;
42
use DeployUtils::RmPkgInfo;
-
 
43
use BuildConfig;
44
use Exporter();
44
use Exporter();
45
use ArrayHashUtils;
45
use ArrayHashUtils;
46
 
46
 
47
#-------------------------------------------------------------------------------
47
#-------------------------------------------------------------------------------
48
#   Export variables and function into the users name space
48
#   Export variables and function into the users name space
Line 114... Line 114...
114
                    &createSymbolicLink
114
                    &createSymbolicLink
115
                    &createPrototypeFile2
115
                    &createPrototypeFile2
116
                    &installDeployFile
116
                    &installDeployFile
117
                    &createDpkgArchive
117
                    &createDpkgArchive
118
                    &generateHtmlReleaseNote
118
                    &generateHtmlReleaseNote
119
                    &generateInternalHtmlReleaseNote
-
 
120
                    &generateIShieldIncludeFile
119
                    &generateIShieldIncludeFile
121
                    &createPerlSvcWin32
120
                    &createPerlSvcWin32
122
                    &createPerlAppWin32
121
                    &createPerlAppWin32
123
                    &convertFile
122
                    &convertFile
124
 
123
 
Line 276... Line 275...
276
our %BuildPkgArchive     = ();
275
our %BuildPkgArchive     = ();
277
 
276
 
278
our $RmPkgDetails        = undef;
277
our $RmPkgDetails        = undef;
279
our $RmPvPkgDetails      = undef;
278
our $RmPvPkgDetails      = undef;
280
 
279
 
-
 
280
my  $autobuild = $ENV{'GBE_ABT'} || 0;
-
 
281
 
281
 
282
 
282
#------------------------------------------------------------------------------
283
#------------------------------------------------------------------------------
283
# Initialization actions
284
# Initialization actions
284
#------------------------------------------------------------------------------
285
#------------------------------------------------------------------------------
285
 
286
 
Line 499... Line 500...
499
    if ($opt_o)
500
    if ($opt_o)
500
    {
501
    {
501
        $PkgPreviousVersionStr = $opt_o;
502
        $PkgPreviousVersionStr = $opt_o;
502
    }
503
    }
503
 
504
 
-
 
505
    # Load the JATS-parsed information from the build.pl file
-
 
506
    #
-
 
507
    $BuildFileInfo = DeployUtils::BuildConfig->new($RootDir, $Platform);
-
 
508
 
-
 
509
    # Load all our build dependencies
-
 
510
    #
-
 
511
    %BuildPkgArchive = $BuildFileInfo->getDpkgArchiveHash();
504
 
512
 
505
    # lets define where we get our stuff from
513
    # lets define where we get our stuff from
506
    #
514
    #
507
    if ( $ERGAFC_BASEDIR =~ m|/$| )
515
    if ( $ERGAFC_BASEDIR =~ m|/$| )
508
    {
516
    {
Line 527... Line 535...
527
    {
535
    {
528
        LogError('-x', "No deployment support files found");
536
        LogError('-x', "No deployment support files found");
529
        LogError(      "These MUST be provided by a dependant package in build.pl");
537
        LogError(      "These MUST be provided by a dependant package in build.pl");
530
    }
538
    }
531
 
539
 
532
    $Username     = getlogin || getpwuid($<);
-
 
533
 
540
 
-
 
541
    $Username     = getlogin || getpwuid($<);
534
 
542
 
535
    if ( "$BuildType" eq "D" )
543
    if ( "$BuildType" eq "D" )
536
    {
544
    {
537
        $PkgBaseDir = "$PkgDir/debug"; 
545
        $PkgBaseDir = "$PkgDir/debug"; 
538
    }
546
    }
Line 570... Line 578...
570
    $DpkgLibDir     = "$InterfaceDir";
578
    $DpkgLibDir     = "$InterfaceDir";
571
    $DpkgBinDir     = "$InterfaceDir";
579
    $DpkgBinDir     = "$InterfaceDir";
572
   
580
   
573
 
581
 
574
    #   Define where we might find our artifacts
582
    #   Define where we might find our artifacts
575
    #   The search order is: Platform, Product, Target, MachineType
583
    #   The search order is: Platform, Product, --Uses extensions,Target, MachineType
-
 
584
    #   Much of this list, and its described in the build.pl file, use the JATS
-
 
585
    #   generated information to extract the correct information
576
    #
586
    #
577
    #   Only add the directory to the list if it actually exists
587
    #   Only add the directory to the list if it actually exists
578
    #   This will speed up searching later.
588
    #   This will speed up searching later.
579
    #
589
    #
580
    #   Create multiple search paths
590
    #   Create multiple search paths
581
    #       One for an exaustive search
591
    #       One for an exaustive search
582
    #       Others for selective searchs
592
    #       Others for selective searchs
583
    #
593
    #
584
    #
594
    #
585
    foreach my $part ( $Platform, $Product, $Target, $MachType )
595
    foreach my $part ( $BuildFileInfo->getPlatformParts($Platform), $MachType )
586
    {
596
    {
587
        next unless ( $part );
597
        next unless ( $part );
588
        foreach my $subdir ( "lib." . "$part",
598
        foreach my $subdir ( "lib." . "$part",
589
                             "lib." . "$part" . "$BuildType",
599
                             "lib." . "$part" . "$BuildType",
590
                             "lib/lib." . "$part" . "$BuildType",
600
                             "lib/lib." . "$part" . "$BuildType",
Line 597... Line 607...
597
                UniquePush( \@{$DpkgLibDirList{$part}}, $subdir);
607
                UniquePush( \@{$DpkgLibDirList{$part}}, $subdir);
598
            }
608
            }
599
        }
609
        }
600
    }
610
    }
601
 
611
 
602
    foreach my $part ( $Platform, $Product, $Target, $MachType )
612
    foreach my $part ( $BuildFileInfo->getPlatformParts($Platform), $MachType )
603
    {
613
    {
604
        next unless ( $part );
614
        next unless ( $part );
605
        foreach my $subdir ( "bin." . "$part" . "$BuildType",
615
        foreach my $subdir ( "bin." . "$part" . "$BuildType",
606
                             "bin." . "$part",
616
                             "bin." . "$part",
607
                             "bin/bin." . "$part" . "$BuildType",
617
                             "bin/bin." . "$part" . "$BuildType",
Line 641... Line 651...
641
 
651
 
642
        $PkgPatchID     = "$_tmpStr" . "-" . "$PkgPatchNum"; 
652
        $PkgPatchID     = "$_tmpStr" . "-" . "$PkgPatchNum"; 
643
        $PkgPatchReadme = "$PkgBaseDir" . "/README." . "$PkgPatchID"; 
653
        $PkgPatchReadme = "$PkgBaseDir" . "/README." . "$PkgPatchID"; 
644
        $PkgPatchTmpDir = "$PkgBaseDir/tmp";
654
        $PkgPatchTmpDir = "$PkgBaseDir/tmp";
645
 
655
 
646
        $PkgReleaseNote = "$PkgBaseDir" . "/$PkgPatchName" . 
656
        $PkgReleaseNote = "$ReleaseDir" . "/$PkgPatchName" .
647
                                                                "$PkgVersionStr\_" . 
657
                                                                "$PkgVersionStr\_" . 
648
                                                                "$PkgPatchNum\_" . 
658
                                                                "$PkgPatchNum\_" . 
649
                                                                "$ProjectAcronym\_" . 
659
                                                                "$ProjectAcronym\_" . 
650
                                                                "$Platform"; 
660
                                                                "$Platform"; 
651
 
661
 
Line 660... Line 670...
660
        $PkgOutputFile = "na"; 
670
        $PkgOutputFile = "na"; 
661
    }
671
    }
662
    else
672
    else
663
    {
673
    {
664
        LogNorm("This is a normal RELEASE build...");
674
        LogNorm("This is a normal RELEASE build...");
665
        $PkgReleaseNote = "$PkgBaseDir" . "/" .
675
        $PkgReleaseNote = "$ReleaseDir" . "/" .
666
                                                                "$PkgName" . "-" . 
676
                                                                "$PkgName" . "-" . 
667
                                                                "$PkgVersion" . "." .
677
                                                                "$PkgVersion" . "." .
668
                                                                "$ProjectAcronym" . "-" .
678
                                                                "$ProjectAcronym" . "-" .
669
                                                                "$Platform";
679
                                                                "$Platform";
670
 
680
 
Line 681... Line 691...
681
                         "$ProjectAcronym" . "-" .
691
                         "$ProjectAcronym" . "-" .
682
                         "$Platform" . "-" .
692
                         "$Platform" . "-" .
683
                         "$BuildType\.pkg";
693
                         "$BuildType\.pkg";
684
    }
694
    }
685
 
695
 
686
 
-
 
687
    # lets load all our build dependencies
-
 
688
    #
-
 
689
    $BuildFileInfo = DeployUtils::BuildFile->new("$RootDir/build.pl");
-
 
690
    # Now lets make a copy into %BuildPkgArchive
-
 
691
    %BuildPkgArchive = $BuildFileInfo->getDpkgArchiveHash();
-
 
692
 
-
 
693
    LogNorm("------------------------------------------------------------");
696
    LogNorm("------------------------------------------------------------");
694
 
697
 
695
 
698
 
696
    # lets just show what we have determined.
699
    # lets just show what we have determined.
697
    #
700
    #
Line 713... Line 716...
713
        LogNorm("PkgPatchNum      =[$PkgPatchNum]");
716
        LogNorm("PkgPatchNum      =[$PkgPatchNum]");
714
        LogNorm("PkgPatchID       =[$PkgPatchID]");
717
        LogNorm("PkgPatchID       =[$PkgPatchID]");
715
        LogNorm("PkgPatchTmpDir   =[$PkgPatchTmpDir]");
718
        LogNorm("PkgPatchTmpDir   =[$PkgPatchTmpDir]");
716
    }
719
    }
717
 
720
 
718
    LogNorm("PkgReleaseNote   =[$PkgReleaseNote]");
721
    LogNorm("PkgReleaseNote   =[$PkgReleaseNote]") unless ($autobuild);
-
 
722
    LogNorm("PkgReleaseNote   =[Delayed by ABT]") if ($autobuild);
719
    LogNorm("PkgLabel         =[$PkgLabel]");
723
    LogNorm("PkgLabel         =[$PkgLabel]");
720
 
724
 
721
    LogNorm("PkgPreviousVersionStr=[$PkgPreviousVersionStr]");
725
    LogNorm("PkgPreviousVersionStr=[$PkgPreviousVersionStr]");
722
 
726
 
723
    LogNorm("ProjectAcronym   =[$ProjectAcronym]");
727
    LogNorm("ProjectAcronym   =[$ProjectAcronym]");
724
    LogNorm("BuildType        =[$BuildType]");
728
    LogNorm("BuildType        =[$BuildType]");
725
    LogNorm("MachType         =[$MachType]");
729
    LogNorm("MachType         =[$MachType]");
726
    LogNorm("Platform         =[$Platform]");
730
    LogNorm("Platform         =[$Platform]");
727
    LogNorm("Product          =[$Product]");
731
    LogNorm("Product          =[$Product]");
728
    LogNorm("Target           =[$Target]");
732
    LogNorm("Target           =[$Target]");
-
 
733
    LogInfo("BuildParts       =[" . join(',',$BuildFileInfo->getPlatformParts($Platform)) . "]");
729
    
734
    
730
    LogNorm("CurrentDir       =[$CurrentDir]");
735
    LogNorm("CurrentDir       =[$CurrentDir]");
731
    LogNorm("RootDir          =[$RootDir]");
736
    LogNorm("RootDir          =[$RootDir]");
732
    LogNorm("SandBoxName      =[$SandBoxName]");
737
    LogNorm("SandBoxName      =[$SandBoxName]");
733
    LogNorm("Username         =[$Username]");
738
    LogNorm("Username         =[$Username]");
Line 4453... Line 4458...
4453
#       associated key.
4458
#       associated key.
4454
#
4459
#
4455
#       If the value does not exist then it will return an error
4460
#       If the value does not exist then it will return an error
4456
#       and terminate processing.
4461
#       and terminate processing.
4457
#
4462
#
-
 
4463
# Inputs:   $m_key          Symbolic name for target directory
-
 
4464
#           $m_type         Type : A    - Absolute
-
 
4465
#                                  R    - Relative
-
 
4466
#
4458
#------------------------------------------------------------------------------
4467
#------------------------------------------------------------------------------
4459
{
4468
{
4460
    # correct number of parameters?
4469
    # correct number of parameters?
4461
    if ( ($#_+1) != 2 ) 
4470
    if ( ($#_+1) != 2 ) 
4462
    {
4471
    {
4463
        LogError("Incorrect number of params passed to " .
4472
        LogError("Incorrect number of params passed to " .
4464
                  "getTargetDstDirValue() function.");
4473
                  "getTargetDstDirValue() function.");
4465
    }
4474
    }
4466
 
4475
 
4467
    my ($m_key, $m_type) = @_;
4476
    my ($m_key, $m_type) = @_;
4468
    if (exists  $TargetDstDirStructure{$m_key} )    
-
 
4469
    {
-
 
4470
        if ( "$m_type" eq "A" )
-
 
4471
        {
4477
    my $tdir;
4472
            return "$PkgBaseDir/$TargetBaseDir/" .
-
 
4473
                   "$TargetDstDirStructure{$m_key}";
-
 
4474
        }
-
 
4475
 
4478
 
-
 
4479
    #
4476
        if ( "$m_type" eq "R" )
4480
    #   Look up the users tag conversion hash
4477
        {
4481
    #
4478
             return "$TargetBaseDir/$TargetDstDirStructure{$m_key}";
4482
    if ( exists $TargetDstDirStructure{$m_key} )
4479
        }
4483
    {
-
 
4484
        $tdir = $TargetBaseDir . '/' . $TargetDstDirStructure{$m_key};
4480
    }
4485
    }
4481
    else
4486
    else
4482
    {
4487
    {
4483
        LogError("Target destination dir tag [$m_key] does not exist in " .
4488
        LogError("Target destination dir tag [$m_key] does not exist in " .
4484
                 "TargetDstDirStructure. " .
4489
                 "TargetDstDirStructure. " .
4485
                 "Check deploy configuration.");
4490
                 "Check deploy configuration.");
4486
    }
4491
    }
4487
 
4492
 
-
 
4493
 
-
 
4494
    #
-
 
4495
    #   If an absolute path is required than add the PkgBaseDir
-
 
4496
    #   otherwise the user must be requesting a relative path.
-
 
4497
    #
-
 
4498
    if ( "$m_type" eq "A" ) {
-
 
4499
        $tdir = "$PkgBaseDir/$tdir";
-
 
4500
    } elsif ( "$m_type" eq "R" )  {
-
 
4501
    } else {
-
 
4502
        LogError("getTargetDstDirValue: Bad call. Unknown type: $m_type");
-
 
4503
    }
-
 
4504
 
4488
    return 1;
4505
    return $tdir;
4489
}
4506
}
4490
 
4507
 
4491
 
4508
 
4492
#------------------------------------------------------------------------------
4509
#------------------------------------------------------------------------------
4493
sub createPatch
4510
sub createPatch
Line 4665... Line 4682...
4665
 
4682
 
4666
#------------------------------------------------------------------------------
4683
#------------------------------------------------------------------------------
4667
sub createPackage
4684
sub createPackage
4668
#
4685
#
4669
# Description:
4686
# Description:
4670
#       This sub-routine is used to create a solaris package.
4687
#       This sub-routine is used to create a package.
-
 
4688
#       The type of package is machine specific. The subroutine will invoke a
-
 
4689
#       machine specfic function to do the real work.
4671
#
4690
#
4672
#------------------------------------------------------------------------------
4691
#------------------------------------------------------------------------------
4673
{
4692
{
-
 
4693
    LogInfo("createPackage");
4674
    # correct number of parameters?
4694
    # correct number of parameters?
4675
    if ( ($#_+1) != 0 )
4695
    if ( ($#_+1) != 0 )
4676
    {
4696
    {
4677
        LogError("Incorrect number of params passed to " .
4697
        LogError("Incorrect number of params passed to " .
4678
                  "createPackage() function. Check deploy config.");
4698
                  "createPackage() function. Check deploy config.");
4679
    }
4699
    }
4680
 
4700
 
4681
    # lets just check to see if we can execute this function on
4701
    # lets just check to see if we can execute this function on
4682
    # this machine.
4702
    # this machine.
4683
    #
4703
    #
-
 
4704
    my $createRoutine = 'createPackage_' . $MachType;
4684
    if ( "$MachType" ne "sparc" )
4705
    if ( exists &$createRoutine )
4685
    {
4706
    {
-
 
4707
        # lets just check to see if we can execute this function on
-
 
4708
        # for  this build.
-
 
4709
        #
-
 
4710
        if ( $PkgPatchNum )
-
 
4711
        {
4686
        LogInfo("createPackage() not supported on this machine type.");
4712
            LogWarn("createPackage() can only be called during a RELEASE build.");
4687
        return 1;
4713
            return 1;
4688
    }
4714
        }
4689
 
4715
 
-
 
4716
        #
4690
    # lets just check to see if we can execute this function on
4717
        #   Ensure the Release directory is present
-
 
4718
        #
4691
    # for  this build.
4719
        if ( ! -d $ReleaseDir )
-
 
4720
        {
-
 
4721
 
-
 
4722
            mkpath ( $ReleaseDir, 0, 0777);
-
 
4723
            LogInfo("created [$ReleaseDir] dir...");
-
 
4724
        }
4692
    #
4725
    
-
 
4726
        # Ensure that the package descriptor is transferred
-
 
4727
        #
-
 
4728
        my ($m_copydesc) = "cp $SrcDir/descpkg $ReleaseDir";
-
 
4729
        system($m_copydesc);
-
 
4730
 
-
 
4731
        # Invoke the machine specific package builder by name
-
 
4732
        # Need to relax strictness. Yes we do know what we are doing here
-
 
4733
        #
-
 
4734
        no strict "refs";
-
 
4735
        &$createRoutine( @_ ) || LogError("Unspecified error building package");
4693
    if ( "x$PkgPatchNum" ne "x" )
4736
        use strict "refs";
-
 
4737
    }
-
 
4738
    else
4694
    {
4739
    {
4695
        LogWarn("createPackage() can only be called during a RELEASE build.");
4740
        LogInfo("createPackage() not supported on this machine type: $MachType.");
4696
        return 1;
-
 
4697
    }
4741
    }
-
 
4742
    return 1;
-
 
4743
}
4698
 
4744
 
4699
 
4745
 
-
 
4746
#------------------------------------------------------------------------------
-
 
4747
sub createPackage_sparc
-
 
4748
#
-
 
4749
# Description:
-
 
4750
#       This sub-routine is used to create a package.
-
 
4751
#       The type of package is machine specific. The subroutine will invoke a
-
 
4752
#       machine specfic function to do the real work.
-
 
4753
#
-
 
4754
#------------------------------------------------------------------------------
-
 
4755
{
-
 
4756
    LogInfo("createPackage_sparc");
-
 
4757
 
4700
    # we need to copy the package utility files from
4758
    # we need to copy the package utility files from
4701
    # their resting place.
4759
    # their resting place.
4702
    #
4760
    #
4703
    my ($i);
-
 
4704
    foreach $i ( @PKG_UTIL_FILES )
4761
    foreach my $i ( @PKG_UTIL_FILES )
4705
    {
4762
    {
4706
        if( File::Copy::copy("$PKG_UTIL_DIR/$i", "$PkgBaseDir") )
4763
        if( File::Copy::copy("$PKG_UTIL_DIR/$i", "$PkgBaseDir") )
4707
        {
4764
        {
4708
            LogNorm("Copied [$PKG_UTIL_DIR/$i] to [$PkgBaseDir] ...");
4765
            LogNorm("Copied [$PKG_UTIL_DIR/$i] to [$PkgBaseDir] ...");
4709
            updatePrototypeFileAddItem2("$i", "$i", "", "", "", "I");
4766
            updatePrototypeFileAddItem2("$i", "$i", "", "", "", "I");
Line 4744... Line 4801...
4744
    }
4801
    }
4745
 
4802
 
4746
    # lets compress the output to save some space.
4803
    # lets compress the output to save some space.
4747
    #
4804
    #
4748
    LogNorm("Compressing $PkgOutputFile");
4805
    LogNorm("Compressing $PkgOutputFile");
4749
    my ($m_compressCmd) = "cd $PkgBaseDir; gzip $PkgOutputFile";
4806
    my ($m_compressCmd) = "cd $PkgBaseDir; gzip $PkgOutputFile; mv ${PkgOutputFile}.gz $ReleaseDir";
4750
    system($m_compressCmd);
4807
    system($m_compressCmd);
4751
 
4808
 
4752
    return 1;
4809
    return 1;
4753
}
4810
}
4754
 
4811
 
-
 
4812
#------------------------------------------------------------------------------
-
 
4813
sub createPackage_WinCE
-
 
4814
#
-
 
4815
# Description:
-
 
4816
#       This sub-routine is used to create a package.
-
 
4817
#       Really a win32 machine type, but for some reason, the MachType gets
-
 
4818
#       stuffed around. Don't know why.
-
 
4819
#
-
 
4820
#       Do have the option of creating a WinCE specific packager
-
 
4821
#
-
 
4822
#------------------------------------------------------------------------------
-
 
4823
{
-
 
4824
    LogInfo("createPackage_WinCE");
-
 
4825
    createPackage_win32(@_);
-
 
4826
}
-
 
4827
 
-
 
4828
#------------------------------------------------------------------------------
-
 
4829
sub createPackage_win32
-
 
4830
#
-
 
4831
# Description:
-
 
4832
#       This sub-routine is used to create a package.
-
 
4833
#       Invoke the isbuild.pl utility to build the install shield project
-
 
4834
#
-
 
4835
#------------------------------------------------------------------------------
-
 
4836
{
-
 
4837
    LogInfo("createPackage_win32");
-
 
4838
    #
-
 
4839
    #   Locate MergeModules in external packages
-
 
4840
    #   These will be used by the InstallShield compiler
-
 
4841
    #
-
 
4842
    my @mm_dirs;
-
 
4843
    my @mm_tld;
-
 
4844
    my $tdir;
-
 
4845
 
-
 
4846
    #
-
 
4847
    #   Check for Merge Modules in the local directory
-
 
4848
    #   This must be a flat directory structure. ie: all files in the
-
 
4849
    #   subdirectory called MergeModule.
-
 
4850
    #
-
 
4851
    $tdir = "$RootDir/MergeModules";
-
 
4852
    push @mm_dirs, $tdir if ( -d $tdir );
-
 
4853
    LogInfo ("Discovered MergeModules in: $tdir") if ( -d $tdir );
-
 
4854
 
-
 
4855
    #
-
 
4856
    #   Check for Merge Modules in the Interface directory
-
 
4857
    #   This will be pulled in via a BuildPkgArchive
-
 
4858
    #
-
 
4859
    $tdir = "$InterfaceDir/MergeModules";
-
 
4860
    push @mm_tld, $tdir if ( -d $tdir );
-
 
4861
    LogInfo ("Discovered MergeModules in: $tdir") if ( -d $tdir );
-
 
4862
 
-
 
4863
    #
-
 
4864
    #   Check in LinkPkgArchive locations too
-
 
4865
    for my $entry ( $BuildFileInfo->getBuildPkgRules() )
-
 
4866
    {
-
 
4867
        next unless ( $entry->{'TYPE'} eq 'link' );
-
 
4868
        $tdir = $entry->{'ROOT'} . '/MergeModules';
-
 
4869
        push @mm_tld, $tdir if ( -d $tdir );
-
 
4870
        LogInfo ("Discovered MergeModules in: $tdir") if ( -d $tdir );
-
 
4871
    }
-
 
4872
 
-
 
4873
    #
-
 
4874
    #   Expand the merge module subdirectory tree into
-
 
4875
    #   suitable paths:
-
 
4876
    #       Modules/i386
-
 
4877
    #       Modules/i386/<language>
-
 
4878
    #       Objects
-
 
4879
    #       Merge Modules
-
 
4880
    #
-
 
4881
    foreach my $dir ( @mm_tld )
-
 
4882
    {
-
 
4883
        $tdir = $dir . '/Modules/i386';
-
 
4884
        if ( -d $tdir )
-
 
4885
        {
-
 
4886
            push @mm_dirs, $tdir;
-
 
4887
            foreach my $file ( glob( "$tdir/*" ))
-
 
4888
            {
-
 
4889
                next unless ( -d $file );
-
 
4890
                push @mm_dirs, $file;
-
 
4891
            }
-
 
4892
        }
-
 
4893
 
-
 
4894
        $tdir = $dir . '/Objects';
-
 
4895
        push @mm_dirs, $tdir if ( -d $tdir );
-
 
4896
 
-
 
4897
        $tdir = $dir . '/Merge Modules';
-
 
4898
        push @mm_dirs, $tdir if ( -d $tdir );
-
 
4899
    }
-
 
4900
 
-
 
4901
 
-
 
4902
    #
-
 
4903
    #   Locate the program
-
 
4904
    #   It will be in a location addressed by the @INC path
-
 
4905
    #
-
 
4906
    my $prog_found;
-
 
4907
    my $prog;
-
 
4908
    foreach my $dir ( @INC )
-
 
4909
    {
-
 
4910
        $prog = $dir . '/isbuild.pl';
-
 
4911
        next unless ( -f $prog );
-
 
4912
        $prog_found = 1;
-
 
4913
        last;
-
 
4914
    }
-
 
4915
 
-
 
4916
    LogError("isbuild.pl not found") unless $prog_found;
-
 
4917
    LogNorm("isbuild: $prog");
-
 
4918
    my $rv = system ( $ENV{GBE_PERL}, $prog,
-
 
4919
                            "-project=../$PkgName.ism",
-
 
4920
                            "-version=$PkgVersionUser",
-
 
4921
                            "-out=$ReleaseDir",
-
 
4922
                            "-workdir=$InterfaceDir",
-
 
4923
                            map { "-mergemodule=$_" } @mm_dirs
-
 
4924
                             );
-
 
4925
    LogError ("InstallShield Builder Error" ) if ( $rv );
-
 
4926
    return 1;
-
 
4927
}
4755
 
4928
 
4756
#------------------------------------------------------------------------------
4929
#------------------------------------------------------------------------------
4757
sub createPrototypeFile
4930
sub createPrototypeFile
4758
#
4931
#
4759
# Description:
4932
# Description:
4760
#       This sub-routine is used to create the required package prototye file
4933
#       This sub-routine is used to create the required package prototype file
4761
#       from a known directory struture using the search path method.
4934
#       from a known directory struture using the search path method.
4762
#
4935
#
4763
#------------------------------------------------------------------------------
4936
#------------------------------------------------------------------------------
4764
{
4937
{
4765
    # correct number of parameters?
4938
    # correct number of parameters?
Line 6277... Line 6450...
6277
#
6450
#
6278
#    Description:
6451
#    Description:
6279
#
6452
#
6280
#------------------------------------------------------------------------------
6453
#------------------------------------------------------------------------------
6281
{
6454
{
-
 
6455
 
-
 
6456
    #
-
 
6457
    #   If this script is invoked by the AutoBuildTool, then we may not be able
-
 
6458
    #   to create a Release Note as the RM entry may not be available. More over
-
 
6459
    #   the ABT will create a release note as the package is made official
-
 
6460
    #
-
 
6461
    if ( $autobuild )
-
 
6462
    {
-
 
6463
        LogWarn('AutoBuild Environment. Release notes generated later');
-
 
6464
        return;
-
 
6465
    }
-
 
6466
 
6282
    #
6467
    #
6283
    #   Ensure the Release directory is present
6468
    #   Ensure the Release directory is present
6284
    #
6469
    #
6285
    if ( ! -d $ReleaseDir )
6470
    if ( ! -d $ReleaseDir )
6286
    {
6471
    {
Line 6288... Line 6473...
6288
        LogInfo("created [$ReleaseDir] dir...");
6473
        LogInfo("created [$ReleaseDir] dir...");
6289
    }
6474
    }
6290
 
6475
 
6291
    if ( ! getRmReleaseNote() )
6476
    if ( ! getRmReleaseNote() )
6292
    {
6477
    {
6293
        LogNorm("No Release Manager release note, lets attempt to create an internal version");
-
 
6294
        if ( $RmPkgDetails->foundPkg() )
-
 
6295
        {
-
 
6296
            # internal version
-
 
6297
            generateInternalHtmlReleaseNote();
-
 
6298
        }
-
 
6299
        else
-
 
6300
        {
-
 
6301
            LogWarn("No Release Manager details, release note not generated.");
6478
        LogError("No Release Manager details, release note not generated.");
6302
        }
-
 
6303
    }
6479
    }
6304
}
6480
}
6305
 
6481
 
6306
 
6482
 
6307
 
6483
 
Line 6341... Line 6517...
6341
        LogWarn("Unable to retrieve Release Manager Release Notes");
6517
        LogWarn("Unable to retrieve Release Manager Release Notes");
6342
        return 0;
6518
        return 0;
6343
    }
6519
    }
6344
}
6520
}
6345
 
6521
 
6346
 
-
 
6347
 
-
 
6348
#------------------------------------------------------------------------------
-
 
6349
sub generateInternalHtmlReleaseNote
-
 
6350
#
-
 
6351
#    Description:
-
 
6352
#        This subroutine is used to generate a simple release note in HTML format 
-
 
6353
#        for the package.
-
 
6354
#
-
 
6355
#        The function populates various sections of the release note 
-
 
6356
#        with details that are available at the time of execution 
-
 
6357
#        and it also creates blank sections to be populated later by the user
-
 
6358
#        when the information is available.
-
 
6359
#
-
 
6360
#------------------------------------------------------------------------------
-
 
6361
{
-
 
6362
    # correct number of parameters?
-
 
6363
    if ( ($#_+1) != 0 )
-
 
6364
    {
-
 
6365
        LogError("Incorrect number of params passed to " .
-
 
6366
                  "generateReleaseNote2() function. Check deploy config.");
-
 
6367
    }
-
 
6368
 
-
 
6369
 
-
 
6370
    local *FILE;
-
 
6371
    open ( FILE, "> $PkgReleaseNote\.html") or
-
 
6372
        LogError("Failed to open file [$PkgReleaseNote\.html].");
-
 
6373
 
-
 
6374
 
-
 
6375
    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime();
-
 
6376
    my $dateStr = sprintf ("%04u-%02u-%02u", $year + 1900, $mon+1, $mday);
-
 
6377
    my $timeStr = sprintf ("%02u:%02u:%02u", $hour, $min, $sec);
-
 
6378
    my ($i);
-
 
6379
 
-
 
6380
    # lets check to see if our package desc field has been set
-
 
6381
    #
-
 
6382
    if ( "$PkgDesc" eq "" )
-
 
6383
    {
-
 
6384
        LogError("Package description not set. Use setPkgDescription('my description') function.");
-
 
6385
    }
-
 
6386
 
-
 
6387
 
-
 
6388
    # lets get some details for our package
-
 
6389
    getRmDetails();
-
 
6390
 
-
 
6391
    # now we need to ensure that our local build file dependencies are
-
 
6392
    # the same as those we have entered in the Release Manager database.
-
 
6393
    checkDependencies();
-
 
6394
 
-
 
6395
 
-
 
6396
    print FILE ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n");                            
-
 
6397
    print FILE ("    \"http://www.w3.org/TR/html4/loose.dtd\">\n");                            
-
 
6398
 
-
 
6399
    print FILE ("<html>\n");
-
 
6400
    print FILE ("<head>\n");                       
-
 
6401
 
-
 
6402
    print FILE ("<title>Software Release Note: " .
-
 
6403
                 "$PkgName $PkgVersion.$ProjectAcronym</title>\n");
-
 
6404
 
-
 
6405
    print FILE ("</head>\n");
-
 
6406
    print FILE ("<body>\n");                                                                          
-
 
6407
    print FILE ("<h1><font face=\"Arial\">Software Release Note</h1>\n");     
-
 
6408
    
-
 
6409
                 
-
 
6410
    print FILE ("<hr>\n");                          
-
 
6411
    print FILE ("<h2><font face=\"Arial\">Identification</h2>\n");
-
 
6412
 
-
 
6413
    print FILE ("<table width=\"100%\" >\n");
-
 
6414
 
-
 
6415
    print FILE ("<tr>\n");
-
 
6416
    print FILE ("\t<td colspan=\"2\"><font face=\"Arial\">This release can be uniquely identified by,</font></td>\n");
-
 
6417
    print FILE ("</tr>\n");
-
 
6418
 
-
 
6419
    print FILE ("<tr>\n");
-
 
6420
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Name:</b></font></td>\n");
-
 
6421
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">" . $RmPkgDetails->pkg_name() . "</font></td>\n");
-
 
6422
    print FILE ("</tr>\n");
-
 
6423
 
-
 
6424
    print FILE ("<tr>\n");
-
 
6425
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Description:</b></font></td>\n");
-
 
6426
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">" . $RmPkgDetails->pv_description() . "</font></td>\n");
-
 
6427
    print FILE ("</tr>\n");
-
 
6428
 
-
 
6429
    print FILE ("<tr>\n");
-
 
6430
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Version:</b></font></td>\n");
-
 
6431
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">" . 
-
 
6432
                "$PkgVersion.$ProjectAcronym" . "</font></td>\n");
-
 
6433
    print FILE ("</tr>\n");
-
 
6434
 
-
 
6435
    print FILE ("<tr>\n");
-
 
6436
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Platform:</b></font></td>\n");
-
 
6437
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">$MachType</font></td>\n");
-
 
6438
    print FILE ("</tr>\n");
-
 
6439
 
-
 
6440
    print FILE ("<tr>\n");
-
 
6441
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>PkgLabel:</b></font></td>\n");
-
 
6442
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">$PkgLabel</font></td>\n");
-
 
6443
    print FILE ("</tr>\n");
-
 
6444
 
-
 
6445
    print FILE ("<tr>\n");
-
 
6446
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Date:</b></font></td>\n");
-
 
6447
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">$dateStr $timeStr</font></td>\n");
-
 
6448
    print FILE ("</tr>\n");
-
 
6449
 
-
 
6450
    print FILE ("<tr>\n");
-
 
6451
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Correspondence No:</b></font></td>\n");
-
 
6452
    print FILE ("\t<td width=\"80%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6453
    print FILE ("</tr>\n");
-
 
6454
    print FILE ("</table>\n");
-
 
6455
 
-
 
6456
 
-
 
6457
    print FILE ("<hr>\n");                          
-
 
6458
    print FILE ("<h2><font face=\"Arial\">Package Overview</h2>\n");
-
 
6459
 
-
 
6460
    print FILE ("<table width=\"100%\">\n");
-
 
6461
    print FILE ("<tr>\n");
-
 
6462
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">" . $RmPkgDetails->pv_overview() . "</font></td>\n");
-
 
6463
    print FILE ("</tr>\n");
-
 
6464
    print FILE ("</table>\n");
-
 
6465
    print FILE ("<br>\n");                          
-
 
6466
 
-
 
6467
 
-
 
6468
    print FILE ("<hr>\n");                          
-
 
6469
    print FILE ("<h2><font face=\"Arial\">Release Summary</h2>\n");
-
 
6470
 
-
 
6471
    print FILE ("<table width=\"100%\">\n");
-
 
6472
    print FILE ("<tr>\n");
-
 
6473
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">Reason for this release,</font></td>\n");
-
 
6474
    print FILE ("</tr>\n");
-
 
6475
    print FILE ("<tr>\n");
-
 
6476
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">" . $RmPkgDetails->pv_reason() . "</font></td>\n");
-
 
6477
    print FILE ("</tr>\n");
-
 
6478
    print FILE ("</table>\n");
-
 
6479
 
-
 
6480
 
-
 
6481
    # here we will list any issues that have been associated with
-
 
6482
    # the package
-
 
6483
    #
-
 
6484
    print FILE ("<br>\n");
-
 
6485
 
-
 
6486
    my ($j);
-
 
6487
    my ($k);
-
 
6488
    my ($m_str) = "";
-
 
6489
    foreach $i ( $RmPkgDetails->getIssueTypes() )
-
 
6490
    {
-
 
6491
        print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6492
                    "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6493
 
-
 
6494
        print FILE ("<tr>\n");
-
 
6495
        print FILE ("<td colspan=\"6\"><font face=\"Arial\"><b>Issues - $i</b></font></td>\n");
-
 
6496
        print FILE ("</tr>\n");
-
 
6497
 
-
 
6498
        print FILE ("<tr>\n");
-
 
6499
        print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Fixed</b></font></td>\n");
-
 
6500
        print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Issue Id</b></font></td>\n");
-
 
6501
        print FILE ("\t<td width=\"50%\"><font face=\"Arial\"><b>Summary</b></font></td>\n");
-
 
6502
        print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Issue Type</b></font></td>\n");
-
 
6503
        print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Status</b></font></td>\n");
-
 
6504
        print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Priority</b></font></td>\n");
-
 
6505
        print FILE ("</tr>\n");
-
 
6506
 
-
 
6507
        foreach $j ( $RmPkgDetails->getIssueNumbers($i) )
-
 
6508
        {
-
 
6509
            print FILE ("<tr>\n");
-
 
6510
            if (  $RmPkgDetails->iss_state($i, $j) == 1 )
-
 
6511
            {
-
 
6512
                $m_str = "Yes";
-
 
6513
            }
-
 
6514
            else
-
 
6515
            {
-
 
6516
                $m_str = "No";
-
 
6517
            }
-
 
6518
 
-
 
6519
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\">$m_str</font></td>\n");
-
 
6520
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $RmPkgDetails->iss_numStr($i, $j)   . "</font></td>\n");
-
 
6521
            print FILE ("\t<td width=\"50%\"><font face=\"Arial\">" . $RmPkgDetails->iss_summary($i, $j)  . "</font></td>\n");
-
 
6522
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $RmPkgDetails->iss_type($i, $j)     . "</font></td>\n");
-
 
6523
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $RmPkgDetails->iss_status($i, $j)   . "</font></td>\n");
-
 
6524
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $RmPkgDetails->iss_priority($i, $j) . "</font></td>\n");
-
 
6525
            print FILE ("</tr>\n");
-
 
6526
        }
-
 
6527
        print FILE ("</table>\n");
-
 
6528
    }
-
 
6529
 
-
 
6530
    print FILE ("<hr>\n");                          
-
 
6531
    print FILE ("<h2><font face=\"Arial\">Build Dependencies</h2>\n");
-
 
6532
 
-
 
6533
    print FILE ("<table width=\"100%\">\n");
-
 
6534
    print FILE ("<tr>\n");
-
 
6535
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">The release was built with the following " .
-
 
6536
                "\"dpkg_archive\" modules,</font></td>\n");
-
 
6537
    print FILE ("</tr>\n");
-
 
6538
    print FILE ("</table>\n");
-
 
6539
    print FILE ("<br>\n");
-
 
6540
 
-
 
6541
    my $depObj;
-
 
6542
 
-
 
6543
    foreach $i ( $RmPkgDetails->getDependencyNames() )
-
 
6544
    {
-
 
6545
        $depObj = $RmPkgDetails->getDependencyObject($i); 
-
 
6546
 
-
 
6547
        print FILE ("<h4><font face=\"Arial\">" . $depObj->pkg_name() . " - " . $depObj->pkg_version() . "</h4>\n");
-
 
6548
       
-
 
6549
        print FILE ("<tr>\n");
-
 
6550
        print FILE ("\t<td width=\"100%\"><font face=\"Arial\">Reason for this release,</font></td>\n");
-
 
6551
        print FILE ("</tr>\n");
-
 
6552
        print FILE ("<tr>\n");
-
 
6553
        print FILE ("\t<td width=\"100%\"><font face=\"Arial\">" . $depObj->pv_reason() . "</font></td>\n");
-
 
6554
        print FILE ("</tr>\n");
-
 
6555
        print FILE ("</table>\n");
-
 
6556
        print FILE ("<br><br>\n"); 
-
 
6557
 
-
 
6558
        foreach $j ( $depObj->getIssueTypes() )
-
 
6559
        {
-
 
6560
            print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6561
                        "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6562
 
-
 
6563
            print FILE ("<tr>\n");
-
 
6564
            print FILE ("<td colspan=\"6\"><font face=\"Arial\"><b>Issues - $j</b></font></td>\n");
-
 
6565
            print FILE ("</tr>\n");
-
 
6566
 
-
 
6567
            print FILE ("<tr>\n");
-
 
6568
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Fixed</b></font></td>\n");
-
 
6569
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Issue Id</b></font></td>\n");
-
 
6570
            print FILE ("\t<td width=\"50%\"><font face=\"Arial\"><b>Summary</b></font></td>\n");
-
 
6571
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Issue Type</b></font></td>\n");
-
 
6572
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Status</b></font></td>\n");
-
 
6573
            print FILE ("\t<td width=\"10%\"><font face=\"Arial\"><b>Priority</b></font></td>\n");
-
 
6574
            print FILE ("</tr>\n");
-
 
6575
 
-
 
6576
            foreach $k ( $depObj->getIssueNumbers($j) )
-
 
6577
            {
-
 
6578
                if ( $depObj->iss_state($j, $k) == 1 )
-
 
6579
                {  
-
 
6580
                    $m_str = "Yes";
-
 
6581
                }
-
 
6582
                else
-
 
6583
                {
-
 
6584
                    $m_str = "No";
-
 
6585
                }
-
 
6586
                print FILE ("\t<td width=\"10%\"><font face=\"Arial\">$m_str</font></td>\n");
-
 
6587
 
-
 
6588
                print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $depObj->iss_numStr($j, $k)   . "</font></td>\n");
-
 
6589
                print FILE ("\t<td width=\"50%\"><font face=\"Arial\">" . $depObj->iss_summary($j, $k)  . "</font></td>\n");
-
 
6590
                print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $depObj->iss_type($j, $k)     . "</font></td>\n");
-
 
6591
                print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $depObj->iss_status($j, $k)   . "</font></td>\n");
-
 
6592
                print FILE ("\t<td width=\"10%\"><font face=\"Arial\">" . $depObj->iss_priority($j, $k) . "</font></td>\n");
-
 
6593
                print FILE ("</tr>\n");
-
 
6594
 
-
 
6595
            }
-
 
6596
            print FILE ("</table>\n"); 
-
 
6597
            print FILE ("<br><br>\n"); 
-
 
6598
        }
-
 
6599
        print FILE ("</table>\n"); 
-
 
6600
    }
-
 
6601
 
-
 
6602
 
-
 
6603
    print FILE ("<hr>\n");                          
-
 
6604
    print FILE ("<h2><font face=\"Arial\">System (Runtime) Dependencies</h2>\n");
-
 
6605
 
-
 
6606
    print FILE ("<table width=\"100%\">\n");
-
 
6607
    print FILE ("<tr>\n");
-
 
6608
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">The release is dependent and requires the presence of the " .
-
 
6609
                "following modules to operate correctly,</font></td>\n");
-
 
6610
    print FILE ("</tr>\n");
-
 
6611
    print FILE ("</table>\n");
-
 
6612
    print FILE ("<br>\n");
-
 
6613
 
-
 
6614
 
-
 
6615
    print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6616
                "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6617
 
-
 
6618
    print FILE ("<tr>\n");
-
 
6619
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Package</b></font></td>\n");
-
 
6620
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Version</b></font></td>\n");
-
 
6621
    print FILE ("\t<td width=\"60%\"><font face=\"Arial\"><b>Comments</b></font></td>\n");
-
 
6622
    print FILE ("</tr>\n");
-
 
6623
 
-
 
6624
    my ($count) = 0;
-
 
6625
    foreach $i ( $RmPkgDetails->getRtDepNames() )
-
 
6626
    {
-
 
6627
        print FILE ("<tr>\n");
-
 
6628
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">$i</font></td>\n");
-
 
6629
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">" . $RmPkgDetails->rt_version($i)  . "</font></td>\n");
-
 
6630
        print FILE ("\t<td width=\"60%\"><font face=\"Arial\">" . $RmPkgDetails->rt_comments($i) . "</font></td>\n");
-
 
6631
        print FILE ("</tr>\n");
-
 
6632
        $count++;
-
 
6633
    }
-
 
6634
    # if we have no RTDs lets add an empty row.
-
 
6635
    if ( $count == 0 )
-
 
6636
    {
-
 
6637
        print FILE ("<tr>\n");
-
 
6638
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">&nbsp</font></td>\n");
-
 
6639
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">&nbsp</font></td>\n");
-
 
6640
        print FILE ("\t<td width=\"60%\"><font face=\"Arial\">&nbsp</font></td>\n");
-
 
6641
        print FILE ("</tr>\n");
-
 
6642
    }
-
 
6643
    print FILE ("</table>\n");
-
 
6644
   
-
 
6645
 
-
 
6646
 
-
 
6647
    print FILE ("<hr>\n");                          
-
 
6648
    print FILE ("<h2><font face=\"Arial\">Files</h2>\n");
-
 
6649
 
-
 
6650
    print FILE ("<table width=\"100%\">\n");
-
 
6651
    print FILE ("<tr>\n");
-
 
6652
    print FILE ("\t<td width=\"100%\">\n");
-
 
6653
    print FILE ("\t\t<p><font face=\"Arial\">This release contains the following files,</font></p>\n");
-
 
6654
    print FILE ("\t\t<p><font face=\"Arial\">(Note: checksums are derived using,</font></p>\n");
-
 
6655
    print FILE ("\t\t<ul>\n");
-
 
6656
 
-
 
6657
    print FILE ("\t\t\t<li><font face=\"Arial\">The /usr/bin/cksum utility provided by the Solaris ".
-
 
6658
          "8 operating system, or</font></li>\n");
-
 
6659
 
-
 
6660
    print FILE ("<li><font face=\"Arial\">The ~/core_devl/BIN.win32/cksum.exe utility provided ". 
-
 
6661
          "by the ERG JATS build tools.)</font></li>\n");
-
 
6662
 
-
 
6663
    print FILE ("\t\t</ul>\n");
-
 
6664
    print FILE ("\t</td>\n");
-
 
6665
    print FILE ("</tr>\n");
-
 
6666
    print FILE ("</table>\n");
-
 
6667
 
-
 
6668
    print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6669
                "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6670
    print FILE ("<tr>\n");
-
 
6671
    print FILE ("\t<td width=\"60%\"><font face=\"Arial\"><b>Name</b></font></td>\n");
-
 
6672
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Size</b></font></td>\n");
-
 
6673
    print FILE ("\t<td width=\"20%\"><font face=\"Arial\"><b>Checksum</b></font></td>\n");
-
 
6674
    print FILE ("</tr>\n");
-
 
6675
 
-
 
6676
    my ($m_cksum, $m_size, $m_rest) = "";
-
 
6677
    if ( "$MachType" eq "sparc" )
-
 
6678
    {
-
 
6679
        my $retStr = `cksum $PkgBaseDir/$PkgOutputFile\.gz`;
-
 
6680
        chomp($retStr);
-
 
6681
 
-
 
6682
        $retStr =~ s/\s+/ /g;
-
 
6683
        ($m_cksum, $m_size, $m_rest) = split / /,$retStr;
-
 
6684
 
-
 
6685
        $m_cksum =~ s/\s+//g;
-
 
6686
        $m_size  =~ s/\s+//g;
-
 
6687
 
-
 
6688
        print FILE ("<tr>\n");
-
 
6689
        print FILE ("\t<td width=\"60%\"><font face=\"Arial\">$PkgOutputFile\.gz</font></td>\n");
-
 
6690
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">$m_size (bytes)</font></td>\n");
-
 
6691
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">$m_cksum</font></td>\n");
-
 
6692
        print FILE ("</tr>\n");
-
 
6693
    }
-
 
6694
    else
-
 
6695
    {
-
 
6696
        print FILE ("<tr>\n");
-
 
6697
        print FILE ("\t<td width=\"60%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6698
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6699
        print FILE ("\t<td width=\"20%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6700
        print FILE ("</tr>\n");
-
 
6701
    }
-
 
6702
    print FILE ("</table>\n");
-
 
6703
 
-
 
6704
    print FILE ("<hr>\n");                          
-
 
6705
    print FILE ("<h2><font face=\"Arial\">Installation Instructions</h2>\n");
-
 
6706
 
-
 
6707
    print FILE ("<table width=\"100%\">\n");
-
 
6708
    print FILE ("<tr>\n");
-
 
6709
    print FILE ("\t<td width=\"100%\"><font face=\"Arial\">Please follow the instructions described below " .
-
 
6710
                "when attempting to install the package,</font></td>\n");
-
 
6711
    print FILE ("</tr>\n");
-
 
6712
    print FILE ("</table>\n");
-
 
6713
 
-
 
6714
    print FILE ("<br>\n");
-
 
6715
 
-
 
6716
    print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6717
                "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6718
    if ( "$MachType" eq "sparc" )
-
 
6719
    {
-
 
6720
        print FILE ("<tr>\n");
-
 
6721
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>1.</b></font></td>\n");
-
 
6722
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6723
                    "Ensure the previous package has been removed by using the " .
-
 
6724
                    "\'pkginfo -l $PkgName\' command. " .
-
 
6725
                    "If the command returns that a package is cuurently installed you will " . 
-
 
6726
                    "need to remove it by executing the \'pkgrm $PkgName\' command. " .
-
 
6727
                    "</font></td>\n");
-
 
6728
        print FILE ("</tr>\n");
-
 
6729
 
-
 
6730
        print FILE ("<tr>\n");
-
 
6731
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>2.</b></font></td>\n");
-
 
6732
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6733
                    "Copy the new package \'$PkgOutputFile\.gz\' into the " .
-
 
6734
                    "'/tmp' directory as the 'root' user. " .
-
 
6735
                    "Uncompress the package (i.e. \'gzip -d $PkgOutputFile\.gz\')." .
-
 
6736
                    "</font></td>\n");
-
 
6737
        print FILE ("</tr>\n");
-
 
6738
 
-
 
6739
        print FILE ("<tr>\n");
-
 
6740
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>3.</b></font></td>\n");
-
 
6741
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6742
                    "Install the package as the 'root' user (i.e. execute the following command " .
-
 
6743
                    "\'pkgadd -d $PkgOutputFile\'), providing all the information " . 
-
 
6744
                    "required during the package install." .
-
 
6745
                    "</font></td>\n");
-
 
6746
        print FILE ("</tr>\n");
-
 
6747
    }
-
 
6748
    else
-
 
6749
    {
-
 
6750
        print FILE ("<tr>\n");
-
 
6751
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>1.</b></font></td>\n");
-
 
6752
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6753
                    "Ensure the previous package has been removed by using the Add-Remove " .
-
 
6754
                    "programs option in the Control Panel. " .
-
 
6755
                    "</font></td>\n");
-
 
6756
        print FILE ("</tr>\n");
-
 
6757
 
-
 
6758
        print FILE ("<tr>\n");
-
 
6759
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>2.</b></font></td>\n");
-
 
6760
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6761
                    "Copy the installer into the /temp directory as a user with Administrator " .
-
 
6762
                    "privileges." .
-
 
6763
                    "</font></td>\n");
-
 
6764
        print FILE ("</tr>\n");
-
 
6765
 
-
 
6766
        print FILE ("<tr>\n");
-
 
6767
        print FILE ("\t<td width=\"5%\"><font face=\"Arial\"><b>3.</b></font></td>\n");
-
 
6768
        print FILE ("\t<td width=\"95%\"><font face=\"Arial\">" .
-
 
6769
                    "Execute the package and follow the prompts." .
-
 
6770
                    "</font></td>\n");
-
 
6771
        print FILE ("</tr>\n");
-
 
6772
 
-
 
6773
    }
-
 
6774
    print FILE ("</table>\n");
-
 
6775
 
-
 
6776
 
-
 
6777
    print FILE ("<hr>\n");                          
-
 
6778
    print FILE ("<h2><font face=\"Arial\">Additional Notes</h2>\n");
-
 
6779
    print FILE ("<p><font face=\"Arial\">None</p>\n");
-
 
6780
 
-
 
6781
 
-
 
6782
    print FILE ("<hr>\n");                          
-
 
6783
    print FILE ("<h2><font face=\"Arial\">Dependency History</h2>\n");
-
 
6784
 
-
 
6785
 
-
 
6786
    # lets check to see if we got something
-
 
6787
    if ( $RmPkgDetails->foundPkg() )
-
 
6788
    {
-
 
6789
        if ( $RmPvPkgDetails->foundDetails() != 0 && $RmPvPkgDetails->pv_id() != $RmPkgDetails->pv_id() )
-
 
6790
        {
-
 
6791
            print FILE ("<table width=\"100%\">\n");
-
 
6792
            print FILE ("<tr>\n");
-
 
6793
            print FILE ("\t<td width=\"100%\"><font face=\"Arial\">The table below describes the differences between " .
-
 
6794
                        "$PkgName $PkgVersionUser and " .
-
 
6795
                        "$PkgPreviousVersionStr,</font></td>\n");
-
 
6796
            print FILE ("</tr>\n");
-
 
6797
            print FILE ("</table>\n");
-
 
6798
            print FILE ("<br>\n");
-
 
6799
 
-
 
6800
    
-
 
6801
            print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6802
                        "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6803
 
-
 
6804
            print FILE ("<tr>\n");
-
 
6805
            print FILE ("\t<td width=\"30%\"><font face=\"Arial\"><b>Dependency</b></font></td>\n");
-
 
6806
            print FILE ("\t<td width=\"30%\"><font face=\"Arial\"><b>Status</b></font></td>\n");
-
 
6807
            print FILE ("\t<td width=\"40%\"><font face=\"Arial\"><b>Previous Version</b></font></td>\n");
-
 
6808
            print FILE ("</tr>\n");
-
 
6809
 
-
 
6810
            my $PvDepObj;
-
 
6811
            foreach $i ( $RmPkgDetails->getDependencyNames() )
-
 
6812
            {
-
 
6813
                $PvDepObj = $RmPvPkgDetails->getDependencyObject($i);
-
 
6814
    
-
 
6815
                if ( defined($PvDepObj) )
-
 
6816
                {
-
 
6817
                    if ( $PvDepObj->pkg_version() ne $RmPkgDetails->getDependencyObject($i)->pkg_version() )
-
 
6818
                    {
-
 
6819
                        print FILE ("<tr>\n");
-
 
6820
                        print FILE ("\t<td width=\"30%\"><font face=\"Arial\">$i</font></td>\n");
-
 
6821
                        print FILE ("\t<td width=\"30%\"><font face=\"Arial\">Updated</font></td>\n");
-
 
6822
                        print FILE ("\t<td width=\"40%\"><font face=\"Arial\">" . $PvDepObj->pkg_version() . "</font></td>\n");
-
 
6823
                        print FILE ("</tr>\n");
-
 
6824
                    }
-
 
6825
                }
-
 
6826
                else
-
 
6827
                {
-
 
6828
                    print FILE ("<tr>\n");
-
 
6829
                    print FILE ("\t<td width=\"30%\"><font face=\"Arial\">$i</font></td>\n");
-
 
6830
                    print FILE ("\t<td width=\"30%\"><font face=\"Arial\">New</font></td>\n");
-
 
6831
                    print FILE ("\t<td width=\"40%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6832
                    print FILE ("</tr>\n");
-
 
6833
                }
-
 
6834
            }
-
 
6835
            print FILE ("</table>\n"); 
-
 
6836
        }
-
 
6837
        else
-
 
6838
        {
-
 
6839
            print FILE ("<p><font face=\"Arial\">No history available.</p>\n");
-
 
6840
        }
-
 
6841
    }
-
 
6842
 
-
 
6843
 
-
 
6844
    print FILE ("<hr>\n");                          
-
 
6845
    print FILE ("<h2><font face=\"Arial\">Approval</h2>\n");
-
 
6846
 
-
 
6847
    print FILE ("<table width=\"100%\">\n");
-
 
6848
    print FILE ("<tr>\n");
-
 
6849
    print FILE ("\t<td colspan=\"4\"><font face=\"Arial\">This release requires the signature of the " .
-
 
6850
                "following persons for approval,</font></td>\n");
-
 
6851
    print FILE ("</tr>\n");
-
 
6852
    print FILE ("</table>\n");
-
 
6853
    print FILE ("<br>\n");
-
 
6854
 
-
 
6855
 
-
 
6856
    print FILE ("<table width=\"100%\" border=\"1\" cellpadding=\"2\" cellspacing=\"0\" " .
-
 
6857
                "bordercolordark=\"White\" bordercolorlight=\"Black\">\n");
-
 
6858
 
-
 
6859
    print FILE ("<tr>\n");
-
 
6860
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\"><b>Tile</b></font></td>\n");
-
 
6861
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\"><b>Name</b></font></td>\n");
-
 
6862
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\"><b>Signature</b></font></td>\n");
-
 
6863
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\"><b>Date</b></font></td>\n");
-
 
6864
    print FILE ("</tr>\n");
-
 
6865
 
-
 
6866
    print FILE ("<tr>\n");
-
 
6867
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">Software Engineer</font></td>\n");
-
 
6868
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">$Username</font></td>\n");
-
 
6869
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6870
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">$dateStr</font></td>\n");
-
 
6871
    print FILE ("</tr>\n");
-
 
6872
 
-
 
6873
    print FILE ("<tr>\n");
-
 
6874
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">Team Leader</font></td>\n");
-
 
6875
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6876
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6877
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6878
    print FILE ("</tr>\n");
-
 
6879
 
-
 
6880
    print FILE ("<tr>\n");
-
 
6881
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">Manager</font></td>\n");
-
 
6882
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6883
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</b></font></td>\n");
-
 
6884
    print FILE ("\t<td width=\"25%\"><font face=\"Arial\">&nbsp;</font></td>\n");
-
 
6885
    print FILE ("</tr>\n");
-
 
6886
 
-
 
6887
    print FILE ("</table>\n");
-
 
6888
 
-
 
6889
 
-
 
6890
    print FILE ("</head>\n");
-
 
6891
    print FILE ("</body>\n");
-
 
6892
    printf FILE ("</html>\n");
-
 
6893
 
-
 
6894
    # done.
-
 
6895
    close FILE;
-
 
6896
  
-
 
6897
    LogNorm("Generated HTML Release note [$PkgReleaseNote\.html]");
-
 
6898
    return 1;
-
 
6899
}
-
 
6900
 
-
 
6901
 
-
 
6902
#------------------------------------------------------------------------------
6522
#------------------------------------------------------------------------------
6903
sub checkDependencies
6523
sub checkDependencies
6904
#
6524
#
6905
#------------------------------------------------------------------------------
6525
#------------------------------------------------------------------------------
6906
{
6526
{
Line 6910... Line 6530...
6910
    # first we want to loop through all our local build archives
6530
    # first we want to loop through all our local build archives
6911
    # 
6531
    # 
6912
    my ($versionStr) = "";
6532
    my ($versionStr) = "";
6913
    foreach $i ( $BuildFileInfo->getDpkgArchiveList() )
6533
    foreach $i ( $BuildFileInfo->getDpkgArchiveList() )
6914
    {
6534
    {
6915
        if (       "$i" eq "ishieldlibimg"
-
 
6916
                || "$i" eq "ishieldlibicon"
-
 
6917
                || "$i" eq "ishieldmodules"
-
 
6918
                || "$i" eq "deployfiles" )
-
 
6919
        {
-
 
6920
            # these three packages are a special case,
-
 
6921
            # we do not include them in the dependecy check
-
 
6922
            #
-
 
6923
            # This is BAD and should be removed.
-
 
6924
            # We do have a dependancy ! Lets be honest about it.
-
 
6925
            #
-
 
6926
            next;
-
 
6927
        }
-
 
6928
        
-
 
6929
        my $moduleInfo = $BuildFileInfo->getDpkgArchiveInfo($i);
6535
        my $moduleInfo = $BuildFileInfo->getDpkgArchiveInfo($i);
6930
        
6536
        
6931
        $versionStr = "$moduleInfo->{version}"; 
6537
        $versionStr = "$moduleInfo->{version}"; 
6932
        $versionStr .= "\.$moduleInfo->{proj}" if ( $moduleInfo->{proj} ne "" );
6538
        $versionStr .= "\.$moduleInfo->{proj}" if ( $moduleInfo->{proj} ne "" );
6933
        my $depObj = $RmPkgDetails->getDependencyObject($i);
6539
        my $depObj = $RmPkgDetails->getDependencyObject($i);
6934
 
6540
 
6935
        if ( defined ( $depObj ) )
6541
        if ( defined ( $depObj ) )
6936
        {
6542
        {
6937
            if ( $depObj->pkg_version() ne "$versionStr" )
6543
            if ( $depObj->pkg_version() ne "$versionStr" )
6938
            {
6544
            {
6939
                LogWarn("Dependency difference, [$i] local version $versionStr, RM version " . $depObj->pkg_version());
6545
                LogWarn("Dependency difference, [$i] Local version $versionStr, RM version " . $depObj->pkg_version());
6940
                $retValue = 1;
6546
                $retValue = 1;
6941
            }
6547
            }
6942
        }  
6548
        }  
6943
        else
6549
        else
6944
        {
6550
        {
6945
            LogWarn("Dependency difference, cannot locate archive [$i] in Release Manager database.");
6551
            LogWarn("Dependency difference, [$i] Cannot locate archive in Release Manager database.");
6946
            $retValue = 1;
6552
            $retValue = 1;
6947
        }
6553
        }
6948
    }
6554
    }
6949
 
6555
 
6950
    # lets check to see if we detected a difference 
6556
    # lets check to see if we detected a difference 
Line 7283... Line 6889...
7283
            }
6889
            }
7284
        }
6890
        }
7285
    }
6891
    }
7286
}
6892
}
7287
 
6893
 
7288
 
-
 
7289
 
-
 
7290
#------------------------------------------------------------------------------
6894
#------------------------------------------------------------------------------
7291
1;
6895
1;