| 361 |
dpurdie |
1 |
#-------------------------------------------------------------------------------
|
|
|
2 |
# Documentation
|
|
|
3 |
#
|
|
|
4 |
|
|
|
5 |
=pod
|
|
|
6 |
|
|
|
7 |
=for htmltoc FAQ::Windows::Add version info to DLL or EXE
|
|
|
8 |
|
|
|
9 |
=head1 NAME
|
|
|
10 |
|
|
|
11 |
How to add version information into a Windows DLL or EXE
|
|
|
12 |
|
|
|
13 |
=head1 SYNOPSIS
|
|
|
14 |
|
|
|
15 |
The following fragment uses a JATS provided tool to create a simple Resource
|
|
|
16 |
file that contains version information. This information will appear in the
|
|
|
17 |
"Properties" page for the DLL in Windows Explorer.
|
|
|
18 |
|
|
|
19 |
# In the build.pl file
|
|
|
20 |
#
|
|
|
21 |
BuildVersion ( '--Style=WinRC', '--File=MyRes.rc',
|
|
|
22 |
'--Comment=This is a comment',
|
|
|
23 |
'--Description=This is a description',
|
|
|
24 |
);
|
|
|
25 |
In one or more makefile.pl
|
|
|
26 |
|
|
|
27 |
# Build a library and a program
|
|
|
28 |
#
|
|
|
29 |
SharedLib ( '*', 'MyLib', @OBJS );
|
|
|
30 |
SharedLibArgs ( '*', 'MyLib', '--Resource=MyRes.rc' );
|
|
|
31 |
|
|
|
32 |
Prog ( '*', 'MyProg', @OBJS );
|
|
|
33 |
Prog ( '*', 'MyProg', '--Resource=MyRes.rc' );
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
Points of interest:
|
|
|
37 |
|
|
|
38 |
=over 4
|
|
|
39 |
|
|
|
40 |
=item *
|
|
|
41 |
|
|
|
42 |
The user provided comment and description.
|
|
|
43 |
|
|
|
44 |
=item *
|
|
|
45 |
|
|
|
46 |
The use of ''SharedLibArgs'' to add arguments to the shared library.
|
|
|
47 |
|
|
|
48 |
=back
|
|
|
49 |
|
|
|
50 |
=head2 Other options
|
|
|
51 |
|
|
|
52 |
If the application already has a .RC file to provide resources, then a slightly
|
|
|
53 |
different mechanism must be used.
|
|
|
54 |
|
|
|
55 |
A C<--definitions> option may be used to create a version.rc file that contains
|
|
|
56 |
only definitions. This can be 'included' in an RC file that provides resources
|
|
|
57 |
to the application.
|
|
|
58 |
|
|
|
59 |
An Icon can be added to the resource file, with a C<--Icon=path> directive. The
|
|
|
60 |
path must be resolved when the resource file is consumed.
|
|
|
61 |
|