MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / getSupportedJavaArchitecture

Function getSupportedJavaArchitecture

launcher/SysInfo.cpp:68–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68QString getSupportedJavaArchitecture()
69{
70 auto sys = currentSystem();
71 auto arch = useQTForArch();
72 if (sys == "windows") {
73 if (arch == "x86_64")
74 return "windows-x64";
75 if (arch == "i386")
76 return "windows-x86";
77 // Unknown, maybe arm, appending arch
78 return "windows-" + arch;
79 }
80 if (sys == "osx") {
81 if (arch == "arm64")
82 return "mac-os-arm64";
83 if (arch.contains("64"))
84 return "mac-os-x64";
85 if (arch.contains("86"))
86 return "mac-os-x86";
87 // Unknown, maybe something new, appending arch
88 return "mac-os-" + arch;
89 } else if (sys == "linux") {
90 if (arch == "x86_64")
91 return "linux-x64";
92 if (arch == "i386")
93 return "linux-x86";
94 // will work for arm32 arm(64)
95 return "linux-" + arch;
96 }
97 return {};
98}
99} // 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