Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

#-------------------------------------------------------------------------------
#   Documentation
#

=pod

=for htmltoc    FAQ::Windows::Add version info to DLL or EXE

=head1 NAME

How to add version information into a Windows DLL or EXE

=head1 SYNOPSIS

The following fragment uses a JATS provided tool to create a simple Resource
file that contains version information. This information will appear in the
"Properties" page for the DLL in Windows Explorer.

    # In the build.pl file
    #
    BuildVersion ( '--Style=WinRC', '--File=MyRes.rc',
                                    '--Comment=This is a comment',
                                    '--Description=This is a description',
                                    );
In one or more makefile.pl

    #   Build a library and a program
    #
    SharedLib       ( '*', 'MyLib', @OBJS );
    SharedLibArgs   ( '*', 'MyLib', '--Resource=MyRes.rc' );

    Prog            ( '*', 'MyProg', @OBJS );
    Prog            ( '*', 'MyProg', '--Resource=MyRes.rc' );


Points of interest:

=over 4

=item *

The user provided comment and description.

=item * 

The use of ''SharedLibArgs'' to add arguments to the shared library.

=back

=head2 Other options

If the application already has a .RC file to provide resources, then a slightly
different mechanism must be used.

A C<--definitions> option may be used to create a version.rc file that contains
only definitions. This can be 'included' in an RC file that provides resources
to the application.

An Icon can be added to the resource file, with a C<--Icon=path> directive. The
path must be resolved when the resource file is consumed.