refactor: support armhf

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
Sefa Eyeoglu 2022-10-15 12:41:16 +02:00
parent 19ee736e1d
commit 545944cb0d
No known key found for this signature in database
GPG Key ID: C10411294912A422

View File

@ -29,9 +29,14 @@ struct RuntimeContext {
QString system;
QString mappedJavaRealArchitecture() const {
if (javaRealArchitecture == "aarch64") {
if (javaRealArchitecture == "amd64")
return "x86_64";
if (javaRealArchitecture == "i386" || javaRealArchitecture == "i686")
return "x86";
if (javaRealArchitecture == "aarch64")
return "arm64";
}
if (javaRealArchitecture == "arm" || javaRealArchitecture == "armhf")
return "arm32";
return javaRealArchitecture;
}
@ -48,8 +53,8 @@ struct RuntimeContext {
// "Legacy" refers to the fact that Mojang assumed that these are the only two architectures
bool isLegacyArch() const {
QSet<QString> legacyArchitectures{"amd64", "x86_64", "i386", "i686", "x86"};
return legacyArchitectures.contains(mappedJavaRealArchitecture());
const QString mapped = mappedJavaRealArchitecture();
return mapped == "x86_64" || mapped == "x86";
}
bool classifierMatches(QString target) const {