take Ventura into account

Signed-off-by: SergeySlice <sergey.slice@gmail.com>
This commit is contained in:
SergeySlice 2022-06-24 19:03:14 +03:00
parent 48be65956e
commit 2c28c23fdd
7 changed files with 15 additions and 6 deletions

View File

@ -6,8 +6,8 @@
#, fuzzy #, fuzzy
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Clover r5145\n" "Project-Id-Version: Clover r5146\n"
"POT-Creation-Date: 2022-03-16 19:08+0300\n" "POT-Creation-Date: 2022-06-23 20:44+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -548,7 +548,7 @@ void LOADER_ENTRY::AddKextsInArray(XObjArray<SIDELOAD_KEXT>* kextArray)
XString8 OSVersionKextsDirName; // declare here to avoid multiple allocation XString8 OSVersionKextsDirName; // declare here to avoid multiple allocation
// Add kext from 10 or 11 // Add kexts from 10, 11, 12, 13...
OSVersionKextsDirName = macOSVersion.asString(1); OSVersionKextsDirName = macOSVersion.asString(1);
AddKextsFromDirInArray(OSVersionKextsDirName, archCpuType, kextArray); AddKextsFromDirInArray(OSVersionKextsDirName, archCpuType, kextArray);

View File

@ -583,6 +583,8 @@ MacOsVersion GetOSVersion(int LoaderType, const EFI_GUID& APFSTargetUUID, const
OSVersion = "11"_XS8; OSVersion = "11"_XS8;
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Monterey") || Prop->getString()->stringValue().contains("Install%20macOS%2012")) { } else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Monterey") || Prop->getString()->stringValue().contains("Install%20macOS%2012")) {
OSVersion = "12"_XS8; OSVersion = "12"_XS8;
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Ventura") || Prop->getString()->stringValue().contains("Install%20macOS%2013")) {
OSVersion = "13"_XS8;
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%2010.16")) { } else if ( Prop->getString()->stringValue().contains("Install%20macOS%2010.16")) {
OSVersion = "10.16"_XS8; OSVersion = "10.16"_XS8;
} else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Catalina") || Prop->getString()->stringValue().contains("Install%20macOS%2010.15")) { } else if ( Prop->getString()->stringValue().contains("Install%20macOS%20Catalina") || Prop->getString()->stringValue().contains("Install%20macOS%2010.15")) {
@ -834,6 +836,9 @@ GetOSIconName (const MacOsVersion& OSVersion)
XStringW OSIconName; XStringW OSIconName;
if (OSVersion.isEmpty()) { if (OSVersion.isEmpty()) {
OSIconName = L"mac"_XSW; OSIconName = L"mac"_XSW;
} else if (OSVersion.elementAt(0) == 13 ){
// Ventura
OSIconName = L"ventura,mac"_XSW;
} else if (OSVersion.elementAt(0) == 12 ){ } else if (OSVersion.elementAt(0) == 12 ){
// Monterey // Monterey
OSIconName = L"monterey,mac"_XSW; OSIconName = L"monterey,mac"_XSW;

View File

@ -84,6 +84,7 @@ CONST CHAR8* IconsNames[] = {
//other oses will be added below //other oses will be added below
"os_bigsur", //53 == ICON_BIGSUR "os_bigsur", //53 == ICON_BIGSUR
"os_monterey", //54 == ICON_MONTEREY "os_monterey", //54 == ICON_MONTEREY
"os_ventura", //55 == ICON_VENTURA
"" ""
}; };
const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]); const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]);

View File

@ -361,6 +361,7 @@ void DebugPause(void);
#define ICON_CLOVER (52) #define ICON_CLOVER (52)
#define ICON_BIGSUR (53) #define ICON_BIGSUR (53)
#define ICON_MONTEREY (54) #define ICON_MONTEREY (54)
#define ICON_VENTURA (55)
#define BUILTIN_ICON_BACKGROUND (100) #define BUILTIN_ICON_BACKGROUND (100)
#define BUILTIN_ICON_SELECTION (101) #define BUILTIN_ICON_SELECTION (101)
#define BUILTIN_ICON_ANIME (102) #define BUILTIN_ICON_ANIME (102)

View File

@ -1452,7 +1452,9 @@ void LOADER_ENTRY::StartLoader()
strncmp(InstallerVersion, "10.15", 5) && strncmp(InstallerVersion, "10.15", 5) &&
strncmp(InstallerVersion, "10.16", 5) && strncmp(InstallerVersion, "10.16", 5) &&
strncmp(InstallerVersion, "11.", 3) && strncmp(InstallerVersion, "11.", 3) &&
strncmp(InstallerVersion, "12.", 3)) { strncmp(InstallerVersion, "12.", 3) &&
strncmp(InstallerVersion, "13.", 3)
) {
InstallerVersion = NULL; // flag known version was not found InstallerVersion = NULL; // flag known version was not found
} }
if (InstallerVersion != NULL) { // known version was found in image if (InstallerVersion != NULL) { // known version was found in image

View File

@ -1873,8 +1873,8 @@ LOADER_ENTRY* LOADER_ENTRY::SubMenuKextInjectMgmt()
} }
// Add kext from : // Add kext from :
// 10(or 11).{version}.0 if NO minor version // 10(or 1*).{version}.0 if NO minor version
// 10(or 11).{version}.{minor version} if minor version is > 0 // 10(or 1*).{version}.{minor version} if minor version is > 0
if ( macOSVersion.nbElement() >= 2 ) if ( macOSVersion.nbElement() >= 2 )
{ {
OSVersionKextsDirName = macOSVersion.asString(3); OSVersionKextsDirName = macOSVersion.asString(3);