Configuration: Class OpenCoreBuild - axivo/opencore GitHub Wiki

This wiki page will detail the opencore/build.py OpenCoreBuild class and methods, used to generate the OpenCore tree and configuration for macOS.

Class OpenCoreBuild

Generates the EFI tree and config.plist file.

Method __init__(self, directory)

Constructs a new OpenCoreBuild object.

  • param directory: Path of the build directory

Method configure_kexts(self, kexts=[])

Inserts kexts into kernel Add data settings.

  • param kexts: List of kext properties to be applied

Method configure_patches(self, patches=[])

Inserts patches into kernel Patch data settings.

  • param kexts: List of patch properties to be applied

Method copy_tree(self, source, destination)

Copies directories and files recursively.

  • param source: Source path
  • param destination: Destination path

Method extract_files(self, file, directory, local=False)

Extracts the contents of a zip file directly from Internet.

  • param file: File name
  • param directory: Directory name where file will be extracted
  • param local: Local file will be extracted

Method install_kext(self, repo, project, version, debug=False)

Builds the kext files structure.

  • param repo: Repo name
  • param project: Project name
  • param version: Project version
  • param debug: Install DEBUG release

Method install_opencore(self, version, debug=False)

Builds the OpenCore files structure.

  • param version: Project version
  • param debug: Install DEBUG release

Method print_bold(self, string)

Prints bold text.

Method run_misc_tasks(self)

Runs miscellaneous post install tasks.

Method unhexlify(self, string)

Transforms the binary data represented by the hexadecimal string.

  • param string: String to transform

Example of Hex value transformed into Base64 Data value:

hex to Base64

Method update_settings(self, result, settings)

Updates existing settings with new settings.

  • param result: Default settings
  • param settings: Settings to be updated

Method write_plist(self, settings)

Generates the OpenCore configuration file.

  • param settings: Settings to be updated

Method write_tree(self, debug=False)

Generates the OpenCore files structure.

  • param debug: Install DEBUG release