Browse Source

Update InstallContext.onWindowsPro for Windows 11+

The matcher is more future-proof now, as long as Windows names stay
"Windows Server.*" and "Windows [1-8][0-9]?".

This is not beautiful, but a quick drive-by improvement.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_21_1
Alexander Kriegisch 3 months ago
parent
commit
ae9532af0f
1 changed files with 4 additions and 3 deletions
  1. 4
    3
      build/src/main/java/$installer$/org/aspectj/Main.java

+ 4
- 3
build/src/main/java/$installer$/org/aspectj/Main.java View File

@@ -573,10 +573,11 @@ class InstallContext {
}

public boolean onWindowsPro() {
// Except for some older versions/names, also match Windows 7, 8, 10, 11 up to 89,
// but not 9x, i.e. e.g. not Windows 95 or 98
// TODO: Think about a more future-proof solution also checking 'os.version' system property. See also this table:
// https://github.com/openjdk/jdk/blob/9604ee82690f89320614b37bfef4178abc869777/src/java.base/windows/native/libjava/java_props_md.c#L446
// Alternatively, explicitly exclude unsupported versions because those won't change in the future.
return getOS().matches("^Windows (NT|2000|XP|Vista|Server|7|8|10).*");
// https://github.com/openjdk/jdk/blob/7a300b63b5ca22dfe3e831e641f7a11b9c719b30/src/java.base/windows/native/libjava/java_props_md.c#L415
return getOS().matches("^Windows (NT|2000|XP|Vista|Server|[1-8][0-9]?).*");
}

public boolean onMacintosh() {

Loading…
Cancel
Save