mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
Correct some refactoring bugs.
This commit is contained in:
parent
29d559aec8
commit
2961827dce
@ -5,7 +5,7 @@
|
|||||||
* Author: jief
|
* Author: jief
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "guid.h"
|
#include "guid.h"
|
||||||
#include "APFS.h"
|
#include "APFS.h"
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#ifndef PLATFORM_ACPIPATCHER_H_
|
#ifndef PLATFORM_ACPIPATCHER_H_
|
||||||
#define PLATFORM_ACPIPATCHER_H_
|
#define PLATFORM_ACPIPATCHER_H_
|
||||||
|
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#pragma pack(push)
|
#pragma pack(push)
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#ifndef _AML_GENERATOR_H
|
#ifndef _AML_GENERATOR_H
|
||||||
#define _AML_GENERATOR_H
|
#define _AML_GENERATOR_H
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
/*
|
/*
|
||||||
static inline BOOLEAN aml_isvalidchar(char c)
|
static inline BOOLEAN aml_isvalidchar(char c)
|
||||||
|
@ -12,8 +12,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../include/Handle.h"
|
#include "../include/Handle.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
//#include <Library/MemLogLib.h>
|
//#include <Library/MemLogLib.h>
|
||||||
#include "DataHubCpu.h"
|
#include "DataHubCpu.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
extern EFI_GUID gEfiMiscSubClassGuid;
|
extern EFI_GUID gEfiMiscSubClassGuid;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "BootOptions.h"
|
#include "BootOptions.h"
|
||||||
#include "BasicIO.h"
|
#include "BasicIO.h"
|
||||||
#include "Nvram.h"
|
#include "Nvram.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
Removed commented out code in rev 2965
|
Removed commented out code in rev 2965
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE CurrentMode = EfiConsoleControlScreenText;
|
STATIC EFI_CONSOLE_CONTROL_SCREEN_MODE CurrentMode = EfiConsoleControlScreenText;
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "Nvram.h"
|
#include "Nvram.h"
|
||||||
#include "platformdata.h"
|
#include "platformdata.h"
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
@ -279,8 +279,12 @@ SetVariablesForOSX(LOADER_ENTRY *Entry)
|
|||||||
// Do not mess with prev-lang:kbd on UEFI systems without NVRAM emulation; it's OS X's business
|
// Do not mess with prev-lang:kbd on UEFI systems without NVRAM emulation; it's OS X's business
|
||||||
KbdPrevLang = L"prev-lang:kbd";
|
KbdPrevLang = L"prev-lang:kbd";
|
||||||
OldData = (__typeof__(OldData))GetNvramVariable(KbdPrevLang, &gEfiAppleBootGuid, NULL, NULL);
|
OldData = (__typeof__(OldData))GetNvramVariable(KbdPrevLang, &gEfiAppleBootGuid, NULL, NULL);
|
||||||
gSettings.Language.trim();
|
if (OldData == NULL) {
|
||||||
SetNvramXString8(KbdPrevLang, &gEfiAppleBootGuid, Attributes, gSettings.Language);
|
gSettings.Language.trim();
|
||||||
|
SetNvramXString8(KbdPrevLang, &gEfiAppleBootGuid, Attributes, gSettings.Language);
|
||||||
|
} else {
|
||||||
|
FreePool(OldData);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Attributes |= EFI_VARIABLE_NON_VOLATILE;
|
Attributes |= EFI_VARIABLE_NON_VOLATILE;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#ifndef PLATFORM_DATAHUBCPU_H_
|
#ifndef PLATFORM_DATAHUBCPU_H_
|
||||||
#define PLATFORM_DATAHUBCPU_H_
|
#define PLATFORM_DATAHUBCPU_H_
|
||||||
|
|
||||||
|
#include "../gui/menu_items/menu_items.h"
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
SetVariablesForOSX (LOADER_ENTRY *Entry);
|
SetVariablesForOSX (LOADER_ENTRY *Entry);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
//
|
//
|
||||||
//**/
|
//**/
|
||||||
//
|
//
|
||||||
//#include "Platform.h"
|
//#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
////#include <Library/GenericBdsLib.h>
|
////#include <Library/GenericBdsLib.h>
|
||||||
////#include "InternalBdsLib.h"
|
////#include "InternalBdsLib.h"
|
||||||
//
|
//
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//Slice 2013
|
//Slice 2013
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "AcpiPatcher.h"
|
#include "AcpiPatcher.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -15,6 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
#include "kernel_patcher.h"
|
#include "kernel_patcher.h"
|
||||||
#include "usbfix.h"
|
#include "usbfix.h"
|
||||||
#include "../Platform/cpu.h"
|
#include "../Platform/cpu.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define PATCH_DEBUG 0
|
#define PATCH_DEBUG 0
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
//totally rebuilt by Slice, 2012-2013
|
//totally rebuilt by Slice, 2012-2013
|
||||||
// NForce additions by Oscar09, 2013
|
// NForce additions by Oscar09, 2013
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "StateGenerator.h"
|
#include "StateGenerator.h"
|
||||||
#include "AcpiPatcher.h"
|
#include "AcpiPatcher.h"
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "HdaCodecDump.h"
|
#include "HdaCodecDump.h"
|
||||||
#include "StateGenerator.h"
|
#include "StateGenerator.h"
|
||||||
#include "AmlGenerator.h"
|
#include "AmlGenerator.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
CONST CHAR8 *gWidgetNames[HDA_WIDGET_TYPE_VENDOR + 1] = {
|
CONST CHAR8 *gWidgetNames[HDA_WIDGET_TYPE_VENDOR + 1] = {
|
||||||
"Audio Output", "Audio Input", "Audio Mixer",
|
"Audio Output", "Audio Input", "Audio Mixer",
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "AcpiPatcher.h"
|
#include "AcpiPatcher.h"
|
||||||
#include "guid.h"
|
#include "guid.h"
|
||||||
#include "APFS.h"
|
#include "APFS.h"
|
||||||
|
@ -17,12 +17,13 @@
|
|||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Header Files *
|
* Header Files *
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include <Protocol/OSInfo.h>
|
#include <Protocol/OSInfo.h>
|
||||||
#include <Protocol/AppleGraphConfig.h>
|
#include <Protocol/AppleGraphConfig.h>
|
||||||
#include <Protocol/KeyboardInfo.h>
|
#include <Protocol/KeyboardInfo.h>
|
||||||
#include <Protocol/OcQuirksProtocol.h>
|
#include <Protocol/OcQuirksProtocol.h>
|
||||||
#include "Injectors.h"
|
#include "Injectors.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_PRO 1
|
#define DEBUG_PRO 1
|
||||||
|
@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
#include "LegacyBiosThunk.h"
|
#include "LegacyBiosThunk.h"
|
||||||
#include <posix.h>
|
#include <posix.h>
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_LBTHUNK 0
|
#define DEBUG_LBTHUNK 0
|
||||||
|
@ -10,7 +10,7 @@ LegacyBoot.c - support for boot legacy OS such as WindowsXP and Linux
|
|||||||
Portion from XOM project
|
Portion from XOM project
|
||||||
Copyright (c) 2006 JLA
|
Copyright (c) 2006 JLA
|
||||||
*/
|
*/
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "LegacyBiosThunk.h"
|
#include "LegacyBiosThunk.h"
|
||||||
//#include <Protocol/Bds.h>
|
//#include <Protocol/Bds.h>
|
||||||
#include "AcpiPatcher.h"
|
#include "AcpiPatcher.h"
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
// Slice 2014
|
// Slice 2014
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include <Library/NetLib.h>
|
#include <Library/NetLib.h>
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
|
||||||
#ifndef DEBUG_MAC
|
#ifndef DEBUG_MAC
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* dmazar, 2012
|
* dmazar, 2012
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "Nvram.h"
|
#include "Nvram.h"
|
||||||
#include "BootOptions.h"
|
#include "BootOptions.h"
|
||||||
#include "guid.h"
|
#include "guid.h"
|
||||||
@ -1033,7 +1033,6 @@ PutNvramPlistToRtVars ()
|
|||||||
TagPtr Tag;
|
TagPtr Tag;
|
||||||
TagPtr ValTag;
|
TagPtr ValTag;
|
||||||
INTN Size, i;
|
INTN Size, i;
|
||||||
CHAR16 KeyBuf[128];
|
|
||||||
VOID *Value;
|
VOID *Value;
|
||||||
|
|
||||||
if (gNvramDict == NULL) {
|
if (gNvramDict == NULL) {
|
||||||
@ -1074,11 +1073,11 @@ PutNvramPlistToRtVars ()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// key to unicode; check if key buffer is large enough
|
// // key to unicode; check if key buffer is large enough
|
||||||
if ( Tag->string.length() > sizeof(KeyBuf) - 1 ) {
|
// if ( Tag->string.length() > sizeof(KeyBuf) - 1 ) {
|
||||||
DBG(" ERROR: Skipping too large key %s\n", Tag->string.c_str());
|
// DBG(" ERROR: Skipping too large key %s\n", Tag->string.c_str());
|
||||||
continue;
|
// continue;
|
||||||
}
|
// }
|
||||||
|
|
||||||
if ( Tag->string == "Boot0082"_XS8 || Tag->string == "BootNext"_XS8 ) {
|
if ( Tag->string == "Boot0082"_XS8 || Tag->string == "BootNext"_XS8 ) {
|
||||||
VendorGuid = &gEfiGlobalVariableGuid;
|
VendorGuid = &gEfiGlobalVariableGuid;
|
||||||
@ -1087,8 +1086,9 @@ PutNvramPlistToRtVars ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// AsciiStrToUnicodeStrS(Tag->string, KeyBuf, 128);
|
// AsciiStrToUnicodeStrS(Tag->string, KeyBuf, 128);
|
||||||
|
XStringW KeyBuf = Tag->string;
|
||||||
if (!GlobalConfig.DebugLog) {
|
if (!GlobalConfig.DebugLog) {
|
||||||
DBG(" Adding Key: %s: ", Tag->string.c_str());
|
DBG(" Adding Key: %ls: ", KeyBuf.wc_str());
|
||||||
}
|
}
|
||||||
// process value tag
|
// process value tag
|
||||||
|
|
||||||
@ -1134,7 +1134,7 @@ PutNvramPlistToRtVars ()
|
|||||||
); */
|
); */
|
||||||
|
|
||||||
SetNvramVariable (
|
SetNvramVariable (
|
||||||
KeyBuf,
|
KeyBuf.wc_str(),
|
||||||
VendorGuid,
|
VendorGuid,
|
||||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||||
Size,
|
Size,
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#define NON_APPLE_SMC_SIGNATURE SIGNATURE_64('S','M','C','H','E','L','P','E')
|
#define NON_APPLE_SMC_SIGNATURE SIGNATURE_64('S','M','C','H','E','L','P','E')
|
||||||
|
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
|
#include "../gui/REFIT_MENU_SCREEN.h"
|
||||||
|
|
||||||
|
|
||||||
extern EFI_GUID *gEfiBootDeviceGuid;
|
extern EFI_GUID *gEfiBootDeviceGuid;
|
||||||
extern EFI_DEVICE_PATH_PROTOCOL *gEfiBootDeviceData;
|
extern EFI_DEVICE_PATH_PROTOCOL *gEfiBootDeviceData;
|
||||||
|
@ -28,7 +28,7 @@ Headers collection for procedures
|
|||||||
#include "BootLog.h"
|
#include "BootLog.h"
|
||||||
#include "BasicIO.h"
|
#include "BasicIO.h"
|
||||||
#include "VersionString.h"
|
#include "VersionString.h"
|
||||||
#include "Settings.h"
|
//#include "Settings.h"
|
||||||
|
|
||||||
#ifndef CLOVERAPPLICATION
|
#ifndef CLOVERAPPLICATION
|
||||||
#include "../Platform/Utils.h"
|
#include "../Platform/Utils.h"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include <Protocol/PlatformDriverOverride.h>
|
#include <Protocol/PlatformDriverOverride.h>
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -1,24 +1,6 @@
|
|||||||
//#ifdef CLOVER_BUILD
|
|
||||||
//#include "../../Platform/BootLog.h"
|
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
//
|
|
||||||
//#ifdef __cplusplus
|
|
||||||
//extern "C" {
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#include <Library/BaseLib.h> // for CpuDeadLoop
|
|
||||||
//
|
|
||||||
//#ifdef __cplusplus
|
|
||||||
//} // extern "C"
|
|
||||||
//#endif
|
|
||||||
//
|
|
||||||
//#else
|
|
||||||
//
|
|
||||||
//#include <Platform.h>
|
|
||||||
//
|
|
||||||
//#endif
|
|
||||||
|
|
||||||
#if defined(CLOVER_BUILD) || !defined(_MSC_VER)
|
#if defined(CLOVER_BUILD) || !defined(_MSC_VER)
|
||||||
void abort(void)
|
void abort(void)
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
#include "ati_reg.h"
|
#include "ati_reg.h"
|
||||||
#include "../../Version.h"
|
#include "../../Version.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#include <Protocol/OcQuirksProtocol.h>
|
#include <Protocol/OcQuirksProtocol.h>
|
||||||
|
|
||||||
@ -920,8 +921,8 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
UINTN len = 0, i=0;
|
UINTN len = 0, i=0;
|
||||||
|
|
||||||
// ATIConnectors patch
|
// ATIConnectors patch
|
||||||
Patches->KPATIConnectorsController.takeValueFrom(Prop->string);
|
Patches->KPATIConnectorsController = Prop->string;
|
||||||
// AsciiStrToUnicodeStrS (Prop->string, Patches->KPATIConnectorsController, AsciiStrSize(Prop->string));
|
// AsciiStrToUnicodeStrS (Prop->string.c_str(), Patches->KPATIConnectorsController, AsciiStrSize(Prop->string.c_str()));
|
||||||
|
|
||||||
UINT8* p = GetDataSetting (DictPointer, "ATIConnectorsData", &len);
|
UINT8* p = GetDataSetting (DictPointer, "ATIConnectorsData", &len);
|
||||||
Patches->KPATIConnectorsData.stealValueFrom(p, len);
|
Patches->KPATIConnectorsData.stealValueFrom(p, len);
|
||||||
@ -968,7 +969,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (AsciiStrSize(p) > 1) {
|
if (AsciiStrSize(p) > 1) {
|
||||||
Patches->ForceKexts.Add(Prop2->string);
|
Patches->ForceKexts.Add(p);
|
||||||
DBG(" - [%zu]: %ls\n", Patches->ForceKexts.size(), Patches->ForceKexts[Patches->ForceKexts.size()-1].wc_str());
|
DBG(" - [%zu]: %ls\n", Patches->ForceKexts.size(), Patches->ForceKexts[Patches->ForceKexts.size()-1].wc_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1010,14 +1011,11 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
KEXT_PATCH* newPatchPtr = new KEXT_PATCH();
|
KEXT_PATCH* newPatchPtr = new KEXT_PATCH();
|
||||||
KEXT_PATCH& newPatch = *newPatchPtr;
|
KEXT_PATCH& newPatch = *newPatchPtr;
|
||||||
|
|
||||||
newPatch.Name.takeValueFrom(Dict->string);
|
newPatch.Name = Dict->string;
|
||||||
newPatch.Label.takeValueFrom(newPatch.Name);
|
newPatch.Label.takeValueFrom(newPatch.Name);
|
||||||
|
|
||||||
Dict = GetProperty(Prop2, "Comment");
|
Dict = GetProperty(Prop2, "Comment");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
//this is impossible because UnicodeStrToAsciiStr not extend output size
|
|
||||||
// UnicodeStrToAsciiStr(SWPrintf("%s (%s)", KextPatchesLabel, Dict->string), KextPatchesLabel);
|
|
||||||
|
|
||||||
newPatch.Label += " (";
|
newPatch.Label += " (";
|
||||||
newPatch.Label += Dict->string;
|
newPatch.Label += Dict->string;
|
||||||
newPatch.Label += ")";
|
newPatch.Label += ")";
|
||||||
@ -1063,7 +1061,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
|
|
||||||
Dict = GetProperty(Prop2, "Procedure");
|
Dict = GetProperty(Prop2, "Procedure");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
newPatch.ProcedureName.takeValueFrom(Dict->string);
|
newPatch.ProcedureName = Dict->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1097,13 +1095,13 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
// check enable/disabled patch (OS based) by Micky1979
|
// check enable/disabled patch (OS based) by Micky1979
|
||||||
Dict = GetProperty(Prop2, "MatchOS");
|
Dict = GetProperty(Prop2, "MatchOS");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newPatch.MatchOS.takeValueFrom(Dict->string);
|
newPatch.MatchOS = Dict->string;
|
||||||
DBG(" :: MatchOS: %s", newPatch.MatchOS.c_str());
|
DBG(" :: MatchOS: %s", newPatch.MatchOS.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict = GetProperty(Prop2, "MatchBuild");
|
Dict = GetProperty(Prop2, "MatchBuild");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newPatch.MatchBuild.takeValueFrom(Dict->string);
|
newPatch.MatchBuild = Dict->string;
|
||||||
DBG(" :: MatchBuild: %s", newPatch.MatchBuild.c_str());
|
DBG(" :: MatchBuild: %s", newPatch.MatchBuild.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1159,7 +1157,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
|
|
||||||
Dict = GetProperty(Prop2, "Comment");
|
Dict = GetProperty(Prop2, "Comment");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
newKernelPatch.Label.takeValueFrom(Dict->string);
|
newKernelPatch.Label = Dict->string;
|
||||||
} else {
|
} else {
|
||||||
newKernelPatch.Label = "NoLabel"_XS8;
|
newKernelPatch.Label = "NoLabel"_XS8;
|
||||||
}
|
}
|
||||||
@ -1199,7 +1197,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
|
|
||||||
Dict = GetProperty(Prop2, "Procedure");
|
Dict = GetProperty(Prop2, "Procedure");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
newKernelPatch.ProcedureName.takeValueFrom(Dict->string);
|
newKernelPatch.ProcedureName = Dict->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1237,13 +1235,13 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
// check enable/disabled patch (OS based) by Micky1979
|
// check enable/disabled patch (OS based) by Micky1979
|
||||||
Dict = GetProperty(Prop2, "MatchOS");
|
Dict = GetProperty(Prop2, "MatchOS");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newKernelPatch.MatchOS.takeValueFrom(Dict->string);
|
newKernelPatch.MatchOS = Dict->string;
|
||||||
DBG(" :: MatchOS: %s", newKernelPatch.MatchOS.c_str());
|
DBG(" :: MatchOS: %s", newKernelPatch.MatchOS.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict = GetProperty(Prop2, "MatchBuild");
|
Dict = GetProperty(Prop2, "MatchBuild");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newKernelPatch.MatchBuild.takeValueFrom(Dict->string);
|
newKernelPatch.MatchBuild = Dict->string;
|
||||||
DBG(" :: MatchBuild: %s", newKernelPatch.MatchBuild.c_str());
|
DBG(" :: MatchBuild: %s", newKernelPatch.MatchBuild.c_str());
|
||||||
}
|
}
|
||||||
DBG(" :: data len: %zu\n", newKernelPatch.Data.size());
|
DBG(" :: data len: %zu\n", newKernelPatch.Data.size());
|
||||||
@ -1279,7 +1277,7 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
|
|
||||||
Dict = GetProperty(Prop2, "Comment");
|
Dict = GetProperty(Prop2, "Comment");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
newBootPatch.Label.takeValueFrom(Dict->string);
|
newBootPatch.Label = Dict->string;
|
||||||
} else {
|
} else {
|
||||||
newBootPatch.Label = "NoLabel"_XS8;
|
newBootPatch.Label = "NoLabel"_XS8;
|
||||||
}
|
}
|
||||||
@ -1350,13 +1348,13 @@ FillinKextPatches (IN OUT KERNEL_AND_KEXT_PATCHES *Patches,
|
|||||||
|
|
||||||
Dict = GetProperty(Prop2, "MatchOS");
|
Dict = GetProperty(Prop2, "MatchOS");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newBootPatch.MatchOS.takeValueFrom(Dict->string);
|
newBootPatch.MatchOS = Dict->string;
|
||||||
DBG(" :: MatchOS: %s", newBootPatch.MatchOS.c_str());
|
DBG(" :: MatchOS: %s", newBootPatch.MatchOS.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict = GetProperty(Prop2, "MatchBuild");
|
Dict = GetProperty(Prop2, "MatchBuild");
|
||||||
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
if ((Dict != NULL) && (Dict->type == kTagTypeString)) {
|
||||||
newBootPatch.MatchBuild.takeValueFrom(Dict->string);
|
newBootPatch.MatchBuild = Dict->string;
|
||||||
DBG(" :: MatchBuild: %s", newBootPatch.MatchBuild.c_str());
|
DBG(" :: MatchBuild: %s", newBootPatch.MatchBuild.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1519,17 +1517,17 @@ FillinCustomEntry (
|
|||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Volume");
|
Prop = GetProperty(DictPointer, "Volume");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Volume.takeValueFrom(Prop->string);
|
Entry->Volume = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Path");
|
Prop = GetProperty(DictPointer, "Path");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Path.takeValueFrom(Prop->string);
|
Entry->Path = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Settings");
|
Prop = GetProperty(DictPointer, "Settings");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Settings.takeValueFrom(Prop->string);
|
Entry->Settings = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "CommonSettings");
|
Prop = GetProperty(DictPointer, "CommonSettings");
|
||||||
@ -1554,11 +1552,11 @@ FillinCustomEntry (
|
|||||||
}
|
}
|
||||||
Prop = GetProperty(DictPointer, "Title");
|
Prop = GetProperty(DictPointer, "Title");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Title.takeValueFrom(Prop->string);
|
Entry->Title = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(DictPointer, "FullTitle");
|
Prop = GetProperty(DictPointer, "FullTitle");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->FullTitle.takeValueFrom(Prop->string);
|
Entry->FullTitle = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Image");
|
Prop = GetProperty(DictPointer, "Image");
|
||||||
@ -1617,8 +1615,7 @@ FillinCustomEntry (
|
|||||||
} else if (Prop->string.equalIC("Theme")) {
|
} else if (Prop->string.equalIC("Theme")) {
|
||||||
Entry->CustomBoot = CUSTOM_BOOT_THEME;
|
Entry->CustomBoot = CUSTOM_BOOT_THEME;
|
||||||
} else {
|
} else {
|
||||||
// CHAR16 *customLogo = SWPrintf("%s", Prop->string);
|
XStringW customLogo = XStringW() = Prop->string;
|
||||||
XStringW customLogo = XStringW().takeValueFrom(Prop->string);
|
|
||||||
Entry->CustomBoot = CUSTOM_BOOT_USER;
|
Entry->CustomBoot = CUSTOM_BOOT_USER;
|
||||||
Entry->CustomLogo.LoadXImage(SelfRootDir, customLogo);
|
Entry->CustomLogo.LoadXImage(SelfRootDir, customLogo);
|
||||||
if (Entry->CustomLogo.isEmpty()) {
|
if (Entry->CustomLogo.isEmpty()) {
|
||||||
@ -1631,7 +1628,7 @@ FillinCustomEntry (
|
|||||||
Entry->CustomBoot = CUSTOM_BOOT_USER;
|
Entry->CustomBoot = CUSTOM_BOOT_USER;
|
||||||
Entry->CustomLogo.FromPNG(Prop->data, Prop->dataLen);
|
Entry->CustomLogo.FromPNG(Prop->data, Prop->dataLen);
|
||||||
if (Entry->CustomLogo.isEmpty()) {
|
if (Entry->CustomLogo.isEmpty()) {
|
||||||
DBG("Custom boot logo not decoded from data!\n"/*, Prop->string*/);
|
DBG("Custom boot logo not decoded from data!\n"/*, Prop->string.c_str()*/);
|
||||||
Entry->CustomBoot = CUSTOM_BOOT_DISABLED;
|
Entry->CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1856,17 +1853,17 @@ FillingCustomLegacy (
|
|||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Volume");
|
Prop = GetProperty(DictPointer, "Volume");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Volume.takeValueFrom(Prop->string);
|
Entry->Volume = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "FullTitle");
|
Prop = GetProperty(DictPointer, "FullTitle");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->FullTitle.takeValueFrom(Prop->string);
|
Entry->FullTitle = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Title");
|
Prop = GetProperty(DictPointer, "Title");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Title.takeValueFrom(Prop->string);
|
Entry->Title = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(DictPointer, "Image");
|
Prop = GetProperty(DictPointer, "Image");
|
||||||
if (Prop != NULL) {
|
if (Prop != NULL) {
|
||||||
@ -1971,19 +1968,19 @@ FillingCustomTool (IN OUT CUSTOM_TOOL_ENTRY *Entry, TagPtr DictPointer)
|
|||||||
|
|
||||||
Prop = GetProperty(DictPointer, "FullTitle");
|
Prop = GetProperty(DictPointer, "FullTitle");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->FullTitle.takeValueFrom(Prop->string);
|
Entry->FullTitle = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Title");
|
Prop = GetProperty(DictPointer, "Title");
|
||||||
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
if (Prop != NULL && (Prop->type == kTagTypeString)) {
|
||||||
Entry->Title.takeValueFrom(Prop->string);
|
Entry->Title = Prop->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop = GetProperty(DictPointer, "Image");
|
Prop = GetProperty(DictPointer, "Image");
|
||||||
if (Prop != NULL) {
|
if (Prop != NULL) {
|
||||||
Entry->ImagePath.setEmpty();
|
Entry->ImagePath.setEmpty();
|
||||||
if (Prop->type == kTagTypeString) {
|
if (Prop->type == kTagTypeString) {
|
||||||
Entry->ImagePath.takeValueFrom(Prop->string);
|
Entry->ImagePath = Prop->string;
|
||||||
}
|
}
|
||||||
Entry->Image.LoadXImage(ThemeX.ThemeDir, Entry->ImagePath);
|
Entry->Image.LoadXImage(ThemeX.ThemeDir, Entry->ImagePath);
|
||||||
} else {
|
} else {
|
||||||
@ -2328,8 +2325,7 @@ GetEarlyUserSettings (
|
|||||||
} else if (Prop->string.equalIC("Theme")) {
|
} else if (Prop->string.equalIC("Theme")) {
|
||||||
gSettings.CustomBoot = CUSTOM_BOOT_THEME;
|
gSettings.CustomBoot = CUSTOM_BOOT_THEME;
|
||||||
} else {
|
} else {
|
||||||
// CHAR16 *customLogo = SWPrintf("%s", Prop->string);
|
XStringW customLogo = XStringW() = Prop->string;
|
||||||
XStringW customLogo = XStringW().takeValueFrom(Prop->string);
|
|
||||||
gSettings.CustomBoot = CUSTOM_BOOT_USER;
|
gSettings.CustomBoot = CUSTOM_BOOT_USER;
|
||||||
if (gSettings.CustomLogo != NULL) {
|
if (gSettings.CustomLogo != NULL) {
|
||||||
delete gSettings.CustomLogo;
|
delete gSettings.CustomLogo;
|
||||||
@ -2350,7 +2346,7 @@ GetEarlyUserSettings (
|
|||||||
gSettings.CustomLogo = new XImage;
|
gSettings.CustomLogo = new XImage;
|
||||||
gSettings.CustomLogo->FromPNG(Prop->data, Prop->dataLen);
|
gSettings.CustomLogo->FromPNG(Prop->data, Prop->dataLen);
|
||||||
if (gSettings.CustomLogo->isEmpty()) {
|
if (gSettings.CustomLogo->isEmpty()) {
|
||||||
DBG("Custom boot logo not decoded from data!\n"/*, Prop->string*/);
|
DBG("Custom boot logo not decoded from data!\n"/*, Prop->string.c_str()*/);
|
||||||
gSettings.CustomBoot = CUSTOM_BOOT_DISABLED;
|
gSettings.CustomBoot = CUSTOM_BOOT_DISABLED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -2468,7 +2464,7 @@ GetEarlyUserSettings (
|
|||||||
GlobalConfig.ConsoleMode = -2;
|
GlobalConfig.ConsoleMode = -2;
|
||||||
DBG("ConsoleMode will be set to lowest mode\n");
|
DBG("ConsoleMode will be set to lowest mode\n");
|
||||||
} else {
|
} else {
|
||||||
GlobalConfig.ConsoleMode = (INT32)AsciiStrDecimalToUintn(Prop->string.c_str());
|
GlobalConfig.ConsoleMode = (INT32)AsciiStrDecimalToUintn(Prop->string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (GlobalConfig.ConsoleMode > 0) {
|
if (GlobalConfig.ConsoleMode > 0) {
|
||||||
@ -3268,7 +3264,7 @@ XTheme::GetThemeTagSettings(void* DictP)
|
|||||||
|
|
||||||
Dict2 = GetProperty(Dict, "Path");
|
Dict2 = GetProperty(Dict, "Path");
|
||||||
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
||||||
BackgroundName.takeValueFrom(Dict2->string);
|
BackgroundName = Dict2->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict, "Sharp");
|
Dict2 = GetProperty(Dict, "Sharp");
|
||||||
@ -3281,14 +3277,14 @@ XTheme::GetThemeTagSettings(void* DictP)
|
|||||||
Dict = GetProperty(DictPointer, "Banner");
|
Dict = GetProperty(DictPointer, "Banner");
|
||||||
if (Dict != NULL) {
|
if (Dict != NULL) {
|
||||||
// retain for legacy themes.
|
// retain for legacy themes.
|
||||||
if ((Dict->type == kTagTypeString) && Dict->string.notEmpty()) {
|
if ( Dict->type == kTagTypeString && Dict->string.notEmpty() ) {
|
||||||
BannerFileName.takeValueFrom(Dict->string);
|
BannerFileName = Dict->string;
|
||||||
} else {
|
} else {
|
||||||
// for new placement settings
|
// for new placement settings
|
||||||
Dict2 = GetProperty(Dict, "Path");
|
Dict2 = GetProperty(Dict, "Path");
|
||||||
if (Dict2 != NULL) {
|
if (Dict2 != NULL) {
|
||||||
if ((Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if ( Dict2->type == kTagTypeString && Dict2->string.notEmpty() ) {
|
||||||
BannerFileName.takeValueFrom(Dict2->string);
|
BannerFileName = Dict2->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3446,18 +3442,18 @@ XTheme::GetThemeTagSettings(void* DictP)
|
|||||||
SelectionColor = (UINTN)GetPropertyInteger(Dict2, SelectionColor);
|
SelectionColor = (UINTN)GetPropertyInteger(Dict2, SelectionColor);
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict, "Small");
|
Dict2 = GetProperty(Dict, "Small");
|
||||||
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty()) {
|
||||||
SelectionSmallFileName.takeValueFrom(Dict2->string);
|
SelectionSmallFileName = Dict2->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict, "Big");
|
Dict2 = GetProperty(Dict, "Big");
|
||||||
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty()) {
|
||||||
SelectionBigFileName.takeValueFrom(Dict2->string);
|
SelectionBigFileName = Dict2->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict, "Indicator");
|
Dict2 = GetProperty(Dict, "Indicator");
|
||||||
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if ( Dict2 && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty()) {
|
||||||
SelectionIndicatorName.takeValueFrom(Dict2->string);
|
SelectionIndicatorName = Dict2->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict, "OnTop");
|
Dict2 = GetProperty(Dict, "OnTop");
|
||||||
@ -3496,8 +3492,8 @@ XTheme::GetThemeTagSettings(void* DictP)
|
|||||||
}
|
}
|
||||||
if (Font == FONT_LOAD) {
|
if (Font == FONT_LOAD) {
|
||||||
Dict2 = GetProperty(Dict, "Path");
|
Dict2 = GetProperty(Dict, "Path");
|
||||||
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty()) {
|
||||||
FontFileName.takeValueFrom(Dict2->string);
|
FontFileName = Dict2->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Dict2 = GetProperty(Dict, "CharWidth");
|
Dict2 = GetProperty(Dict, "CharWidth");
|
||||||
@ -3525,8 +3521,8 @@ XTheme::GetThemeTagSettings(void* DictP)
|
|||||||
NewFilm->SetIndex((UINTN)GetPropertyInteger(Dict2, 1)); //default=main screen
|
NewFilm->SetIndex((UINTN)GetPropertyInteger(Dict2, 1)); //default=main screen
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict3, "Path");
|
Dict2 = GetProperty(Dict3, "Path");
|
||||||
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty() ) {
|
if (Dict2 != NULL && (Dict2->type == kTagTypeString) && Dict2->string.notEmpty()) {
|
||||||
NewFilm->Path.takeValueFrom(Dict2->string);
|
NewFilm->Path = Dict2->string;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dict2 = GetProperty(Dict3, "Frames");
|
Dict2 = GetProperty(Dict3, "Frames");
|
||||||
@ -4080,7 +4076,7 @@ ParseSMBIOSSettings(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//DBG("BiosReleaseDate: set to %s from config, Ignore BiosReleaseDate\n", Prop1->string);
|
//DBG("BiosReleaseDate: set to %s from config, Ignore BiosReleaseDate\n", Prop1->string.c_str());
|
||||||
//DBG("Using BiosReleaseDate from clover\n");
|
//DBG("Using BiosReleaseDate from clover\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -4108,10 +4104,10 @@ ParseSMBIOSSettings(
|
|||||||
|
|
||||||
Prop = GetProperty(DictPointer, "EfiVersion");
|
Prop = GetProperty(DictPointer, "EfiVersion");
|
||||||
if (Prop != NULL) {
|
if (Prop != NULL) {
|
||||||
if (AsciiStrVersionToUint64(gSettings.EfiVersion, 4, 5) > AsciiStrVersionToUint64(XString8(Prop->string), 4, 5)) {
|
if (AsciiStrVersionToUint64(gSettings.EfiVersion, 4, 5) > AsciiStrVersionToUint64(Prop->string, 4, 5)) {
|
||||||
DBG("Using latest EfiVersion from clover: %s\n", gSettings.EfiVersion.c_str());
|
DBG("Using latest EfiVersion from clover: %s\n", gSettings.EfiVersion.c_str());
|
||||||
} else if (AsciiStrVersionToUint64(gSettings.EfiVersion, 4, 5) < AsciiStrVersionToUint64(XString8(Prop->string), 4, 5)) {
|
} else if (AsciiStrVersionToUint64(gSettings.EfiVersion, 4, 5) < AsciiStrVersionToUint64(Prop->string, 4, 5)) {
|
||||||
gSettings.EfiVersion.takeValueFrom(Prop->string).trim();
|
gSettings.EfiVersion = Prop->string;
|
||||||
DBG("Using latest EfiVersion from config: %s\n", gSettings.EfiVersion.c_str());
|
DBG("Using latest EfiVersion from config: %s\n", gSettings.EfiVersion.c_str());
|
||||||
} else {
|
} else {
|
||||||
DBG("Using EfiVersion from clover: %s\n", gSettings.EfiVersion.c_str());
|
DBG("Using EfiVersion from clover: %s\n", gSettings.EfiVersion.c_str());
|
||||||
@ -4470,7 +4466,7 @@ GetUserSettings(
|
|||||||
gSettings.ArbProperties->Child = NULL;
|
gSettings.ArbProperties->Child = NULL;
|
||||||
gSettings.ArbProperties->Device = 0; //to differ from arbitrary
|
gSettings.ArbProperties->Device = 0; //to differ from arbitrary
|
||||||
gSettings.ArbProperties->DevicePath = DevicePath; //this is pointer
|
gSettings.ArbProperties->DevicePath = DevicePath; //this is pointer
|
||||||
gSettings.ArbProperties->Label = (__typeof__(gSettings.ArbProperties->Label))AllocateCopyPool(Prop2->string.sizeInBytes() + 1, Prop2->string.c_str());
|
gSettings.ArbProperties->Label = S8Printf("%s", Prop2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
Child = &(gSettings.ArbProperties->Child);
|
Child = &(gSettings.ArbProperties->Child);
|
||||||
|
|
||||||
Prop2 = Prop2->tag; //take a <dict> for this device
|
Prop2 = Prop2->tag; //take a <dict> for this device
|
||||||
@ -4493,24 +4489,24 @@ GetUserSettings(
|
|||||||
) {
|
) {
|
||||||
if (Prop3->string[0] != '#') {
|
if (Prop3->string[0] != '#') {
|
||||||
(*Child)->MenuItem.BValue = TRUE;
|
(*Child)->MenuItem.BValue = TRUE;
|
||||||
(*Child)->Key = (__typeof__((*Child)->Key))AllocateCopyPool(Prop3->string.sizeInBytes() + 1, Prop3->string.c_str());
|
(*Child)->Key = S8Printf("%s", Prop3->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
(*Child)->MenuItem.BValue = FALSE;
|
(*Child)->MenuItem.BValue = FALSE;
|
||||||
(*Child)->Key = (__typeof__((*Child)->Key))AllocateCopyPool(Prop3->string.sizeInBytes() + 1, Prop3->string.c_str() + 1);
|
(*Child)->Key = S8Printf("%s", Prop3->string.c_str() - 1).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop3 = Prop3->tag; //expected value
|
Prop3 = Prop3->tag; //expected value
|
||||||
// DBG("<key>%s\n <value> type %d\n", (*Child)->Key, Prop3->type);
|
// DBG("<key>%s\n <value> type %d\n", (*Child)->Key, Prop3->type);
|
||||||
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
||||||
//first suppose it is Ascii string
|
//first suppose it is Ascii string
|
||||||
(*Child)->Value = (__typeof__((*Child)->Value))AllocateCopyPool(Prop3->string.sizeInBytes() + 1, Prop3->string.c_str());
|
(*Child)->Value = (UINT8*)S8Printf("%s", Prop3->string.c_str()).forgetDataWithoutFreeing();
|
||||||
(*Child)->ValueLen = Prop3->string.sizeInBytes() + 1;
|
(*Child)->ValueLen = Prop3->string.sizeInBytesIncludingTerminator();
|
||||||
(*Child)->ValueType = kTagTypeString;
|
(*Child)->ValueType = kTagTypeString;
|
||||||
}
|
}
|
||||||
else if (Prop3 && (Prop3->type == kTagTypeInteger)) {
|
else if (Prop3 && (Prop3->type == kTagTypeInteger)) {
|
||||||
(*Child)->Value = (__typeof__((*Child)->Value))AllocatePool(4);
|
(*Child)->Value = (__typeof__((*Child)->Value))AllocatePool(4);
|
||||||
CopyMem((*Child)->Value, &(Prop3->string), 4);
|
CopyMem((*Child)->Value, &Prop3->intValue, 4);
|
||||||
(*Child)->ValueLen = 4;
|
(*Child)->ValueLen = 4;
|
||||||
(*Child)->ValueType = kTagTypeInteger;
|
(*Child)->ValueType = kTagTypeInteger;
|
||||||
}
|
}
|
||||||
@ -4615,18 +4611,18 @@ GetUserSettings(
|
|||||||
|
|
||||||
Prop3 = GetProperty(Dict3, "Key");
|
Prop3 = GetProperty(Dict3, "Key");
|
||||||
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
||||||
gSettings.ArbProperties->Key = (__typeof__(gSettings.ArbProperties->Key))AllocateCopyPool(Prop3->string.sizeInBytesIncludingTerminator(), Prop3->string.c_str());
|
gSettings.ArbProperties->Key = S8Printf("%s", Prop3->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop3 = GetProperty(Dict3, "Value");
|
Prop3 = GetProperty(Dict3, "Value");
|
||||||
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
if (Prop3 && (Prop3->type == kTagTypeString) && Prop3->string.notEmpty()) {
|
||||||
//first suppose it is Ascii string
|
//first suppose it is Ascii string
|
||||||
gSettings.ArbProperties->Value = (__typeof__(gSettings.ArbProperties->Value))AllocateCopyPool(Prop3->string.sizeInBytesIncludingTerminator(), Prop3->string.c_str());
|
gSettings.ArbProperties->Value = (UINT8*)S8Printf("%s", Prop3->string.c_str()).forgetDataWithoutFreeing();
|
||||||
gSettings.ArbProperties->ValueLen = Prop3->string.sizeInBytesIncludingTerminator();
|
gSettings.ArbProperties->ValueLen = Prop3->string.sizeInBytesIncludingTerminator();
|
||||||
gSettings.ArbProperties->ValueType = kTagTypeString;
|
gSettings.ArbProperties->ValueType = kTagTypeString;
|
||||||
} else if (Prop3 && (Prop3->type == kTagTypeInteger)) {
|
} else if (Prop3 && (Prop3->type == kTagTypeInteger)) {
|
||||||
gSettings.ArbProperties->Value = (__typeof__(gSettings.ArbProperties->Value))AllocatePool(4);
|
gSettings.ArbProperties->Value = (__typeof__(gSettings.ArbProperties->Value))AllocatePool(4);
|
||||||
CopyMem(gSettings.ArbProperties->Value, &(Prop3->string), 4);
|
CopyMem(gSettings.ArbProperties->Value, &Prop3->intValue, 4);
|
||||||
gSettings.ArbProperties->ValueLen = 4;
|
gSettings.ArbProperties->ValueLen = 4;
|
||||||
gSettings.ArbProperties->ValueType = kTagTypeInteger;
|
gSettings.ArbProperties->ValueType = kTagTypeInteger;
|
||||||
} else if (Prop3 && (Prop3->type == kTagTypeTrue)) {
|
} else if (Prop3 && (Prop3->type == kTagTypeTrue)) {
|
||||||
@ -4723,17 +4719,17 @@ GetUserSettings(
|
|||||||
|
|
||||||
Prop2 = GetProperty(Dict2, "Key");
|
Prop2 = GetProperty(Dict2, "Key");
|
||||||
if (Prop2 && (Prop2->type == kTagTypeString) && Prop2->string.notEmpty()) {
|
if (Prop2 && (Prop2->type == kTagTypeString) && Prop2->string.notEmpty()) {
|
||||||
gSettings.AddProperties[Index].Key = (__typeof__(gSettings.AddProperties[Index].Key))AllocateCopyPool(Prop2->string.sizeInBytesIncludingTerminator(), Prop2->string.c_str());
|
gSettings.AddProperties[Index].Key = S8Printf("%s", Prop2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
|
|
||||||
Prop2 = GetProperty(Dict2, "Value");
|
Prop2 = GetProperty(Dict2, "Value");
|
||||||
if (Prop2 && (Prop2->type == kTagTypeString) && Prop2->string.notEmpty()) {
|
if (Prop2 && (Prop2->type == kTagTypeString) && Prop2->string.notEmpty()) {
|
||||||
//first suppose it is Ascii string
|
//first suppose it is Ascii string
|
||||||
gSettings.AddProperties[Index].Value = (__typeof__(gSettings.AddProperties[Index].Value))AllocateCopyPool(Prop2->string.sizeInBytesIncludingTerminator(), Prop2->string.c_str());
|
gSettings.AddProperties[Index].Value = (UINT8*)S8Printf("%s", Prop2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
gSettings.AddProperties[Index].ValueLen = Prop2->string.sizeInBytesIncludingTerminator();
|
gSettings.AddProperties[Index].ValueLen = Prop2->string.sizeInBytesIncludingTerminator();
|
||||||
} else if (Prop2 && (Prop2->type == kTagTypeInteger)) {
|
} else if (Prop2 && (Prop2->type == kTagTypeInteger)) {
|
||||||
gSettings.AddProperties[Index].Value = (__typeof__(gSettings.AddProperties[Index].Value))AllocatePool (4);
|
gSettings.AddProperties[Index].Value = (__typeof__(gSettings.AddProperties[Index].Value))AllocatePool (4);
|
||||||
CopyMem(gSettings.AddProperties[Index].Value, &(Prop2->string), 4);
|
CopyMem(gSettings.AddProperties[Index].Value, &Prop2->intValue, 4);
|
||||||
gSettings.AddProperties[Index].ValueLen = 4;
|
gSettings.AddProperties[Index].ValueLen = 4;
|
||||||
} else {
|
} else {
|
||||||
//else data
|
//else data
|
||||||
@ -5099,7 +5095,7 @@ GetUserSettings(
|
|||||||
} else if (IsPropertyFalse(Prop)) {
|
} else if (IsPropertyFalse(Prop)) {
|
||||||
gSettings.DropOEM_DSM = 0;
|
gSettings.DropOEM_DSM = 0;
|
||||||
} else if (Prop->type == kTagTypeInteger) {
|
} else if (Prop->type == kTagTypeInteger) {
|
||||||
gSettings.DropOEM_DSM = (UINT16)(UINTN)Prop->string;
|
gSettings.DropOEM_DSM = (UINT16)(UINTN)Prop->??;
|
||||||
} else if (Prop->type == kTagTypeDict) {
|
} else if (Prop->type == kTagTypeDict) {
|
||||||
Prop2 = GetProperty(Prop, "ATI");
|
Prop2 = GetProperty(Prop, "ATI");
|
||||||
if (IsPropertyTrue(Prop2)) {
|
if (IsPropertyTrue(Prop2)) {
|
||||||
@ -5477,17 +5473,17 @@ GetUserSettings(
|
|||||||
// Get memory vendor
|
// Get memory vendor
|
||||||
Dict2 = GetProperty(Prop3, "Vendor");
|
Dict2 = GetProperty(Prop3, "Vendor");
|
||||||
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
||||||
SlotPtr->Vendor = (__typeof__(SlotPtr->Vendor))AllocateCopyPool(Dict2->string.sizeInBytesIncludingTerminator(), Dict2->string.c_str());
|
SlotPtr->Vendor = S8Printf("%s", Dict2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
// Get memory part number
|
// Get memory part number
|
||||||
Dict2 = GetProperty(Prop3, "Part");
|
Dict2 = GetProperty(Prop3, "Part");
|
||||||
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
||||||
SlotPtr->PartNo = (__typeof__(SlotPtr->PartNo))AllocateCopyPool(Dict2->string.sizeInBytesIncludingTerminator(), Dict2->string.c_str());
|
SlotPtr->PartNo = S8Printf("%s", Dict2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
// Get memory serial number
|
// Get memory serial number
|
||||||
Dict2 = GetProperty(Prop3, "Serial");
|
Dict2 = GetProperty(Prop3, "Serial");
|
||||||
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
if (Dict2 && Dict2->type == kTagTypeString && Dict2->string.notEmpty()) {
|
||||||
SlotPtr->SerialNo = (__typeof__(SlotPtr->SerialNo))AllocateCopyPool(Dict2->string.sizeInBytesIncludingTerminator(), Dict2->string.c_str());
|
SlotPtr->SerialNo = S8Printf("%s", Dict2->string.c_str()).forgetDataWithoutFreeing();
|
||||||
}
|
}
|
||||||
// Get memory type
|
// Get memory type
|
||||||
SlotPtr->Type = MemoryTypeDdr3;
|
SlotPtr->Type = MemoryTypeDdr3;
|
||||||
@ -5808,7 +5804,7 @@ GetUserSettings(
|
|||||||
|
|
||||||
Prop = GetProperty(DictPointer, "CustomUUID");
|
Prop = GetProperty(DictPointer, "CustomUUID");
|
||||||
if (Prop != NULL) {
|
if (Prop != NULL) {
|
||||||
if (IsValidGuidAsciiString (Prop->string)) {
|
if (IsValidGuidAsciiString(Prop->string)) {
|
||||||
gSettings.CustomUuid = Prop->string;
|
gSettings.CustomUuid = Prop->string;
|
||||||
DBG("Converted CustomUUID %ls\n", gSettings.CustomUuid.wc_str());
|
DBG("Converted CustomUUID %ls\n", gSettings.CustomUuid.wc_str());
|
||||||
Status = StrToGuidLE(gSettings.CustomUuid, &gUuid);
|
Status = StrToGuidLE(gSettings.CustomUuid, &gUuid);
|
||||||
@ -5902,7 +5898,6 @@ GetUserSettings(
|
|||||||
if (DictPointer != NULL) {
|
if (DictPointer != NULL) {
|
||||||
Prop = GetProperty(DictPointer, "Theme");
|
Prop = GetProperty(DictPointer, "Theme");
|
||||||
if ((Prop != NULL) && (Prop->type == kTagTypeString) && Prop->string.notEmpty()) {
|
if ((Prop != NULL) && (Prop->type == kTagTypeString) && Prop->string.notEmpty()) {
|
||||||
// GlobalConfig.Theme = XStringW().takeValueFrom(Prop->string).forgetDataWithoutFreeing();
|
|
||||||
GlobalConfig.Theme.takeValueFrom(Prop->string);
|
GlobalConfig.Theme.takeValueFrom(Prop->string);
|
||||||
DBG("Theme from new config: %ls\n", GlobalConfig.Theme.wc_str());
|
DBG("Theme from new config: %ls\n", GlobalConfig.Theme.wc_str());
|
||||||
}
|
}
|
||||||
@ -5965,11 +5960,11 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "ProductVersion");
|
Prop = GetProperty(Dict, "ProductVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(Dict, "ProductBuildVersion");
|
Prop = GetProperty(Dict, "ProductBuildVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
Entry->BuildVersion.takeValueFrom(Prop->string);
|
Entry->BuildVersion = Prop->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5996,11 +5991,11 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "ProductVersion");
|
Prop = GetProperty(Dict, "ProductVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(Dict, "ProductBuildVersion");
|
Prop = GetProperty(Dict, "ProductBuildVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
Entry->BuildVersion.takeValueFrom(Prop->string);
|
Entry->BuildVersion = Prop->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6013,7 +6008,7 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
Status = egLoadFile(Entry->Volume->RootDir, InstallerPlist, (UINT8 **)&PlistBuffer, &PlistLen);
|
Status = egLoadFile(Entry->Volume->RootDir, InstallerPlist, (UINT8 **)&PlistBuffer, &PlistLen);
|
||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "Kernel Flags");
|
Prop = GetProperty(Dict, "Kernel Flags");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if ( Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
if ( Prop->string.contains("Install%20macOS%20BigSur") || Prop->string.contains("Install%20macOS%2011.0")) {
|
if ( Prop->string.contains("Install%20macOS%20BigSur") || Prop->string.contains("Install%20macOS%2011.0")) {
|
||||||
OSVersion = "11.0"_XS8;
|
OSVersion = "11.0"_XS8;
|
||||||
} else if ( Prop->string.contains("Install%20macOS%2010.16")) {
|
} else if ( Prop->string.contains("Install%20macOS%2010.16")) {
|
||||||
@ -6069,11 +6064,11 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "ProductVersion");
|
Prop = GetProperty(Dict, "ProductVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(Dict, "ProductBuildVersion");
|
Prop = GetProperty(Dict, "ProductBuildVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
Entry->BuildVersion.takeValueFrom(Prop->string);
|
Entry->BuildVersion = Prop->string;
|
||||||
}
|
}
|
||||||
// In InstallInfo.plist, there is no a version key only when updating from AppStore in 10.13+
|
// In InstallInfo.plist, there is no a version key only when updating from AppStore in 10.13+
|
||||||
// If use the startosinstall in 10.13+, this version key exists in InstallInfo.plist
|
// If use the startosinstall in 10.13+, this version key exists in InstallInfo.plist
|
||||||
@ -6081,7 +6076,7 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (DictPointer != NULL) {
|
if (DictPointer != NULL) {
|
||||||
Prop = GetProperty(DictPointer, "version");
|
Prop = GetProperty(DictPointer, "version");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6166,11 +6161,11 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "ProductVersion");
|
Prop = GetProperty(Dict, "ProductVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(Dict, "ProductBuildVersion");
|
Prop = GetProperty(Dict, "ProductBuildVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
Entry->BuildVersion.takeValueFrom(Prop->string);
|
Entry->BuildVersion = Prop->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -6202,11 +6197,11 @@ XString8 GetOSVersion(IN LOADER_ENTRY *Entry)
|
|||||||
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
if (!EFI_ERROR(Status) && PlistBuffer != NULL && ParseXML(PlistBuffer, &Dict, 0) == EFI_SUCCESS) {
|
||||||
Prop = GetProperty(Dict, "ProductVersion");
|
Prop = GetProperty(Dict, "ProductVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
OSVersion.takeValueFrom(Prop->string);
|
OSVersion = Prop->string;
|
||||||
}
|
}
|
||||||
Prop = GetProperty(Dict, "ProductBuildVersion");
|
Prop = GetProperty(Dict, "ProductBuildVersion");
|
||||||
if (Prop != NULL && Prop->string.notEmpty() ) {
|
if (Prop != NULL && Prop->string.notEmpty() ) {
|
||||||
Entry->BuildVersion.takeValueFrom(Prop->string);
|
Entry->BuildVersion = Prop->string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (FileExists (Entry->Volume->RootDir, L"\\com.apple.recovery.boot\\boot.efi")) {
|
} else if (FileExists (Entry->Volume->RootDir, L"\\com.apple.recovery.boot\\boot.efi")) {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "../gui/menu_items/menu_items.h"
|
#include "../gui/menu_items/menu_items.h"
|
||||||
#include "../Platform/plist.h"
|
#include "../Platform/plist.h"
|
||||||
|
//class TagStruct;
|
||||||
|
|
||||||
//// SysVariables
|
//// SysVariables
|
||||||
//typedef struct SYSVARIABLES SYSVARIABLES;
|
//typedef struct SYSVARIABLES SYSVARIABLES;
|
||||||
@ -180,20 +181,6 @@ public:
|
|||||||
CUSTOM_TOOL_ENTRY& operator=(const CUSTOM_TOOL_ENTRY&) = delete;
|
CUSTOM_TOOL_ENTRY& operator=(const CUSTOM_TOOL_ENTRY&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
kTagTypeNone,
|
|
||||||
kTagTypeDict,
|
|
||||||
kTagTypeKey,
|
|
||||||
kTagTypeString,
|
|
||||||
kTagTypeInteger,
|
|
||||||
kTagTypeData,
|
|
||||||
kTagTypeDate,
|
|
||||||
kTagTypeFalse,
|
|
||||||
kTagTypeTrue,
|
|
||||||
kTagTypeArray,
|
|
||||||
kTagTypeFloat
|
|
||||||
} TAG_TYPE;
|
|
||||||
|
|
||||||
class DEV_PROPERTY
|
class DEV_PROPERTY
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "StartupSound.h"
|
#include "StartupSound.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "Nvram.h"
|
#include "Nvram.h"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
///*++
|
///*++
|
||||||
//
|
//
|
||||||
//Copyright (c) 2005 - 2007, Intel Corporation
|
|
||||||
//All rights reserved. This program and the accompanying materials
|
//All rights reserved. This program and the accompanying materials
|
||||||
//are licensed and made available under the terms and conditions of the BSD License
|
//are licensed and made available under the terms and conditions of the BSD License
|
||||||
//which accompanies this distribution. The full text of the license may be found at
|
//which accompanies this distribution. The full text of the license may be found at
|
||||||
@ -21,7 +20,7 @@
|
|||||||
//
|
//
|
||||||
//--*/
|
//--*/
|
||||||
//
|
//
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
//
|
//
|
||||||
//VOID LowCase (IN OUT CHAR8 *Str)
|
//VOID LowCase (IN OUT CHAR8 *Str)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
JrCs 2014
|
JrCs 2014
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
XString8 NonDetected = "10.10.10"_XS8; //longer string
|
XString8 NonDetected = "10.10.10"_XS8; //longer string
|
||||||
|
|
||||||
|
@ -5,13 +5,14 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "ati.h"
|
#include "ati.h"
|
||||||
#include "ati_reg.h"
|
#include "ati_reg.h"
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "../include/Pci.h"
|
#include "../include/Pci.h"
|
||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_ATI 1
|
#define DEBUG_ATI 1
|
||||||
|
@ -7,11 +7,11 @@
|
|||||||
* big thank to Islam M. Ahmed Zaid for the updating the collection
|
* big thank to Islam M. Ahmed Zaid for the updating the collection
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include "Platform.h" //this include needed for Uefi types
|
//#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile //this include needed for Uefi types
|
||||||
//#include "ati_reg.h"
|
//#include "ati_reg.h"
|
||||||
#include "../include/Pci.h"
|
#include "../include/Pci.h"
|
||||||
#include "device_inject.h"
|
#include "device_inject.h"
|
||||||
|
class LOADER_ENTRY;
|
||||||
|
|
||||||
#define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x6e
|
#define OFFSET_TO_GET_ATOMBIOS_STRINGS_START 0x6e
|
||||||
#define DATVAL(x) {kPtr, sizeof(x), (UINT8 *)x}
|
#define DATVAL(x) {kPtr, sizeof(x), (UINT8 *)x}
|
||||||
|
@ -5,7 +5,7 @@ This is part of the libb64 project, and has been placed in the public domain.
|
|||||||
For details, see http://sourceforge.net/projects/libb64
|
For details, see http://sourceforge.net/projects/libb64
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "b64cdecode.h"
|
#include "b64cdecode.h"
|
||||||
|
|
||||||
int base64_decode_value(char value_in)
|
int base64_decode_value(char value_in)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "nvidia.h"
|
#include "nvidia.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#ifndef PLATFORM_CARD_VLIST_H_
|
#ifndef PLATFORM_CARD_VLIST_H_
|
||||||
#define PLATFORM_CARD_VLIST_H_
|
#define PLATFORM_CARD_VLIST_H_
|
||||||
|
|
||||||
|
#include "../Platform/plist.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
UINT32 Signature;
|
UINT32 Signature;
|
||||||
|
@ -34,10 +34,11 @@
|
|||||||
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
* @APPLE_OSREFERENCE_LICENSE_HEADER_END@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
#include "kernel_patcher.h"
|
#include "kernel_patcher.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_CPU 1
|
#define DEBUG_CPU 1
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "device_inject.h"
|
#include "device_inject.h"
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_INJECT
|
#ifndef DEBUG_INJECT
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
* Cleaned and merged by iNDi
|
* Cleaned and merged by iNDi
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include "Platform.h"
|
|
||||||
|
|
||||||
#ifndef __LIBSAIO_DEVICE_INJECT_H
|
#ifndef __LIBSAIO_DEVICE_INJECT_H
|
||||||
#define __LIBSAIO_DEVICE_INJECT_H
|
#define __LIBSAIO_DEVICE_INJECT_H
|
||||||
|
|
||||||
|
@ -61,11 +61,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "gma.h"
|
#include "gma.h"
|
||||||
#include "platformdata.h"
|
#include "platformdata.h"
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_GMA
|
#ifndef DEBUG_GMA
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#ifndef __LIBSAIO_GMA_H
|
#ifndef __LIBSAIO_GMA_H
|
||||||
#define __LIBSAIO_GMA_H
|
#define __LIBSAIO_GMA_H
|
||||||
|
|
||||||
#include "device_inject.h"
|
#include "device_inject.h"
|
||||||
|
#include "../gui/menu_items/menu_items.h"
|
||||||
|
|
||||||
BOOLEAN setup_gma_devprop(LOADER_ENTRY *Entry, pci_dt_t *gma_dev);
|
BOOLEAN setup_gma_devprop(LOADER_ENTRY *Entry, pci_dt_t *gma_dev);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
guid.c
|
guid.c
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
//this is standard
|
//this is standard
|
||||||
//gEfiSmbios3TableGuid = { 0xF2FD1544, 0x9794, 0x4A2C, { 0x99, 0x2E, 0xE5, 0xBB, 0xCF, 0x20, 0xE3, 0x94 }};
|
//gEfiSmbios3TableGuid = { 0xF2FD1544, 0x9794, 0x4A2C, { 0x99, 0x2E, 0xE5, 0xBB, 0xCF, 0x20, 0xE3, 0x94 }};
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef PLATFORM_GUID_H_
|
#ifndef PLATFORM_GUID_H_
|
||||||
#define PLATFORM_GUID_H_
|
#define PLATFORM_GUID_H_
|
||||||
|
|
||||||
|
#include "../cpp_foundation/XStringArray.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
|
|
||||||
/** Returns TRUE is Str is ascii Guid in format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
|
/** Returns TRUE is Str is ascii Guid in format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */
|
||||||
|
@ -18,11 +18,12 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
#include "../include/Pci.h"
|
#include "../include/Pci.h"
|
||||||
#include "device_inject.h"
|
#include "device_inject.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_HDA
|
#ifndef DEBUG_HDA
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <UefiLoader.h>
|
#include <UefiLoader.h>
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
//#include "LoaderUefi.h"
|
//#include "LoaderUefi.h"
|
||||||
#include "Nvram.h"
|
#include "Nvram.h"
|
||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "kext_inject.h"
|
#include "kext_inject.h"
|
||||||
#include "DataHubCpu.h"
|
#include "DataHubCpu.h"
|
||||||
|
#include "../Platform/plist.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define KEXT_INJECT_DEBUG 1
|
#define KEXT_INJECT_DEBUG 1
|
||||||
|
@ -16,6 +16,9 @@ kext injection
|
|||||||
////////////////////
|
////////////////////
|
||||||
#define RoundPage(x) ((((UINTN)(x)) + EFI_PAGE_SIZE - 1) & ~(EFI_PAGE_SIZE - 1))
|
#define RoundPage(x) ((((UINTN)(x)) + EFI_PAGE_SIZE - 1) & ~(EFI_PAGE_SIZE - 1))
|
||||||
|
|
||||||
|
|
||||||
|
#define KERNEL_MAX_SIZE 80000000
|
||||||
|
|
||||||
#define KEXT_SIGNATURE SIGNATURE_32('M','O','S','X')
|
#define KEXT_SIGNATURE SIGNATURE_32('M','O','S','X')
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -15,8 +15,10 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <UefiLoader.h>
|
#include <UefiLoader.h>
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "kernel_patcher.h"
|
#include "kernel_patcher.h"
|
||||||
|
#include "kext_inject.h"
|
||||||
|
#include "../gui/menu_items/menu_items.h"
|
||||||
|
|
||||||
#define OLD_METHOD 0
|
#define OLD_METHOD 0
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "nvidia.h"
|
#include "nvidia.h"
|
||||||
#include "device_inject.h"
|
#include "device_inject.h"
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
@ -55,6 +55,7 @@
|
|||||||
#include "FixBiosDsdt.h"
|
#include "FixBiosDsdt.h"
|
||||||
#include "../include/Pci.h"
|
#include "../include/Pci.h"
|
||||||
#include "../include/Devices.h"
|
#include "../include/Devices.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_NVIDIA
|
#ifndef DEBUG_NVIDIA
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
platformdata.c
|
platformdata.c
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "nvidia.h"
|
#include "nvidia.h"
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
* code split out from drivers.c by Soren Spies, 2005
|
* code split out from drivers.c by Soren Spies, 2005
|
||||||
*/
|
*/
|
||||||
//Slice - rewrite for UEFI with more functions like Copyright (c) 2003 Apple Computer
|
//Slice - rewrite for UEFI with more functions like Copyright (c) 2003 Apple Computer
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "b64cdecode.h"
|
#include "b64cdecode.h"
|
||||||
#include "plist.h"
|
#include "plist.h"
|
||||||
#include "../libeg/FloatLib.h"
|
#include "../libeg/FloatLib.h"
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
TagPtr gTagsFree = NULL;
|
XObjArray<TagStruct> gTagsFree;
|
||||||
CHAR8* buffer_start = NULL;
|
CHAR8* buffer_start = NULL;
|
||||||
|
|
||||||
// Forward declarations
|
// Forward declarations
|
||||||
@ -517,7 +517,7 @@ EFI_STATUS ParseTagList( CHAR8* buffer, TagPtr* tag, UINT32 type, UINT32 empty,
|
|||||||
tmpTag->string.setEmpty();
|
tmpTag->string.setEmpty();
|
||||||
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start : 0);
|
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start : 0);
|
||||||
tmpTag->tag = tagList;
|
tmpTag->tag = tagList;
|
||||||
tmpTag->tagNext = 0;
|
tmpTag->tagNext = NULL;
|
||||||
|
|
||||||
*tag = tmpTag;
|
*tag = tmpTag;
|
||||||
*lenPtr=pos;
|
*lenPtr=pos;
|
||||||
@ -556,7 +556,7 @@ EFI_STATUS ParseTagKey( char * buffer, TagPtr* tag, UINT32* lenPtr)
|
|||||||
tmpTag->string.takeValueFrom(buffer);
|
tmpTag->string.takeValueFrom(buffer);
|
||||||
tmpTag->tag = subTag;
|
tmpTag->tag = subTag;
|
||||||
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
||||||
tmpTag->tagNext = 0;
|
tmpTag->tagNext = NULL;
|
||||||
|
|
||||||
*tag = tmpTag;
|
*tag = tmpTag;
|
||||||
*lenPtr = length + length2;
|
*lenPtr = length + length2;
|
||||||
@ -613,19 +613,19 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
tmpTag = NewTag();
|
tmpTag = NewTag();
|
||||||
if (tmpTag == NULL) {
|
tmpTag->type = kTagTypeInteger;
|
||||||
return EFI_OUT_OF_RESOURCES;
|
tmpTag->string.setEmpty();
|
||||||
}
|
tmpTag->intValue = 0;
|
||||||
|
tmpTag->floatValue = 0;
|
||||||
|
tmpTag->tag = NULL;
|
||||||
|
tmpTag->offset = 0;
|
||||||
|
tmpTag->tagNext = NULL;
|
||||||
|
|
||||||
size = length;
|
size = length;
|
||||||
|
|
||||||
integer = 0;
|
integer = 0;
|
||||||
if(buffer[0] == '<') {
|
|
||||||
tmpTag->type = kTagTypeInteger;
|
|
||||||
tmpTag->string.setEmpty();
|
|
||||||
tmpTag->tag = 0;
|
|
||||||
tmpTag->offset = 0;
|
|
||||||
tmpTag->tagNext = 0;
|
|
||||||
|
|
||||||
|
if(buffer[0] == '<')
|
||||||
|
{
|
||||||
*tag = tmpTag;
|
*tag = tmpTag;
|
||||||
length = 0;
|
length = 0;
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
@ -675,12 +675,8 @@ EFI_STATUS ParseTagInteger(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmpTag->type = kTagTypeInteger;
|
|
||||||
tmpTag->string.S8Printf("%lld", integer);
|
|
||||||
tmpTag->intValue = integer;
|
tmpTag->intValue = integer;
|
||||||
tmpTag->tag = NULL;
|
|
||||||
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
||||||
tmpTag->tagNext = NULL;
|
|
||||||
|
|
||||||
*tag = tmpTag;
|
*tag = tmpTag;
|
||||||
*lenPtr = length;
|
*lenPtr = length;
|
||||||
@ -714,8 +710,6 @@ EFI_STATUS ParseTagFloat(CHAR8* buffer, TagPtr * tag, UINT32* lenPtr)
|
|||||||
AsciiStrToFloat(buffer, NULL, &fVar.B.fNum);
|
AsciiStrToFloat(buffer, NULL, &fVar.B.fNum);
|
||||||
//----
|
//----
|
||||||
tmpTag->type = kTagTypeFloat;
|
tmpTag->type = kTagTypeFloat;
|
||||||
tmpTag->string.S8Printf("%f", fVar.B.fNum);
|
|
||||||
tmpTag->intValue = (INTN)fVar.B.fNum;
|
|
||||||
tmpTag->floatValue = fVar.B.fNum;
|
tmpTag->floatValue = fVar.B.fNum;
|
||||||
tmpTag->tag = NULL;
|
tmpTag->tag = NULL;
|
||||||
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
tmpTag->offset = (UINT32)(buffer_start ? buffer - buffer_start: 0);
|
||||||
@ -905,39 +899,19 @@ EFI_STATUS FixDataMatchingTag( CHAR8* buffer, CONST CHAR8* tag, UINT32* lenPtr)
|
|||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
// NewTag
|
// NewTag
|
||||||
#define TAGCACHESIZE 0x1000
|
|
||||||
|
|
||||||
TagPtr NewTag( void )
|
TagPtr NewTag( void )
|
||||||
{
|
{
|
||||||
UINT32 cnt;
|
|
||||||
TagPtr tag;
|
TagPtr tag;
|
||||||
|
|
||||||
if (gTagsFree == NULL) {
|
if ( gTagsFree.size() > 0 ) {
|
||||||
tag = (TagPtr)AllocateZeroPool(TAGCACHESIZE * sizeof(TagStruct));
|
tag = &gTagsFree[0];
|
||||||
if (tag == NULL) {
|
gTagsFree.RemoveWithoutFreeingAtIndex(0);
|
||||||
return NULL;
|
return tag;
|
||||||
}
|
|
||||||
|
|
||||||
// Initalize the new tags.
|
|
||||||
for (cnt = 0; cnt < TAGCACHESIZE - 1; cnt++) {
|
|
||||||
tag[cnt].type = kTagTypeNone;
|
|
||||||
tag[cnt].tagNext = tag + cnt + 1;
|
|
||||||
}
|
|
||||||
tag[TAGCACHESIZE - 1].tagNext = 0;
|
|
||||||
|
|
||||||
gTagsFree = tag;
|
|
||||||
}
|
}
|
||||||
|
tag = new TagStruct();
|
||||||
tag = gTagsFree;
|
|
||||||
gTagsFree = tag->tagNext;
|
|
||||||
if (gTagsFree == NULL) { //end of cache
|
|
||||||
gTagsFree = NewTag();
|
|
||||||
tag->tagNext = gTagsFree; //add new cache to old one
|
|
||||||
}
|
|
||||||
|
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
#undef TAGCACHESIZE
|
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
// XMLFreeTag
|
// XMLFreeTag
|
||||||
@ -964,8 +938,8 @@ void FreeTag( TagPtr tag )
|
|||||||
tag->dataLen = 0;
|
tag->dataLen = 0;
|
||||||
tag->tag = NULL;
|
tag->tag = NULL;
|
||||||
tag->offset = 0;
|
tag->offset = 0;
|
||||||
tag->tagNext = gTagsFree;
|
tag->tagNext = NULL;
|
||||||
gTagsFree = tag;
|
gTagsFree.AddReference(tag, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,9 +26,24 @@
|
|||||||
#define kXMLTagFloat "real"
|
#define kXMLTagFloat "real"
|
||||||
|
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
kTagTypeNone,
|
||||||
|
kTagTypeDict,
|
||||||
|
kTagTypeKey,
|
||||||
|
kTagTypeString,
|
||||||
|
kTagTypeInteger,
|
||||||
|
kTagTypeData,
|
||||||
|
kTagTypeDate,
|
||||||
|
kTagTypeFalse,
|
||||||
|
kTagTypeTrue,
|
||||||
|
kTagTypeArray,
|
||||||
|
kTagTypeFloat
|
||||||
|
} TAG_TYPE;
|
||||||
|
|
||||||
typedef struct TagStruct {
|
|
||||||
|
|
||||||
|
class TagStruct
|
||||||
|
{
|
||||||
|
public:
|
||||||
UINTN type;
|
UINTN type;
|
||||||
XString8 string;
|
XString8 string;
|
||||||
INTN intValue;
|
INTN intValue;
|
||||||
@ -36,10 +51,16 @@ typedef struct TagStruct {
|
|||||||
UINT8 *data;
|
UINT8 *data;
|
||||||
UINTN dataLen;
|
UINTN dataLen;
|
||||||
UINTN offset;
|
UINTN offset;
|
||||||
struct TagStruct *tag;
|
TagStruct *tag;
|
||||||
struct TagStruct *tagNext;
|
TagStruct *tagNext;
|
||||||
|
|
||||||
} TagStruct, *TagPtr;
|
TagStruct() : type(kTagTypeNone), string(), intValue(0), floatValue(0), data(0), dataLen(0), offset(0), tag(NULL), tagNext(NULL) {}
|
||||||
|
TagStruct(const TagStruct& other) = delete; // Can be defined if needed
|
||||||
|
const TagStruct& operator = ( const TagStruct & ) = delete; // Can be defined if needed
|
||||||
|
~TagStruct() {}
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef TagStruct* TagPtr;
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
SmbiosGen.c
|
SmbiosGen.c
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "smbios.h"
|
#include "smbios.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "platformdata.h"
|
#include "platformdata.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
UINT8 EmbeddedSound[] = {
|
UINT8 EmbeddedSound[] = {
|
||||||
0x52, 0x49, 0x46, 0x46, 0x24, 0x64, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45,
|
0x52, 0x49, 0x46, 0x46, 0x24, 0x64, 0x00, 0x00, 0x57, 0x41, 0x56, 0x45,
|
||||||
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
0x66, 0x6d, 0x74, 0x20, 0x10, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00,
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
* XMP detection - apianti
|
* XMP detection - apianti
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "Platform.h"
|
#include "../Platform/Settings.h"
|
||||||
#include "spd.h"
|
#include "spd.h"
|
||||||
#include "memvendors.h"
|
#include "memvendors.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* based on works by mackerintel 2008, orByte 2006, Signal64, THeKiNG
|
* based on works by mackerintel 2008, orByte 2006, Signal64, THeKiNG
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_USB 0
|
#define DEBUG_USB 0
|
||||||
@ -20,7 +20,6 @@
|
|||||||
#define DBG(...) DebugLog(DEBUG_USB, __VA_ARGS__)
|
#define DBG(...) DebugLog(DEBUG_USB, __VA_ARGS__)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define PCI_IF_OHCI 0x10
|
#define PCI_IF_OHCI 0x10
|
||||||
#define PCI_IF_XHCI 0x30
|
#define PCI_IF_XHCI 0x30
|
||||||
#define OHCI_CTRL_MASK (1 << 9)
|
#define OHCI_CTRL_MASK (1 << 9)
|
||||||
|
@ -107,7 +107,7 @@ class XObjArrayNC
|
|||||||
void Remove(const TYPE &Element);
|
void Remove(const TYPE &Element);
|
||||||
void RemoveAtIndex(size_t nIndex);
|
void RemoveAtIndex(size_t nIndex);
|
||||||
void RemoveAtIndex(int nIndex);
|
void RemoveAtIndex(int nIndex);
|
||||||
void RemoveWithoutFreeing(size_t nIndex); // If you use this, there might be a design problem somewhere ???
|
void RemoveWithoutFreeingAtIndex(size_t nIndex); // If you use this, there might be a design problem somewhere ???
|
||||||
//void Remove(int nIndex);
|
//void Remove(int nIndex);
|
||||||
void RemoveAllBut(const TYPE *Element);
|
void RemoveAllBut(const TYPE *Element);
|
||||||
|
|
||||||
@ -429,12 +429,9 @@ void XObjArrayNC<TYPE>::SetFreeIt(const TYPE *Element, bool Flag)
|
|||||||
template<class TYPE>
|
template<class TYPE>
|
||||||
void XObjArrayNC<TYPE>::RemoveAtIndex(size_t nIndex)
|
void XObjArrayNC<TYPE>::RemoveAtIndex(size_t nIndex)
|
||||||
{
|
{
|
||||||
if ( nIndex < XObjArrayNC<TYPE>::_Len )
|
if ( nIndex >= XObjArrayNC<TYPE>::_Len ) {
|
||||||
{
|
panic("void XObjArrayNC<TYPE>::RemoveAtIndex(size_t nIndex) : BUG nIndex (%zu) is > length(). System halted\n", nIndex);
|
||||||
if ( nIndex >= XObjArrayNC<TYPE>::_Len ) {
|
}
|
||||||
panic("void XObjArrayNC<TYPE>::RemoveAtIndex(size_t nIndex) : BUG nIndex (%zu) is > length(). System halted\n", nIndex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( _Data[nIndex].FreeIt )
|
if ( _Data[nIndex].FreeIt )
|
||||||
{
|
{
|
||||||
TYPE *TmpObject; // BCB 4 oblige me to use a tmp var for doing the delete.
|
TYPE *TmpObject; // BCB 4 oblige me to use a tmp var for doing the delete.
|
||||||
@ -452,7 +449,7 @@ void XObjArrayNC<TYPE>::RemoveAtIndex(size_t nIndex)
|
|||||||
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
||||||
/* RemoveWithoutFreeing(size_t) */
|
/* RemoveWithoutFreeing(size_t) */
|
||||||
template<class TYPE>
|
template<class TYPE>
|
||||||
void XObjArrayNC<TYPE>::RemoveWithoutFreeing(size_t nIndex)
|
void XObjArrayNC<TYPE>::RemoveWithoutFreeingAtIndex(size_t nIndex)
|
||||||
{
|
{
|
||||||
if ( nIndex < _Len )
|
if ( nIndex < _Len )
|
||||||
{
|
{
|
||||||
@ -461,7 +458,7 @@ void XObjArrayNC<TYPE>::RemoveWithoutFreeing(size_t nIndex)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
throw "XObjArray::RemoveWithoutFreeing(size_t) -> nIndex > _Len\n";
|
panic("XObjArray::RemoveWithoutFreeing(size_t) -> nIndex > _Len");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define DBG(...)
|
#define DBG(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "XString.h"
|
#include "XString.h"
|
||||||
|
|
||||||
#include "../../Include/Library/printf_lite.h"
|
#include "../../Include/Library/printf_lite.h"
|
||||||
|
@ -52,6 +52,7 @@ class XString8 : public XStringAbstract<char, XString8>
|
|||||||
using XStringAbstract<char, XString8>::operator =;
|
using XStringAbstract<char, XString8>::operator =;
|
||||||
|
|
||||||
const char* c_str() const { return m_data; }
|
const char* c_str() const { return m_data; }
|
||||||
|
char* copy_str() const { return (char*)AllocateCopyPool(length()+1, m_data); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void transmitS8Printf(const char* buf, unsigned int nbchar, void* context)
|
static void transmitS8Printf(const char* buf, unsigned int nbchar, void* context)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/XStringArray.h"
|
#include "../cpp_foundation/XStringArray.h"
|
||||||
#include "global_test.h"
|
#include "global_test.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XBuffer.h"
|
#include "../cpp_foundation/XBuffer.h"
|
||||||
|
|
||||||
int XBuffer_tests()
|
int XBuffer_tests()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XStringArray.h"
|
#include "../cpp_foundation/XStringArray.h"
|
||||||
|
|
||||||
int XStringArray_tests()
|
int XStringArray_tests()
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "global_test.h"
|
#include "global_test.h"
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2017 Jief. All rights reserved.
|
// Copyright © 2017 Jief. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
#include <printf_lite-test-cpp_conf.h>
|
#include <printf_lite-test-cpp_conf.h>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2017 Jief. All rights reserved.
|
// Copyright © 2017 Jief. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
#include <printlib-test-cpp_conf.h>
|
#include <printlib-test-cpp_conf.h>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
#include "global_test.h"
|
#include "global_test.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
#include "global_test.h"
|
#include "global_test.h"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_foundation/unicode_conversions.h"
|
#include "../cpp_foundation/unicode_conversions.h"
|
||||||
#include "global_test.h"
|
#include "global_test.h"
|
||||||
|
@ -16,7 +16,8 @@ extern "C" {
|
|||||||
// #include <stddef.h>
|
// #include <stddef.h>
|
||||||
}
|
}
|
||||||
#include "globals_ctor.h"
|
#include "globals_ctor.h"
|
||||||
#include <Platform/Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
#include <Protocol/LoadedImage.h>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform/Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define DBG(...) DebugLog(2, __VA_ARGS__)
|
#define DBG(...) DebugLog(2, __VA_ARGS__)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <Platform/Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define DBG(...) DebugLog(2, __VA_ARGS__)
|
#define DBG(...) DebugLog(2, __VA_ARGS__)
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#include "../refit/screen.h"
|
#include "../refit/screen.h"
|
||||||
#include "../libeg/XImage.h"
|
#include "../libeg/XImage.h"
|
||||||
#include "../libeg/XTheme.h"
|
#include "../libeg/XTheme.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "entry_scan.h"
|
#include "entry_scan.h"
|
||||||
#include "../refit/menu.h"
|
#include "../refit/menu.h"
|
||||||
#include "../Platform/guid.h"
|
#include "../Platform/guid.h"
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
#include "../gui/menu_items/menu_items.h"
|
||||||
|
|
||||||
extern REFIT_MENU_ITEM_RETURN MenuEntryReturn;
|
extern REFIT_MENU_ITEM_RETURN MenuEntryReturn;
|
||||||
extern REFIT_MENU_ITEM_OPTIONS MenuEntryOptions;
|
extern REFIT_MENU_ITEM_OPTIONS MenuEntryOptions;
|
||||||
|
@ -34,7 +34,6 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//#include "Platform.h"
|
|
||||||
#include "../libeg/libegint.h" //this includes platform.h
|
#include "../libeg/libegint.h" //this includes platform.h
|
||||||
//#include "../include/scroll_images.h"
|
//#include "../include/scroll_images.h"
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
#define __REFIT_MENU_SCREEN_H__
|
#define __REFIT_MENU_SCREEN_H__
|
||||||
|
|
||||||
|
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
#include "../libeg/libegint.h"
|
#include "../libeg/libegint.h"
|
||||||
//#include "../libeg/libeg.h"
|
//#include "../libeg/libeg.h"
|
||||||
#include "../refit/lib.h"
|
#include "../refit/lib.h"
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "../../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "menu_items.h"
|
#include "menu_items.h"
|
||||||
|
|
||||||
#include "../../libeg/libeg.h"
|
#include "../../libeg/libeg.h"
|
||||||
|
@ -39,10 +39,11 @@
|
|||||||
* THIS will most likely disappear soon !
|
* THIS will most likely disappear soon !
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
//#include "../refit/lib.h"
|
#include "../refit/lib.h"
|
||||||
//#include "menu_items/menu_items.h"
|
#include "menu_items/menu_items.h"
|
||||||
//#include "../entry_scan/common.h"
|
//#include "../entry_scan/common.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
CONST XString8 ArgOptional[NUM_OPT] = {
|
CONST XString8 ArgOptional[NUM_OPT] = {
|
||||||
"arch=i386"_XS8, //0
|
"arch=i386"_XS8, //0
|
||||||
|
@ -46,6 +46,7 @@ extern "C" {
|
|||||||
#include <Library/VideoBiosPatchLib.h>
|
#include <Library/VideoBiosPatchLib.h>
|
||||||
#include <Library/MemLogLib.h>
|
#include <Library/MemLogLib.h>
|
||||||
#include <Library/WaveLib.h>
|
#include <Library/WaveLib.h>
|
||||||
|
#include <Library/IoLib.h>
|
||||||
|
|
||||||
#include <Framework/FrameworkInternalFormRepresentation.h>
|
#include <Framework/FrameworkInternalFormRepresentation.h>
|
||||||
|
|
||||||
@ -57,6 +58,8 @@ extern "C" {
|
|||||||
#include <IndustryStandard/AppleFeatures.h>
|
#include <IndustryStandard/AppleFeatures.h>
|
||||||
#include <IndustryStandard/Bmp.h>
|
#include <IndustryStandard/Bmp.h>
|
||||||
#include <IndustryStandard/HdaCodec.h>
|
#include <IndustryStandard/HdaCodec.h>
|
||||||
|
#include <IndustryStandard/Pci22.h>
|
||||||
|
#include <IndustryStandard/Pci23.h>
|
||||||
|
|
||||||
#include <Protocol/PciIo.h>
|
#include <Protocol/PciIo.h>
|
||||||
#include <Protocol/AudioIo.h>
|
#include <Protocol/AudioIo.h>
|
||||||
|
@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||||||
|
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
//#include "IO.h"
|
//#include "IO.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
|
|
||||||
#include "VectorGraphics.h"
|
#include "VectorGraphics.h"
|
||||||
|
|
||||||
#include "../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#include "nanosvg.h"
|
#include "nanosvg.h"
|
||||||
#include "FloatLib.h"
|
#include "FloatLib.h"
|
||||||
#include "lodepng.h"
|
#include "lodepng.h"
|
||||||
#include "../refit/screen.h"
|
#include "../refit/screen.h"
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_VEC 1
|
#define DEBUG_VEC 1
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#define LIBEG_VECTORGRAPHICS_H_
|
#define LIBEG_VECTORGRAPHICS_H_
|
||||||
|
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../Platform/plist.h"
|
|
||||||
#include "XImage.h"
|
#include "XImage.h"
|
||||||
|
|
||||||
INTN renderSVGtext(XImage* TextBufferXY, INTN posX, INTN posY, INTN textType, const XStringW& string, UINTN Cursor);
|
INTN renderSVGtext(XImage* TextBufferXY, INTN posX, INTN posY, INTN textType, const XStringW& string, UINTN Cursor);
|
||||||
|
@ -16,9 +16,9 @@ extern "C" {
|
|||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../libeg/libeg.h"
|
#include "../libeg/libeg.h"
|
||||||
#include "XImage.h"
|
#include "XImage.h"
|
||||||
#include "XTheme.h"
|
|
||||||
|
|
||||||
class XTheme;
|
class XTheme;
|
||||||
|
class XCinema;
|
||||||
|
|
||||||
class FILM
|
class FILM
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,8 @@
|
|||||||
#include "lodepng.h"
|
#include "lodepng.h"
|
||||||
#include "nanosvg.h"
|
#include "nanosvg.h"
|
||||||
#include "libegint.h" //for egDecodeIcns
|
#include "libegint.h" //for egDecodeIcns
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_XIMAGE 1
|
#define DEBUG_XIMAGE 1
|
||||||
|
@ -5,9 +5,6 @@ This class will replace EG_IMAGE structure and methods
|
|||||||
#if !defined(__XIMAGE_H__)
|
#if !defined(__XIMAGE_H__)
|
||||||
#define __XIMAGE_H__
|
#define __XIMAGE_H__
|
||||||
|
|
||||||
//#include <Platform.h>
|
|
||||||
//
|
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <Protocol/GraphicsOutput.h>
|
#include <Protocol/GraphicsOutput.h>
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
* a class for mouse support
|
* a class for mouse support
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <Platform.h>
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
#include "XPointer.h"
|
#include "XPointer.h"
|
||||||
#include "libegint.h" //this includes platform.h
|
#include "libegint.h" //this includes platform.h
|
||||||
#include "../refit/screen.h"
|
#include "../refit/screen.h"
|
||||||
#include "../refit/menu.h"
|
#include "../refit/menu.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_MOUSE 0
|
#define DEBUG_MOUSE 0
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
//#include <efi.h>
|
//#include <efi.h>
|
||||||
//#include <efilib.h>
|
//#include <efilib.h>
|
||||||
|
|
||||||
#include "../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
|
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
@ -34,8 +34,10 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "libegint.h"
|
#include "libegint.h"
|
||||||
#include "lodepng.h"
|
#include "lodepng.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
|
|
||||||
//#include <efiUgaDraw.h>
|
//#include <efiUgaDraw.h>
|
||||||
|
@ -39,6 +39,7 @@
|
|||||||
#include "FloatLib.h"
|
#include "FloatLib.h"
|
||||||
#include "../Platform/b64cdecode.h"
|
#include "../Platform/b64cdecode.h"
|
||||||
#include "XImage.h"
|
#include "XImage.h"
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_SVG 0
|
#define DEBUG_SVG 0
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
}
|
}
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
//TODO exclude intersection between libeg and platform
|
//TODO exclude intersection between libeg and platform
|
||||||
#include "libeg.h"
|
#include "libeg.h"
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "nanosvg.h"
|
#include "nanosvg.h"
|
||||||
#include "FloatLib.h"
|
#include "FloatLib.h"
|
||||||
|
#include "XImage.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_SVG 0
|
#define DEBUG_SVG 0
|
||||||
|
@ -42,6 +42,8 @@ extern "C" {
|
|||||||
#include "libegint.h"
|
#include "libegint.h"
|
||||||
#include "nanosvg.h"
|
#include "nanosvg.h"
|
||||||
#include "VectorGraphics.h"
|
#include "VectorGraphics.h"
|
||||||
|
#include "XTheme.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
//#include "egemb_font.h"
|
//#include "egemb_font.h"
|
||||||
//#define FONT_CELL_WIDTH (7)
|
//#define FONT_CELL_WIDTH (7)
|
||||||
|
@ -34,10 +34,12 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "../Platform/guid.h"
|
#include "../Platform/guid.h"
|
||||||
#include "../Platform/APFS.h"
|
#include "../Platform/APFS.h"
|
||||||
|
#include "../refit/lib.h"
|
||||||
|
#include "../Platform/Settings.h"
|
||||||
|
|
||||||
#ifndef DEBUG_ALL
|
#ifndef DEBUG_ALL
|
||||||
#define DEBUG_LIB 1
|
#define DEBUG_LIB 1
|
||||||
|
@ -498,9 +498,6 @@ extern BOOLEAN DumpVariable(CHAR16* Name, EFI_GUID* Guid, INTN DevicePathAt);
|
|||||||
//VOID FilterKextPatches(IN LOADER_ENTRY *Entry);
|
//VOID FilterKextPatches(IN LOADER_ENTRY *Entry);
|
||||||
|
|
||||||
|
|
||||||
#define KERNEL_MAX_SIZE 80000000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VOID ReinitVolumes(VOID);
|
VOID ReinitVolumes(VOID);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../cpp_foundation/XString.h"
|
#include "../cpp_foundation/XString.h"
|
||||||
#include "../cpp_util/globals_ctor.h"
|
#include "../cpp_util/globals_ctor.h"
|
||||||
#include "../cpp_util/globals_dtor.h"
|
#include "../cpp_util/globals_dtor.h"
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
//#include "Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../libeg/libegint.h" //this includes platform.h
|
#include "../libeg/libegint.h"
|
||||||
//#include "../include/scroll_images.h"
|
//#include "../include/scroll_images.h"
|
||||||
|
|
||||||
#include "../Platform/Settings.h"
|
#include "../Platform/Settings.h"
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "screen.h"
|
#include "screen.h"
|
||||||
#include "../Platform/Platform.h"
|
#include <Platform.h> // Only use angled for Platform, else, xcode project won't compile
|
||||||
#include "../libeg/libegint.h" // included Platform.h
|
#include "../libeg/libegint.h"
|
||||||
#include "../libeg/XTheme.h"
|
#include "../libeg/XTheme.h"
|
||||||
#include "../Platform/BasicIO.h"
|
#include "../Platform/BasicIO.h"
|
||||||
#include "menu.h"
|
#include "menu.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user