use PACKAGEVERSION as the base of MSI ProductVersion

Formerly PRODUCTVERSION was used but that did not contain
the microversion digit. It is better to have it in MSI
ProductVersion, because a higher build number of a lower
microversion looked newer from the MSI point of view, and
update failed.

MSI ProductVersion is now major.minor.micro.build, e.g.
3.6.1.1206 (build number is taken from minor.mk)
This commit is contained in:
Andras Timar
2011-12-10 22:10:35 +01:00
parent 3fbedc3e8f
commit 6a43a6c1fe

View File

@@ -1805,27 +1805,11 @@ sub set_msiproductversion
{
my ( $allvariables ) = @_;
my $productversion = $allvariables->{'PRODUCTVERSION'};
if (( $productversion =~ /^\s*\d+\s*$/ ) && ( $productversion > 255 )) { $productversion = $productversion%256; }
my $productversion = $allvariables->{'PACKAGEVERSION'};
if ( $productversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ )
{
$productversion = $1 . "\." . $2 . $3 . "\." . $installer::globals::buildid;
}
elsif ( $productversion =~ /^\s*(\d+)\.(\d+)\s*$/ )
{
$productversion = $1 . "\." . $2 . "\." . $installer::globals::buildid;
}
else
{
my $productminor = "00";
if (( $allvariables->{'PACKAGEVERSION'} ) && ( $allvariables->{'PACKAGEVERSION'} ne "" ))
{
if ( $allvariables->{'PACKAGEVERSION'} =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ ) { $productminor = $2; }
}
$productversion = $productversion . "\." . $productminor . "\." . $installer::globals::buildid;
$productversion = $1 . "\." . $2 . "\." . $3 . "\." . $installer::globals::buildid;
}
$installer::globals::msiproductversion = $productversion;