1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-13 10:17:00 +08:00
This commit is contained in:
2024-11-14 22:11:00 +08:00
7 changed files with 22 additions and 24 deletions

View File

@@ -50,14 +50,11 @@ class Asst:
platform_type = platform.system().lower()
if platform_type == 'windows':
lib_import_func = ctypes.WinDLL
# Todo: MAA v4.12.0正式版更新之后删除
# 手动加载onnxruntime.dll以避免部分版本的python错误地从System32加载旧版本
try:
lib_import_func(str(pathlib.Path(path) / 'onnxruntime.dll'))
# Override by System32 dll
lib_import_func(os.path.join(os.environ['SystemRoot'], 'System32/msvcp140.dll'))
except Exception as e:
print(e)
pass
# Todo
else:
lib_import_func = ctypes.CDLL