mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 12:00:15 +10:00
Add SeedUtil option to Advanced Patcher Settings
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
- dGPU must be disabled via NVRAM or deMUXed
|
- dGPU must be disabled via NVRAM or deMUXed
|
||||||
- Increment binaries:
|
- Increment binaries:
|
||||||
- Apple Binaries 478f6a6 (0.0.7 release - 05-16-2021)
|
- Apple Binaries 478f6a6 (0.0.7 release - 05-16-2021)
|
||||||
|
- Add SeedUtil option to Advanced Patcher Settings
|
||||||
|
|
||||||
## 0.1.4
|
## 0.1.4
|
||||||
- Fix Device Path formatting on 2012+ iMacs
|
- Fix Device Path formatting on 2012+ iMacs
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
|
|||||||
#[f"Download more RAM:\t\t\tCurrently {self.constants.download_ram}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).download_more_ram_dot_com],
|
#[f"Download more RAM:\t\t\tCurrently {self.constants.download_ram}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).download_more_ram_dot_com],
|
||||||
[f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).disable_cpufriend],
|
[f"Disable CPU Friend:\t\t\tCurrently {self.constants.disallow_cpufriend}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).disable_cpufriend],
|
||||||
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).custom_cpu],
|
[f"Set Custom name {self.constants.custom_cpu_model_value}", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).custom_cpu],
|
||||||
|
[f"Set SeedUtil Status", CliMenu.MenuOptions(self.constants.custom_model or self.current_model, self.constants).set_seedutil],
|
||||||
]
|
]
|
||||||
|
|
||||||
for option in options:
|
for option in options:
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Handle misc CLI menu options
|
# Handle misc CLI menu options
|
||||||
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
# Copyright (C) 2020-2021, Dhinak G, Mykola Grymalyuk
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
import subprocess
|
||||||
|
|
||||||
from Resources import ModelArray, Constants, Utilities
|
from Resources import ModelArray, Constants, Utilities
|
||||||
|
|
||||||
@@ -378,3 +379,33 @@ hardware
|
|||||||
self.constants.disallow_cpufriend = False
|
self.constants.disallow_cpufriend = False
|
||||||
else:
|
else:
|
||||||
print("Invalid option")
|
print("Invalid option")
|
||||||
|
|
||||||
|
def set_seedutil(self):
|
||||||
|
Utilities.cls()
|
||||||
|
Utilities.header(["Set SeedUtil Status"])
|
||||||
|
print("""Used for setting OS Update Preferences
|
||||||
|
|
||||||
|
Valid options:
|
||||||
|
1. Public Release Seed (Default)
|
||||||
|
2. Public Beta Seed
|
||||||
|
3. Developer Beta Seed
|
||||||
|
4. Check SeedUtil's current status
|
||||||
|
""")
|
||||||
|
|
||||||
|
change_menu = input("Set update status(Press [ENTER] to exit): ")
|
||||||
|
if change_menu == "1":
|
||||||
|
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
elif change_menu == "2":
|
||||||
|
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "enroll", "PublicSeed"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
elif change_menu == "3":
|
||||||
|
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "unenroll"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "enroll", "DeveloperSeed"], stdout=subprocess.PIPE).stdout.decode().strip().encode()
|
||||||
|
elif change_menu == "4":
|
||||||
|
result = subprocess.run(["sudo", "/System/Library/PrivateFrameworks/Seeding.framework/Versions/A/Resources/seedutil", "current"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
|
result = [i.partition(":")[2] for i in result.stdout.decode().split("\n") if "Currently enrolled in" in i][0]
|
||||||
|
print(f"SeedUtil Current Status: {result}")
|
||||||
|
input("\nPress [ENTER] to continue")
|
||||||
|
self.set_seedutil()
|
||||||
|
else:
|
||||||
|
print("Returning to main menu")
|
||||||
|
|||||||
Reference in New Issue
Block a user