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.

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

Commit messages:
 - Bugfix and corresponding unit test
 - Copyright year updated
 - Clean trailing whitespaces
 - Make it work when both the main launcher and java.dll are missing
 - Update doc and add "os-condition.wxf" to the resources
 - Remove debug output
 - Remove accidentally added file
 - Merge branch 'master' into JDK-8150442
 - Merge branch 'master' into JDK-8150442
 - Add ExecutableOSVersionTest test
 - ... and 2 more: https://git.openjdk.org/jdk/compare/64bd8d25...c208cfc5

Changes: https://git.openjdk.org/jdk/pull/23472/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23472&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8150442
  Stats: 407 lines in 14 files changed: 396 ins; 2 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/23472.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23472/head:pull/23472

PR: https://git.openjdk.org/jdk/pull/23472

Reply via email to