1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-18 11:31:30 +08:00
This commit is contained in:
GH Action - Upstream Sync
2024-11-10 01:39:34 +00:00

View File

@@ -50,14 +50,11 @@ class Asst:
platform_type = platform.system().lower() platform_type = platform.system().lower()
if platform_type == 'windows': if platform_type == 'windows':
lib_import_func = ctypes.WinDLL lib_import_func = ctypes.WinDLL
# Todo: MAA v4.12.0正式版更新之后删除
# 手动加载onnxruntime.dll以避免部分版本的python错误地从System32加载旧版本
try: 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: except Exception as e:
print(e)
pass pass
# Todo
else: else:
lib_import_func = ctypes.CDLL lib_import_func = ctypes.CDLL