This is an automated email from the ASF dual-hosted git repository.

jimjag pushed a commit to branch AOO50X
in repository https://gitbox.apache.org/repos/asf/openoffice.git

commit 3c7c41f5d15f3fd65cdd1ad9a8c5d03d8559427b
Author: Peter <[email protected]>
AuthorDate: Sat Nov 14 22:58:30 2026 +0100

    Windows installer fixes from the Win7 floor change
    
    - Require .NET 4 for the CLI assemblies; without it they are skipped
      instead of failing with error 1304
    - Another build of the same version replaces the installed one
    - Refuse a build id above 65535, which Windows Installer rejects
    - lngconvex: fall back to en-US for untranslated strings
    
    Only these hunks are taken; the floor itself stays on trunk.
    (cherry picked from commit c34c9f813125780dafc52d725b4057487d838338)
---
 main/shell/source/tools/lngconvex/lngconvex.cxx      | 18 ++++++++++++++++++
 main/solenv/bin/modules/installer/globals.pm         |  5 ++++-
 main/solenv/bin/modules/installer/windows/file.pm    |  9 +++++++++
 main/solenv/bin/modules/installer/windows/upgrade.pm | 14 ++++++++++----
 4 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/main/shell/source/tools/lngconvex/lngconvex.cxx 
b/main/shell/source/tools/lngconvex/lngconvex.cxx
index ad3681c939..bb91ba7936 100644
--- a/main/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/main/shell/source/tools/lngconvex/lngconvex.cxx
@@ -273,7 +273,25 @@ public:
                OSL_ASSERT(prt);
                replacement_table_t::iterator iter = prt->find(Text);
                if (iter != prt->end())
+               {
                        Text = iter->second;
+                       return;
+               }
+
+               // Not translated into this language (typically a string newer 
than the
+               // last translation round): fall back to en-US.  Without this 
the raw
+               // placeholder, e.g. "%RUNTIME_FAILED%", ends up in the 
resource and is
+               // what a non-English user sees.  Looked up with find(), not
+               // get_replacement_table(), which would create a table and with 
it an
+               // extra language section in the output.
+               iso_lang_replacement_table_t::iterator en =
+                       iso_lang_replacement_table_.find("en-US");
+               if (en != iso_lang_replacement_table_.end())
+               {
+                       iter = en->second->find(Text);
+                       if (iter != en->second->end())
+                               Text = iter->second;
+               }
        }
 
        void add_substitution(
diff --git a/main/solenv/bin/modules/installer/globals.pm 
b/main/solenv/bin/modules/installer/globals.pm
index 4c0af69214..ce18068708 100644
--- a/main/solenv/bin/modules/installer/globals.pm
+++ b/main/solenv/bin/modules/installer/globals.pm
@@ -113,7 +113,10 @@ BEGIN
        $destdir = "";
        $rootpath = "";
 
-       $required_dotnet_version = "2.0.0.0";
+       # The CLI-UNO assemblies are built for the .NET 4 runtime (CLR 
4.0.30319).
+       # Below that, DotNetCheck sets DOTNET_SUFFICIENT=0 and the assembly
+       # components are skipped instead of failing the GAC install (error 
1304).
+       $required_dotnet_version = "4.0.0.0";
        $productextension = "";
        $languageproduct = undef;
        $build = "";
diff --git a/main/solenv/bin/modules/installer/windows/file.pm 
b/main/solenv/bin/modules/installer/windows/file.pm
index 18f87405e4..f2b083f46d 100644
--- a/main/solenv/bin/modules/installer/windows/file.pm
+++ b/main/solenv/bin/modules/installer/windows/file.pm
@@ -525,6 +525,15 @@ sub get_fileversion
         {
             $vendornumber = $allvariables->{'VENDORPATCHVERSION'};
         }
+               # Windows Installer stores each field of a file version in 16 
bits, so a
+               # build id above 65535 produces a package that every Windows 
machine
+               # rejects at InstallValidate with "Internal Error 2725 -- 
Invalid
+               # database tables".  The failure gives no hint of its cause, so 
refuse to
+               # build such a package rather than shipping one that cannot be 
installed.
+               if (( $installer::globals::buildid =~ /^\d+$/ ) && ( 
$installer::globals::buildid > 65535 ))
+               {
+                       installer::exiter::exit_program("ERROR: build id 
$installer::globals::buildid exceeds 65535, the largest value Windows Installer 
accepts in a version field. Lower BUILD in solenv/inc/minor.mk.", 
"get_fileversion");
+               }
                $fileversion = $libraryversion . "\." . 
$installer::globals::buildid . "\." . $vendornumber;
                if ( $onefile->{'FileVersion'} )
         {
diff --git a/main/solenv/bin/modules/installer/windows/upgrade.pm 
b/main/solenv/bin/modules/installer/windows/upgrade.pm
index 6e0ee516c2..887dc71e82 100644
--- a/main/solenv/bin/modules/installer/windows/upgrade.pm
+++ b/main/solenv/bin/modules/installer/windows/upgrade.pm
@@ -57,7 +57,16 @@ sub create_upgrade_table
        push(@upgradetable, $newline);
 
        # Setting all products, that must be removed.
-       $newline = $installer::globals::upgradecode . "\t" . 
$installer::globals::msimajorproductversion . "\t" . 
$installer::globals::msiproductversion . "\t" . "\t" . "257" . "\t" . "\t" . 
"OLDPRODUCTSSAMEMAJOR" . "\n";
+       # 257 = MigrateFeatures | VersionMinInclusive.  Outside patches the 
current
+       # version is included as well (+512 VersionMaxInclusive): every build 
gets a
+       # new product code, so another build of the SAME version is a different
+       # product, and it is replaced like an older one.  FindRelatedProducts 
never
+       # lists the package's own product code, so re-running the identical 
package
+       # still gets the normal maintenance dialog (modify / repair / remove).
+       # This used to be a SAMEPRODUCTS row whose SameProductFound action 
aborted
+       # with "The same version of ... is already installed".
+       my $samemajorattributes = $installer::globals::patch ? "257" : "769";
+       $newline = $installer::globals::upgradecode . "\t" . 
$installer::globals::msimajorproductversion . "\t" . 
$installer::globals::msiproductversion . "\t" . "\t" . $samemajorattributes . 
"\t" . "\t" . "OLDPRODUCTSSAMEMAJOR" . "\n";
        push(@upgradetable, $newline);
 
        if ( ! $installer::globals::patch )
@@ -66,9 +75,6 @@ sub create_upgrade_table
                $newline = $installer::globals::upgradecode . "\t" . 
$installer::globals::msiproductversion . "\t" . $ooomaxnew . "\t" . "\t" . "2" 
. "\t" . "\t" . "NEWPRODUCTS" . "\n";
                push(@upgradetable, $newline);
 
-               $newline = $installer::globals::upgradecode . "\t" . 
$installer::globals::msiproductversion . "\t" . $ooomaxnew . "\t" . "\t" . 
"258" . "\t" . "\t" . "SAMEPRODUCTS" . "\n";
-               push(@upgradetable, $newline);
-
                if ( $include_ooo_fix )
                {
                        $newline = $installer::globals::upgradecode . "\t" . 
"35.0.0" . "\t" . "36.0.0" . "\t" . "\t" . "1" . "\t" . "\t" . "OLDPRODUCTS2" . 
"\n";

Reply via email to