diff --git a/OpenCorePkg b/OpenCorePkg index 704c042bd..b0aac62ac 160000 --- a/OpenCorePkg +++ b/OpenCorePkg @@ -1 +1 @@ -Subproject commit 704c042bdb9be1e14d207276403127b7b46f4007 +Subproject commit b0aac62accc46de3297b2fa3b50e34f0d03460bd diff --git a/rEFIt_UEFI/entry_scan/loader.cpp b/rEFIt_UEFI/entry_scan/loader.cpp index c219e16ad..6e57fca99 100644 --- a/rEFIt_UEFI/entry_scan/loader.cpp +++ b/rEFIt_UEFI/entry_scan/loader.cpp @@ -580,6 +580,8 @@ MacOsVersion GetOSVersion(int LoaderType, const XStringW& APFSTargetUUID, const }else{ if ( Prop->getString()->stringValue().contains("Install%20macOS%20BigSur") || Prop->getString()->stringValue().contains("Install%20macOS%2011.0")) { OSVersion = "11"_XS8; + } else if ( Prop->getString()->stringValue().contains("Install%20macOS%2012.0")) { + OSVersion = "12"_XS8; } else if ( Prop->getString()->stringValue().contains("Install%20macOS%2010.16")) { OSVersion = "10.16"_XS8; } else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Catalina") || Prop->getString()->stringValue().contains("Install%20macOS%2010.15")) { @@ -831,12 +833,15 @@ GetOSIconName (const MacOsVersion& OSVersion) XStringW OSIconName; if (OSVersion.isEmpty()) { OSIconName = L"mac"_XSW; + } else if (OSVersion.elementAt(0) == 12 ){ + // Monterey + OSIconName = L"monterey,mac"_XSW; } else if ( (OSVersion.elementAt(0) == 10 && OSVersion.elementAt(1) == 16 ) || (OSVersion.elementAt(0) == 11 /*&& OSVersion.elementAt(1) == 0*/ ) ) { // Big Sur OSIconName = L"bigsur,mac"_XSW; - }else if ( OSVersion.elementAt(0) == 10 ) { + } else if ( OSVersion.elementAt(0) == 10 ) { if ( OSVersion.elementAt(1) == 15 ) { // Catalina OSIconName = L"cata,mac"_XSW; diff --git a/rEFIt_UEFI/libeg/XIcon.cpp b/rEFIt_UEFI/libeg/XIcon.cpp index 39f9a0bd8..3b62dd778 100644 --- a/rEFIt_UEFI/libeg/XIcon.cpp +++ b/rEFIt_UEFI/libeg/XIcon.cpp @@ -83,6 +83,7 @@ CONST CHAR8* IconsNames[] = { "os_clover", //52 == ICON_CLOVER //other oses will be added below "os_bigsur", //53 == ICON_BIGSUR + "os_monterey", //54 == ICON_MONTEREY "" }; const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]); diff --git a/rEFIt_UEFI/refit/lib.h b/rEFIt_UEFI/refit/lib.h index 8c3369b59..0e9b4eb61 100644 --- a/rEFIt_UEFI/refit/lib.h +++ b/rEFIt_UEFI/refit/lib.h @@ -361,6 +361,7 @@ void DebugPause(void); #define ICON_OTHER_OS (51) #define ICON_CLOVER (52) #define ICON_BIGSUR (53) +#define ICON_MONTEREY (54) #define BUILTIN_ICON_BACKGROUND (100) #define BUILTIN_ICON_SELECTION (101) #define BUILTIN_ICON_ANIME (102) diff --git a/rEFIt_UEFI/refit/main.cpp b/rEFIt_UEFI/refit/main.cpp index 0a0131e44..983a4245d 100644 --- a/rEFIt_UEFI/refit/main.cpp +++ b/rEFIt_UEFI/refit/main.cpp @@ -1340,8 +1340,13 @@ void LOADER_ENTRY::StartLoader() */ // InstallerVersion = SearchString((CHAR8*)LoadedImage->ImageBase, LoadedImage->ImageSize, "Mac OS X ", 9); InstallerVersion = AsciiStrStr((CHAR8*)LoadedImage->ImageBase, "Mac OS X "); + int location = 9; + if (InstallerVersion == NULL) { + InstallerVersion = AsciiStrStr((CHAR8*)LoadedImage->ImageBase, "macOS "); + location = 7; + } if (InstallerVersion != NULL) { // string was found - InstallerVersion += 9; // advance to version location + InstallerVersion += location; // advance to version location if (strncmp(InstallerVersion, "10.7", 4) && strncmp(InstallerVersion, "10.8", 4) && @@ -1353,7 +1358,8 @@ void LOADER_ENTRY::StartLoader() strncmp(InstallerVersion, "10.14", 5) && strncmp(InstallerVersion, "10.15", 5) && strncmp(InstallerVersion, "10.16", 5) && - strncmp(InstallerVersion, "11.", 3)) { + strncmp(InstallerVersion, "11.", 3) && + strncmp(InstallerVersion, "12.", 3)) { InstallerVersion = NULL; // flag known version was not found } if (InstallerVersion != NULL) { // known version was found in image