mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 22:20:53 +10:00
Enhance RecoveryOS support
This commit is contained in:
+4
-2
@@ -940,9 +940,11 @@ Please build OpenCore first!"""
|
|||||||
print("- Adding Internal Drive icon")
|
print("- Adding Internal Drive icon")
|
||||||
shutil.copy(self.constants.icon_path_internal, mount_path)
|
shutil.copy(self.constants.icon_path_internal, mount_path)
|
||||||
print("- Cleaning install location")
|
print("- Cleaning install location")
|
||||||
subprocess.run(f"dot_clean {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
if Constants.Constants().recovery_status == False:
|
||||||
|
# RecoveryOS doesn't support dot_clean
|
||||||
|
subprocess.run(["dot_clean", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
print("- Unmounting EFI partition")
|
print("- Unmounting EFI partition")
|
||||||
subprocess.run(f"diskutil umount {mount_path}".split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
subprocess.run(["diskutil", "umount", mount_path], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
print("- OpenCore transfer complete")
|
print("- OpenCore transfer complete")
|
||||||
print("\nPress [Enter] to continue.\n")
|
print("\nPress [Enter] to continue.\n")
|
||||||
input()
|
input()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ from __future__ import print_function
|
|||||||
import os
|
import os
|
||||||
import math as m
|
import math as m
|
||||||
|
|
||||||
|
from Resources import Constants
|
||||||
|
|
||||||
def header(lines):
|
def header(lines):
|
||||||
lines = [i for i in lines if i is not None]
|
lines = [i for i in lines if i is not None]
|
||||||
@@ -16,7 +17,13 @@ def header(lines):
|
|||||||
|
|
||||||
|
|
||||||
def cls():
|
def cls():
|
||||||
os.system('cls' if os.name == 'nt' else 'clear')
|
# RecoveryOS doesn't support terminal clearing
|
||||||
|
if Constants.Constants().recovery_status == False:
|
||||||
|
os.system('cls' if os.name == 'nt' else 'clear')
|
||||||
|
else:
|
||||||
|
# Default terminal window is 24 lines tall
|
||||||
|
for i in range(24):
|
||||||
|
print("")
|
||||||
|
|
||||||
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
# def menu(title, prompt, menu_options, add_quit=True, auto_number=False, in_between=[], top_level=False):
|
||||||
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
|
# return_option = ["Q", "Quit", None] if top_level else ["B", "Back", None]
|
||||||
|
|||||||
Reference in New Issue
Block a user