Skip to content

Commit d2c0619

Browse files
committed
- Move Lilu and WEG Patch
- Improve Audio Patch & Settings - Fix DMG Sort
1 parent 16888d8 commit d2c0619

File tree

6 files changed

+23
-79
lines changed

6 files changed

+23
-79
lines changed

.github/workflows/build-self.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

oclp_r/sys_patch/patchsets/hardware/misc/modern_audio.py

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ def present(self) -> bool:
3131
AppleHDA was outright removed in macOS 26, so this patch set is always present if OS requires it
3232
"""
3333

34-
return self._constants.audio_type=="AppleHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") !=""
35-
34+
return self._constants.audio_type=="AppleHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") !="" and utilities.check_kext_loaded("org.voodoo.driver.VoodooHDA") ==""
3635

3736
def native_os(self) -> bool:
3837
"""
@@ -61,20 +60,6 @@ def _modern_audio_patches(self) -> dict:
6160
"""
6261
return {
6362
"Modern Audio": {
64-
PatchType.REMOVE_SYSTEM_VOLUME: {
65-
"/System/Library/Extensions":[
66-
"VoodooHDA.kext",
67-
],
68-
"/Library/Extensions":[
69-
"VoodooHDA.kext",
70-
],
71-
"/Library/PreferencePanes":[
72-
"VoodooHDA.prefPane",
73-
],
74-
"/System/Library/PreferencePanes":[
75-
"VoodooHDA.prefPane",
76-
],
77-
},
7863
PatchType.OVERWRITE_SYSTEM_VOLUME: {
7964
"/System/Library/Extensions": {
8065
"AppleHDA.kext": "26.0 Beta 1",

oclp_r/sys_patch/patchsets/hardware/misc/voodoo_audio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def name(self) -> str:
2020

2121

2222
def present(self) -> bool:
23-
return self._constants.audio_type=="VoodooHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") ==""
23+
return self._constants.audio_type=="VoodooHDA" and utilities.check_kext_loaded("as.vit9696.AppleALC") =="" and utilities.check_kext_loaded("org.voodoo.driver.VoodooHDA")==""
2424

2525

2626
def native_os(self) -> bool:

oclp_r/sys_patch/patchsets/hardware/misc/whatevergreen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def _weg_patches(self) -> dict:
5858
return {
5959
"WEG Patch": {
6060
PatchType.OVERWRITE_SYSTEM_VOLUME: {
61-
"/System/Library/Extensions": {
61+
"/Library/Extensions": {
6262
"WhateverGreen.kext": "WEG",
6363
"Lilu.kext": "WEG",
6464
},

oclp_r/wx_gui/gui_macos_installer_download.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ def _fetch_simplehac_dmgs():
196196
aes=requests.get(aesurl,verify=False)
197197
if res.status_code == 200:
198198
dmgdata=res.json()
199+
dmgdata['dmgFiles'] = sorted(dmgdata['dmgFiles'], key=lambda x: x['build'])
200+
201+
print(dmgdata)
199202
logging.info("JSON data:")
200203
dmgwell=json.dumps(dmgdata, indent=4, ensure_ascii=False)
201204
if aes.status_code == 200:

oclp_r/wx_gui/gui_settings.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
os_data,
3434
cpu_data
3535
)
36+
from ..support import utilities
3637

37-
38+
import platform
3839
class SettingsFrame(wx.Frame):
3940
"""
4041
Modal-based Settings Frame
@@ -44,7 +45,7 @@ def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Con
4445
self.constants: constants.Constants = global_constants
4546
self.title: str = title
4647
self.parent: wx.Frame = parent
47-
48+
self.xnu_major = int(platform.release().split(".")[0])
4849
self.hyperlink_colour = (25, 179, 231)
4950

5051
self.settings = self._settings()
@@ -201,6 +202,10 @@ def _generate_elements(self, frame: wx.Frame = None) -> None:
201202
choice.Bind(wx.EVT_CHOICE, lambda event, variable=setting: self.settings[tab][variable]["override_function"](event))
202203
else:
203204
choice.Bind(wx.EVT_CHOICE, lambda event, variable=setting: self.on_choice(event, variable))
205+
if "condition" in setting_info:
206+
choice.Enable(setting_info["condition"])
207+
if setting_info["condition"] is False:
208+
choice.Disable()
204209
height += 10
205210
elif setting_info["type"] == "button":
206211
button = wx.Button(panel, label=setting, pos=(width + 25, 10 + height), size = (200,-1))
@@ -230,8 +235,14 @@ def _generate_elements(self, frame: wx.Frame = None) -> None:
230235

231236
if height > lowest_height_reached:
232237
lowest_height_reached = height
233-
234-
238+
def audio_check(self):
239+
if utilities.check_kext_loaded("com.apple.driver.AppleHDA")!="" or utilities.check_kext_loaded("as.vit9696.AppleALC") !="":
240+
self.constants.audio_type="AppleHDA"
241+
return False
242+
if utilities.check_kext_loaded("com.apple.driver.AppleHDA") and self.xnu_major>=os_data.os_data.tahoe:
243+
self.constants.audio_type="AppleHDA"
244+
return False
245+
return True
235246
def _settings(self) -> dict:
236247
"""
237248
Generates a dictionary of settings to be used in the GUI
@@ -729,11 +740,12 @@ def _settings(self) -> dict:
729740
" on Monterey and newer.",
730741
" Not recommended.",
731742
],
743+
"condition":self.audio_check()
732744
},
733745
"wrap_around 1": {
734746
"type": "wrap_around",
735747
},
736-
"Allow Tahoe Old USB Exts Patch": {
748+
"Allow Tahoe Modern USB Patch": {
737749
"type": "checkbox",
738750
"value": self.constants.allow_usb_patch,
739751
"variable": "allow_usb_patch",

0 commit comments

Comments
 (0)