diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-04 16:43:15 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-03-04 16:43:15 +0700 |
commit | 087d965cf6c0e4183fdc76a9650025d5edc70ac9 (patch) | |
tree | 36544c76e29f7416b87b48e6b2c1d963c7715322 | |
parent | 2e1ec2bce6912783a4fdef2afa54045e81c17374 (diff) | |
download | aspectj-087d965cf6c0e4183fdc76a9650025d5edc70ac9.tar.gz aspectj-087d965cf6c0e4183fdc76a9650025d5edc70ac9.zip |
Support Windows 10 and Windows Server 2016/2019 in installer
Those versions were not detected until now, which lead to bogus Windows
batch files forwarding only 9 Ajc parameters to the Java process via
"%1 %2 %3 %4 %5 %6 %7 %8 %9" instead of "%*".
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r-- | build/src/main/java/$installer$/org/aspectj/Main.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/build/src/main/java/$installer$/org/aspectj/Main.java b/build/src/main/java/$installer$/org/aspectj/Main.java index 2ffc8b889..f75f28a6e 100644 --- a/build/src/main/java/$installer$/org/aspectj/Main.java +++ b/build/src/main/java/$installer$/org/aspectj/Main.java @@ -690,8 +690,10 @@ class InstallContext { } public boolean onWindowsPro() { - return getOS().equals("Windows NT") || getOS().equals("Windows 2000") || getOS().equals("Windows XP") - || getOS().equals("Windows Vista") || getOS().equals("Windows 7") || getOS().startsWith("Windows 8"); + // 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).*"); } public boolean onMacintosh() { |