MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / GetOSIconName

Function GetOSIconName

rEFIt_UEFI/Platform/Settings.cpp:6373–6424  ·  view source on GitHub ↗

constexpr XStringW iconMac = L"mac"_XSW;

Source from the content-addressed store, hash-verified

6371
6372//constexpr XStringW iconMac = L"mac"_XSW;
6373CONST XStringW
6374GetOSIconName (const XString8& OSVersion)
6375{
6376 XStringW OSIconName;
6377 if (OSVersion.isEmpty()) {
6378 OSIconName = L"mac"_XSW;
6379 } else if (OSVersion.contains("10.16") ||
6380 (OSVersion.contains("11.0") != 0)) {
6381 // Big Sur
6382 OSIconName = L"bigsur,mac"_XSW;
6383 } else if (OSVersion.contains("10.15") != 0) {
6384 // Catalina
6385 OSIconName = L"cata,mac"_XSW;
6386 } else if (OSVersion.contains("10.14") != 0) {
6387 // Mojave
6388 OSIconName = L"moja,mac"_XSW;
6389 } else if (OSVersion.contains("10.13") != 0) {
6390 // High Sierra
6391 OSIconName = L"hsierra,mac"_XSW;
6392 } else if (OSVersion.contains("10.12") != 0) {
6393 // Sierra
6394 OSIconName = L"sierra,mac"_XSW;
6395 } else if (OSVersion.contains("10.11") != 0) {
6396 // El Capitan
6397 OSIconName = L"cap,mac"_XSW;
6398 } else if (OSVersion.contains("10.10") != 0) {
6399 // Yosemite
6400 OSIconName = L"yos,mac"_XSW;
6401 } else if (OSVersion.contains("10.9") != 0) {
6402 // Mavericks
6403 OSIconName = L"mav,mac"_XSW;
6404 } else if (OSVersion.contains("10.8") != 0) {
6405 // Mountain Lion
6406 OSIconName = L"cougar,mac"_XSW;
6407 } else if (OSVersion.contains("10.7") != 0) {
6408 // Lion
6409 OSIconName = L"lion,mac"_XSW;
6410 } else if (OSVersion.contains("10.6") != 0) {
6411 // Snow Leopard
6412 OSIconName = L"snow,mac"_XSW;
6413 } else if (OSVersion.contains("10.5") != 0) {
6414 // Leopard
6415 OSIconName = L"leo,mac"_XSW;
6416 } else if (OSVersion.contains("10.4") != 0) {
6417 // Tiger
6418 OSIconName = L"tiger,mac"_XSW;
6419 } else {
6420 OSIconName = L"mac"_XSW;
6421 }
6422
6423 return OSIconName;
6424}
6425
6426//Get the UUID of the AppleRaid or CoreStorage volume from the boot helper partition
6427EFI_STATUS

Callers 1

loader.cppFile · 0.85

Calls 2

isEmptyMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected