Subversion Repositories DevTools

Rev

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

Rev 1556 Rev 1564
Line 64... Line 64...
64
my $opt_suffix;
64
my $opt_suffix;
65
my $opt_outpath;
65
my $opt_outpath;
66
my @opt_mergemodule;
66
my @opt_mergemodule;
67
my $opt_workdir;
67
my $opt_workdir;
68
my $opt_name_version = 1;
68
my $opt_name_version = 1;
-
 
69
my $opt_multi_prod = 0;
-
 
70
my $opt_multi_rel = 0;
69
 
71
 
70
#
72
#
71
#   Kludgy values
73
#   Kludgy values
72
#       May need to be configured
74
#       May need to be configured
73
#       These are current IS 11.5 install locations
75
#       These are current IS 11.5 install locations
Line 94... Line 96...
94
                "version=s"     => \$opt_version,           # string
96
                "version=s"     => \$opt_version,           # string
95
                "out=s"         => \$opt_outpath,           # string
97
                "out=s"         => \$opt_outpath,           # string
96
                "mergemodule=s" => \@opt_mergemodule,       # string
98
                "mergemodule=s" => \@opt_mergemodule,       # string
97
                "workdir=s"     => \$opt_workdir,           # string
99
                "workdir=s"     => \$opt_workdir,           # string
98
                "nameversion!"  => \$opt_name_version,      # [no]flag
100
                "nameversion!"  => \$opt_name_version,      # [no]flag
-
 
101
                "multiprod!"    => \$opt_multi_prod,        # [no]flag no by default
-
 
102
                "multirel!"     => \$opt_multi_rel          # [no]flag no by default
99
                );
103
                );
100
 
104
 
101
                #
105
                #
102
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
106
                #   UPDATE THE DOCUMENTATION AT THE END OF THIS FILE !!!
103
                #
107
                #
Line 317... Line 321...
317
#   These are found within the product config
321
#   These are found within the product config
318
#   We need to locate the Release in order to build it
322
#   We need to locate the Release in order to build it
319
#
323
#
320
Verbose ("InstallShield Products");
324
Verbose ("InstallShield Products");
321
my $products = $dev->ISWiProductConfigs;
325
my $products = $dev->ISWiProductConfigs;
-
 
326
 
-
 
327
# if we are building check to make sure -multiprod is enabled if more than 1 product configuration is configured
-
 
328
# and/or more than 1 release per product configuration
-
 
329
if ( $opt_build )
-
 
330
{
-
 
331
    Error("Multiple Product Configurations found, -multiprod must be specified to build them all") 
-
 
332
        if ( $products->Count > 1 && !$opt_multi_prod );
-
 
333
    
-
 
334
    foreach my $p ( 1 .. $products->Count )
-
 
335
    {
-
 
336
        Error("Multiple Releases found for a Product Configuration, -multirel must be specified to build them all") 
-
 
337
            if ( $products->Item($p)->ISWiReleases->Count > 1 && !$opt_multi_rel );
-
 
338
    }
-
 
339
}
-
 
340
 
-
 
341
 
322
foreach my $index ( 1 .. $products->Count )
342
foreach my $index ( 1 .. $products->Count )
323
{
343
{
324
    my $product = $products->Item($index);
344
    my $product = $products->Item($index);
325
 
345
 
326
    Verbose ("Product Index  : " . $index );
346
    Verbose ("Product Index  : " . $index );
Line 350... Line 370...
350
            #   Set build location
370
            #   Set build location
351
            #
371
            #
352
            my $location = $opt_workdir . '/Media';
372
            my $location = $opt_workdir . '/Media';
353
            $location =~ s~/~\\~g;
373
            $location =~ s~/~\\~g;
354
            $release->SetProperty('BuildLocation', $location );
374
            $release->SetProperty('BuildLocation', $location );
355
            Message ("BuildLocation: " . $release->BuildLocation );
375
            Message ("New BuildLocation: " . $release->BuildLocation );
356
 
376
 
-
 
377
            #
-
 
378
            #   Massage the ProductName [ if required ]
-
 
379
            #   Only update ProductName for this product Configuration if nameversion is supplied and the
-
 
380
            #   product Configuration has a product Name.  
-
 
381
            #   This overrides the default project product name for this product Configuration.
-
 
382
            #   Should contain a comma<space><version>
-
 
383
            #
-
 
384
            if ( $opt_name_version && $product->ProductName ne "" )
-
 
385
            {
-
 
386
                Verbose( "Update ProductName for this Product Configuration" );
-
 
387
                Verbose( "Originial ProductName   :" . $product->ProductName);
-
 
388
                my $product_name = $product->ProductName;
-
 
389
                if ( $product_name =~ m/^(.*),/ )
-
 
390
                {
-
 
391
                    $product_name = $1;
-
 
392
                }
-
 
393
                $product_name .= ', ' . $opt_version . '.' . $opt_suffix;
-
 
394
                $product->SetProperty('ProductName', $product_name );
-
 
395
                Message( "New ProductName   :" . $product->ProductName);
-
 
396
            }
-
 
397
 
-
 
398
            #
-
 
399
            #   Update the Product version [ if required ]
-
 
400
            #   Only update Product Version for this Product Configuration if the current Product 
-
 
401
            #   Version has a value.  
-
 
402
            #   This overrides the default project version for this product Configuration.
-
 
403
            #
-
 
404
            if ( $product->ProductVersion ne "" )
-
 
405
            {
-
 
406
                Verbose( "Update ProductVersion for this Product Configuration" );
-
 
407
                Verbose( "Original ProductVersion:" . $product->ProductVersion);
-
 
408
                $product->SetProperty('ProductVersion', $opt_version );
-
 
409
                Message ("New ProductVersion:" . $product->ProductVersion);
-
 
410
            }
357
 
411
 
358
            #
412
            #
359
            #   If building with the Standalone interface will need to set
413
            #   If building with the Standalone interface will need to set
360
            #   up the merge module paths
414
            #   up the merge module paths
361
            #
415
            #
Line 379... Line 433...
379
            #   Set thename of the setup file
433
            #   Set thename of the setup file
380
            #   This contains the build name and number
434
            #   This contains the build name and number
381
            #
435
            #
382
            Verbose ("Setting Setup Filename");
436
            Verbose ("Setting Setup Filename");
383
            Verbose2 ( "Initial SetupFileName: " . $product->SetupFileName );
437
            Verbose2 ( "Initial SetupFileName: " . $product->SetupFileName );
384
            my $setup_name = $opt_name
438
            my $setup_name  = $opt_name . '-';
-
 
439
               $setup_name .= $product->Name . '-' if ($opt_multi_prod);
385
                           . '-'
440
               $setup_name .= $release->Name . '-' if ($opt_multi_rel);
386
                           . $dev->ProductVersion
441
               $setup_name .= $dev->ProductVersion
387
                           . '.'
442
                           .  '.'
388
                           . $opt_suffix
443
                           .  $opt_suffix
389
                           . '-WIN32';
444
                           .  '-WIN32';
390
 
445
 
391
            $product->SetProperty('SetupFileName', $setup_name );
446
            $product->SetProperty('SetupFileName', $setup_name );
392
            Message( "SetupFileName: " . $product->SetupFileName );
447
            Message( "SetupFileName: " . $product->SetupFileName );
393
 
448
 
394
            #
449
            #
Line 403... Line 458...
403
            #   Transfer the result file to the user
458
            #   Transfer the result file to the user
404
            #
459
            #
405
            if ( $result_code == 0 && $opt_outpath )
460
            if ( $result_code == 0 && $opt_outpath )
406
            {
461
            {
407
                Message("Transfer output file: $opt_outpath");
462
                Message("Transfer output file: $opt_outpath");
408
                my$ofile = $location . "/ishield package/Release/DiskImages/DISK1/" . $setup_name . '.exe';
463
                my $ofile = $location . "/" . $product->Name . "/" . $release->Name . "/DiskImages/DISK1/" . $setup_name . '.exe';
409
                Error ("Build output file not found", "Expected: $ofile" ) unless ( -f $ofile );
464
                Error ("Build output file not found", "Expected: $ofile" ) unless ( -f $ofile );
410
 
465
 
411
                File::Copy::copy( $ofile, $opt_outpath) ||
466
                File::Copy::copy( $ofile, $opt_outpath) ||
412
                    Error ("Did not transfer InstallShield output file", $ofile, $opt_outpath);
467
                    Error ("Did not transfer InstallShield output file", $ofile, $opt_outpath);
413
            }
468
            }
Line 530... Line 585...
530
    -[no]readonly      - Open project in readonly mode
585
    -[no]readonly      - Open project in readonly mode
531
    -[no]standalone    - Use SA or IS automation interface
586
    -[no]standalone    - Use SA or IS automation interface
532
    -[no]build         - Build project
587
    -[no]build         - Build project
533
    -[no]codes         - Modify GUID codes in release
588
    -[no]codes         - Modify GUID codes in release
534
    -[no]nameversion   - Add Version info to ProductName (default)
589
    -[no]nameversion   - Add Version info to ProductName (default)
-
 
590
    -[no]multiprod     - Builds multiple product configurations (off by default)
-
 
591
    -[no]multirel      - Builds multiple releases per product configuration (off by default)
535
 
592
 
536
=head1 OPTIONS
593
=head1 OPTIONS
537
 
594
 
538
=over 8
595
=over 8
539
 
596
 
Line 618... Line 675...
618
 
675
 
619
=item B<-nameversion>
676
=item B<-nameversion>
620
 
677
 
621
This option Add Version information to the Product Name.
678
This option Add Version information to the Product Name.
622
 
679
 
-
 
680
Additionally now if there are any Product Configurations in the Release view
-
 
681
of the project that have a value in the Product Name for that configuration then
-
 
682
they to will be modified in the same way.
-
 
683
 
623
The default operation will add Version Information. Use -nonameversion to disable
684
The default operation will add Version Information. Use -nonameversion to disable
624
this operation.
685
this operation.
625
 
686
 
-
 
687
=item B<-multiprod>
-
 
688
 
-
 
689
This option builds multiple product configurations from the single IS project.
-
 
690
 
-
 
691
The Releases view in Installshield allows multiple Product Configurations to 
-
 
692
be configured and built. This must be specified if the project contains more 
-
 
693
than 1 Product Configuration, but can also be used with a single configuration.
-
 
694
If there are multiple release for any Product Configuration then -multirel must
-
 
695
be specified as well.
-
 
696
 
-
 
697
This uses the Product Configuration Name, that is the name given to this Product
-
 
698
Configuration that appears in the Releases tree view of Installshield.
-
 
699
   
-
 
700
This name is used to modify the name to the final setup executable and is
-
 
701
appended to the Project Name.  For example each product configuration will
-
 
702
have a setup exe named 
-
 
703
   <ProjectName>-<ProductConfigName>-<Version>.<Suffix>-WIN32
-
 
704
 
-
 
705
Additionally if nameversion is active and a product configuration has a Product Name
-
 
706
then it to will be updated as per -nameversion option.
-
 
707
 
-
 
708
=item B<-multirel>
-
 
709
 
-
 
710
This option builds multiple releases per product configuration from the single 
-
 
711
IS project.
-
 
712
 
-
 
713
The Releases view in Installshield allows multiple releases per product 
-
 
714
configuration to be configured and built. This must be specified if the project 
-
 
715
contains more than 1 release per product configuration, but can also be used 
-
 
716
with a single release per product configuration.
-
 
717
 
-
 
718
This uses the Release Name, that is the name given to this Release for this Product
-
 
719
Configuration and appears under the Product Configuration in the Releases tree view 
-
 
720
of Installshield.
-
 
721
   
-
 
722
This name is used to modify the name to the final setup executable and is appended to 
-
 
723
the Project Name or Product Configuration name if -multiprod is enabled.  For example
-
 
724
If -multiprod is specified as well, each release of each product configuration
-
 
725
will have a setup exe named
-
 
726
   <ProjectName>-<ProductConfigName>-<ReleaseName>-<Version>.<Suffix>-WIN32
-
 
727
If -multiprod is Not specified, each release of the single product configuration
-
 
728
will have a setup exe named
-
 
729
   <ProjectName>-<ReleaseName>-<Version>.<Suffix>-WIN32
-
 
730
 
626
=back
731
=back
627
 
732
 
628
=head1 DESCRIPTION
733
=head1 DESCRIPTION
629
 
734
 
630
This program is used within the ERG deployment process to build up an Install
735
This program is used within the ERG deployment process to build up an Install