msiglobal.pm (86e1cf34) | msiglobal.pm (c1467797) |
---|---|
1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 1663 unchanged lines hidden (view full) --- 1672# upgrade table. Saving in global variable $msiproductversion 1673############################################################### 1674 1675sub set_msiproductversion 1676{ 1677 my ( $allvariables ) = @_; 1678 1679 my $productversion = $allvariables->{'PRODUCTVERSION'}; | 1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance --- 1663 unchanged lines hidden (view full) --- 1672# upgrade table. Saving in global variable $msiproductversion 1673############################################################### 1674 1675sub set_msiproductversion 1676{ 1677 my ( $allvariables ) = @_; 1678 1679 my $productversion = $allvariables->{'PRODUCTVERSION'}; |
1680 my $productmajor; 1681 my $productminor; # It must be 3 digits long |
|
1680 1681 if (( $productversion =~ /^\s*\d+\s*$/ ) && ( $productversion > 255 )) { $productversion = $productversion%256; } 1682 1683 if ( $productversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ ) 1684 { | 1682 1683 if (( $productversion =~ /^\s*\d+\s*$/ ) && ( $productversion > 255 )) { $productversion = $productversion%256; } 1684 1685 if ( $productversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ ) 1686 { |
1685 $productversion = $1 . "\." . $2 . $3 . "\." . $installer::globals::buildid; | 1687 my $productmicro = $3; 1688 $productmajor = $1; 1689 $productminor = $2; 1690 $productmicro = "0" . $productmicro while ( length ( $productminor . $productmicro ) < 3 ); 1691 $productminor .= $productmicro; |
1686 } 1687 elsif ( $productversion =~ /^\s*(\d+)\.(\d+)\s*$/ ) 1688 { | 1692 } 1693 elsif ( $productversion =~ /^\s*(\d+)\.(\d+)\s*$/ ) 1694 { |
1689 $productversion = $1 . "\." . $2 . "\." . $installer::globals::buildid; | 1695 $productmajor = $1; 1696 $productminor = $2; |
1690 } 1691 else 1692 { | 1697 } 1698 else 1699 { |
1693 my $productminor = "00"; | |
1694 if (( $allvariables->{'PACKAGEVERSION'} ) && ( $allvariables->{'PACKAGEVERSION'} ne "" )) 1695 { 1696 if ( $allvariables->{'PACKAGEVERSION'} =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ ) { $productminor = $2; } 1697 } 1698 | 1700 if (( $allvariables->{'PACKAGEVERSION'} ) && ( $allvariables->{'PACKAGEVERSION'} ne "" )) 1701 { 1702 if ( $allvariables->{'PACKAGEVERSION'} =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ ) { $productminor = $2; } 1703 } 1704 |
1699 $productversion = $productversion . "\." . $productminor . "\." . $installer::globals::buildid; | 1705 $productmajor = $productversion; |
1700 } | 1706 } |
1707 $productminor .= "0" while ( length( $productminor ) < 3); 1708 $productversion = $productmajor . "\." . $productminor . "\." . $installer::globals::buildid; |
|
1701 1702 $installer::globals::msiproductversion = $productversion; 1703 1704 # Setting $installer::globals::msimajorproductversion, to differ between old version in upgrade table 1705 1706 if ( $installer::globals::msiproductversion =~ /^\s*(\d+)\./ ) 1707 { 1708 my $major = $1; --- 120 unchanged lines hidden --- | 1709 1710 $installer::globals::msiproductversion = $productversion; 1711 1712 # Setting $installer::globals::msimajorproductversion, to differ between old version in upgrade table 1713 1714 if ( $installer::globals::msiproductversion =~ /^\s*(\d+)\./ ) 1715 { 1716 my $major = $1; --- 120 unchanged lines hidden --- |