mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
feat: Python接口的MAA更新器
This commit is contained in:
@@ -2,7 +2,7 @@ import json
|
||||
import pathlib
|
||||
import time
|
||||
|
||||
from asst import InstanceOptionType, Asst, Message
|
||||
from asst import InstanceOptionType, Asst, Message, Updater, Version
|
||||
|
||||
|
||||
@Asst.CallBackType
|
||||
@@ -18,6 +18,9 @@ if __name__ == "__main__":
|
||||
# 请设置为存放 dll 文件及资源的路径
|
||||
path = pathlib.Path.cwd().parent
|
||||
|
||||
# 设置更新器的路径和目标版本并更新
|
||||
Updater(path, Version.Stable).update()
|
||||
|
||||
# 外服需要再额外传入增量资源路径,例如
|
||||
# incremental_path=path / 'resource' / 'global' / 'YoStarEN'
|
||||
Asst.load(path=path)
|
||||
|
||||
Reference in New Issue
Block a user