]>
git.saurik.com Git - wxWidgets.git/blob - distrib/msw/tmake/lib/wxVersion.pm
9 use wxVersion qw(GetVersion);
18 use vars
qw(@EXPORT_OK);
20 @EXPORT_OK = qw(GetVersion);
24 my $filename = $ENV{"WXWIN"} . "/include/wx/version.h";
25 open(VERSION_H
, $filename) or die "Can't open $filename: $!\n";
30 while ( defined($_ = <VERSION_H
>) ) {
33 if ( /\s*#define\s+wxMAJOR_VERSION\s+(\d+)/ ) {
34 $versions{'MAJOR'} = $1;
37 elsif ( /\s*#define\s+wxMINOR_VERSION\s+(\d+)/ ) {
38 $versions{'MINOR'} = $1;
41 elsif ( /\s*#define\s+wxRELEASE_NUMBER\s+(\d+)/ ) {
42 $versions{'MICRO'} = $1;
46 last if $numGot == 3 # we've got everything we wanted
49 $numGot == 3 or die "Failed to read the version from $filename.\n";