|
From: <jgr...@us...> - 2003-11-05 15:08:34
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv28087/engine/POPFile
Modified Files:
Loader.pm
Log Message:
Create a single place where the POPFile version number is stored.
POPFile now reads its version number from a file called popfile_version
which is stored in the POPFile subdirectory. This file is created
by the build process from information in vars.mak.
engine/vars.mak:
Add variables to hold the major, minor and revision numbers of the
POPFile version and a variable that holds the name of the file that
will contains the POPFile version information.
engine/popfile.pl
engine/popfile-tray.pl:
Remove explicit set of the POPFile version number, this is now handled
by POPFile::Loader::CORE_loader_init.
engine/POPFile/Loader.pm:
CORE_loader_init looks for the file popfile_version in the same directory
and if found reads and sets the version number from it.
windows/installer.nsi:
Installer script reads the variables set in vars.mak to set the version
number being built.
Index: Loader.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Loader.pm 22 Sep 2003 13:27:22 -0000 1.11
--- Loader.pm 5 Nov 2003 15:08:23 -0000 1.12
***************
*** 78,84 ****
# string
! $self->{major_version__} = '';
! $self->{minor_version__} = '';
! $self->{build_version__} = '';
$self->{version_string__} = '';
--- 78,84 ----
# string
! $self->{major_version__} = '?';
! $self->{minor_version__} = '?';
! $self->{build_version__} = '?';
$self->{version_string__} = '';
***************
*** 109,112 ****
--- 109,126 ----
$self->{reaper__} = sub { $self->CORE_reaper(@_) };
+ # See if there's a file named popfile_version that contains the
+ # POPFile version number
+
+ my $version_file = 'POPFile/popfile_version';
+
+ if ( -e $version_file ) {
+ open VER, "<$version_file";
+ my $major = int(<VER>);
+ my $minor = int(<VER>);
+ my $rev = int(<VER>);
+ close VER;
+ $self->CORE_version( $major, $minor, $rev );
+ }
+
print "\nPOPFile Engine loading\n" if $self->{debug__};
}
***************
*** 667,671 ****
sub CORE_version
{
! my ($self,$major_version, $minor_version, $build_version) = @_;
if (!defined($major_version)) {
--- 681,685 ----
sub CORE_version
{
! my ( $self, $major_version, $minor_version, $build_version ) = @_;
if (!defined($major_version)) {
|