mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Fix codesign
This commit is contained in:
+30
-30
@@ -5,9 +5,9 @@
|
|||||||
# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
|
# - Temporary Work-around: sudo bless --mount /System/Volumes/Update/mnt1 --bootefi --last-sealed-snapshot
|
||||||
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
# - Work-around battery throttling on laptops with no battery (IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/)
|
||||||
|
|
||||||
#import hashlib
|
import hashlib
|
||||||
import os
|
import os
|
||||||
#mport requests
|
import requests
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import zipfile
|
import zipfile
|
||||||
@@ -338,35 +338,35 @@ class PatchSysVolume:
|
|||||||
print("- Removing old Apple Binaries zip")
|
print("- Removing old Apple Binaries zip")
|
||||||
Path(self.constants.payload_apple_root_path_zip).unlink()
|
Path(self.constants.payload_apple_root_path_zip).unlink()
|
||||||
|
|
||||||
Utilities.cls()
|
#Utilities.cls()
|
||||||
print("- Downloading Apple binaries")
|
#print("- Downloading Apple binaries")
|
||||||
popen_oclp = subprocess.Popen(
|
#popen_oclp = subprocess.Popen(
|
||||||
["curl", "-S", "-L", link, "--output", self.constants.payload_apple_root_path_zip],
|
# ["curl", "-S", "-L", link, "--output", self.constants.payload_apple_root_path_zip],
|
||||||
stdin=subprocess.PIPE,
|
# stdin=subprocess.PIPE,
|
||||||
stdout=subprocess.PIPE,
|
# stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.STDOUT,
|
# stderr=subprocess.STDOUT,
|
||||||
universal_newlines=True,
|
# universal_newlines=True,
|
||||||
)
|
#)
|
||||||
for stdout_line in iter(popen_oclp.stdout.readline, ""):
|
#for stdout_line in iter(popen_oclp.stdout.readline, ""):
|
||||||
print(stdout_line, end="")
|
# print(stdout_line, end="")
|
||||||
popen_oclp.stdout.close()
|
#popen_oclp.stdout.close()
|
||||||
|
|
||||||
#response = requests.get(link, stream=True)
|
response = requests.get(link, stream=True)
|
||||||
#with self.constants.payload_apple_root_path_zip.open("wb") as file:
|
with self.constants.payload_apple_root_path_zip.open("wb") as file:
|
||||||
# count = 0
|
count = 0
|
||||||
# for chunk in response.iter_content(1024 * 1024 * 4):
|
for chunk in response.iter_content(1024 * 1024 * 4):
|
||||||
# file.write(chunk)
|
file.write(chunk)
|
||||||
# count += len(chunk)
|
count += len(chunk)
|
||||||
# Utilities.cls()
|
Utilities.cls()
|
||||||
# print(f"- Downloading Apple binaries ({os_ver}) from PatcherSupportPkg")
|
print(f"- Downloading Apple binaries ({os_ver}) from PatcherSupportPkg")
|
||||||
# print(f"- {count / 1024 / 1024}MB Downloaded")
|
print(f"- {count / 1024 / 1024}MB Downloaded")
|
||||||
#checksum = hashlib.sha256()
|
checksum = hashlib.sha256()
|
||||||
#with self.constants.payload_apple_root_path_zip.open("rb") as file:
|
with self.constants.payload_apple_root_path_zip.open("rb") as file:
|
||||||
# chunk = file.read(1024 * 1024 * 16)
|
chunk = file.read(1024 * 1024 * 16)
|
||||||
# while chunk:
|
while chunk:
|
||||||
# checksum.update(chunk)
|
checksum.update(chunk)
|
||||||
# chunk = file.read(1024 * 1024 * 16)
|
chunk = file.read(1024 * 1024 * 16)
|
||||||
#print(f"- Checksum: {checksum.hexdigest()}")
|
print(f"- Checksum: {checksum.hexdigest()}")
|
||||||
if self.constants.payload_apple_root_path_zip.exists():
|
if self.constants.payload_apple_root_path_zip.exists():
|
||||||
print("- Download completed")
|
print("- Download completed")
|
||||||
print("- Unzipping download...")
|
print("- Unzipping download...")
|
||||||
|
|||||||
@@ -4,5 +4,7 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>com.apple.security.cs.disable-library-validation</key>
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
Reference in New Issue
Block a user