Package: ocebuild
OCE BuildA minimal framework for fast, secure, and reliable build and dependency management forOpenCoreEFIs.OCE-Build is designed to help enable projects to be highly composable and easily
maintainable, prioritizing a small git-friendly footprint. It is designed to be
flexible and extensible for existing projects, while also providing a simple
configuration and interface for new projects to get started quickly.Feature OverviewNote: This project is still in early development and is not yet ready for general use.
The following is a list of features that are planned for the initial release.Declarative ConfigurationMinimal project configuration.Flexible support for any project structure.Shared/Template config.plist configurations.Automated config.plist schema conflict resolution.Version ManagementVersioning for OpenCore binaries and resources (Kexts, SSDTs, etc).Automatic version resolution for dependencies.Lockfile creation for intelligent registry management.Build SupportIncremental builds and cache management from lockfile.Advanced ACPI language support, including compiler and patchfile options.Dependency sorting for proper prelink injection (i.e. SSDTs, Kexts).CI support for managing and building Kexts with XCode.User DocumentationThis section is for users looking to integrate this tool with their own project.
For information on contributing to this project, refer to theDeveloper DocsInstallationThis project is distributed as both a standalone CLI and a Python library on
PyPI. The CLI is intended to be used for simple projects or for CI/CD, while the
library is intended to be used for supporting Python library development or
complex build pipelines. The library also comes bundled with the CLI and it's
source code is available under theocebuild.climodule.The recommended way to install the CLI is fromGitHub releases. This will provide you with a standalone executable that can be used without installing Python or any other dependencies. The CLI is available for Windows, macOS, and Linux.To install the CLI / library from PyPI, you will need to have Python 3.8 or
later installed. You can install Python frompython.orgor from your package manager. For more information on installing Python, refer
to thePython documentation.To install the library directly from PyPI usingpip, simply run the following
command in your terminal:pipinstallocebuildOr when using thepoetrypackage manager, run:poetryaddocebuildDepending on your system, you may need to usepip3instead ofpipwhen
installing the library. You may also need to usesudoorpip install --userto install the library globally or locally, respectively.After installing the library, the CLI will also be available in your PATH, which
you can invoke by simply runningocebuildin your terminal (orpoetry run ocebuild).Getting StartedTo get started, you will need to create abuild.ymlfile in the root of your
project. This file will contain all of the information needed to build your EFI.
You can follow along with the below example or reference one of theexample projectsincluded in this repository.The following is a minimal example of abuild.ymlfile located under asrc/directory:# src/build.yml---build:DEBUGversion:latest---ACPI:Drivers:-AudioDxe-HfsPlus-OpenRuntime-ResetNvramEntryKexts:Lilu:latestVirtualSMC:latestResources:Tools:-OpenShellOnce you have created yourbuild.ymlfile, you can run the build command to
build your EFI:ocebuildbuild--cwdsrc/build.ymlThis will create a newdist/directory in your project containing your EFI.
You can also specify a custom output directory by using the-o/--outputoption. To view all available commands and options, runocebuild --helpor runocebuild <command> --helpfor more information on a specific command.Refer todocs/configuration.mdfor more information on how to setup your build
configuration.Note that this does not output a config.plist file. To generate a config.plist
file, you will need to create aconfig.ymlfile in the same directory as yourbuild.ymlfile. Theconfig.ymlfile contains only the changes you wish to
make to the default Sample.plist file (located underdist/Docs/Sample.plist).
Refer todocs/configuration.mdfor more information.Developer DocumentationThis section is for developers looking to contribute to this project. This is
only meant to be a brief overview of the project structure and development
guidelines. For more information, refer to thecontributingdocumentation.Guidelines and PhilosophyThe general philosophy for this project is to keep things as simple as possible.
This means that the project should be easy to understand, easy to maintain, and
easy to contribute to.A summary of the contributing guidelines for this project are as follows:Create anissuefor any major
changes and enhancements that you wish to make.If you find a security vulnerability, do NOT open an issue. Please refer to ourSecurity Policyfor reporting security vulnerabilities.For questions or discussions related to this project, please open a new GitHubdiscussioninstead of
opening an issue.Create apull requestfor your
changes and coordinate with the project maintainers to get it merged to main.Include unit tests when you contribute new features or fix a bug. This:Proves that your code works correctly and prevents regressions from going
unnoticed.Guards against breaking changes to the public API and ensures that the
project can remain backwards compatible.Lowers the maintenance cost of the project by making it easier to
troubleshoot and debug issues.Keep compatibility and cohesiveness mind when contributing a change that
will impact the public API. This helps limit the scope of changes to only
what is required to implement the new feature or fix the bug.LicenseBSD 3-Clause License.