mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
Merge branch 'CloverHackyColor:master' into master
This commit is contained in:
commit
1d31f9ecd3
@ -1 +1 @@
|
|||||||
Subproject commit 704c042bdb9be1e14d207276403127b7b46f4007
|
Subproject commit b0aac62accc46de3297b2fa3b50e34f0d03460bd
|
@ -580,6 +580,8 @@ MacOsVersion GetOSVersion(int LoaderType, const XStringW& APFSTargetUUID, const
|
|||||||
}else{
|
}else{
|
||||||
if ( Prop->getString()->stringValue().contains("Install%20macOS%20BigSur") || Prop->getString()->stringValue().contains("Install%20macOS%2011.0")) {
|
if ( Prop->getString()->stringValue().contains("Install%20macOS%20BigSur") || Prop->getString()->stringValue().contains("Install%20macOS%2011.0")) {
|
||||||
OSVersion = "11"_XS8;
|
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")) {
|
} 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")) {
|
||||||
@ -831,12 +833,15 @@ 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) == 12 ){
|
||||||
|
// Monterey
|
||||||
|
OSIconName = L"monterey,mac"_XSW;
|
||||||
} else if ( (OSVersion.elementAt(0) == 10 && OSVersion.elementAt(1) == 16 ) ||
|
} else if ( (OSVersion.elementAt(0) == 10 && OSVersion.elementAt(1) == 16 ) ||
|
||||||
(OSVersion.elementAt(0) == 11 /*&& OSVersion.elementAt(1) == 0*/ )
|
(OSVersion.elementAt(0) == 11 /*&& OSVersion.elementAt(1) == 0*/ )
|
||||||
) {
|
) {
|
||||||
// Big Sur
|
// Big Sur
|
||||||
OSIconName = L"bigsur,mac"_XSW;
|
OSIconName = L"bigsur,mac"_XSW;
|
||||||
}else if ( OSVersion.elementAt(0) == 10 ) {
|
} else if ( OSVersion.elementAt(0) == 10 ) {
|
||||||
if ( OSVersion.elementAt(1) == 15 ) {
|
if ( OSVersion.elementAt(1) == 15 ) {
|
||||||
// Catalina
|
// Catalina
|
||||||
OSIconName = L"cata,mac"_XSW;
|
OSIconName = L"cata,mac"_XSW;
|
||||||
|
@ -83,6 +83,7 @@ CONST CHAR8* IconsNames[] = {
|
|||||||
"os_clover", //52 == ICON_CLOVER
|
"os_clover", //52 == ICON_CLOVER
|
||||||
//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
|
||||||
""
|
""
|
||||||
};
|
};
|
||||||
const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]);
|
const INTN IconsNamesSize = sizeof(IconsNames) / sizeof(IconsNames[0]);
|
||||||
|
@ -361,6 +361,7 @@ void DebugPause(void);
|
|||||||
#define ICON_OTHER_OS (51)
|
#define ICON_OTHER_OS (51)
|
||||||
#define ICON_CLOVER (52)
|
#define ICON_CLOVER (52)
|
||||||
#define ICON_BIGSUR (53)
|
#define ICON_BIGSUR (53)
|
||||||
|
#define ICON_MONTEREY (54)
|
||||||
#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)
|
||||||
|
@ -1340,8 +1340,13 @@ void LOADER_ENTRY::StartLoader()
|
|||||||
*/
|
*/
|
||||||
// InstallerVersion = SearchString((CHAR8*)LoadedImage->ImageBase, LoadedImage->ImageSize, "Mac OS X ", 9);
|
// InstallerVersion = SearchString((CHAR8*)LoadedImage->ImageBase, LoadedImage->ImageSize, "Mac OS X ", 9);
|
||||||
InstallerVersion = AsciiStrStr((CHAR8*)LoadedImage->ImageBase, "Mac OS X ");
|
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
|
if (InstallerVersion != NULL) { // string was found
|
||||||
InstallerVersion += 9; // advance to version location
|
InstallerVersion += location; // advance to version location
|
||||||
|
|
||||||
if (strncmp(InstallerVersion, "10.7", 4) &&
|
if (strncmp(InstallerVersion, "10.7", 4) &&
|
||||||
strncmp(InstallerVersion, "10.8", 4) &&
|
strncmp(InstallerVersion, "10.8", 4) &&
|
||||||
@ -1353,7 +1358,8 @@ void LOADER_ENTRY::StartLoader()
|
|||||||
strncmp(InstallerVersion, "10.14", 5) &&
|
strncmp(InstallerVersion, "10.14", 5) &&
|
||||||
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)) {
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user