Support space in path when downloading Root Patches

Closes https://github.com/dortania/OpenCore-Legacy-Patcher/issues/194
This commit is contained in:
Mykola Grymalyuk
2021-05-14 15:51:19 -06:00
parent 9eecbae6da
commit 608decc9de
2 changed files with 3 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
- Add agdpmod=vit9696 to all Nvidia Metal iMacs
- Fixes external display support on Nvidia iMac12,x
- Remove reliance on AppleBacklightFixup
- Support space in path when downloading Root Patches
## 0.1.4
- Fix Device Path formatting on 2012+ iMacs

View File

@@ -288,7 +288,7 @@ class PatchSysVolume:
def download_files(self):
Utilities.cls()
print("- Downloading Apple binaries")
popen_oclp = subprocess.Popen(f"curl -S -L {self.constants.url_apple_binaries}{self.constants.payload_version}.zip --output {self.constants.payload_apple_root_path_zip}".split(), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
popen_oclp = subprocess.Popen(["curl", "-S", "-L", f"{self.constants.url_apple_binaries}{self.constants.payload_version}.zip", "--output", self.constants.payload_apple_root_path_zip], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
for stdout_line in iter(popen_oclp.stdout.readline, ""):
print(stdout_line, end="")
popen_oclp.stdout.close()
@@ -296,7 +296,7 @@ class PatchSysVolume:
print("- Download completed")
print("- Unzipping download...")
try:
subprocess.run(f"unzip {self.constants.payload_apple_root_path_zip}".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
subprocess.run(["unzip", self.constants.payload_apple_root_path_zip], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=self.constants.payload_path).stdout.decode()
print("- Renaming folder")
os.rename(self.constants.payload_apple_root_path_unzip, self.constants.payload_apple_root_path)
print("- Binaries downloaded to:")