mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-12 13:17:00 +08:00
Fix: OSError when loading MAA (#2010)
This commit is contained in:
@@ -35,6 +35,10 @@ class Asst:
|
||||
if platform.system().lower() == 'windows':
|
||||
Asst.__libpath = pathlib.Path(path) / 'MaaCore.dll'
|
||||
os.environ["PATH"] += os.pathsep + str(path)
|
||||
try:
|
||||
ctypes.WinDLL(str(pathlib.Path(path) / 'onnxruntime.dll'))
|
||||
except Exception:
|
||||
pass
|
||||
Asst.__lib = ctypes.WinDLL(str(Asst.__libpath))
|
||||
elif platform.system().lower() == 'darwin':
|
||||
Asst.__libpath = pathlib.Path(path) / 'libMaaCore.dylib'
|
||||
|
||||
Reference in New Issue
Block a user