From 5b96d4db2374c853aba6d4fc0441be7b643a274e Mon Sep 17 00:00:00 2001 From: amousavigourabi <28668597+amousavigourabi@users.noreply.github.com> Date: Tue, 15 Aug 2023 00:39:00 +0200 Subject: [PATCH 1/2] Switch to amd64 To improve clarity and be consistent with the naming in amousavigourabi/thrift-binary --- README.md | 2 +- .../java/me/atour/thriftjar/ThriftExtractor.java | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2086c2a..f800f30 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Multi-platform Thrift compiler. Executable JAR that packages precompiled Thrift compiler binaries for Windows and Linux systems, providing portability across these platforms. Supports all Thrift versions starting at 0.6.0 for Windows -and Linux systems running on 64-bit x86, aarch64, s390x, ppc64le, and armv7 machines. As Thrift only +and Linux systems running on aarch64, amd64, armv7, ppc64le, and s390x machines. As Thrift only publishes binaries for Windows, it is impossible to avoid using the embedded binaries and instead download them on the fly. diff --git a/src/main/java/me/atour/thriftjar/ThriftExtractor.java b/src/main/java/me/atour/thriftjar/ThriftExtractor.java index ef40bd8..1518913 100644 --- a/src/main/java/me/atour/thriftjar/ThriftExtractor.java +++ b/src/main/java/me/atour/thriftjar/ThriftExtractor.java @@ -28,7 +28,7 @@ enum OperatingSystems { LINUX_ARMV7, LINUX_PPC64LE, LINUX_S390X, - LINUX_X86_64, + LINUX_AMD64, WINDOWS, UNKNOWN } @@ -109,8 +109,8 @@ public ThriftExtractor(String thriftVersion) throws IOException { return "thrift-linux_ppc64le.exe"; case LINUX_S390X: return "thrift-linux_s390x.exe"; - case LINUX_X86_64: - return "thrift-linux_x86_64.exe"; + case LINUX_AMD64: + return "thrift-linux_amd64.exe"; case UNKNOWN: default: throw new CannotLocateAppropriateExecutableException(); @@ -125,8 +125,8 @@ public ThriftExtractor(String thriftVersion) throws IOException { private ThriftExtractor.OperatingSystems getOs() { OperatingSystems os; if (SystemUtils.IS_OS_LINUX) { - if (isX86_64()) { - os = OperatingSystems.LINUX_X86_64; + if (isAmd64()) { + os = OperatingSystems.LINUX_AMD64; } else if (isS390x()) { os = OperatingSystems.LINUX_S390X; } else if (isArmV7()) { @@ -147,11 +147,11 @@ private ThriftExtractor.OperatingSystems getOs() { } /** - * Checks whether this machine is x86_64. + * Checks whether this machine is amd64. * - * @return a {@code boolean} indicating whether this machine is x86_64 + * @return a {@code boolean} indicating whether this machine is amd64 */ - private boolean isX86_64() { + private boolean isAmd64() { String arch = System.getProperty("os.arch").toLowerCase(); return arch.contains("x8664") || arch.contains("x64") || arch.contains("amd64"); } From 68b0bb34d6ed6dcb4009572e5d74ff6049680098 Mon Sep 17 00:00:00 2001 From: amousavigourabi <28668597+amousavigourabi@users.noreply.github.com> Date: Tue, 15 Aug 2023 14:08:56 +0200 Subject: [PATCH 2/2] Reupload binaries Reupload the binaries from amousavigourabi/thrift-binary@v0.0.0 --- ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin ...rift-linux_x86_64.exe => thrift-linux_amd64.exe} | Bin 20 files changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/bin/0.10.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.11.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.12.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.13.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.14.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.14.1/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.14.2/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.15.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.16.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.17.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.18.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.18.1/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.6.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.6.1/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.7.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.8.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.9.0/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.9.1/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.9.2/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) rename src/main/resources/bin/0.9.3/{thrift-linux_x86_64.exe => thrift-linux_amd64.exe} (100%) diff --git a/src/main/resources/bin/0.10.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.10.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.10.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.10.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.11.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.11.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.11.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.11.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.12.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.12.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.12.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.12.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.13.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.13.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.13.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.13.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.14.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.14.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.14.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.14.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.14.1/thrift-linux_x86_64.exe b/src/main/resources/bin/0.14.1/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.14.1/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.14.1/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.14.2/thrift-linux_x86_64.exe b/src/main/resources/bin/0.14.2/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.14.2/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.14.2/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.15.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.15.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.15.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.15.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.16.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.16.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.16.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.16.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.17.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.17.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.17.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.17.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.18.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.18.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.18.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.18.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.18.1/thrift-linux_x86_64.exe b/src/main/resources/bin/0.18.1/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.18.1/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.18.1/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.6.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.6.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.6.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.6.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.6.1/thrift-linux_x86_64.exe b/src/main/resources/bin/0.6.1/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.6.1/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.6.1/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.7.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.7.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.7.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.7.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.8.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.8.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.8.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.8.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.9.0/thrift-linux_x86_64.exe b/src/main/resources/bin/0.9.0/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.9.0/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.9.0/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.9.1/thrift-linux_x86_64.exe b/src/main/resources/bin/0.9.1/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.9.1/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.9.1/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.9.2/thrift-linux_x86_64.exe b/src/main/resources/bin/0.9.2/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.9.2/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.9.2/thrift-linux_amd64.exe diff --git a/src/main/resources/bin/0.9.3/thrift-linux_x86_64.exe b/src/main/resources/bin/0.9.3/thrift-linux_amd64.exe similarity index 100% rename from src/main/resources/bin/0.9.3/thrift-linux_x86_64.exe rename to src/main/resources/bin/0.9.3/thrift-linux_amd64.exe