RFR: 8150442: Enforce Supported Platforms in Packager for MSI bundles

Christian Stein cstein at openjdk.org
Mon Feb 10 10:16:16 UTC 2025


On Wed, 5 Feb 2025 20:11:36 GMT, Alexey Semenyuk <asemenyuk at openjdk.org> wrote:

> Enable MSI installers to block installation if the version of Windows is too old.
> 
> jpackage will read major and minor OS versions from PE headers of the main launcher and `java.dll` in the app image. The combined version is the minimal Windows version these executables can run. Thus, it will be a lower bound for the Windows version the installer supports. 
> 
> The value of the combined version is passed as `JpExecutableOSVersion` WiX variable to a new `os-condition.wxf` WiX fragment. The fragment compares the value of `JpExecutableOSVersion` WiX variable with the value of `VersionNT` MSI property. If the value of the latter is less the installation is blocked.
> 
> The fragment can be overridden in the resource directory. This makes this feature fully customizable.

Integration with `jtreg` and JUnit looks good.

-------------

Marked as reviewed by cstein (Committer).

PR Review: https://git.openjdk.org/jdk/pull/23472#pullrequestreview-2605292288


More information about the core-libs-dev mailing list