Skip to content

Commit c6f2dfd

Browse files
committed
bump version to 3.1.0
- Update NVMe Patch for test
1 parent 373b49b commit c6f2dfd

7 files changed

Lines changed: 111 additions & 7 deletions

File tree

oclp_r/constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def __init__(self) -> None:
2020
self.metallib_api_link: str = ""
2121

2222
# Patcher Versioning
23-
self.patcher_version: str = "3.0.9" # OCLP-R
24-
self.patcher_support_pkg_version: str = "1.11.1" # PatcherSupportPkg
23+
self.patcher_version: str = "3.1.0" # OCLP-R
24+
self.patcher_support_pkg_version: str = "1.11.2" # PatcherSupportPkg
2525
self.copyright_date: str = "Copyright © 2020-2026 Dortania and Hackdoc"
2626
self.patcher_name: str = "OCLP-R"
2727

@@ -257,7 +257,7 @@ def __init__(self) -> None:
257257
self.allow_apfs_aligned_patch: bool = True
258258

259259

260-
260+
self.allow_ionvme_patch: bool = False
261261

262262

263263
## Non-Metal OS support

oclp_r/support/arguments.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def _parse_arguments(self) -> None:
5050
"""
5151
Parses arguments passed to the patcher
5252
"""
53-
53+
54+
5455
if self.args.validate:
5556
self._validation_handler()
5657
return
@@ -78,6 +79,8 @@ def _parse_arguments(self) -> None:
7879
if self.args.auto_patch:
7980
self._sys_patch_auto_handler()
8081
return
82+
83+
8184

8285

8386
def _validation_handler(self) -> None:
@@ -87,6 +90,8 @@ def _validation_handler(self) -> None:
8790
logging.info(self.trans["Set Validation Mode"])
8891
validation.PatcherValidation(self.constants)
8992

93+
94+
9095

9196
def _sys_patch_handler(self) -> None:
9297
"""
@@ -206,6 +211,7 @@ def _build_handler(self) -> None:
206211
else:
207212
self.constants.verbose_debug = False # Override Defaults detected
208213

214+
209215
if self.args.debug_oc:
210216
logging.info(self.trans["- Set OpenCore DEBUG configuration"])
211217
self.constants.opencore_debug = True
@@ -272,5 +278,7 @@ def _build_handler(self) -> None:
272278
logging.info(self.trans["- Building for natively supported model"])
273279
self.constants.allow_oc_everywhere = True
274280
self.constants.serial_settings = "None"
281+
282+
275283

276284
build.BuildOpenCore(self.constants.custom_model or self.constants.computer.real_model, self.constants)

oclp_r/support/translate_language.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ def arguements(self):
152152
"Selected installer: {name} ({version} ({build}))":"Selected installer: {name} ({version} ({build}))",
153153
"Available disks:":"Available disks:",
154154
"Selected macOS DMG {version} ({build})":"Selected macOS DMG {version} ({build})",
155-
"Selected macOS {version} ({build})":"Selected macOS {version} ({build})"
155+
"Selected macOS {version} ({build})":"Selected macOS {version} ({build})",
156+
"Set IONvme Patch is True":"Set IONvme Patch is True",
156157
}
157158
elif self.language_point=="简体中文":
158159
trans = {
160+
"Set IONvme Patch is True":"设置IONvme补丁",
159161
"Set Validation Mode": "设置验证模式",
160162
"- Running from Installer Sandbox, blocking OS updaters": "- 从安装程序沙箱运行, 阻止操作系统更新程序",
161163
"Set System Volume patching": "设置系统卷修补",
@@ -1203,11 +1205,13 @@ def gui_download(self):
12031205
def gui_entry(self):
12041206
if self.language_point=="English":
12051207
trans={
1208+
"Set IONvme Patch is True":"Set IONvme Patch is True",
12061209
"Entry point set:":"Entry point set:",
12071210
"Cleaning up wxPython GUI":"Cleaning up wxPython GUI"
12081211
}
12091212
elif self.language_point=="简体中文":
12101213
trans={
1214+
"Set IONvme Patch is True":"设置IONvme补丁",
12111215
"Entry point set:":"入口点已设置:",
12121216
"Cleaning up wxPython GUI":"正在清理 wxPython GUI"
12131217
}
@@ -3132,6 +3136,7 @@ def hardware(self):
31323136
"Legacy Audio":"Legacy Audio",
31333137
"Modern Audio":"Modern Audio",
31343138
"Voodoo Audio":"Voodoo Audio",
3139+
"IONvme Patch":"IONvme Patch",
31353140

31363141
# Graphics
31373142
"AMD Legacy GCN":"AMD Legacy GCN",
@@ -3180,7 +3185,7 @@ def hardware(self):
31803185
"Legacy Audio":"传统音频补丁",
31813186
"Modern Audio":"现代音频补丁",
31823187
"Voodoo Audio":"Voodoo 音频补丁",
3183-
3188+
"IONvme Patch":"IONvme 补丁",
31843189
# Graphics
31853190
"AMD Legacy GCN":"AMD 传统 GCN",
31863191
"AMD Navi":"AMD Navi",

oclp_r/support/utilities.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,8 @@ def check_cli_args():
631631
parser.add_argument("--auto_patch", help="Check if patches are needed and prompt user", action="store_true", required=False)
632632
parser.add_argument("--update_installed", help="Prompt user to finish updating via GUI", action="store_true", required=False)
633633

634+
# Internal
635+
parser.add_argument("--ionv", help="Allow Nvme Patch for Samsung.", action="store_true", required=False)
634636
args = parser.parse_args()
635637
if not (
636638
args.build or

oclp_r/sys_patch/patchsets/detect.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
pcie_webcam,
4545
t1_security,
4646
cpu_missing_avx,
47-
47+
io_nvme
4848
)
4949
from .hardware.USB import (
5050
modern_usb,
@@ -147,6 +147,7 @@ def __init__(self, constants: constants.Constants,
147147
t1_security.T1SecurityChip,
148148
legacy_usb11.USB11Controller,
149149
cpu_missing_avx.CPUMissingAVX,
150+
io_nvme.IONvme
150151
]
151152

152153
self.device_properties = None
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
"""
2+
io_nvme.py: Modern Audio patch set for macOS 11-13
3+
"""
4+
5+
from ..base import BaseHardware, HardwareVariant
6+
from .....detections.amfi_detect import AmfiConfigDetectLevel
7+
from ...base import PatchType
8+
9+
from .....constants import Constants
10+
11+
from .....datasets.os_data import os_data
12+
13+
from .....support import utilities
14+
15+
16+
class IONvme(BaseHardware):
17+
18+
def __init__(self, xnu_major, xnu_minor, os_build, global_constants: Constants) -> None:
19+
super().__init__(xnu_major, xnu_minor, os_build, global_constants)
20+
21+
def required_amfi_level(self) -> AmfiConfigDetectLevel:
22+
"""
23+
What level of AMFI configuration is required for this patch set
24+
Currently defaulted to AMFI needing to be disabled
25+
"""
26+
return AmfiConfigDetectLevel.NO_CHECK
27+
28+
def name(self) -> str:
29+
"""
30+
Display name for end users
31+
"""
32+
return f"{self._trans.get(self.hardware_variant(), self.hardware_variant())}: {self._trans.get("IONvme Patch", "IONvme Patch")}"
33+
34+
def present(self) -> bool:
35+
"""
36+
Requires constants to be set
37+
"""
38+
return self._constants.allow_ionvme_patch==True
39+
40+
def requires_kernel_debug_kit(self) -> bool:
41+
"""
42+
Apple no longer provides standalone kexts in the base OS
43+
"""
44+
return True
45+
46+
def native_os(self) -> bool:
47+
"""
48+
macOS 14+ is native
49+
"""
50+
51+
if self._xnu_major < os_data.sonoma.value:
52+
return False
53+
54+
return False
55+
56+
def hardware_variant(self) -> HardwareVariant:
57+
"""
58+
Type of hardware variant
59+
"""
60+
return HardwareVariant.MISCELLANEOUS
61+
62+
def _ionvme_patches(self) -> dict:
63+
"""
64+
Patches for Modern Audio
65+
"""
66+
return {
67+
"Modern Audio": {
68+
PatchType.OVERWRITE_SYSTEM_VOLUME: {
69+
"/System/Library/Extensions": {
70+
"IONvmeFamily.kext": "26.4",
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._ionvme_patches()

oclp_r/wx_gui/gui_entry.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ def start(self, entry: SupportedEntryPoints = gui_main_menu.MainFrame, start_pat
8787
elif "--gui_unpatch" in sys.argv:
8888
self.frame.revert_root_patching()
8989

90+
if "--ionv" in sys.argv:
91+
logging.info(self.trans["Set IONvme Patch is True"])
92+
self.constants.allow_ionvme_patch = True
93+
94+
9095
self.app.MainLoop()
9196

9297

0 commit comments

Comments
 (0)