mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
Menu disable kext for version 11.
This commit is contained in:
parent
7470ecc797
commit
9681c6292d
@ -492,10 +492,11 @@ EFI_STATUS LOADER_ENTRY::LoadKexts()
|
||||
DBG("GetOtherKextsDir(FALSE) return NULL\n");
|
||||
}
|
||||
|
||||
if ( !OSVersion.contains(".") ) panic("!OSVersion.contains('.')");
|
||||
XStringW osMajorVersion = OSVersion.subString(0, OSVersion.indexOf('.'));
|
||||
// Add kext from 10
|
||||
if ( OSVersion.contains(".") )
|
||||
{
|
||||
// Add kext from 10 or 11
|
||||
XStringW osMajorVersion = OSVersion.subString(0, OSVersion.indexOf('.'));
|
||||
|
||||
XStringW OSAllVersionKextsDir;
|
||||
XStringW OSShortVersionKextsDir;
|
||||
XStringW OSVersionKextsDirName;
|
||||
@ -554,6 +555,8 @@ EFI_STATUS LOADER_ENTRY::LoadKexts()
|
||||
}
|
||||
DirPath = SWPrintf("%ls\\kexts\\%ls", OEMPath.wc_str(), DirName.wc_str());
|
||||
AddKexts(DirPath, DirName, archCpuType);
|
||||
}else{
|
||||
//MsgLog("No os version is detected\n");
|
||||
}
|
||||
|
||||
|
||||
@ -574,27 +577,6 @@ EFI_STATUS LOADER_ENTRY::LoadKexts()
|
||||
FreePool(extra);
|
||||
}
|
||||
|
||||
// SIDELOAD_KEXT *CurrentKext = NULL;
|
||||
// SIDELOAD_KEXT *CurrentPlugInKext = NULL;
|
||||
// SIDELOAD_KEXT *Next = NULL;
|
||||
// //No more InjectKextList needed. Will free the list
|
||||
// while (InjectKextList) {
|
||||
// CurrentKext = InjectKextList->Next;
|
||||
// CurrentPlugInKext = InjectKextList->PlugInList;
|
||||
// while (CurrentPlugInKext) {
|
||||
// Next = CurrentPlugInKext->Next;
|
||||
// FreePool(CurrentPlugInKext->FileName);
|
||||
// FreePool(CurrentPlugInKext->KextDirNameUnderOEMPath);
|
||||
// FreePool(CurrentPlugInKext->Version);
|
||||
// FreePool(CurrentPlugInKext);
|
||||
// CurrentPlugInKext = Next;
|
||||
// }
|
||||
// FreePool(InjectKextList->FileName);
|
||||
// FreePool(InjectKextList->KextDirNameUnderOEMPath);
|
||||
// FreePool(InjectKextList->Version);
|
||||
// FreePool(InjectKextList);
|
||||
// InjectKextList = CurrentKext;
|
||||
// }
|
||||
delete InjectKextList;
|
||||
InjectKextList = NULL;
|
||||
return EFI_SUCCESS;
|
||||
|
@ -1834,20 +1834,23 @@ LOADER_ENTRY* LOADER_ENTRY::SubMenuKextInjectMgmt()
|
||||
|
||||
SubScreen->AddMenuInfoLine_f("Block injected kexts for target version of macOS: %s", ShortOSVersion.c_str());
|
||||
|
||||
// Add kext from 10
|
||||
{
|
||||
SubScreen->AddMenuEntry(SubMenuKextBlockInjection("10"_XS8), true);
|
||||
// Add kext from 10 or 11
|
||||
if ( OSVersion.contains(".") )
|
||||
{
|
||||
XString8 osMajorVersion = OSVersion.subString(0, OSVersion.indexOf('.'));
|
||||
|
||||
SubScreen->AddMenuEntry(SubMenuKextBlockInjection(osMajorVersion), true);
|
||||
|
||||
XString8 DirName;
|
||||
if (OSTYPE_IS_OSX_INSTALLER(LoaderType)) {
|
||||
DirName = "10_install"_XS8;
|
||||
DirName = S8Printf("%s_install", osMajorVersion.c_str());
|
||||
}
|
||||
else {
|
||||
if (OSTYPE_IS_OSX_RECOVERY(LoaderType)) {
|
||||
DirName = "10_recovery"_XS8;
|
||||
DirName = S8Printf("%s_recovery", osMajorVersion.c_str());
|
||||
}
|
||||
else {
|
||||
DirName = "10_normal"_XS8;
|
||||
DirName = S8Printf("%s_normal", osMajorVersion.c_str());
|
||||
}
|
||||
}
|
||||
SubScreen->AddMenuEntry(SubMenuKextBlockInjection(DirName), true);
|
||||
|
Loading…
Reference in New Issue
Block a user