From b1d0d733d95e259baf491db4746b8f2e4d04a353 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Thu, 25 May 2023 16:13:41 -0600 Subject: [PATCH 1/7] Use BSD4 License --- LICENSE.md | 14 ++++++++++++++ docs/LICENSE.md | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 LICENSE.md diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 000000000..6978bce4c --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,14 @@ +Copyright (c) 2020-2023, Dhinak G +Copyright (c) 2020-2023, Mykola Grymalyuk + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software must display the following acknowledgement: +This product includes software developed by the organization. +4. Neither the name of the copyright holder nor the names the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/docs/LICENSE.md b/docs/LICENSE.md index fa0d65c43..c5498f43e 100644 --- a/docs/LICENSE.md +++ b/docs/LICENSE.md @@ -20,4 +20,4 @@ This patcher is made of multiple external applications from different people and * [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) - parrotgeek1 * Apple Binaries - Apple Inc. -Remaining files within OpenCore Legacy Patcher are copyrighted 2020-2022 Mykola Grymalyuk & Dhinak G. For integration into other projects, please request written permission. +Remaining files within OpenCore Legacy Patcher are distributed under BSD-4-Clause license. For integration into other projects, please request written permission. From cf28e8d2b577f8a319df076199824bf94bd8eb9e Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Thu, 25 May 2023 16:38:06 -0600 Subject: [PATCH 2/7] Strip extra --- docs/LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/LICENSE.md b/docs/LICENSE.md index c5498f43e..c38ce2737 100644 --- a/docs/LICENSE.md +++ b/docs/LICENSE.md @@ -20,4 +20,4 @@ This patcher is made of multiple external applications from different people and * [VMM Patch Set](https://github.com/dortania/OpenCore-Legacy-Patcher/blob/4a8f61a01da72b38a4b2250386cc4b497a31a839/payloads/Config/config.plist#L1222-L1281) - parrotgeek1 * Apple Binaries - Apple Inc. -Remaining files within OpenCore Legacy Patcher are distributed under BSD-4-Clause license. For integration into other projects, please request written permission. +Remaining files within OpenCore Legacy Patcher are distributed under BSD-4-Clause license. From 0427c9ef44aeccefe94d02df89389c7cf0a41481 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk <48863253+khronokernel@users.noreply.github.com> Date: Thu, 25 May 2023 17:06:42 -0600 Subject: [PATCH 3/7] Rename LICENSE.md to LICENSE.txt --- LICENSE.md => LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename LICENSE.md => LICENSE.txt (99%) diff --git a/LICENSE.md b/LICENSE.txt similarity index 99% rename from LICENSE.md rename to LICENSE.txt index 6978bce4c..41edb3b21 100644 --- a/LICENSE.md +++ b/LICENSE.txt @@ -11,4 +11,4 @@ Redistribution and use in source and binary forms, with or without modification, This product includes software developed by the organization. 4. Neither the name of the copyright holder nor the names the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. From c8b6eec14fa5d5bf30abd6fcd86ff161b54164d4 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Fri, 26 May 2023 21:45:46 -0600 Subject: [PATCH 4/7] gui_install_oc.py: Fix missing spacer --- CHANGELOG.md | 2 ++ resources/wx_gui/gui_install_oc.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b009160da..cbc933afe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # OpenCore Legacy Patcher changelog ## 0.6.7 +- Resolve partition buttons overlapping in Install OpenCore UI + - ex. "EFI" and additional FAT32 partitions on a single drive - Backend changes: - Call `setpgrp()` to prevent app from being killed if parent process is killed (ie. LaunchAgents) diff --git a/resources/wx_gui/gui_install_oc.py b/resources/wx_gui/gui_install_oc.py index b6371eefd..3a2c9d0f9 100644 --- a/resources/wx_gui/gui_install_oc.py +++ b/resources/wx_gui/gui_install_oc.py @@ -195,13 +195,15 @@ 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 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])) From 7d0bbf62bffedfc25db862ed5ede8fe8d1cfb831 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 27 May 2023 10:58:16 -0600 Subject: [PATCH 5/7] main.py: Fix payload routing --- CHANGELOG.md | 1 + resources/main.py | 3 --- resources/network_handler.py | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc933afe..9677574e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - ex. "EFI" and additional FAT32 partitions on a single drive - Backend changes: - Call `setpgrp()` to prevent app from being killed if parent process is killed (ie. LaunchAgents) + - Resolve payloads path being mis-routed during CLI calls ## 0.6.6 - Implement option to disable ColorSync downgrade on HD 3000 Macs diff --git a/resources/main.py b/resources/main.py index f231dac1f..3041533bc 100644 --- a/resources/main.py +++ b/resources/main.py @@ -107,9 +107,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"): - logging.info("- Rerouting payloads location") - self.constants.payload_path = sys._MEIPASS / Path("payloads") ignore_args = ignore_args.pop(0) if not any(x in sys.argv for x in ignore_args): diff --git a/resources/network_handler.py b/resources/network_handler.py index 5efd0be14..2dc61fd6f 100644 --- a/resources/network_handler.py +++ b/resources/network_handler.py @@ -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 From a2cdc0339ab193ca5e62ee98aabb70762288a16e Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 27 May 2023 11:23:35 -0600 Subject: [PATCH 6/7] misc.py: Strip media argument --- CHANGELOG.md | 4 ++++ resources/build/misc.py | 17 ----------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9677574e5..dfaedcd88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ## 0.6.7 - Resolve partition buttons overlapping in Install OpenCore UI - ex. "EFI" and additional FAT32 partitions on a single drive +- Re-enable mediaanalysisd on Ventura + - Allows for Live Text support on systems with3802 GPUs + - ie. Intel Ivy Bridge and Haswell, Nvidia Kepler + - Previously disabled due to high instability in Photos with Face Scanning, now resolved - Backend changes: - Call `setpgrp()` to prevent app from being killed if parent process is killed (ie. LaunchAgents) - Resolve payloads path being mis-routed during CLI calls diff --git a/resources/build/misc.py b/resources/build/misc.py index 9bf332cdf..a39f15080 100644 --- a/resources/build/misc.py +++ b/resources/build/misc.py @@ -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 From 969cc65ae5cea7a275736477dfc495ea50fd7f7c Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 27 May 2023 11:52:02 -0600 Subject: [PATCH 7/7] integrity_verification.py: Add extra error handling for missing/botched files --- resources/integrity_verification.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/resources/integrity_verification.py b/resources/integrity_verification.py index 0144f779f..b249d02d0 100644 --- a/resources/integrity_verification.py +++ b/resources/integrity_verification.py @@ -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