mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-06-20 06:10:00 +10:00
sys_patch_dict.py: Set ShowDate var as global
This commit is contained in:
@@ -85,7 +85,7 @@ def SystemPatchDictionary(os_major, os_minor, non_metal_os_support):
|
|||||||
},
|
},
|
||||||
"Processes": {
|
"Processes": {
|
||||||
# 'When Space Allows' option introduced in 12.4 (XNU 21.5)
|
# 'When Space Allows' option introduced in 12.4 (XNU 21.5)
|
||||||
**({"defaults write com.apple.menuextra.clock ShowDate -int 1": False } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 4, os_major, os_minor) else {}),
|
**({"defaults write /Library/Preferences/.GlobalPreferences.plist ShowDate -int 1": True } if os_data.os_conversion.is_os_newer(os_data.os_data.monterey, 4, os_major, os_minor) else {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
"Non-Metal IOAccelerator Common": {
|
"Non-Metal IOAccelerator Common": {
|
||||||
|
|||||||
@@ -213,11 +213,12 @@ class PatchSysVolume:
|
|||||||
for process in required_patches[patch]["Processes"]:
|
for process in required_patches[patch]["Processes"]:
|
||||||
# Some processes need sudo, however we cannot directly call sudo in some scenarios
|
# Some processes need sudo, however we cannot directly call sudo in some scenarios
|
||||||
# Instead, call elevated funtion is string's boolean is True
|
# Instead, call elevated funtion is string's boolean is True
|
||||||
process_array = process.split(" ")
|
|
||||||
if required_patches[patch]["Processes"][process] is True:
|
if required_patches[patch]["Processes"][process] is True:
|
||||||
utilities.process_status(utilities.elevated(process_array, stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
print(f"- Running Process as Root:\n{process}")
|
||||||
|
utilities.process_status(utilities.elevated(process, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True))
|
||||||
else:
|
else:
|
||||||
utilities.process_status(subprocess.run(process_array, stdout=subprocess.PIPE, stderr=subprocess.STDOUT))
|
print(f"- Running Process:\n{process}")
|
||||||
|
utilities.process_status(subprocess.run(process, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True))
|
||||||
self.write_patchset(required_patches)
|
self.write_patchset(required_patches)
|
||||||
|
|
||||||
def preflight_checks(self, required_patches, source_files_path):
|
def preflight_checks(self, required_patches, source_files_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user