OpenCoreMisc: Add Enabled property to Tools

This commit is contained in:
vit9696 2019-06-09 19:40:29 +03:00
parent 1c99318334
commit 461eb44fad
7 changed files with 34 additions and 4 deletions

Binary file not shown.

View File

@ -1826,6 +1826,13 @@ rm vault.pub
reference for the entry. It is implementation defined whether this value is
used.
\item
\texttt{Enabled}\\
\textbf{Type}: \texttt{plist\ boolean}\\
\textbf{Default value}: \texttt{false}\\
\textbf{Description}: This tool will not be listed unless set to
\texttt{true}.
\item
\texttt{Name}\\
\textbf{Type}: \texttt{plist\ string}\\

Binary file not shown.

View File

@ -1,7 +1,7 @@
\documentclass[]{article}
%DIF LATEXDIFF DIFFERENCE FILE
%DIF DEL PreviousConfiguration.tex Fri May 24 02:34:39 2019
%DIF ADD ../Configuration.tex Sun Jun 9 16:31:33 2019
%DIF ADD ../Configuration.tex Sun Jun 9 19:11:09 2019
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
@ -1980,6 +1980,14 @@ rm vault.pub
used.
}
\item
\texttt{\DIFadd{Enabled}}\\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ boolean}}\\
\textbf{\DIFadd{Default value}}\DIFadd{: }\texttt{\DIFadd{false}}\\
\textbf{\DIFadd{Description}}\DIFadd{: This tool will not be listed unless set to
}\texttt{\DIFadd{true}}\DIFadd{.
}
\item
\texttt{\DIFadd{Name}}\\
\textbf{\DIFadd{Type}}\DIFadd{: }\texttt{\DIFadd{plist\ string}}\\

View File

@ -430,6 +430,8 @@
<string>UEFI Shell</string>
<key>Comment</key>
<string>Not signed for security reasons</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>Shell.efi</string>
</dict>
@ -438,6 +440,8 @@
<string>memcheck</string>
<key>Comment</key>
<string>Memory testing utility</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>memcheck/memcheck.efi</string>
</dict>

View File

@ -430,6 +430,8 @@
<string>UEFI Shell</string>
<key>Comment</key>
<string>Not signed for security reasons</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>Shell.efi</string>
</dict>
@ -438,6 +440,8 @@
<string>memcheck</string>
<key>Comment</key>
<string>Memory testing utility</string>
<key>Enabled</key>
<false/>
<key>Path</key>
<string>memcheck/memcheck.efi</string>
</dict>

View File

@ -322,6 +322,7 @@ OcMiscBoot (
OC_PICKER_CONTEXT *Context;
UINTN ContextSize;
UINT32 Index;
UINT32 ToolCount;
//
// Do not use our boot picker unless asked.
@ -354,15 +355,21 @@ OcMiscBoot (
Context->ShowPicker = Config->Misc.Boot.ShowPicker;
Context->CustomBootGuid = CustomBootGuid;
Context->ExcludeHandle = LoadHandle;
Context->CustomEntryCount = Config->Misc.Tools.Count;
Context->CustomEntryContext = Storage;
Context->CustomRead = OcToolLoadEntry;
ToolCount = 0;
for (Index = 0; Index < Context->CustomEntryCount; ++Index) {
Context->CustomEntries[Index].Name = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Name);
Context->CustomEntries[Index].Path = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Path);
if (Config->Misc.Tools.Values[Index]->Enabled) {
Context->CustomEntries[Index].Name = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Name);
Context->CustomEntries[Index].Path = OC_BLOB_GET (&Config->Misc.Tools.Values[Index]->Path);
++ToolCount;
}
}
Context->CustomEntryCount = ToolCount;
Status = OcRunSimpleBootPicker (
Context
);