mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 14:10:51 +10:00
Merge branch 'main' into logging-rework
This commit is contained in:
@@ -106,23 +106,6 @@ class BuildMiscellaneous:
|
||||
logging.info("- Disabling memory error reporting")
|
||||
re_block_args.append("pcie")
|
||||
|
||||
# Resolve mediaanalysisd crashing on 3802 GPUs
|
||||
gpu_dict = [] if self.constants.custom_model else self.constants.computer.gpus
|
||||
if gpu_dict == []:
|
||||
gpu_dict = smbios_data.smbios_dictionary[self.model]["Stock GPUs"] if self.model in smbios_data.smbios_dictionary else []
|
||||
|
||||
for gpu in gpu_dict:
|
||||
if not self.constants.custom_model:
|
||||
gpu = gpu.arch
|
||||
if gpu in [
|
||||
device_probe.Intel.Archs.Ivy_Bridge,
|
||||
device_probe.Intel.Archs.Haswell,
|
||||
device_probe.NVIDIA.Archs.Kepler,
|
||||
]:
|
||||
logging.info("- Disabling mediaanalysisd")
|
||||
re_block_args.append("media")
|
||||
break
|
||||
|
||||
return re_block_args
|
||||
|
||||
|
||||
|
||||
@@ -100,6 +100,18 @@ class ChunklistVerification:
|
||||
self.status = ChunklistStatus.FAILURE
|
||||
return
|
||||
|
||||
if not Path(self.file_path).exists():
|
||||
self.error_msg = f"File {self.file_path} does not exist"
|
||||
self.status = ChunklistStatus.FAILURE
|
||||
logging.info(self.error_msg)
|
||||
return
|
||||
|
||||
if not Path(self.file_path).is_file():
|
||||
self.error_msg = f"File {self.file_path} is not a file"
|
||||
self.status = ChunklistStatus.FAILURE
|
||||
logging.info(self.error_msg)
|
||||
return
|
||||
|
||||
with self.file_path.open("rb") as f:
|
||||
for chunk in self.chunks:
|
||||
self.current_chunk += 1
|
||||
|
||||
@@ -104,9 +104,6 @@ class OpenCoreLegacyPatcher:
|
||||
ignore_args = ["--auto_patch", "--gui_patch", "--gui_unpatch", "--update_installed"]
|
||||
if not any(x in sys.argv for x in ignore_args):
|
||||
self.constants.current_path = Path.cwd()
|
||||
if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"):
|
||||
self.constants.payload_path = sys._MEIPASS / Path("payloads")
|
||||
logging.info("Rerouting payloads location")
|
||||
ignore_args = ignore_args.pop(0)
|
||||
|
||||
if not any(x in sys.argv for x in ignore_args):
|
||||
|
||||
@@ -316,6 +316,7 @@ class DownloadObject:
|
||||
logging.error(f"Error preparing working directory {path}: {self.error_msg}")
|
||||
return False
|
||||
|
||||
logging.info(f"- Directory ready: {path}")
|
||||
return True
|
||||
|
||||
|
||||
|
||||
@@ -197,14 +197,16 @@ class InstallOCFrame(wx.Frame):
|
||||
items = len(partitions)
|
||||
longest_label = max((len(partitions[partition]['partition']) + len(partitions[partition]['name']) + len(str(partitions[partition]['size']))) for partition in partitions)
|
||||
longest_label = longest_label * 10
|
||||
spacer = 0
|
||||
logging.info(f"Available partitions for {disk}:")
|
||||
for partition in partitions:
|
||||
logging.info(f"- {partitions[partition]['partition']} - {partitions[partition]['name']} - {partitions[partition]['size']}")
|
||||
disk_button = wx.Button(dialog, label=f"{partitions[partition]['partition']} - {partitions[partition]['name']} - {partitions[partition]['size']}", size=(longest_label,30), pos=(-1, text_label.GetPosition()[1] + text_label.GetSize()[1] + 5))
|
||||
disk_button = wx.Button(dialog, label=f"{partitions[partition]['partition']} - {partitions[partition]['name']} - {partitions[partition]['size']}", size=(longest_label,30), pos=(-1, text_label.GetPosition()[1] + text_label.GetSize()[1] + 5 + spacer))
|
||||
disk_button.Centre(wx.HORIZONTAL)
|
||||
disk_button.Bind(wx.EVT_BUTTON, lambda event, partition=partition: self._install_oc_process(partition))
|
||||
if items == 1 or self.constants.booted_oc_disk == partitions[partition]['partition']:
|
||||
disk_button.SetDefault()
|
||||
spacer += 25
|
||||
|
||||
# Add button: Return to main menu
|
||||
return_button = wx.Button(dialog, label="Return to main menu", size=(150,30), pos=(-1, disk_button.GetPosition()[1] + disk_button.GetSize()[1]))
|
||||
|
||||
Reference in New Issue
Block a user