MaaFw 2.2.2__py3-none-win_amd64.whl → 2.3.0__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of MaaFw might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: MaaFw
3
- Version: 2.2.2
3
+ Version: 2.3.0
4
4
  Summary: An automation black-box testing framework based on image recognition
5
5
  Author: MaaXYZ
6
6
  Project-URL: Homepage, https://github.com/MaaXYZ/MaaFramework
@@ -87,7 +87,7 @@ _✨ 基于图像识别的自动化黑盒测试框架 ✨_
87
87
  - [maa-whmx](https://github.com/MAWHA/maa-whmx) 物华弥新 小助手 ![cpp](https://img.shields.io/badge/C%2B%2B-00599C?logo=c%2B%2B&logoColor=white) ![qt](https://img.shields.io/badge/Qt6-41CD52?logo=Qt&logoColor=white)
88
88
  基于全新架构的 物华弥新 小助手。图像技术 + 模拟控制,解放双手!由 MaaFramework 强力驱动!
89
89
 
90
- - [MAA-for-Millennium-Tour](https://github.com/Ostwind23/MAA-for-Millennium-Tour) 千年之旅 小助手 ![Pipeline](https://img.shields.io/badge/Pipeline-%23454545?logo=codecademy&logoColor=%23FFFFFF&color=%23454545) ![python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)
90
+ - [MAA-for-Millennium-Tour](https://github.com/Ostwind23/MAA-for-Millennium-Tour) 千年之旅 小助手 ![Pipeline](https://img.shields.io/badge/Pipeline-%23454545?logo=codecademy&logoColor=%23FFFFFF&color=%23454545) ![python](https://img.shields.io/badge/Python-3776AB?logo=python&logoColor=white)
91
91
  基于全新架构的 千年之旅 小助手。图像技术 + 模拟控制,解放侍主的大手!由 MaaFramework 强力驱动!
92
92
 
93
93
  - [MFAWPF](https://github.com/SweetSmellFox/MFAWPF) MFA 任务管理器 ![csharp](https://img.shields.io/badge/C%23-239120?logo=csharp&logoColor=white)
@@ -104,7 +104,13 @@ _✨ 基于图像识别的自动化黑盒测试框架 ✨_
104
104
 
105
105
  - [MPA](https://github.com/overflow65537/MAA_Punish) 战双 小助手 ![Pipeline](https://img.shields.io/badge/Pipeline-%23454545?logo=paddypower&logoColor=%23FFFFFF)
106
106
  基于全新架构的 战双帕弥什 小助手。图像技术 + 模拟控制,解放双手!由 玛丽的黑咖啡 2.0 强力驱动!
107
-
107
+
108
+ - [MaaYuan](https://github.com/syoius/MaaYuan) 代号鸢/如鸢 一键长草小助手 ![Pipeline](https://img.shields.io/badge/Pipeline-%23454545?logo=paddypower&logoColor=%23FFFFFF)
109
+ 基于全新架构的 代号鸢/如鸢 小助手。图像技术 + 模拟控制,解放双手!由 MaaFramework 强力驱动!
110
+
111
+ - [MFW-ELE-GUI](https://github.com/Night-stars-1/maa-gui) MFW-ELE-GUI ![Typescript](https://img.shields.io/badge/Typescript-8A2BE2?logo=typescript) ![Electron](https://img.shields.io/badge/Electron-3776AB?logo=electron&logoColor=black)
112
+ 基于全新架构的 MFW-ELE-GUI。由 MaaFramework 强力驱动!
113
+
108
114
  ## 生态共建
109
115
 
110
116
  MAA 正计划建设为一类项目,而非舟的单一软件。
@@ -159,9 +165,7 @@ _请留意,仅当您准备开发 MaaFramework 本身时,才需要阅读本
159
165
 
160
166
  感谢以下开发者对 MaaFramework 作出的贡献:
161
167
 
162
- <a href="https://github.com/MaaXYZ/MaaFramework/graphs/contributors">
163
- <img src="https://contrib.rocks/image?repo=MaaXYZ/MaaFramework&max=1000" />
164
- </a>
168
+ [![Contributors](https://contrib.rocks/image?repo=MaaXYZ/MaaFramework&max=1000)](https://github.com/MaaXYZ/MaaFramework/graphs/contributors)
165
169
 
166
170
  ## 讨论
167
171
 
@@ -169,6 +173,7 @@ _请留意,仅当您准备开发 MaaFramework 本身时,才需要阅读本
169
173
 
170
174
  ## 赞助
171
175
 
176
+ <!-- markdownlint-disable MD045 -->
172
177
  <a href="https://afdian.com/a/misteo">
173
178
  <img width="200" src="https://pic1.afdiancdn.com/static/img/welcome/button-sponsorme.png">
174
179
  </a>
@@ -0,0 +1,28 @@
1
+ maa/__init__.py,sha256=JkhLdjqr1X69SYY2O3qoPhdYImQC_91XS5_eY1vbtEo,230
2
+ maa/buffer.py,sha256=JLxAF8esnAN4SlkZf2OMMlpv0SV3WK7OyMF8w7sTaC8,16617
3
+ maa/context.py,sha256=Y71T92tIAGq6x8bJfYX8emUPEmPUA7nhnWgqOHh390E,5722
4
+ maa/controller.py,sha256=61R4asxDLChiZBSD1hEdGdbpoyOxHttOeflNuJ7DmqM,22381
5
+ maa/custom_action.py,sha256=pqPjDK7nVkGL8fceJadwb7IkeGjYc2X8RaXZOnVZXQs,2527
6
+ maa/custom_recognition.py,sha256=Y3Asdgb19YZioOVZZVs_hLSW6uBg7WDZDQPR2XfZpFU,3087
7
+ maa/define.py,sha256=uvqM04p6NLfju1Zz-EMR-8Af8MZGpEImMAt3QdcYvIA,13114
8
+ maa/job.py,sha256=jXGQ4YV_G8sAi-B7OmUrbPCEIf4xZjWqCSr36LT6Qt0,1153
9
+ maa/library.py,sha256=AwdFx_zWHEah81NwOmD-SDzysSuVbsreDLIaxpWsXvY,1267
10
+ maa/notification_handler.py,sha256=KjQlu66fNVwGGli8kuhNdSZPj2vO_oXjaNt_B1i_5wA,5251
11
+ maa/resource.py,sha256=TAULVwajpPThbLreB0JbhMWTv82r8Y3fFLM2b2VC91Y,9349
12
+ maa/tasker.py,sha256=tYD-YvqRPwMzt-h8UToJ01CsN4mO2mJHEnjsj5tTkSU,14425
13
+ maa/toolkit.py,sha256=BE_o8XgznuW1d_7YairYHOrqOp5Ha9GYMcinsYYBgVM,11163
14
+ maa/bin/DirectML.dll,sha256=nJ5tgiVhxsQbkOaZSz6IV88dZtv7HgxMeZx8ibTpLaE,18527776
15
+ maa/bin/MaaAdbControlUnit.dll,sha256=vK6yQvsRcCZgopUhwG-A57wGeK7iMfXgXifWvgzKG2Q,739840
16
+ maa/bin/MaaDbgControlUnit.dll,sha256=LWk3LXxTEOETfxwwslR-6Wh6ITk9zG5N7fQxeJIOd2k,390144
17
+ maa/bin/MaaFramework.dll,sha256=AyGv2GlFYDEEq63obdZ0Ev_n474aaq6mVrPKrgyprOU,1463808
18
+ maa/bin/MaaToolkit.dll,sha256=LYbYZgUcIFY_ZZmbJJ0bO46IQzk1HqycAeZ5F42PDCo,662528
19
+ maa/bin/MaaUtils.dll,sha256=_c4M6X2KiwYC9LJK8sRuUZRwMmQBxqnzCSgOeyMWsaI,538624
20
+ maa/bin/MaaWin32ControlUnit.dll,sha256=oDELrscQQkX13kbpuU2y8coXbNcoUfZORR4zAc7LiQU,325632
21
+ maa/bin/fastdeploy_ppocr_maa.dll,sha256=CUlHQM5FswM5sA8w0cznIn9FeWUqJrcz5amhFjc4FII,1222656
22
+ maa/bin/onnxruntime_maa.dll,sha256=M8x3OILDxCqf4eA4vGsqCogYiHbTSdznrmaIclO9ekQ,19207680
23
+ maa/bin/opencv_world4_maa.dll,sha256=hOYbTOL__zUlQXasinPjt1cgtMR1OfCGe8vWVSp3LFs,18272768
24
+ MaaFw-2.3.0.dist-info/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
25
+ MaaFw-2.3.0.dist-info/METADATA,sha256=YmMDFPFPV3HXlxHGp3sXtS990kjVpGLcFjMJ2c5Orag,11039
26
+ MaaFw-2.3.0.dist-info/WHEEL,sha256=7fwWHnUhFh8w_0TvE3v3Cyq6xlqIbZ7a_Y5-lVCtqvs,96
27
+ MaaFw-2.3.0.dist-info/top_level.txt,sha256=G8r2L__aYaMq4S3R70G6NsfEROiVp08kUcWvATzk2J8,4
28
+ MaaFw-2.3.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.3.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-win_amd64
maa/__init__.py CHANGED
@@ -1,10 +1,12 @@
1
1
  import os
2
+ from pathlib import Path
2
3
 
3
4
  from .library import Library
4
5
 
5
- __PATH = os.path.join(os.path.dirname(__file__), "bin")
6
+ env_path = os.environ.get("MAAFW_BINARY_PATH")
7
+ if env_path:
8
+ __PATH = Path(env_path)
9
+ else:
10
+ __PATH = Path(Path(__file__).parent, "bin")
6
11
 
7
- if os.path.exists(__PATH):
8
- ver = Library.open(__PATH)
9
- if ver:
10
- print(f"MaaFw version: {ver}")
12
+ Library.open(__PATH)
maa/bin/DirectML.dll CHANGED
Binary file
Binary file
Binary file
maa/bin/MaaFramework.dll CHANGED
Binary file
maa/bin/MaaToolkit.dll CHANGED
Binary file
maa/bin/MaaUtils.dll CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
maa/buffer.py CHANGED
@@ -13,10 +13,6 @@ class StringBuffer:
13
13
  _own: bool
14
14
 
15
15
  def __init__(self, handle: Optional[MaaStringBufferHandle] = None):
16
- if not Library.initialized:
17
- raise RuntimeError(
18
- "Library not initialized, please call `library.open()` first."
19
- )
20
16
  self._set_api_properties()
21
17
 
22
18
  if handle:
@@ -97,10 +93,6 @@ class StringListBuffer:
97
93
  _own: bool
98
94
 
99
95
  def __init__(self, handle: Optional[MaaStringListBufferHandle] = None):
100
- if not Library.initialized:
101
- raise RuntimeError(
102
- "Library not initialized, please call `library.open()` first."
103
- )
104
96
  self._set_api_properties()
105
97
 
106
98
  if handle:
@@ -203,11 +195,6 @@ class ImageBuffer:
203
195
  _own: bool
204
196
 
205
197
  def __init__(self, c_handle: Optional[MaaImageBufferHandle] = None):
206
- if not Library.initialized:
207
- raise RuntimeError(
208
- "Library not initialized, please call `library.open()` first."
209
- )
210
-
211
198
  self._set_api_properties()
212
199
 
213
200
  if c_handle:
@@ -309,10 +296,6 @@ class ImageListBuffer:
309
296
  _own: bool
310
297
 
311
298
  def __init__(self, c_handle: Optional[MaaImageListBufferHandle] = None):
312
- if not Library.initialized:
313
- raise RuntimeError(
314
- "Library not initialized, please call `library.open()` first."
315
- )
316
299
  self._set_api_properties()
317
300
 
318
301
  if c_handle:
@@ -413,11 +396,6 @@ class RectBuffer:
413
396
  _own: bool
414
397
 
415
398
  def __init__(self, c_handle: Optional[MaaRectHandle] = None):
416
- if not Library.initialized:
417
- raise RuntimeError(
418
- "Library not initialized, please call `library.open()` first."
419
- )
420
-
421
399
  self._set_api_properties()
422
400
 
423
401
  if c_handle:
maa/controller.py CHANGED
@@ -28,11 +28,6 @@ class Controller:
28
28
  self,
29
29
  handle: Optional[MaaControllerHandle] = None,
30
30
  ):
31
- if not Library.initialized:
32
- raise RuntimeError(
33
- "Library not initialized, please call `library.open()` first."
34
- )
35
-
36
31
  self._set_api_properties()
37
32
 
38
33
  if handle:
@@ -152,7 +147,7 @@ class Controller:
152
147
  ctypes.sizeof(ctypes.c_int32),
153
148
  )
154
149
  )
155
-
150
+
156
151
  def set_screenshot_use_raw_size(self, enable: bool) -> bool:
157
152
  cbool = MaaBool(enable)
158
153
  return bool(
maa/define.py CHANGED
@@ -110,15 +110,33 @@ class MaaCtrlOptionEnum:
110
110
  Recording = 5
111
111
 
112
112
 
113
- # enum MaaInferenceDeviceEnum
114
- # {
115
- # MaaInferenceDevice_CPU = -2,
116
- # MaaInferenceDevice_Auto = -1,
117
- # MaaInferenceDevice_GPU0 = 0,
118
- # MaaInferenceDevice_GPU1 = 1,
119
- # // and more gpu id...
120
- # };
121
- MaaInferenceDevice = ctypes.c_int32
113
+ class MaaInferenceDeviceEnum:
114
+ CPU = -2
115
+ Auto = -1
116
+ # and more gpu id or flag...
117
+
118
+
119
+ class MaaInferenceExecutionProviderEnum:
120
+ # I don't recommend setting up MaaResOption_InferenceDevice in this case,
121
+ # because you don't know which EP will be used on different user devices.
122
+ Auto = 0
123
+
124
+ # MaaResOption_InferenceDevice will not work.
125
+ CPU = 1
126
+
127
+ # MaaResOption_InferenceDevice will be used to set adapter id,
128
+ # It's from Win32 API `EnumAdapters1`.
129
+ DirectML = 2
130
+
131
+ # MaaResOption_InferenceDevice will be used to set coreml_flag,
132
+ # Reference to
133
+ # https://github.com/microsoft/onnxruntime/blob/main/include/onnxruntime/core/providers/coreml/coreml_provider_factory.h
134
+ # But you need to pay attention to the onnxruntime version we use, the latest flag may not be supported.
135
+ CoreML = 3
136
+
137
+ # MaaResOption_InferenceDevice will be used to set NVIDIA GPU ID
138
+ # TODO!
139
+ CUDA = 4
122
140
 
123
141
 
124
142
  class MaaResOptionEnum:
@@ -131,6 +149,13 @@ class MaaResOptionEnum:
131
149
  # default value is MaaInferenceDevice_Auto
132
150
  InferenceDevice = 1
133
151
 
152
+ # Use the specified inference execution provider
153
+ # Please set this option before loading the model.
154
+ #
155
+ # value: MaaInferenceExecutionProvider, eg: 0; val_size: sizeof(MaaInferenceExecutionProvider)
156
+ # default value is MaaInferenceExecutionProvider_Auto
157
+ InferenceExecutionProvider = 2
158
+
134
159
 
135
160
  MaaAdbScreencapMethod = ctypes.c_uint64
136
161
 
maa/library.py CHANGED
@@ -2,17 +2,17 @@ import ctypes
2
2
  import ctypes.util
3
3
  import pathlib
4
4
  import platform
5
- from typing import Optional, Union
6
5
 
7
6
  from .define import *
8
7
 
9
8
 
10
9
  class Library:
11
10
 
12
- initialized = False
13
-
14
11
  @staticmethod
15
- def open(path: Union[pathlib.Path, str]) -> Optional[str]:
12
+ def open(path: pathlib.Path):
13
+ if not path.exists():
14
+ raise FileNotFoundError(f"`{path}` does not exist.")
15
+
16
16
  platform_values = {
17
17
  "windows": ("MaaFramework.dll", "MaaToolkit.dll"),
18
18
  "darwin": ("libMaaFramework.dylib", "libMaaToolkit.dylib"),
@@ -26,40 +26,16 @@ class Library:
26
26
  else:
27
27
  lib_import = ctypes.CDLL
28
28
 
29
- try:
30
- Library.framework_libpath = (
31
- pathlib.Path(path) / platform_values[platform_type][0]
32
- )
33
- Library.framework = lib_import(str(Library.framework_libpath))
34
- except OSError:
35
- Library.framework_libpath = ctypes.util.find_library("MaaFramework")
36
- Library.framework = lib_import(str(Library.framework_libpath))
37
-
38
- try:
39
- Library.toolkit_libpath = (
40
- pathlib.Path(path) / platform_values[platform_type][1]
41
- )
42
- Library.toolkit = lib_import(str(Library.toolkit_libpath))
43
- except OSError:
44
- Library.toolkit_libpath = ctypes.util.find_library("MaaToolkit")
45
- Library.toolkit = lib_import(str(Library.toolkit_libpath))
29
+ Library.framework_libpath = path / platform_values[platform_type][0]
30
+ Library.framework = lib_import(str(Library.framework_libpath))
46
31
 
47
- if not Library.framework or not Library.toolkit:
48
- Library.initialized = False
49
- return None
32
+ Library.toolkit_libpath = path / platform_values[platform_type][1]
33
+ Library.toolkit = lib_import(str(Library.toolkit_libpath))
50
34
 
51
35
  Library._set_api_properties()
52
- Library.initialized = True
53
-
54
- return Library.version()
55
36
 
56
37
  @staticmethod
57
38
  def version() -> str:
58
- if not Library.initialized:
59
- raise RuntimeError(
60
- "Library not initialized, please call `library.open()` first."
61
- )
62
-
63
39
  return Library.framework.MaaVersion().decode()
64
40
 
65
41
  @staticmethod
maa/resource.py CHANGED
@@ -21,12 +21,6 @@ class Resource:
21
21
  notification_handler: Optional[NotificationHandler] = None,
22
22
  handle: Optional[MaaResourceHandle] = None,
23
23
  ):
24
-
25
- if not Library.initialized:
26
- raise RuntimeError(
27
- "Library not initialized, please call `library.open()` first."
28
- )
29
-
30
24
  self._set_api_properties()
31
25
 
32
26
  if handle:
@@ -60,18 +54,45 @@ class Resource:
60
54
  def clear(self) -> bool:
61
55
  return bool(Library.framework.MaaResourceClear(self._handle))
62
56
 
57
+ def use_cpu(self) -> bool:
58
+ return self.set_inference(
59
+ MaaInferenceExecutionProviderEnum.CPU, MaaInferenceDeviceEnum.CPU
60
+ )
61
+
62
+ def use_directml(self, device_id: int = MaaInferenceDeviceEnum.Auto) -> bool:
63
+ return self.set_inference(MaaInferenceExecutionProviderEnum.DirectML, device_id)
64
+
65
+ def use_coreml(self, coreml_flag: int = MaaInferenceDeviceEnum.Auto) -> bool:
66
+ return self.set_inference(MaaInferenceExecutionProviderEnum.CoreML, coreml_flag)
67
+
68
+ def use_auto_ep(self) -> bool:
69
+ return self.set_inference(
70
+ MaaInferenceExecutionProviderEnum.Auto, MaaInferenceDeviceEnum.Auto
71
+ )
72
+
73
+ # not implemented
74
+ # def use_cuda(self, nvidia_gpu_id: int) -> bool:
75
+ # return self.set_inference(MaaInferenceExecutionProviderEnum.CUDA, nvidia_gpu_id)
76
+
63
77
  def set_gpu(self, gpu_id: int) -> bool:
78
+ """
79
+ Deprecated, please use `use_directml`, `use_coreml` or `use_cuda` instead.
80
+ """
64
81
  if gpu_id < 0:
65
82
  return False
66
- return self.set_inference_device(gpu_id)
83
+ return self.use_directml(gpu_id)
67
84
 
68
85
  def set_cpu(self) -> bool:
69
- MaaInferenceDevice_CPU = -2
70
- return self.set_inference_device(MaaInferenceDevice_CPU)
71
-
86
+ """
87
+ Deprecated, please use `use_cpu` instead.
88
+ """
89
+ return self.use_cpu()
90
+
72
91
  def set_auto_device(self) -> bool:
73
- MaaInferenceDevice_Auto = -1
74
- return self.set_inference_device(MaaInferenceDevice_Auto)
92
+ """
93
+ Deprecated, please use `use_auto_ep` instead.
94
+ """
95
+ return self.use_auto_ep()
75
96
 
76
97
  def register_custom_recognition(
77
98
  self, name: str, recognition: "CustomRecognition" # type: ignore
@@ -149,13 +170,21 @@ class Resource:
149
170
 
150
171
  ### private ###
151
172
 
152
- def set_inference_device(self, device_id: int) -> bool:
153
- cint = ctypes.c_int32(device_id)
173
+ def set_inference(self, execution_provider: int, device_id: int) -> bool:
174
+ cep = ctypes.c_int32(execution_provider)
175
+ cdevice = ctypes.c_int32(device_id)
154
176
  return bool(
177
+ Library.framework.MaaResourceSetOption(
178
+ self._handle,
179
+ MaaResOptionEnum.InferenceExecutionProvider,
180
+ ctypes.pointer(cep),
181
+ ctypes.sizeof(ctypes.c_int32),
182
+ )
183
+ ) and bool(
155
184
  Library.framework.MaaResourceSetOption(
156
185
  self._handle,
157
186
  MaaResOptionEnum.InferenceDevice,
158
- ctypes.pointer(cint),
187
+ ctypes.pointer(cdevice),
159
188
  ctypes.sizeof(ctypes.c_int32),
160
189
  )
161
190
  )
maa/tasker.py CHANGED
@@ -1,6 +1,5 @@
1
1
  import ctypes
2
2
  import json
3
- import time
4
3
  from pathlib import Path
5
4
  from typing import Any, Dict, Optional, Union
6
5
 
@@ -25,11 +24,6 @@ class Tasker:
25
24
  notification_handler: Optional[NotificationHandler] = None,
26
25
  handle: Optional[MaaTaskerHandle] = None,
27
26
  ):
28
- if not Library.initialized:
29
- raise RuntimeError(
30
- "Library not initialized, please call `library.open()` first."
31
- )
32
-
33
27
  self._set_api_properties()
34
28
 
35
29
  if handle:
@@ -92,8 +86,8 @@ class Tasker:
92
86
  return bool(Library.framework.MaaTaskerRunning(self._handle))
93
87
 
94
88
  def post_stop(self) -> Job:
95
- Library.framework.MaaTaskerPostStop(self._handle)
96
- return Job(MaaId(0), self._stop_status, self._stop_wait)
89
+ taskid = Library.framework.MaaTaskerPostStop(self._handle)
90
+ return self._gen_task_job(taskid)
97
91
 
98
92
  def get_latest_node(self, name: str) -> Optional[NodeDetail]:
99
93
  c_node_id = MaaNodeId()
@@ -201,15 +195,6 @@ class Tasker:
201
195
  def _task_wait(self, id: int) -> ctypes.c_int32:
202
196
  return Library.framework.MaaTaskerWait(self._handle, id)
203
197
 
204
- def _stop_status(self, id: int) -> MaaStatusEnum:
205
- return MaaStatusEnum.succeeded if not self.running else MaaStatusEnum.running
206
-
207
- def _stop_wait(self, id: int) -> MaaStatusEnum:
208
- # TODO: 这个应该由 callback 来处理
209
- while self.running:
210
- time.sleep(0.1)
211
- return MaaStatusEnum.succeeded
212
-
213
198
  def get_recognition_detail(self, reco_id: int) -> Optional[RecognitionDetail]:
214
199
  name = StringBuffer()
215
200
  algorithm = StringBuffer()
@@ -316,7 +301,9 @@ class Tasker:
316
301
  detail = self.get_node_detail(int(c_node_id_list[i]))
317
302
  nodes.append(detail)
318
303
 
319
- return TaskDetail(task_id=task_id, entry=entry.get(), nodes=nodes, status=Status(status))
304
+ return TaskDetail(
305
+ task_id=task_id, entry=entry.get(), nodes=nodes, status=Status(status)
306
+ )
320
307
 
321
308
  _api_properties_initialized: bool = False
322
309
 
@@ -398,7 +385,7 @@ class Tasker:
398
385
  Library.framework.MaaTaskerRunning.restype = MaaBool
399
386
  Library.framework.MaaTaskerRunning.argtypes = [MaaTaskerHandle]
400
387
 
401
- Library.framework.MaaTaskerPostStop.restype = MaaBool
388
+ Library.framework.MaaTaskerPostStop.restype = MaaTaskId
402
389
  Library.framework.MaaTaskerPostStop.argtypes = [MaaTaskerHandle]
403
390
 
404
391
  Library.framework.MaaTaskerGetResource.restype = MaaResourceHandle
maa/toolkit.py CHANGED
@@ -189,11 +189,6 @@ class Toolkit:
189
189
  return
190
190
  Toolkit._api_properties_initialized = True
191
191
 
192
- if not Library.initialized:
193
- raise RuntimeError(
194
- "Library not initialized, please call `library.open()` first."
195
- )
196
-
197
192
  Library.toolkit.MaaToolkitConfigInitOption.restype = MaaBool
198
193
  Library.toolkit.MaaToolkitConfigInitOption.argtypes = [
199
194
  ctypes.c_char_p,
@@ -1,28 +0,0 @@
1
- maa/__init__.py,sha256=rBIC5X_VsfFXOMJRdKjgDyO428XHgeWAT3t6ZYmqO1M,207
2
- maa/buffer.py,sha256=E0tuasXPm6A_4r22PGSwObgGXb2qCMJrT5yrAvcgk6I,17424
3
- maa/context.py,sha256=Y71T92tIAGq6x8bJfYX8emUPEmPUA7nhnWgqOHh390E,5722
4
- maa/controller.py,sha256=VOz4Und15toq6oehHR0BHC10LMhFVqKAcImQNXCqHxQ,22547
5
- maa/custom_action.py,sha256=pqPjDK7nVkGL8fceJadwb7IkeGjYc2X8RaXZOnVZXQs,2527
6
- maa/custom_recognition.py,sha256=Y3Asdgb19YZioOVZZVs_hLSW6uBg7WDZDQPR2XfZpFU,3087
7
- maa/define.py,sha256=klaIWvNS5DDgKo6EC330EqqWlKQ4JLCOHZ8d7Ifaoqo,12126
8
- maa/job.py,sha256=jXGQ4YV_G8sAi-B7OmUrbPCEIf4xZjWqCSr36LT6Qt0,1153
9
- maa/library.py,sha256=nDTBUFC6_91gmyy8SfkTTccMZET9XGU8IxvuVUEwQ6E,2099
10
- maa/notification_handler.py,sha256=KjQlu66fNVwGGli8kuhNdSZPj2vO_oXjaNt_B1i_5wA,5251
11
- maa/resource.py,sha256=bvS02sCCS9DRw_zJZeyCk8_DrZry6KBlUIvcfpKoUIg,8243
12
- maa/tasker.py,sha256=0hALFCHKHuOBQMSqyG4BYi1idJLy64UZMpqL4GQVZKs,14929
13
- maa/toolkit.py,sha256=TlF8MoaGcWLklpISIlQNvc_rpTFBFrpDbLgctfQ_zqo,11325
14
- maa/bin/DirectML.dll,sha256=GMgqnAYUH36WJBra0aNb6_R4CnLY7usQfsEvdIORs_U,18527264
15
- maa/bin/MaaAdbControlUnit.dll,sha256=w9PCe0V_RMqvlnfpz75qtHp3aLLScV-WpN6XrkaotEw,776192
16
- maa/bin/MaaDbgControlUnit.dll,sha256=yXR3MnqA4EpIoWvhthaHYc0BEzs1ZvCqM2u4Fmkt37I,424448
17
- maa/bin/MaaFramework.dll,sha256=9sHJ1k4UG6f1_6HZvTckGBTkdWL1olKGCu_gDe5cKxE,1381888
18
- maa/bin/MaaToolkit.dll,sha256=x2Jz7Ob6LykAQRk_RXwkfPPzpCFBpsyicW4PhBTx0-g,697344
19
- maa/bin/MaaUtils.dll,sha256=yYTJiZbwCWOlgHFUGSWaqCDYiYGsNjJjk6kbUvRt27k,590848
20
- maa/bin/MaaWin32ControlUnit.dll,sha256=05JWz6Q_8W596aO29SKDZ2X4YBTd1YjEBntZgd4xEDA,371200
21
- maa/bin/fastdeploy_ppocr_maa.dll,sha256=BwN6dniAuGCrJgcqM1wV9z_o2QFhKCbFsIECyJShxh8,564736
22
- maa/bin/onnxruntime_maa.dll,sha256=F87oMy7MdU0YTcpilcuNaZkKq-WhoMqiywU9ovV4Cr0,14664704
23
- maa/bin/opencv_world4_maa.dll,sha256=GSSdBf95My8o08OIplsawk14ne8aNc9Q4D6egs7Go5E,18230272
24
- MaaFw-2.2.2.dist-info/LICENSE.md,sha256=RG51X65V_wNLuyG-RGcLXxFsKyZnlH5wNvK_5mMlOag,7560
25
- MaaFw-2.2.2.dist-info/METADATA,sha256=-Jr7OovF3t1PTdM7qWd5yvWkG7pGBXz5xfJEQjW7K88,10390
26
- MaaFw-2.2.2.dist-info/WHEEL,sha256=59IXTypJ6Z4EzlGBm_p8ImrwEBbQjT8pmKOvaVlWwJI,96
27
- MaaFw-2.2.2.dist-info/top_level.txt,sha256=G8r2L__aYaMq4S3R70G6NsfEROiVp08kUcWvATzk2J8,4
28
- MaaFw-2.2.2.dist-info/RECORD,,