Jump to content

Customized OpenCore with additional features


n.d.k
1,348 posts in this topic

Recommended Posts

7 hours ago, n.d.k said:

 

I got my hand full with other stuffs, these are low priority. I am sure the whole GUI boot picker are wrapped up in that one single file pretty simple enough, if someone want to add something useful, feel free to post and I will not ignore suggestion.

At present, the correspondence between GUI icons and boot entries is not very accurate. For example, my boot partition is mojave system, but the actual corresponding icon is os_mac.icns instead of os_maja.icns. "StrStr" just uses the volume label name to determine the system type. In fact, many people do not necessarily have these characters on the partition volume label, so it should be judged that the system kernel appears more professional!

How is the font of the GUI interface defined, is it possible to change the font?

Edited by btwise
Link to comment
Share on other sites

57 minutes ago, btwise said:

At present, the correspondence between GUI icons and boot entries is not very accurate. For example, my boot partition is mojave system, but the actual corresponding icon is os_mac.icns instead of os_maja.icns. "StrStr" just uses the volume label name to determine the system type. In fact, many people do not necessarily have these characters on the partition volume label, so it should be judged that the system kernel appears more professional!

How is the font of the GUI interface defined, is it possible to change the font?

 

You are not reading the changes on this fork thoroughly, you can use custom entry to override the name from system and can set it be hidden as well.

 

I like to keep it as simple as possible.  This GUI picker is only an extra, like bios menu to me, I hardly have to see it, since I can switch Oses using just the Hotkeys.

 

It uses the system fonts, so not changeable.

  • Like 1
Link to comment
Share on other sites

13 hours ago, iGPU said:

 

How about add below code to the selection list inside OcSimpleBootMenu? You'd need to add one more icon named "os_installer.icns" to the icon folder. (Would this be best under "case OcBootApple:", or under "case OcBootCustom:" ?)

 

(For my own use, I've added extra code in this same section to better distinguish OS on NVMe vs SATA drives as the SATA drives contain my backup copies; one just has to be careful in how one names the actual drives, like "CaBkUp" or "MoBkUp" in accordance with how the search is implemented.)

 


      } else if (StrStr (Name, L"Installer") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_installer.icns";

 

This seems relatively easy to achieve!Like my example, just add an install.icns icon file!

switch (Type) {
    case OcBootWindows:
      if (StrStr (Name, L"10") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_win10.icns";
      } else {
        FilePath = L"EFI\\OC\\Icons\\os_win.icns";
      }
      break;
    case OcBootApple:
      if (Ext == TRUE) {
        FilePath = L"EFI\\OC\\Icons\\install.icns";
      } else if (StrStr (Name, L"Cata") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_cata.icns";
      } else if (StrStr (Name, L"Moja") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_moja.icns";
      }else {
        FilePath = L"EFI\\OC\\Icons\\os_mac.icns";
      }
      break;
    case OcBootAppleRecovery:
      FilePath = L"EFI\\OC\\Icons\\os_recovery.icns";
      break;
    case OcBootCustom:
      if (StrStr (Name, L"Free") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_freebsd.icns";
      } else if (StrStr (Name, L"Linux") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_linux.icns";
      } else if (StrStr (Name, L"Redhat") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_redhat.icns";
      } else if (StrStr (Name, L"Ubuntu") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_ubuntu.icns";
      } else if (StrStr (Name, L"Fedora") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_fedora.icns";
      } else if (StrStr (Name, L"Shell") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\tool_shell.icns";
      } else if (StrStr (Name, L"10") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_win10.icns";
      } else {
        FilePath = L"EFI\\OC\\Icons\\os_custom.icns";
      }
      break;
    case OcBootSystem:
      FilePath = L"EFI\\OC\\Icons\\func_resetnvram.icns";
      break;
    case OcBootUnknown:
      FilePath = L"EFI\\OC\\Icons\\os_unknown.icns";
      break;
      
    default:
      FilePath = L"EFI\\OC\\Icons\\os_unknown.icns";
      break;
  }

 

IMG_20200207_160122R.jpg

  • Like 2
Link to comment
Share on other sites

On 2/7/2020 at 2:04 AM, n.d.k said:

You have ScanPolicy set to 0, set it to default value from sample.plist will make it go away.  And your config.plist is not up to date, check your sample config.plist and compared.

You a Genius !

Replace ScanPolicy Number from "0" to "983 299" fixing problem !!

Edited by CobraKai
Link to comment
Share on other sites

I can't compilng last commit:

Any info about this error:

 

In file included from /Users/tomek/Downloads/OpenCorePkg-master-2/edk2/OpenCorePkg/Application/Bootstrap/Bootstrap.c:15:

/Users/tomek/Downloads/OpenCorePkg-master-2/edk2/OpenCorePkg/Include/OpenCore.h:207:1: error: unknown type name 'OC_BALLOON_ALLOC'

OC_BALLOON_ALLOC

.......

 

1 error generated.

"libtool" -static -o /Users/tomek/Downloads/OpenCorePkg-master-2/edk2/Build/OpenCorePkg/DEBUG_XCODE5/X64/OcSupportPkg/Library/OcConsoleLib/OcConsoleLib/OUTPUT/OcConsoleLib.lib -filelist /Users/tomek/Downloads/OpenCorePkg-master-2/edk2/Build/OpenCorePkg/DEBUG_XCODE5/X64/OcSupportPkg/Library/OcConsoleLib/OcConsoleLib/OUTPUT/object_files.lst

make: *** [/Users/tomek/Downloads/OpenCorePkg-master-2/edk2/Build/OpenCorePkg/DEBUG_XCODE5/X64/OpenCorePkg/Application/Bootstrap/Bootstrap/OUTPUT/Bootstrap.obj] Error 1

 

 

build.py...

 : error 7000: Failed to execute command

make tbuild [/Users/tomek/Downloads/OpenCorePkg-master-2/edk2/Build/OpenCorePkg/DEBUG_XCODE5/X64/OpenCorePkg/Application/Bootstrap/Bootstrap]

 

 

build.py...

 : error F002: Failed to build module

/Users/tomek/Downloads/OpenCorePkg-master-2/edk2/OpenCorePkg/Application/Bootstrap/Bootstrap.inf [X64, XCODE5, DEBUG]

 

- Failed -

Build end time: 09:18:52, Feb.08 2020

Build total time: 00:00:07

 

Early commit build normally, this not.

 

SOLVED - Compilation works on fresh downloaded sources !

Do not compiling in old sources - update sosurces scripl has some bug.

Edited by CobraKai
Link to comment
Share on other sites

4 hours ago, btwise said:

Load a small EFI tools, I can take a screenshot!

19838180419f331c.png

 

Great  :) Can you post your OCSimpleBootMenu file and others modifications, please.

I edit the file without any success.

  • Like 1
Link to comment
Share on other sites

On 2/7/2020 at 12:09 AM, btwise said:

 


switch (Type) {
    case OcBootWindows:
      if (StrStr (Name, L"10") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_win10.icns";
      } else {
        FilePath = L"EFI\\OC\\Icons\\os_win.icns";
      }
      break;
    case OcBootApple:
      if (Ext == TRUE) {
        FilePath = L"EFI\\OC\\Icons\\install.icns";
      } else if (StrStr (Name, L"Cata") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_cata.icns";
      } else if (StrStr (Name, L"Moja") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_moja.icns";
      }else {
        FilePath = L"EFI\\OC\\Icons\\os_mac.icns";
      }
      break;
    case OcBootAppleRecovery:
      FilePath = L"EFI\\OC\\Icons\\os_recovery.icns";
      break;
    case OcBootCustom:
      if (StrStr (Name, L"Free") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_freebsd.icns";
      } else if (StrStr (Name, L"Linux") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_linux.icns";
      } else if (StrStr (Name, L"Redhat") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_redhat.icns";
      } else if (StrStr (Name, L"Ubuntu") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_ubuntu.icns";
      } else if (StrStr (Name, L"Fedora") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_fedora.icns";
      } else if (StrStr (Name, L"Shell") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\tool_shell.icns";
      } else if (StrStr (Name, L"10") != NULL) {
        FilePath = L"EFI\\OC\\Icons\\os_win10.icns";
      } else {
        FilePath = L"EFI\\OC\\Icons\\os_custom.icns";
      }
      break;
    case OcBootSystem:
      FilePath = L"EFI\\OC\\Icons\\func_resetnvram.icns";
      break;
    case OcBootUnknown:
      FilePath = L"EFI\\OC\\Icons\\os_unknown.icns";
      break;
      
    default:
      FilePath = L"EFI\\OC\\Icons\\os_unknown.icns";
      break;
  }

This code did not work for me. By having an extra backup ( Ext ) of my OSX, created by CCC , both Icons ( Install & USB backup ) disappeared :(

This is the code that worked for me:

 

case OcBootWindows:

      if (StrStr (Name, L"10") != NULL) {

        FilePath = L"EFI\\OC\\Icons\\os_win10.icns";

      } else {

        FilePath = L"EFI\\OC\\Icons\\os_win.icns";

      }

      break;

    case OcBootApple:

      if (StrStr (Name, L"Cata") != NULL) {

        FilePath = L"EFI\\OC\\Icons\\os_cata.icns";

      } else if (StrStr (Name, L"Moja") != NULL) {

        FilePath = L"EFI\\OC\\Icons\\os_moja.icns";

      } else if (StrStr (Name, L"BAC") != NULL) {

          FilePath = L"EFI\\OC\\Icons\\os_back.icns";

      } else if (StrStr (Name, L"Inst") != NULL) {

          FilePath = L"EFI\\OC\\Icons\\os_inst.icns";

      } else {

        FilePath = L"EFI\\OC\\Icons\\os_mac.icns";

      }

      break;

 

 

 

OcSimpleBootMenu.c

os_inst.icns

os_back.icns

Edited by Ellybz
  • Thanks 2
Link to comment
Share on other sites

Just a head up, there are quite a few changes from OC that required config.plist updated with a new fields.  So be careful changing your config.plist before restarting.  Vault field need to set to "Optional" if not using Vault, default was set to Secure, which may caused un-bootable. 

Edited by n.d.k
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Hello n.d.k.,

 

the new PickerMode option are added in OpenCore.

 

PickerMode

Type: plist string

Failsafe: Builtin

Description: Choose boot picker used for boot management.

Picker describes underlying boot management with an optional user interface responsible for handling boot options. The following values are supported:

• Builtin — boot management is handled by OpenCore, a simple text only user interface is used.

• External — an external boot management protocol is used if available. Otherwise Builtin mode is used.

• Apple — Apple boot management is used if available. Otherwise Builtin mode is used.

 

So i think, yours customized UI Boot Picker should be implemented via "External" option, and if "Builtin" is used, it should use original OpenCore text mode picker.

What do you think? Is it possible?

Edited by darthsian
Link to comment
Share on other sites

57 minutes ago, darthsian said:

Hello n.d.k.,

 

the new PickerMode option are added in OpenCore.

 

PickerMode

Type: plist string

Failsafe: Builtin

Description: Choose boot picker used for boot management.

Picker describes underlying boot management with an optional user interface responsible for handling boot options. The following values are supported:

• Builtin — boot management is handled by OpenCore, a simple text only user interface is used.

• External — an external boot management protocol is used if available. Otherwise Builtin mode is used.

• Apple — Apple boot management is used if available. Otherwise Builtin mode is used.

 

So i think, yours customized UI Boot Picker should be implemented via "External" option, and if "Builtin" is used, it should use original OpenCore text mode picker.

What do you think? Is it possible?

 

 

Screen Shot 2020-02-09 at 15.09.03.png

  • Like 1
Link to comment
Share on other sites

Maybe an easier next step in integration with the new changes in v056: add one or more color variables to Misc/Boot, along side PickerAttributes, or only use PickerAttributes, to use inside OcSimpleBootMenu.c, in order to allow menu adjustments to be made from within the config.plist?

v056b.jpg.f38d3763a3fcd33423414f6fbcb6289e.jpg

Edited by iGPU
Link to comment
Share on other sites

image.thumb.png.07279e82efd5171e767570457daf6830.png

image.thumb.png.48040465e06490f98dc289fa0174d376.png

 

In the updated OC tonight, UI options that support extended interfaces have been added. Since the n-d-k UI is already in use, why not simply make an extended GUI module and allow users to choose, what a great thing!

35 minutes ago, UefiBooter said:

What is this obsession with a boot loader GUI ?

 

Surely its better to spend time doing stuff in an actual os than just staring at which OS your going to boot ?

 

Would love to know

Because we already have a UI interface, and OC also supports custom interfaces, why not do it? This is not an obsession, it is a spirit!

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Regarding the external GUI part, as @Download-Fritz mentioned, it had been here for quite some time already. When @n.d.k first appeared with the changes that did not line with the primary project architecture, we immediately suggested him to use this option. For unknown reasons on our side, there was no subsequent dialogue and eventually this fork appeared in entire silence.

 

Not to sound salty, but to me, as an Acidanthera lead, it looks like just another example of an intentional move driven by egos/money/lack of culture/megalomania/alike. Basically it is very similar to the situation with bootloader configurators, where the developers ignore any attempt of a constructive dialogue, or Clover/Chameleon forks in older days. Sometimes the need for forking can be justified, but in general it is just a case of everyone pushing the load forward with a sudden person starting to push it sideways, who eventually gets tired of it and leaves a mess that confuses everyone.

 

This of course is counterproductive, but somewhat unavoidable. By making our projects opensource we make it possible for adequate determined people to push things forward, either with us, or after us.

 

 

  • Like 4
  • Thanks 1
Link to comment
Share on other sites

39 minutes ago, meaganmargaret said:

Do you have nothing better to do than troll this thread?  Sad.....

Am I not allowed to find it amusing how people who do not understand the core design decisions for lack of knowledge and experience keep acting like we are blind and deaf, carrying most obvious ideas to us, things that have been done this way in Clover for years, thinking that we have not spent even a second of thought on it because we do not agree with the practice? Believe whatever you want to believe is flawed - when a macOS upgrade hits, we'll see where things like overriding custom entries will get you... probably not seamlessly into the installer, unless arbitrary hacks are implemented.

Edited by Download-Fritz
update->upgrade for clarification
  • Like 2
Link to comment
Share on other sites

1 minute ago, Ellybz said:

When a dev is asking moderators to remove any post or mention of the NDK fork from an open Forum, because they do not agree with it, it speaks volume.

Yes, it speaks volume... assuming it happened? Because if I or someone else should have requested that, that must have happened during somnambulism

Link to comment
Share on other sites

×
×
  • Create New...