Subversion Repositories DevTools

Rev

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

Rev 235 Rev 247
Line 65... Line 65...
65
sub BuildVersionCSharp
65
sub BuildVersionCSharp
66
{
66
{
67
    my ( $fname ) = @_;
67
    my ( $fname ) = @_;
68
    $fname = 'AssemblyVersionInfo.cs' unless $fname;
68
    $fname = 'AssemblyVersionInfo.cs' unless $fname;
69
 
69
 
70
    if ( $Clobber )                             # clobber mode ?
-
 
71
    {
70
    #
72
        System( "$::GBE_BIN/rm -f $Srcdir/$fname" );
71
    #   Store the files location for use at runtime
73
        return;
72
    #   It will be a file that is 'known' to JATS
74
    }
73
    #
-
 
74
    $fname = ::BuildAddKnownFile ( $Srcdir, $fname );
-
 
75
    return if ( $Clobber );      # clobber mode ?
75
 
76
 
76
    #
77
    #
77
    #   Determine the build version
78
    #   Determine the build version
78
    #
79
    #
79
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
80
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
80
    my $vstring = "$major.$minor.$patch.$build";
81
    my $vstring = "$major.$minor.$patch.$build";
81
 
82
 
82
 
83
 
83
    my $fh = ConfigurationFile::New( "$Srcdir/$fname", '--Type=CSharp' );
84
    my $fh = ConfigurationFile::New( $fname, '--Type=CSharp' );
84
    $fh->HeaderSimple( "buildlib (Version $BuildVersion)",
85
    $fh->HeaderSimple( "buildlib (Version $BuildVersion)",
85
                       "CSharp Assembly Version Definition" );
86
                       "CSharp Assembly Version Definition" );
86
 
87
 
87
    $fh->Write( "\n" );
88
    $fh->Write( "\n" );
88
    $fh->Write( "using System.Reflection;\n" );
89
    $fh->Write( "using System.Reflection;\n" );
Line 122... Line 123...
122
sub BuildVersionWinRC
123
sub BuildVersionWinRC
123
{
124
{
124
    my ( $fname, $icon ) = @_;
125
    my ( $fname, $icon ) = @_;
125
    $fname = 'version.rc' unless $fname;
126
    $fname = 'version.rc' unless $fname;
126
 
127
 
-
 
128
    #
127
    if ( $Clobber )                             # clobber mode ?
129
    #   Store the files location for use at runtime
-
 
130
    #   It will be a file that is 'known' to JATS
128
    {
131
    #
129
        System( "$::GBE_BIN/rm -f $Srcdir/$fname" );
132
    $fname = ::BuildAddKnownFile ( $Srcdir, $fname );
130
        return;
133
    return if ( $Clobber );      # clobber mode ?
131
    }
134
    
132
 
-
 
133
    Message ("Creating Windows Resource File: $fname" );    
135
    Message ("Creating Windows Resource File: $fname" );
134
    #
136
    #
135
    #   Determine the build version
137
    #   Determine the build version
136
    #
138
    #
137
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
139
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
138
    my $product_version = "$major, $minor, $patch, $build";
140
    my $product_version = "$major, $minor, $patch, $build";
139
    
141
    
140
 
142
 
141
    #
143
    #
142
    #   Create the file
144
    #   Create the file
143
    #
145
    #
144
    my $fh = ConfigurationFile::New( "$Srcdir/$fname", '--Type=C++' );
146
    my $fh = ConfigurationFile::New( $fname, '--Type=C++' );
145
    $fh->HeaderSimple( "buildlib (Version $BuildVersion)",
147
    $fh->HeaderSimple( "buildlib (Version $BuildVersion)",
146
                       "Windows Resource Version Definition" );
148
                       "Windows Resource Version Definition" );
147
 
149
 
148
    sub prc
150
    sub prc
149
    {
151
    {
Line 466... Line 468...
466
 
468
 
467
    #
469
    #
468
    #   Default name of the file
470
    #   Default name of the file
469
    #
471
    #
470
    $fname = 'version.properties' unless $fname;
472
    $fname = 'version.properties' unless $fname;
471
    if ( $Clobber )                             # clobber mode ?
-
 
-
 
473
 
472
    {
474
    #
473
        System( "$::GBE_BIN/rm -f $Srcdir/$fname" );
475
    #   Store the files location for use at runtime
474
        return;
476
    #   It will be a file that is 'known' to JATS
475
    }
477
    #
-
 
478
    $fname = ::BuildAddKnownFile ( $Srcdir, $fname );
-
 
479
    return if ( $Clobber );      # clobber mode ?
476
 
480
 
477
    #
481
    #
478
    #   Generate version properties file
482
    #   Generate version properties file
479
    #
483
    #
480
    #   This file contains ONLY definitions. It may be included by the ANT
484
    #   This file contains ONLY definitions. It may be included by the ANT
Line 495... Line 499...
495
    #
499
    #
496
    #   Create properties in the same form as for "C" definitions
500
    #   Create properties in the same form as for "C" definitions
497
    #   Note:
501
    #   Note:
498
    #       The 'ALL' is in a format used by other software. Do not change
502
    #       The 'ALL' is in a format used by other software. Do not change
499
    #
503
    #
500
    open( VERSIOND, ">$Srcdir/$fname" ) ||
504
    open( VERSIOND, ">$fname" ) ||
501
        Error( "cannot create $Srcdir/$fname" );
505
        Error( "cannot create $fname" );
502
 
506
 
503
    print VERSIOND
507
    print VERSIOND
504
        "# Please do not edit this file.\n" .
508
        "# Please do not edit this file.\n" .
505
        "# It was auto-generated by Buildlib ($BuildVersion) on $::CurrentTime\n" .
509
        "# It was auto-generated by Buildlib ($BuildVersion) on $::CurrentTime\n" .
506
        "#\n" .
510
        "#\n" .