Skip to content

Commit ac9cbd0

Browse files
committed
bump to 3.0.5
- fix kdk & metallib download
1 parent edf92fa commit ac9cbd0

7 files changed

Lines changed: 31 additions & 25 deletions

File tree

oclp_r/constants.py

Lines changed: 4 additions & 12 deletions
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.4" # OCLP-R
23+
self.patcher_version: str = "3.0.5" # 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"
@@ -275,19 +275,11 @@ def __init__(self) -> None:
275275
###https://github.moeyy.xyz
276276
###https://gitapi.simplehac.top
277277
self.github_mirror: str = ""
278-
self.api_link()
279-
280-
281-
def api_link(self):
282-
if self.github_proxy_link!="SimpleHac":
283-
284-
self.kdk_api_link="https://dortania.github.io/KdkSupportPkg/manifest.json"
285-
self.metallib_api_link="https://dortania.github.io/MetallibSupportPkg/manifest.json"
278+
279+
286280

287-
if self.github_proxy_link=="SimpleHac":
288281

289-
self.kdk_api_link="https://next.oclpapi.simplehac.cn/KdkSupportPkg/manifest.json"
290-
self.metallib_api_link="https://next.oclpapi.simplehac.cn/MetallibSupportPkg/manifest.json"
282+
291283
@property
292284
def special_build(self):
293285
"""

oclp_r/support/kdk_handler.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
196196
for kdk in remote_kdk_version:
197197
if (kdk["build"] != host_build):
198198
continue
199-
if self.constants.github_proxy_link!="SimpleHac" and self.constants.github_proxy_link!="Default":
200-
kdk['url']=kdk['url'].replace("https://gitapi.simplehac.top/","")
201199
if self.constants.github_proxy_link=="gh-proxy":
202200
kdk['url']="https://gh-proxy.com/"+kdk['url']
203201
if self.constants.github_proxy_link=="ghfast":
@@ -257,11 +255,18 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
257255
return
258256
logging.info(self.trans["No direct match found for {0}, falling back to closest match"].format(host_build))
259257
logging.info(self.trans["Closest Match: {0} ({1})"].format(self.kdk_closest_match_url_build, self.kdk_closest_match_url_version))
260-
258+
261259
self.kdk_url = self.kdk_closest_match_url
262260
self.kdk_url_build = self.kdk_closest_match_url_build
263261
self.kdk_url_version = self.kdk_closest_match_url_version
264262
self.kdk_url_expected_size = self.kdk_closest_match_url_expected_size
263+
if self.constants.github_proxy_link=="gh-proxy":
264+
self.kdk_url="https://gh-proxy.com/"+self.kdk_url
265+
elif self.constants.github_proxy_link=="ghfast":
266+
self.kdk_url="https://ghfast.top/"+self.kdk_url
267+
elif self.constants.github_proxy_link=="ghllkk":
268+
self.kdk_url="https://gh.llkk.cc"+self.kdk_url
269+
265270
else:
266271
logging.info(self.trans["Direct match found for {0} ({1})"].format(host_build, host_version))
267272

@@ -273,7 +278,8 @@ def _get_latest_kdk(self, host_build: str = None, host_version: str = None) -> N
273278
self.kdk_already_installed = True
274279
self.success = True
275280
return
276-
281+
282+
277283
logging.info(self.trans["Following KDK is recommended:"])
278284
logging.info(self.trans["- KDK Build: {0}"].format(self.kdk_url_build))
279285
logging.info(self.trans["- KDK Version: {0}"].format(self.kdk_url_version))

oclp_r/support/metallib_handler.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ def _get_latest_metallib(self) -> None:
159159
for metallib in remote_metallib_version:
160160
if (metallib["build"] != self.host_build):
161161
continue
162-
if self.constants.github_proxy_link!="SimpleHac" and self.constants.github_proxy_link!="Default":
163-
metallib['url']=metallib['url'].replace("https://gitapi.simplehac.top/","")
164162
if self.constants.github_proxy_link=="gh-proxy":
165163
metallib['url']="https://gh-proxy.com/"+metallib['url']
166164
if self.constants.github_proxy_link=="ghfast":

oclp_r/support/updates.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,7 @@ def check_binary_updates(self) -> Optional[dict]:
125125
begi=f"https://github.com/hackdoc/OCLP-R/releases/{latest_remote_version}"
126126
if self.constants.github_proxy_link=="Default":
127127
link=begi
128-
elif self.constants.github_proxy_link=="SimpleHac":
129-
link="https://gitapi.simplehac.top/"+begi
128+
130129
elif self.constants.github_proxy_link=="ghfast":
131130
link="https://ghfast.top/"+begi
132131
elif self.constants.github_proxy_link=="gh-proxy":

oclp_r/wx_gui/gui_KDK_download.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ def _fetch_installers():
8080
maxnx=[]
8181
for i in range(len(self.kdk_data)):
8282
self.kdk_data[i]['seen']=((self.kdk_data[i]['seen']).split("T"))[0]
83-
if self.constants.github_proxy_link!="SimpleHac" and self.constants.github_proxy_link!="Default":
84-
self.kdk_data[i]['url']=self.kdk_data[i]['url'].replace("https://gitapi.simplehac.top/","")
83+
8584
if self.constants.github_proxy_link=="gh-proxy":
8685
self.kdk_data[i]['url']="https://gh-proxy.com/"+self.kdk_data[i]['url']
8786
if self.constants.github_proxy_link=="ghfast":

oclp_r/wx_gui/gui_main_menu.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,23 @@ def __init__(self, parent: wx.Frame, title: str, global_constants: constants.Con
5454

5555
self.Centre()
5656
self.Show()
57-
57+
self.api_link()
5858

5959
self._preflight_checks()
60+
def api_link(self):
61+
if self.constants.github_proxy_link!="SimpleHac":
62+
self.constants.kdk_api_link="https://dortania.github.io/KdkSupportPkg/manifest.json"
63+
self.constants.metallib_api_link="https://dortania.github.io/MetallibSupportPkg/manifest.json"
64+
print(f"- User Select kdk link: {self.constants.kdk_api_link}")
65+
print(f"- User Select metallib link: {self.constants.metallib_api_link}")
6066

67+
if self.constants.github_proxy_link=="SimpleHac":
68+
69+
self.constants.kdk_api_link="https://next.oclpapi.simplehac.cn/KdkSupportPkg/manifest.json"
70+
self.constants.metallib_api_link="https://next.oclpapi.simplehac.cn/MetallibSupportPkg/manifest.json"
71+
72+
print(f"- User Select kdk link: {self.constants.kdk_api_link}")
73+
print(f"- User Select metallib link: {self.constants.metallib_api_link}")
6174
def _generate_elements(self) -> None:
6275
"""
6376
Generate UI elements for the main menu

oclp_r/wx_gui/gui_metallib_download.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ def _fetch_installers():
6969
for i in range(len(self.kdk_data)):
7070
data=self.kdk_data[i]["build"][:2]
7171
data2=self.kdk_data[i]["build"]
72-
if self.constants.github_proxy_link!="SimpleHac" and self.constants.github_proxy_link!="Default":
73-
self.kdk_data[i]['url']=self.kdk_data[i]['url'].replace("https://gitapi.simplehac.top/","")
72+
7473
if self.constants.github_proxy_link=="gh-proxy":
7574
self.kdk_data[i]['url']="https://gh-proxy.com/"+self.kdk_data[i]['url']
7675
if self.constants.github_proxy_link=="ghfast":

0 commit comments

Comments
 (0)