You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ms...@apache.org on 2021/11/16 18:41:00 UTC
[openoffice] branch trunk updated: Fix for the Windows (MSI) installer.
This is an automated email from the ASF dual-hosted git repository.
mseidel pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git
The following commit(s) were added to refs/heads/trunk by this push:
new c146779 Fix for the Windows (MSI) installer.
c146779 is described below
commit c1467797f39776453dad050af6d4bc996c2269b2
Author: mseidel <ms...@apache.org>
AuthorDate: Tue Nov 16 19:24:00 2021 +0100
Fix for the Windows (MSI) installer.
The problem was that after 4.1.10 the productversion inside the msi was
"higher" than the one from AOO42X.
So for AOO 4.1.11 it is 4.111.9808. For AOO 4.2.0 it was 4.20.9823 (111 > 20).
This patch corrects the version number to 4.200.9823 (111 < 200).
Credits go to Arrigo for this patch!
---
main/solenv/bin/modules/installer/windows/msiglobal.pm | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/main/solenv/bin/modules/installer/windows/msiglobal.pm b/main/solenv/bin/modules/installer/windows/msiglobal.pm
index cc4782e..e2ce927 100644
--- a/main/solenv/bin/modules/installer/windows/msiglobal.pm
+++ b/main/solenv/bin/modules/installer/windows/msiglobal.pm
@@ -1677,27 +1677,35 @@ sub set_msiproductversion
my ( $allvariables ) = @_;
my $productversion = $allvariables->{'PRODUCTVERSION'};
+ my $productmajor;
+ my $productminor; # It must be 3 digits long
if (( $productversion =~ /^\s*\d+\s*$/ ) && ( $productversion > 255 )) { $productversion = $productversion%256; }
if ( $productversion =~ /^\s*(\d+)\.(\d+)\.(\d+)\s*$/ )
{
- $productversion = $1 . "\." . $2 . $3 . "\." . $installer::globals::buildid;
+ my $productmicro = $3;
+ $productmajor = $1;
+ $productminor = $2;
+ $productmicro = "0" . $productmicro while ( length ( $productminor . $productmicro ) < 3 );
+ $productminor .= $productmicro;
}
elsif ( $productversion =~ /^\s*(\d+)\.(\d+)\s*$/ )
{
- $productversion = $1 . "\." . $2 . "\." . $installer::globals::buildid;
+ $productmajor = $1;
+ $productminor = $2;
}
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;
+ $productmajor = $productversion;
}
+ $productminor .= "0" while ( length( $productminor ) < 3);
+ $productversion = $productmajor . "\." . $productminor . "\." . $installer::globals::buildid;
$installer::globals::msiproductversion = $productversion;