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

Alexander Matveev almatvee at openjdk.org
Thu Feb 6 22:29:14 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.

Looks good. Do you know what versions in PE headers of the main launcher and java.dll we have in JDK 25? Do you know how versions in PE header are being set, is it being updated between JDK releases?

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

PR Comment: https://git.openjdk.org/jdk/pull/23472#issuecomment-2641261618


More information about the core-libs-dev mailing list