mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
更新pythonAPI使其适配现版本
This commit is contained in:
@@ -54,7 +54,7 @@ class Asst:
|
||||
lib_import_func = ctypes.WinDLL
|
||||
# 手动加载onnxruntime.dll以避免部分版本的python错误地从System32加载旧版本
|
||||
try:
|
||||
lib_import_func(str(pathlib.Path(path) / 'onnxruntime.dll'))
|
||||
lib_import_func(str(pathlib.Path(path) / 'onnxruntime_maa.dll'))
|
||||
except Exception as e:
|
||||
print(e)
|
||||
pass
|
||||
|
||||
@@ -103,7 +103,11 @@ class Updater:
|
||||
pre[0] = pre[0][1:]
|
||||
if sub:
|
||||
sub = sub.split('.')
|
||||
sub = sub[:-1]
|
||||
#舍弃版本类型后的字符,避免使用内测版本而出现字母无法转换成数字的情况 XD
|
||||
for i in range(len(sub)):
|
||||
if sub[i].startswith('alpha') or sub[i].startswith('beta') or sub[i].startswith('rc'):
|
||||
sub = sub[:1]
|
||||
break
|
||||
if sub[0] == 'alpha':
|
||||
sub[0] = '1'
|
||||
elif sub[0] == 'beta':
|
||||
|
||||
Reference in New Issue
Block a user