[7dcadb]: Misc / make-latest-xml.pl  Maximize  Restore  History

Download this file

34 lines (29 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/perl -w
# This script prints an XML fragment that can be parsed by
# the application to determine if there's a newer release available.
# The script parses version.h to get the information it needs.
# For the XML format description, see AboutDlg.cpp
open(FILE, "version.h") || die "Couldn't find version.h\n";
my @verline;
my ($Major, $Minor, $Build, $Revision);
while (<FILE>) {
if (/#define\sPRODUCTVER/) {
s/,/ /g;
@verline = split;
shift @verline; shift @verline;
($Major, $Minor, $Build, $Revision) = @verline;
last;
}
};
close FILE;
print "<VersionInfo>\n";
print " <Product name=PasswordSafe variant=PC";
print " major=$Major minor=$Minor build=$Build rev=$Revision />\n";
print " <Product name=PasswordSafe variant=PPc";
print " major=1 minor=9 build=2 rev=100 />\n";
print " <Product name=PasswordSafe variant=U3";
print " major=$Major minor=$Minor build=$Build rev=$Revision />\n";
print " <Product name=SWTPasswordSafe variant=Java";
print " major=0 minor=6 build=0 rev=1230 />\n";
print "</VersionInfo>\n";
exit 0;