MCPcopy Create free account
hub / github.com/ElyPrismLauncher/Launcher / getSupportedJavaArchitecture

Function getSupportedJavaArchitecture

launcher/SysInfo.cpp:97–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97QString getSupportedJavaArchitecture()
98{
99 auto sys = currentSystem();
100 auto arch = useQTForArch();
101 if (sys == "windows") {
102 if (arch == "x86_64")
103 return "windows-x64";
104 if (arch == "i386")
105 return "windows-x86";
106 // Unknown, maybe arm, appending arch
107 return "windows-" + arch;
108 }
109 if (sys == "osx") {
110 if (arch == "arm64")
111 return "mac-os-arm64";
112 if (arch.contains("64"))
113 return "mac-os-x64";
114 if (arch.contains("86"))
115 return "mac-os-x86";
116 // Unknown, maybe something new, appending arch
117 return "mac-os-" + arch;
118 } else if (sys == "linux") {
119 if (arch == "x86_64")
120 return "linux-x64";
121 if (arch == "i386")
122 return "linux-x86";
123 // will work for arm32 arm(64)
124 return "linux-" + arch;
125 }
126 return {};
127}
128} // namespace SysInfo

Callers 2

sortVersionsMethod · 0.85
AutoInstallJavaMethod · 0.85

Calls 3

currentSystemFunction · 0.85
useQTForArchFunction · 0.85
containsMethod · 0.45

Tested by

no test coverage detected