mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-10 05:41:51 +09:00
fix for edge case where 64-bit x86 CPU not reporting itself as AMD64
This commit is contained in:
@@ -66,13 +66,13 @@ public class Principii {
|
||||
String CPUARCH = System.getProperty("os.arch").toUpperCase();
|
||||
String runtimeRoot;
|
||||
String runtimeArch;
|
||||
if (!CPUARCH.equals("AMD64") && !CPUARCH.equals("AARCH64")) {
|
||||
if (!CPUARCH.equals("AMD64") && !CPUARCH.equals("X86_64") && !CPUARCH.equals("AARCH64")) { // macOS Rosetta2 reports X86_64
|
||||
System.err.println("Unsupported CPU architecture: " + CPUARCH);
|
||||
System.exit(1);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
runtimeArch = CPUARCH.equals("AMD64") ? "x86" : "arm";
|
||||
runtimeArch = (CPUARCH.equals("AMD64") || CPUARCH.equals("X86_64")) ? "x86" : "arm";
|
||||
}
|
||||
|
||||
if (OS.contains("WIN")) {
|
||||
|
||||
Reference in New Issue
Block a user