Skip to content

Commit e3e6923

Browse files
committed
fix some bugs && update to 3.0.4
1 parent 5f35378 commit e3e6923

File tree

7 files changed

+27
-14
lines changed

7 files changed

+27
-14
lines changed

.github/workflows/build-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
description: 'Version'
77
required: true
88
type: string
9-
default: '3.0.3'
9+
default: '3.0.4'
1010
pre_release:
1111
description: 'Pre-release or not'
1212
required: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ CLAUDE.MD
1313
/.claude
1414
/dist
1515
/.vscode
16+
Unknown.png
1617
__pycache__/
1718
*.kext
1819
*.py[cod]

oclp_r/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self) -> None:
2020
self.metallib_api_link: str = ""
2121

2222
# Patcher Versioning
23-
self.patcher_version: str = "3.0.3" # OCLP-R
23+
self.patcher_version: str = "3.0.4" # OCLP-R
2424
self.patcher_support_pkg_version: str = "1.11.1" # PatcherSupportPkg
2525
self.copyright_date: str = "Copyright © 2020-2026 Dortania and Hackdoc"
2626
self.patcher_name: str = "OCLP-R"

oclp_r/efi_builder/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def _validate_malformed_kexts(self, directory: str | Path) -> None:
189189
expected_executable = Path(kext_folder / Path("Contents/MacOS") / Path(kext_data["CFBundleExecutable"]))
190190
if not expected_executable.exists():
191191
logging.info(self.trans["- Missing executable for {kext_folder_name}: Contents/MacOS/{expected_executable_name}"].format(kext_folder_name=kext_folder.name, expected_executable_name=expected_executable.name))
192-
raise Exception(self.trans[" - Missing executable for {kext_folder_name}: Contents/MacOS/{expected_executable_name}"].format(kext_folder_name=kext_folder.name, expected_executable_name=expected_executable.name))
192+
raise Exception(self.trans["- Missing executable for {kext_folder_name}: Contents/MacOS/{expected_executable_name}"].format(kext_folder_name=kext_folder.name, expected_executable_name=expected_executable.name))
193193

194194
if Path(kext_folder / Path("Contents/PlugIns")).exists():
195195
self._validate_malformed_kexts(kext_folder / Path("Contents/PlugIns"))

oclp_r/support/kdk_handler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,9 @@ def validate_kdk_checksum(self, kdk_dmg_path: str = None) -> bool:
581581
if result.returncode != 0:
582582
logging.info(self.trans["Error: Kernel Debug Kit checksum verification failed!"])
583583
subprocess_wrapper.log(result)
584-
msg = self.trans["Kernel Debug Kit checksum verification failed, please try again.\n\nIf this continues to fail, ensure you're downloading on a stable network connection (ie. Ethernet)"]
584+
part1 = self.trans["Kernel Debug Kit checksum verification failed, please try again."]
585+
part2 = self.trans["If this continues to fail, ensure you're downloading on a stable network connection (ie. Ethernet)"]
586+
msg = f"{part1}\n\n{part2}"
585587
logging.info(f"{msg}")
586588

587589
self.error_msg = msg

oclp_r/support/translate_language.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def network_handler(self):
549549
"Failed to delete temporary files: {0}":"Failed to delete temporary files: {0}",
550550
"Downloaded {0} of {1}":"Downloaded {0} of {1}",
551551
"Downloaded {0:.2f}% of {1} ({2}/s) ({3:.2f} seconds remaining)":"Downloaded {0:.2f}% of {1} ({2}/s) ({3:.2f} seconds remaining)",
552+
"Content-Length missing from headers":"Content-Length missing from headers",
552553
}
553554
elif self.language_point=="简体中文":
554555
trans={
@@ -586,6 +587,7 @@ def network_handler(self):
586587
"Failed to delete temporary files: {0}":"删除临时文件失败: {0}",
587588
"Downloaded {0} of {1}":"已下载 {0} ,共 {1}",
588589
"Downloaded {0:.2f}% of {1} ({2}/s) ({3:.2f} seconds remaining)":"已下载 {0:.2f}% ,共 {1} ,速度 {2} ,剩余时间 {3:.2f} 秒",
590+
"Content-Length missing from headers":"响应头中缺少 Content-Length",
589591
}
590592
return trans
591593
def private(self):
@@ -1011,6 +1013,7 @@ def gui_KDK_download(self):
10111013
"Ventura":"Ventura",
10121014
"Failed to detect OS build: ":"Failed to detect OS build: ",
10131015
"Available installers on Dortania":"Available installers on Dortania",
1016+
"Cannot find any KDKs on Dortania":"Cannot find any KDKs on Dortania",
10141017
}
10151018
elif self.language_point=="简体中文":
10161019
trans={
@@ -1035,9 +1038,10 @@ def gui_KDK_download(self):
10351038
"Sonoma":"Sonoma",
10361039
"Ventura":"Ventura",
10371040
"Available installers on Dortania":"Dortania 上可用的安装器",
1041+
"Cannot find any KDKs on Dortania":"在 Dortania 上找不到任何 KDK",
10381042
}
10391043
return trans
1040-
1044+
10411045
def gui_about(self):
10421046
if self.language_point=="English":
10431047
trans={
@@ -1256,6 +1260,7 @@ def gui_install_oc(self):
12561260
"Available disks:":"Available disks:",
12571261
"Available partitions for ":"Available partitions for ",
12581262
'OpenCore has finished installing to disk.\n\nYou can eject the drive, insert it into the ':'OpenCore has finished installing to disk.\n\nYou can eject the drive, insert it into the ',
1263+
"Note: Blue represents the disk OpenCore is currently booted from":"Note: Blue represents the disk OpenCore is currently booted from",
12591264
}
12601265
elif self.language_point=="简体中文":
12611266
trans={
@@ -1281,10 +1286,11 @@ def gui_install_oc(self):
12811286
"Would you like to reboot?":"要重启吗?",
12821287
"You can eject the drive, insert it into the ":"您可以弹出驱动器,将其插入 ",
12831288
"reboot, hold the Option key and select OpenCore/Boot EFI\'s option.":"重启,按住 Option 键,然后选择 OpenCore/Boot EFI 选项。",
1284-
"An internal error occurred while installing:\n":"安装过程中发生内部错误:\n"
1289+
"An internal error occurred while installing:\n":"安装过程中发生内部错误:\n",
1290+
"Note: Blue represents the disk OpenCore is currently booted from":"注意:蓝色表示当前 OpenCore 启动所在的磁盘",
12851291
}
12861292
return trans
1287-
1293+
12881294
def gui_macos_installer_download(self):
12891295
if self.language_point=="English":
12901296
trans={
@@ -2052,6 +2058,7 @@ def gui_settings(self):
20522058
"Provide English & Chinese Simplified.":"Provide English & Chinese Simplified.",
20532059
"Updating System Defaults: {variable} = {value} ({value_type})":"Updating System Defaults: {variable} = {value} ({value_type})",
20542060
"Updating System Defaults (root): {variable} = {value} ({value_type})":"Updating System Defaults (root): {variable} = {value} ({value_type})",
2061+
"Root Volume update Failed, check terminal output":"Root Volume update Failed, check terminal output",
20552062
}
20562063
elif self.language_point=="简体中文":
20572064
trans={
@@ -2400,10 +2407,11 @@ def gui_settings(self):
24002407
"Statistics":"统计信息",
24012408
"Populate Stats":"填充统计信息",
24022409
"Return":"返回",
2403-
"This settings requires 'gpu-power-prefs' NVRAM argument to be set to '1'.\n\nIf missing and this option is toggled, the system will not boot\n\nFull command:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00":"此设置需要 'gpu-power-prefs' NVRAM 参数设置为 '1'。\n\n如果缺失且此选项被切换,系统将无法启动\n\n完整命令:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00"
2410+
"This settings requires 'gpu-power-prefs' NVRAM argument to be set to '1'.\n\nIf missing and this option is toggled, the system will not boot\n\nFull command:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00":"此设置需要 'gpu-power-prefs' NVRAM 参数设置为 '1'。\n\n如果缺失且此选项被切换,系统将无法启动\n\n完整命令:\nnvram FA4CE28D-B62F-4C99-9CC3-6815686E30F9:gpu-power-prefs=%01%00%00%00",
2411+
"Root Volume update Failed, check terminal output":"根卷更新失败,请检查终端输出",
24042412
}
24052413
return trans
2406-
2414+
24072415
def gui_support(self):
24082416
if self.language_point=="English":
24092417
trans={
@@ -2687,6 +2695,7 @@ def detect(self):
26872695
"Stripping out Non-Metal GPUs":"Stripping out Non-Metal GPUs",
26882696
" Stripping out {hardware_name}":" Stripping out {hardware_name}",
26892697
"Cannot mix Metal 3802 and Metal 31001 GPUs on macOS Sequoia or newer":"Cannot mix Metal 3802 and Metal 31001 GPUs on macOS Sequoia or newer",
2698+
"Stripping out Metal 3802 GPUs":"Stripping out Metal 3802 GPUs",
26902699
}
26912700
elif self.language_point=="简体中文":
26922701
trans={
@@ -2720,7 +2729,8 @@ def detect(self):
27202729
"Validation: nvda_drv(_vrl) variable missing":"Validation: 缺少nvda_drv(_vrl)变量",
27212730
"Validation: Patching not possible":"Validation: 无法修补",
27222731
"Validation: Unpatching not possible":"Validation: 无法取消修补",
2723-
"Validation: Root volume dirty":"Validation: 根卷目录已被修补"
2732+
"Validation: Root volume dirty":"Validation: 根卷目录已被修补",
2733+
"Stripping out Metal 3802 GPUs":"排除 Metal 3802 GPU",
27242734
}
27252735
return trans
27262736
def auto_patcher(self):

oclp_r/wx_gui/gui_sys_patch_start.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def _kdk_thread_spawn():
100100
if self.kdk_obj.success is False:
101101
progress_bar_animation.stop_pulse()
102102
progress_bar.SetValue(0)
103-
wx.MessageBox(f"{self.trans["KDK download failed:"]} {self.kdk_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
103+
wx.MessageBox(f"{self.trans["KDK download failed: "]}{self.kdk_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
104104
return False
105105

106106
kdk_download_obj = self.kdk_obj.retrieve_download()
@@ -132,7 +132,7 @@ def _kdk_thread_spawn():
132132
progress_bar.SetValue(0)
133133
logging.error(self.trans["KDK checksum validation failed"])
134134
logging.error(self.kdk_obj.error_msg)
135-
msg = wx.MessageDialog(frame, f"{self.trans["KDK checksum validation failed:"]} {self.kdk_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
135+
msg = wx.MessageDialog(frame, f"{self.trans["KDK checksum validation failed: "]}{self.kdk_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
136136
msg.ShowModal()
137137
return False
138138

@@ -181,7 +181,7 @@ def _metallib_thread_spawn():
181181
if self.metallib_obj.success is False:
182182
progress_bar_animation.stop_pulse()
183183
progress_bar.SetValue(0)
184-
wx.MessageBox(f"{self.trans["Metallib download failed:"]} {self.metallib_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
184+
wx.MessageBox(f"{self.trans["Metallib download failed: "]}{self.metallib_obj.error_msg}", self.trans["Error"], wx.OK | wx.ICON_ERROR)
185185
return False
186186

187187
self.metallib_download_obj = self.metallib_obj.retrieve_download()
@@ -194,7 +194,7 @@ def _metallib_thread_spawn():
194194
title=self.title,
195195
global_constants=self.constants,
196196
download_obj=self.metallib_download_obj,
197-
item_name=f"{self.trans["Metallib Build"]} {self.metallib_obj.metallib_url_build}"
197+
item_name=f"{self.trans["Metallib Build "]}{self.metallib_obj.metallib_url_build}"
198198
)
199199
if self.metallib_download_obj.download_complete is False:
200200
return False

0 commit comments

Comments
 (0)