Subversion Repositories DevTools

Rev

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

Rev 229 Rev 235
Line 113... Line 113...
113
#
113
#
114
# Description     : Create a Windows RC file to describe the build version
114
# Description     : Create a Windows RC file to describe the build version
115
#                   This file may be used directly
115
#                   This file may be used directly
116
#
116
#
117
# Inputs          : $FileName           - Output filename (Optional)
117
# Inputs          : $FileName           - Output filename (Optional)
-
 
118
#                   $icon               - Name of icon (optional )
118
#
119
#
119
# Returns         :
120
# Returns         :
120
#
121
#
121
sub BuildVersionWinRC
122
sub BuildVersionWinRC
122
{
123
{
123
    my ( $fname ) = @_;
124
    my ( $fname, $icon ) = @_;
124
    $fname = 'version.rc' unless $fname;
125
    $fname = 'version.rc' unless $fname;
125
 
126
 
126
    if ( $Clobber )                             # clobber mode ?
127
    if ( $Clobber )                             # clobber mode ?
127
    {
128
    {
128
        System( "$::GBE_BIN/rm -f $Srcdir/$fname" );
129
        System( "$::GBE_BIN/rm -f $Srcdir/$fname" );
129
        return;
130
        return;
130
    }
131
    }
131
 
132
 
-
 
133
    Message ("Creating Windows Resource File: $fname" );    
132
    #
134
    #
133
    #   Determine the build version
135
    #   Determine the build version
134
    #
136
    #
135
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
137
    my ($major, $minor, $patch, $build, $raw_patch) = SplitVersion($BUILDNAME_VERSION);
136
    my $product_version = "$major, $minor, $patch, $build";
138
    my $product_version = "$major, $minor, $patch, $build";
Line 217... Line 219...
217
    $fh->Write(prc     ('            VALUE "Translation", 0xc09, 1200'));
219
    $fh->Write(prc     ('            VALUE "Translation", 0xc09, 1200'));
218
    $fh->Write(prc     ('        END'));
220
    $fh->Write(prc     ('        END'));
219
    $fh->Write(prc     ('END'));
221
    $fh->Write(prc     ('END'));
220
    $fh->Write(prc     (''));
222
    $fh->Write(prc     (''));
221
 
223
 
222
    $fh->Close();
224
    if ( $icon )
-
 
225
    {
-
 
226
    $fh->Write(prc     (''));
-
 
227
    $fh->Write(prc     ('/////////////////////////////////////////////////////////////////////////////'));
-
 
228
    $fh->Write(prc     ('//'));
-
 
229
    $fh->Write(prc     ('// Icon'));
-
 
230
    $fh->Write(prc     ('//'));
-
 
231
    $fh->Write(prc     ('// Icon with lowest ID value placed first to ensure application icon'));
-
 
232
    $fh->Write(prc     ('// remains consistent on all systems.'));
-
 
233
    $fh->Write(prc     ("101       ICON    DISCARDABLE     \"$icon\""));
-
 
234
    $fh->Write(prc     (''));
-
 
235
    }
-
 
236
    
223
 
237
 
-
 
238
    $fh->Close();
224
}
239
}
225
 
240
 
226
#-------------------------------------------------------------------------------
241
#-------------------------------------------------------------------------------
227
# Function        : BuildVersionC
242
# Function        : BuildVersionC
228
#
243
#