mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-18 09:11:31 +08:00
Merge branch 'master' of https://github.com/LmeSzinc/AzurLaneAutoScript
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user