Skip to content

Commit ae6d42e

Browse files
committed
add luanchpad and control center
1 parent 9a74647 commit ae6d42e

File tree

6 files changed

+206
-7
lines changed

6 files changed

+206
-7
lines changed

oclp_r/constants.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def __init__(self) -> None:
4848
self.cslvfixup_version: str = "2.6.1" # CSLVFixup
4949
self.autopkg_version: str = "1.0.4" # AutoPkgInstaller
5050
self.cryptexfixup_version: str = "1.0.4" # CryptexFixup
51+
self.launchpad_version: str = "26.0 Beta 4"
52+
5153

5254
## Apple
5355
## https://www.apple.com
@@ -162,6 +164,8 @@ def __init__(self) -> None:
162164
## Hardware
163165
self.computer: device_probe.Computer = None # type: ignore
164166
self.custom_model: Optional[str] = None
167+
self.change_launchpad:bool = False
168+
self.change_control_center:bool =False
165169

166170
## OpenCore Settings
167171
self.opencore_debug: bool = False # Enable OpenCore debug

oclp_r/sys_patch/patchsets/detect.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
legacy_audio,
4444
legacy_usb11,
4545
modern_audio,
46+
Launch,
47+
control_center,
4648
modern_usb,
4749
pcie_webcam,
4850
t1_security,
@@ -132,6 +134,8 @@ def __init__(self, constants: constants.Constants,
132134
modern_wireless.ModernWireless,
133135
legacy_audio.LegacyAudio,
134136
modern_audio.ModernAudio,
137+
Launch.LaunchPad,
138+
control_center.ControlCenter,
135139
voodoo_audio.VoodooAudio,
136140
modern_usb.LegacyUSBHost,
137141
display_backlight.DisplayBacklight,
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
"""
2+
launch.py: LaunchPad patch set for macOS 26
3+
Not Recommend for using
4+
"""
5+
6+
from ..base import BaseHardware, HardwareVariant
7+
8+
from ...base import PatchType
9+
10+
from .....constants import Constants
11+
12+
from .....datasets.os_data import os_data
13+
14+
from .....support import utilities
15+
16+
17+
class LaunchPad(BaseHardware):
18+
19+
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
20+
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
21+
22+
23+
def name(self) -> str:
24+
"""
25+
Display name for end users
26+
"""
27+
return f"{self.hardware_variant()}: LaunchPad ({self._constants.launchpad_version})"
28+
29+
30+
def present(self) -> bool:
31+
return self._constants.change_launchpad
32+
def requires_kernel_debug_kit(self) -> bool:
33+
"""
34+
Apple no longer provides standalone kexts in the base OS
35+
"""
36+
return True
37+
def native_os(self) -> bool:
38+
"""
39+
- Everything before macOS Tahoe 26 is considered native
40+
"""
41+
if self._xnu_major < os_data.tahoe.value:
42+
return True
43+
44+
return False
45+
46+
47+
def hardware_variant(self) -> HardwareVariant:
48+
"""
49+
Type of hardware variant
50+
"""
51+
return HardwareVariant.MISCELLANEOUS
52+
53+
54+
def _modern_audio_patches(self) -> dict:
55+
"""
56+
Patches for Modern Audio
57+
"""
58+
if self._constants.launchpad_version != "26.0 Beta 4" and self._constants.launchpad_version != "26.0 Beta 2":
59+
self._constants.launchpad_version = "26.0 Beta 4"
60+
return {
61+
"LuanchPad": {
62+
PatchType.OVERWRITE_SYSTEM_VOLUME: {
63+
"/System/Library/CoreServices": {
64+
"Dock.app": f"{self._constants.launchpad_version}",
65+
"Spotlight.app": f"{self._constants.launchpad_version}",
66+
},
67+
"/System/Applications": {
68+
"Apps.app": f"{self._constants.launchpad_version}",
69+
"Launchpad.app": f"{self._constants.launchpad_version}",
70+
},
71+
},
72+
},
73+
}
74+
75+
76+
def patches(self) -> dict:
77+
"""
78+
Patches for modern audio
79+
"""
80+
if self.native_os() is True:
81+
return {}
82+
83+
return self._modern_audio_patches()
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
"""
2+
control_center.py: Control Center patch set for macOS 26
3+
Not Recommend for using
4+
"""
5+
6+
from ..base import BaseHardware, HardwareVariant
7+
8+
from ...base import PatchType
9+
10+
from .....constants import Constants
11+
12+
from .....datasets.os_data import os_data
13+
14+
from .....support import utilities
15+
16+
17+
class ControlCenter(BaseHardware):
18+
19+
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
20+
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
21+
22+
23+
def name(self) -> str:
24+
"""
25+
Display name for end users
26+
"""
27+
return f"{self.hardware_variant()}: Control Center"
28+
29+
30+
def present(self) -> bool:
31+
return self._constants.change_control_center
32+
def requires_kernel_debug_kit(self) -> bool:
33+
"""
34+
Apple no longer provides standalone kexts in the base OS
35+
"""
36+
return True
37+
def native_os(self) -> bool:
38+
"""
39+
- Everything before macOS Tahoe 26 is considered native
40+
"""
41+
if self._xnu_major < os_data.tahoe.value:
42+
return True
43+
44+
return False
45+
46+
47+
def hardware_variant(self) -> HardwareVariant:
48+
"""
49+
Type of hardware variant
50+
"""
51+
return HardwareVariant.MISCELLANEOUS
52+
53+
54+
def _modern_audio_patches(self) -> dict:
55+
"""
56+
Patches for Modern Audio
57+
"""
58+
return {
59+
"LuanchPad": {
60+
PatchType.OVERWRITE_SYSTEM_VOLUME: {
61+
"/System/Library/CoreServices": {
62+
"ControlCenter.app": f"26.0 Beta 5",
63+
},
64+
},
65+
},
66+
}
67+
68+
69+
def patches(self) -> dict:
70+
"""
71+
Patches for modern audio
72+
"""
73+
if self.native_os() is True:
74+
return {}
75+
76+
return self._modern_audio_patches()

oclp_r/wx_gui/gui_settings.py

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ def _settings(self) -> dict:
707707
},
708708
},
709709
"Patch": {
710-
"Root Volume Patching": {
710+
"Patch-General": {
711711
"type": "title",
712712
},
713713
"TeraScale 2 Acceleration": {
@@ -742,6 +742,21 @@ def _settings(self) -> dict:
742742
],
743743
"condition":self.audio_check()
744744
},
745+
"Launchpad Version Change": {
746+
"type": "choice",
747+
"choices": [
748+
"26.0 Beta 4",
749+
"26.0 Beta 2"
750+
],
751+
"value": self.constants.launchpad_version,
752+
"variable": "launchpad_version",
753+
"constants_variable": "launchpad_version",
754+
"description": [
755+
" - 26.0 Beta 4: Using macOS 26.0 Beta 4 socures.",
756+
" - 26.0 Beta 2: Using macOS 26.0 Beta 2 socures.",
757+
],
758+
759+
},
745760
"wrap_around 1": {
746761
"type": "wrap_around",
747762
},
@@ -754,8 +769,30 @@ def _settings(self) -> dict:
754769
"When enabled, this will patch the Old USB",
755770
"extensions on Tahoe.",
756771
],
772+
},
773+
"Allow Tahoe Control Center Patch": {
774+
"type": "checkbox",
775+
"value": self.constants.change_control_center,
776+
"variable": "change_control_center",
777+
"constants_variable": "change_control_center",
778+
"description": [
779+
"When enabled, this will patch the Control",
780+
"Center on Tahoe.",
781+
],
782+
},
783+
"Allow Launchpad Patch": {
784+
"type": "checkbox",
785+
"value": self.constants.change_launchpad,
786+
"variable": "change_launchpad",
787+
"constants_variable": "change_launchpad",
788+
"description": [
789+
"When enabled, this will patch the Control",
790+
"Center on Tahoe.",
791+
],
757792
},
758-
"Non-Metal Configuration": {
793+
},
794+
"Non-Metal":{
795+
"Non-Metal Settings": {
759796
"type": "title",
760797
},
761798
"Log out required to apply changes to SkyLight": {
@@ -768,7 +805,6 @@ def _settings(self) -> dict:
768805
"description": [
769806
"If Beta Menu Bar is enabled,",
770807
"menu bar colour will dynamically",
771-
"change as needed.",
772808
],
773809
"override_function": self._update_system_defaults,
774810
"condition": gui_support.CheckProperties(self.constants).host_is_non_metal(general_check=True)
@@ -803,9 +839,6 @@ def _settings(self) -> dict:
803839
"variable": "Amy.MenuBar2Beta",
804840
"description": [
805841
"Supports dynamic colour changes.",
806-
"Note: Setting is still experimental.",
807-
"If you experience issues, please",
808-
"disable this setting.",
809842
],
810843
"override_function": self._update_system_defaults,
811844
"condition": gui_support.CheckProperties(self.constants).host_is_non_metal(general_check=True)
@@ -830,7 +863,6 @@ def _settings(self) -> dict:
830863
"override_function": self._update_system_defaults,
831864
"condition": gui_support.CheckProperties(self.constants).host_is_non_metal(general_check=True)
832865
},
833-
834866
},
835867
"App": {
836868
"General": {

payloads/Icon/AppIcons/Assets.car

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)