mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-19 22:00:00 +10:00
Add new vaulting implementation
This commit is contained in:
@@ -335,11 +335,9 @@ class BuildMiscellaneous:
|
|||||||
logging.info(f"- Setting custom OpenCore picker timeout to {self.constants.oc_timeout} seconds")
|
logging.info(f"- Setting custom OpenCore picker timeout to {self.constants.oc_timeout} seconds")
|
||||||
self.config["Misc"]["Boot"]["Timeout"] = self.constants.oc_timeout
|
self.config["Misc"]["Boot"]["Timeout"] = self.constants.oc_timeout
|
||||||
|
|
||||||
if self.constants.vault is True and utilities.check_command_line_tools() is True:
|
if self.constants.vault is True:
|
||||||
logging.info("- Setting Vault configuration")
|
logging.info("- Setting Vault configuration")
|
||||||
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
self.config["Misc"]["Security"]["Vault"] = "Secure"
|
||||||
support.BuildSupport(self.model, self.constants, self.config).get_efi_binary_by_path("OpenShell.efi", "Misc", "Tools")["Enabled"] = False
|
|
||||||
|
|
||||||
|
|
||||||
def _t1_handling(self) -> None:
|
def _t1_handling(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -108,17 +108,11 @@ class BuildSupport:
|
|||||||
if self.constants.vault is False:
|
if self.constants.vault is False:
|
||||||
return
|
return
|
||||||
|
|
||||||
if utilities.check_command_line_tools() is False:
|
logging.info("- Vaulting EFI\n=========================================")
|
||||||
# sign.command checks for the existence of '/usr/bin/strings' however does not verify whether it's executable
|
popen = subprocess.Popen([str(self.constants.vault_path), f"{self.constants.oc_folder}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
|
||||||
# sign.command will continue to run and create an unbootable OpenCore.efi due to the missing strings binary
|
for stdout_line in iter(popen.stdout.readline, ""):
|
||||||
# macOS has dummy binaries that just reroute to the actual binaries after you install Xcode's Command Line Tools
|
logging.info(stdout_line.strip())
|
||||||
logging.info("- Missing Command Line tools, skipping Vault for saftey reasons")
|
logging.info("=========================================")
|
||||||
logging.info("- Install via 'xcode-select --install' and rerun OCLP if you wish to vault this config")
|
|
||||||
return
|
|
||||||
|
|
||||||
logging.info("- Vaulting EFI")
|
|
||||||
subprocess.run([str(self.constants.vault_path), f"{self.constants.oc_folder}/"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
|
||||||
|
|
||||||
|
|
||||||
def validate_pathing(self) -> None:
|
def validate_pathing(self) -> None:
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ class Constants:
|
|||||||
## Security Settings
|
## Security Settings
|
||||||
self.sip_status: bool = True # System Integrity Protection
|
self.sip_status: bool = True # System Integrity Protection
|
||||||
self.secure_status: bool = False # Secure Boot Model
|
self.secure_status: bool = False # Secure Boot Model
|
||||||
self.vault: bool = False # EFI Vault
|
self.vault: bool = True # EFI Vault
|
||||||
self.disable_cs_lv: bool = False # Disable Library validation
|
self.disable_cs_lv: bool = False # Disable Library validation
|
||||||
self.disable_amfi: bool = False # Disable AMFI
|
self.disable_amfi: bool = False # Disable AMFI
|
||||||
|
|
||||||
|
|||||||
@@ -836,6 +836,15 @@ class SettingsFrame(wx.Frame):
|
|||||||
"Export constants.py values to a txt file.",
|
"Export constants.py values to a txt file.",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
"OpenCore Vaulting": {
|
||||||
|
"type": "checkbox",
|
||||||
|
"value": self.constants.vault,
|
||||||
|
"variable": "vault",
|
||||||
|
"description": [
|
||||||
|
"Untick to disable vaulting for",
|
||||||
|
"testing purposes."
|
||||||
|
],
|
||||||
|
},
|
||||||
"Developer Root Volume Patching": {
|
"Developer Root Volume Patching": {
|
||||||
"type": "title",
|
"type": "title",
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user