mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-21 03:04:31 +10:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e94f6ac63d | ||
|
|
5e4b124b2a | ||
|
|
67df72290f |
@@ -1,5 +1,14 @@
|
|||||||
# OpenCore Legacy Patcher changelog
|
# OpenCore Legacy Patcher changelog
|
||||||
|
|
||||||
|
## 2.1.2
|
||||||
|
- Add additional error handling for when building OpenCore errors out
|
||||||
|
- Prevents broken EFI from being installed to disk
|
||||||
|
- Add additional error handling for broken settings file from OCLP 2.1.0
|
||||||
|
- If typing for settings is wrong, app will skip setting it, delete from settings file and use default
|
||||||
|
- Delete `/Users/Shared/.com.dortania.opencore-legacy-patcher.plist` and restart app to avoid this issue
|
||||||
|
- Add additional warning about OCLP 2.1.0 bug where certain settings saved incorrectly
|
||||||
|
- Delete `/Users/Shared/.com.dortania.opencore-legacy-patcher.plist` and restart app if `TypeError: unsupported type: <class 'NoneType'>` error occurs
|
||||||
|
|
||||||
## 2.1.1
|
## 2.1.1
|
||||||
- Resolve boolean GUI settings saving incorrectly as Python's None type
|
- Resolve boolean GUI settings saving incorrectly as Python's None type
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,14 @@ Currently there is a "PurgePendingUpdate" tool available [on the Discord server]
|
|||||||
|
|
||||||
Disabling automatic macOS updates is extremely recommended once recovered, to prevent it from happening again.
|
Disabling automatic macOS updates is extremely recommended once recovered, to prevent it from happening again.
|
||||||
|
|
||||||
|
**macOS Ventura and newer:**
|
||||||
|
|
||||||
|
System Settings -> General -> Software Update -> (i) button next to Automatic Updates -> Disable "Download new updates when available".
|
||||||
|
|
||||||
|
**macOS Big Sur and Monterey:**
|
||||||
|
|
||||||
|
System Preferences -> Software Update -> Advanced -> Disable "Download new updates when available".
|
||||||
|
|
||||||
## Stuck on boot after root patching
|
## Stuck on boot after root patching
|
||||||
|
|
||||||
Boot into recovery by pressing space when your disk is selected on the OCLP bootpicker (if you have it hidden, hold ESC while starting up)
|
Boot into recovery by pressing space when your disk is selected on the OCLP bootpicker (if you have it hidden, hold ESC while starting up)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ from .detections import device_probe
|
|||||||
class Constants:
|
class Constants:
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
# Patcher Versioning
|
# Patcher Versioning
|
||||||
self.patcher_version: str = "2.1.1" # OpenCore-Legacy-Patcher
|
self.patcher_version: str = "2.1.2" # OpenCore-Legacy-Patcher
|
||||||
self.patcher_support_pkg_version: str = "1.8.4" # PatcherSupportPkg
|
self.patcher_support_pkg_version: str = "1.8.4" # PatcherSupportPkg
|
||||||
self.copyright_date: str = "Copyright © 2020-2024 Dortania"
|
self.copyright_date: str = "Copyright © 2020-2024 Dortania"
|
||||||
self.patcher_name: str = "OpenCore Legacy Patcher"
|
self.patcher_name: str = "OpenCore Legacy Patcher"
|
||||||
|
|||||||
@@ -435,5 +435,14 @@ class GenerateDefaults:
|
|||||||
plist[key] = None
|
plist[key] = None
|
||||||
|
|
||||||
if hasattr(self.constants, constants_key):
|
if hasattr(self.constants, constants_key):
|
||||||
|
# Check if type is different
|
||||||
|
original_type = type(getattr(self.constants, constants_key))
|
||||||
|
new_type = type(plist[key])
|
||||||
|
if original_type != new_type:
|
||||||
|
logging.error(f"Global settings type mismatch for {constants_key}: {original_type} vs {new_type}")
|
||||||
|
logging.error(f"Removing {key} from global settings")
|
||||||
|
global_settings.GlobalEnviromentSettings().delete_property(key)
|
||||||
|
continue
|
||||||
|
|
||||||
logging.info(f"Setting {constants_key} to {plist[key]}")
|
logging.info(f"Setting {constants_key} to {plist[key]}")
|
||||||
setattr(self.constants, constants_key, plist[key])
|
setattr(self.constants, constants_key, plist[key])
|
||||||
@@ -44,6 +44,25 @@ class GlobalEnviromentSettings:
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def delete_property(self, property_name: str) -> None:
|
||||||
|
"""
|
||||||
|
Deletes a property from the global settings file
|
||||||
|
"""
|
||||||
|
if Path(self.global_settings_plist).exists():
|
||||||
|
try:
|
||||||
|
plist = plistlib.load(Path(self.global_settings_plist).open("rb"))
|
||||||
|
except Exception as e:
|
||||||
|
logging.error("Error: Unable to read global settings file")
|
||||||
|
logging.error(e)
|
||||||
|
return
|
||||||
|
if property_name in plist:
|
||||||
|
del plist[property_name]
|
||||||
|
try:
|
||||||
|
plistlib.dump(plist, Path(self.global_settings_plist).open("wb"))
|
||||||
|
except PermissionError:
|
||||||
|
logging.info("Failed to write to global settings")
|
||||||
|
|
||||||
|
|
||||||
def write_property(self, property_name: str, property_value) -> None:
|
def write_property(self, property_name: str, property_value) -> None:
|
||||||
"""
|
"""
|
||||||
Writes a property to the global settings file
|
Writes a property to the global settings file
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ class BuildFrame(wx.Frame):
|
|||||||
super(BuildFrame, self).__init__(parent, title=title, size=(350, 200), style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
|
super(BuildFrame, self).__init__(parent, title=title, size=(350, 200), style=wx.DEFAULT_FRAME_STYLE & ~(wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))
|
||||||
gui_support.GenerateMenubar(self, global_constants).generate()
|
gui_support.GenerateMenubar(self, global_constants).generate()
|
||||||
|
|
||||||
|
self.build_successful: bool = False
|
||||||
|
|
||||||
self.install_button: wx.Button = None
|
self.install_button: wx.Button = None
|
||||||
self.text_box: wx.TextCtrl = None
|
self.text_box: wx.TextCtrl = None
|
||||||
self.frame_modal: wx.Dialog = None
|
self.frame_modal: wx.Dialog = None
|
||||||
@@ -107,6 +109,18 @@ class BuildFrame(wx.Frame):
|
|||||||
wx.Yield()
|
wx.Yield()
|
||||||
|
|
||||||
self.return_button.Enable()
|
self.return_button.Enable()
|
||||||
|
|
||||||
|
# Check if config.plist was built
|
||||||
|
if self.build_successful is False:
|
||||||
|
dialog = wx.MessageDialog(
|
||||||
|
parent=self,
|
||||||
|
message="An error occurred while building OpenCore",
|
||||||
|
caption="Error building OpenCore",
|
||||||
|
style=wx.OK | wx.ICON_ERROR
|
||||||
|
)
|
||||||
|
dialog.ShowModal()
|
||||||
|
return
|
||||||
|
|
||||||
dialog = wx.MessageDialog(
|
dialog = wx.MessageDialog(
|
||||||
parent=self,
|
parent=self,
|
||||||
message=f"Would you like to install OpenCore now?",
|
message=f"Would you like to install OpenCore now?",
|
||||||
@@ -126,9 +140,16 @@ class BuildFrame(wx.Frame):
|
|||||||
logger.addHandler(gui_support.ThreadHandler(self.text_box))
|
logger.addHandler(gui_support.ThreadHandler(self.text_box))
|
||||||
try:
|
try:
|
||||||
build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants)
|
build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants)
|
||||||
except:
|
self.build_successful = True
|
||||||
|
except Exception as e:
|
||||||
logging.error("An internal error occurred while building:\n")
|
logging.error("An internal error occurred while building:\n")
|
||||||
logging.error(traceback.format_exc())
|
logging.error(traceback.format_exc())
|
||||||
|
|
||||||
|
# Handle bug from 2.1.0 where None type was stored in config.plist from global settings
|
||||||
|
if "TypeError: unsupported type: <class 'NoneType'>" in traceback.format_exc():
|
||||||
|
logging.error("If you continue to see this error, delete the following file and restart the application:")
|
||||||
|
logging.error("Path: /Users/Shared/.com.dortania.opencore-legacy-patcher.plist")
|
||||||
|
|
||||||
logger.removeHandler(logger.handlers[2])
|
logger.removeHandler(logger.handlers[2])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user