chore: breaking rename

This commit is contained in:
MistEO
2022-12-02 00:22:47 +08:00
parent 8ff2c5e1d0
commit d9dcbb6289
345 changed files with 374 additions and 372 deletions

View File

@@ -5,8 +5,8 @@ on:
branches-ignore:
- master
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- 'src/MaaCore/**'
- 'src/MaaWpfGui/**'
- 'src/MeoAsstMac/**'
- '3rdparty/**'
- 'include/**'
@@ -16,8 +16,8 @@ on:
branches:
- dev
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- 'src/MaaCore/**'
- 'src/MaaWpfGui/**'
- 'src/MeoAsstMac/**'
- '3rdparty/**'
- 'include/**'
@@ -41,11 +41,11 @@ jobs:
run: |
brew update --preinstall
brew install ninja range-v3
- name: Configure MeoAssistant
- name: Configure MaaCore
run: |
mkdir build && cd build
cmake .. -GNinja -DBUILD_XCFRAMEWORK=ON -DBUILD_UNIVERSAL=ON
- name: Build libMeoAssistant
- name: Build libMaaCore
run: cmake --build build
- name: Build MeoAsstMac
working-directory: src/MeoAsstMac

View File

@@ -21,8 +21,8 @@ on:
branches-ignore:
- master
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- 'src/MaaCore/**'
- 'src/MaaWpfGui/**'
- '3rdparty/**'
- 'tools/MaaBuilder/**'
- tools/MaaBuilder.sln
@@ -33,8 +33,8 @@ on:
branches:
- dev
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- 'src/MaaCore/**'
- 'src/MaaWpfGui/**'
- '3rdparty/**'
- 'tools/MaaBuilder/**'
- tools/MaaBuilder.sln

View File

@@ -26,11 +26,11 @@ jobs:
run: |
brew update --preinstall
brew install ninja range-v3 create-dmg
- name: Configure MeoAssistant
- name: Configure MaaCore
run: |
mkdir build && cd build
cmake .. -GNinja -DCMAKE_BUILD_TYPE=Release -DBUILD_XCFRAMEWORK=ON -DBUILD_UNIVERSAL=ON
- name: Build libMeoAssistant
- name: Build libMaaCore
run: cmake --build build
- name: Build MeoAsstMac
working-directory: src/MeoAsstMac

6
.gitmodules vendored
View File

@@ -1,6 +1,6 @@
[submodule "test"]
path = test
url = https://github.com/MaaAssistantArknights/MaaTestSet.git
[submodule "src/MeoAsstMac"]
path = src/MeoAsstMac
url = https://github.com/MaaAssistantArknights/MeoAsstMac.git
[submodule "src/MaaMacGui"]
path = src/MaaMacGui
url = https://github.com/MaaAssistantArknights/MaaMacGui.git

View File

@@ -39,32 +39,32 @@ if (MSVC)
endif ()
include_directories(include)
include_directories(src/MeoAssistant)
include_directories(src/MaaCore)
file(GLOB_RECURSE maa_src src/MeoAssistant/*.cpp)
file(GLOB_RECURSE maa_src src/MaaCore/*.cpp)
add_library(MeoAssistant SHARED ${maa_src})
add_library(MaaCore SHARED ${maa_src})
if (MSVC)
find_library(FastDeploy_LIB NAMES fastdeploy PATHS 3rdparty/lib)
find_library(OpenCV NAMES opencv_world453 PATHS 3rdparty/lib)
find_library(ZLIB NAMES zlibstatic PATHS 3rdparty/lib)
target_link_libraries(MeoAssistant ws2_32 ${OpenCV} ${FastDeploy_LIB} ${ZLIB})
target_include_directories(MeoAssistant PRIVATE 3rdparty/include)
target_link_libraries(MaaCore ws2_32 ${OpenCV} ${FastDeploy_LIB} ${ZLIB})
target_include_directories(MaaCore PRIVATE 3rdparty/include)
else ()
find_package(ZLIB REQUIRED)
target_include_directories(MeoAssistant PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(MeoAssistant ${ZLIB_LIBRARY})
target_include_directories(MaaCore PRIVATE ${ZLIB_INCLUDE_DIRS})
target_link_libraries(MaaCore ${ZLIB_LIBRARY})
if (CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
find_package(range-v3 REQUIRED)
target_link_libraries(MeoAssistant range-v3::range-v3)
target_link_libraries(MaaCore range-v3::range-v3)
endif ()
if (APPLE)
set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0)
add_subdirectory(3rdparty/VisionOCR)
target_link_libraries(MeoAssistant
target_link_libraries(MaaCore
vnocr
"-framework Accelerate"
)
@@ -73,18 +73,18 @@ else ()
set(OpenCV_DIR "/")
endif ()
find_package(OpenCV REQUIRED PATHS ${OpenCV_DIR} NO_DEFAULT_PATH)
target_include_directories(MeoAssistant PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(MeoAssistant ${OpenCV_LIBS})
target_include_directories(MaaCore PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(MaaCore ${OpenCV_LIBS})
set(OPENCV_DIRECTORY ${OpenCV_DIR})
include(${FASTDEPLOY_INSTALL_DIR}/FastDeploy.cmake)
include_directories(${FASTDEPLOY_INCS})
target_link_libraries(MeoAssistant ${FDLIB})
target_link_libraries(MeoAssistant ${PADDLE2ONNX_LIB})
target_link_libraries(MeoAssistant ${ORT_LIB})
target_link_libraries(MaaCore ${FDLIB})
target_link_libraries(MaaCore ${PADDLE2ONNX_LIB})
target_link_libraries(MaaCore ${ORT_LIB})
install(TARGETS MeoAssistant DESTINATION .)
install(TARGETS MaaCore DESTINATION .)
install(DIRECTORY ${FASTDEPLOY_INSTALL_DIR}/lib/ DESTINATION . USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${FASTDEPLOY_INSTALL_DIR}/third_libs/install/paddle2onnx/lib/ DESTINATION . USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${ORT_LIB_PATH}/ DESTINATION . USE_SOURCE_PERMISSIONS)
@@ -101,18 +101,18 @@ endif ()
if (BUILD_TEST)
add_executable(test src/CppSample/main.cpp)
target_link_libraries(test MeoAssistant)
target_link_libraries(test MaaCore)
endif (BUILD_TEST)
if (BUILD_XCFRAMEWORK)
add_custom_command(OUTPUT MeoAssistant.xcframework
COMMAND rm -rf MeoAssistant.xcframework
COMMAND xcodebuild -create-xcframework -library libMeoAssistant.dylib -headers ${PROJECT_SOURCE_DIR}/include -output MeoAssistant.xcframework
DEPENDS MeoAssistant
add_custom_command(OUTPUT MaaCore.xcframework
COMMAND rm -rf MaaCore.xcframework
COMMAND xcodebuild -create-xcframework -library libMaaCore.dylib -headers ${PROJECT_SOURCE_DIR}/include -output MaaCore.xcframework
DEPENDS MaaCore
)
add_custom_target(MaaXCFramework ALL
DEPENDS MeoAssistant MeoAssistant.xcframework
DEPENDS MaaCore MaaCore.xcframework
)
endif (BUILD_XCFRAMEWORK)

View File

@@ -5,13 +5,13 @@ VisualStudioVersion = 17.2.32616.157
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{6C4B8D52-51D1-45F8-AAEC-808035443FD6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaaWpfGui", "src\MeoAsstGui\MaaWpfGui.csproj", "{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaaWpfGui", "src\MaaWpfGui\MaaWpfGui.csproj", "{FFDC8F49-8EAF-45BE-B0A8-7EF0DB9875A2}"
ProjectSection(ProjectDependencies) = postProject
{362D1E30-F5AE-4279-9985-65C27B3BA300} = {362D1E30-F5AE-4279-9985-65C27B3BA300}
{F860C043-4D86-41B6-A97E-4A75C9A6C4EC} = {F860C043-4D86-41B6-A97E-4A75C9A6C4EC}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaaCore", "src\MeoAssistant\MaaCore.vcxproj", "{362D1E30-F5AE-4279-9985-65C27B3BA300}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MaaCore", "src\MaaCore\MaaCore.vcxproj", "{362D1E30-F5AE-4279-9985-65C27B3BA300}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{11F02235-5785-408B-9651-8A4B41FF36F4}"
ProjectSection(SolutionItems) = preProject

View File

@@ -147,7 +147,7 @@ MAA 的意思是 MAA Assistant Arknights
- [Python 接口](src/Python/asst.py)[集成示例](src/Python/sample.py)
- [Golang 接口](src/Golang/MaaAssistantArknights/)[集成示例](src/Golang/MaaAssistantArknights/maa/maa.go)
- [Dart 接口](src/dart/)
- [Java 接口](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MeoAssistant.java)[集成示例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Java 接口](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaCore.java)[集成示例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Java HTTP 接口](src/Java/Maaj/Readme.md)
- [Rust 接口](src/Rust/src/maa_sys/)[HTTP 接口](src/Rust)
- [集成文档](docs/3.1-集成文档.md)

View File

@@ -148,7 +148,7 @@ MAAをより良くするために開発・テストに貢献してくれたす
- [Pythonインターフェース](src/Python/asst.py)[統合例](src/Python/sample.py)
- [Golangインターフェース](src/Golang/MaaAssistantArknights/)[統合例](src/Golang/MaaAssistantArknights/maa/maa.go)
- [Dartインターフェース](src/dart/)
- [Javaインターフェース](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MeoAssistant.java)[統合例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Javaインターフェース](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaCore.java)[統合例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Rustインターフェース](src/Rust/src/maa_sys/)[HTTPインターフェース](src/Rust)
- [HTTPインターフェース](src/Java/Maaj/Readme.md)
- [統合ドキュメント](docs/ja-jp/3.1-統合ドキュメント.md)

View File

@@ -146,7 +146,7 @@ MAA 的意思是 MAA Assistant Arknights
- [Python 介面](src/Python/asst.py)[整合示例](src/Python/sample.py)
- [Golang 介面](src/Golang/MaaAssistantArknights/)[整合示例](src/Golang/MaaAssistantArknights/maa/maa.go)
- [Dart 介面](src/dart/)
- [Java 介面](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MeoAssistant.java)[整合示例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Java 介面](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaCore.java)[整合示例](src/Java/Maaj/src/main/java/com/iguigui/maaj/easySample/MaaJavaSample.java)
- [Rust 介面](src/Rust/src/maa_sys/)[HTTP 介面](src/Rust)
- [HTTP 介面](src/Java/Maaj/Readme.md)
- [整合文件](docs/zh-tw/3.1-集成文件.md)

View File

@@ -27,12 +27,12 @@ sudo ldconfig
其他发行版若源中没有 zlib, 也可尝试通过 [源码](https://github.com/madler/zlib) 编译
## MeoAssistant
## MaaCore
1. 直接拷贝上面编译的第三方库到 `3rdparty/lib` 或者 手动修改 `CMakeLists.txt` 指定第三方库路径
2. `3rdparty/include/opencv` 中的头文件是 `4.5.3` 版本的,若是使用其他版本,请注意头文件冲突问题(直接将你的 `opencv` 头文件覆盖过去就好)
3. 安装 `adb`
4. 复制资源文件到 `libMeoAssistant.so` 同一目录下
4. 复制资源文件到 `libMaaCore.so` 同一目录下
```sh
cd tools
@@ -44,7 +44,7 @@ sudo ldconfig
## 集成文档
[~~或许算不上文档~~](https://github.com/MistEO/MeoAssistantArknights/wiki)
[~~或许算不上文档~~](https://github.com/MistEO/MaaCoreArknights/wiki)
### Python
@@ -56,4 +56,4 @@ sudo ldconfig
### C sharp
可参考 [MeoAsstGui](../src/MeoAsstGui/Helper/AsstProxy.cs) 中的实现
可参考 [MaaWpfGui](../src/MaaWpfGui/Helper/AsstProxy.cs) 中的实现

View File

@@ -21,7 +21,7 @@
1. 下载并安装 `Visual Studio 2022 community`, 安装的时候需要选中 `基于c++的桌面开发` 和 `.NET桌面开发`
5. 双击打开 `MAA.sln` 文件。Visual Studio 会自动加载整个项目。
6. 测试一下是否成功搭建编程环境,选择参数 `Release`, `x64`, 右键 `MeoAsstGui` 设为启动项目;点击启动,选择继续调试。如果成功打开了 GUI就说明成功搭建了环境。如果求稳可以继续连接模拟器跑一下 MAA
6. 测试一下是否成功搭建编程环境,选择参数 `Release`, `x64`, 右键 `MaaWpfGui` 设为启动项目;点击启动,选择继续调试。如果成功打开了 GUI就说明成功搭建了环境。如果求稳可以继续连接模拟器跑一下 MAA
7. 到这里,你就可以愉快地 ~~瞎 JB 改~~ 发电了
8. 开发过程中,每一定数量,记得提交一个 commit, 别忘了写上 message
假如你不熟悉 git 的使用,你可能想要新建一个分支进行更改,而不是直接提交在 `dev` 上
@@ -81,4 +81,4 @@
你也可以使用 `tools\ClangFormatter\clang-formatter.py` 来直接调用你的 clang-format 来进行格式化,只需要在项目根目录下执行:
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MeoAssistant`
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MaaCore`

View File

@@ -165,8 +165,8 @@ Base task 与 template task 合称**模板任务**。
- 外服 `tasks.json` 中定义的同名任务直接继承国服 `tasks.json` 的参数,相当于 `"A": { "baseTask": "国服的A" }`
- 如果国服 `tasks.json` 中定义了任务 "B@A",外服 `tasks.json` 中也定义了 "B@A",那么
1. 如果外服 "B@A" 有字段 `"baseTask": ""`,则不继承国服 "B@A"
- 若有定义任务 "A",则以 template task 的逻辑处理 "B@A"
- 若未定义任务 "A",则以普通任务的逻辑处理 "B@A"
- 若有定义任务 "A",则以 template task 的逻辑处理 "B@A"
- 若未定义任务 "A",则以普通任务的逻辑处理 "B@A"
2. 如果外服 "B@A" 没有 `baseTask`,则直接继承国服 "B@A" 参数
### Virtual Task虚任务
@@ -231,7 +231,7 @@ Task.get_raw("B@Loading")->next = { "B#self", "B#next", "B#back" };
### Visual Studio
在 `MeoAssistant.vcxporj` 中已对其进行配置,开箱即用。提示效果较为晦涩,且有部分信息缺失。
在 `MaaCore.vcxporj` 中已对其进行配置,开箱即用。提示效果较为晦涩,且有部分信息缺失。
### Visual Studio Code

View File

@@ -27,12 +27,12 @@ sudo ldconfig
If zlib does not exist in other distribution, you can try compiling from [source](https://github.com/madler/zlib).
## MeoAssistant
## MaaCore
1. Copy the compiled 3rd-party library to `3rdparty/lib` or change `CMakeLists.txt` to indicate 3rd-party library path manually.
2. The header files in `3rdparty/include/opencv` is version `4.5.3`. If you are using other versions, please notice there may be conflicts in header files (you can simply replace them with your `opencv` header files).
3. Install `adb`
4. Copy resource files to the same folder of `libMeoAssistant.so`.
4. Copy resource files to the same folder of `libMaaCore.so`.
```sh
cd tools
@@ -44,7 +44,7 @@ If zlib does not exist in other distribution, you can try compiling from [source
## Integration Documentation
[~~Maybe not a doc~~](https://github.com/MistEO/MeoAssistantArknights/wiki)
[~~Maybe not a doc~~](https://github.com/MistEO/MaaCoreArknights/wiki)
### Python
@@ -56,4 +56,4 @@ Refer to the implementation of [CppSample](../src/CppSample/main.cpp)
### C sharp
Refer to the implementation of [MeoAsstGui](../src/MeoAsstGui/Helper/AsstProxy.cs)
Refer to the implementation of [MaaWpfGui](../src/MaaWpfGui/Helper/AsstProxy.cs)

View File

@@ -15,7 +15,7 @@
1. Download and install `Visual Studio 2022 Community`. Select `Desktop development with C++` and `.NET Desktop Development`.
5. Double-click to open the file `MAA.sln`. Visual Studio will load the project automatically.
6. Run a build to test whether the development environment has been configured correctly. Chosse `Release` & `x64`, right-click `MeoAsstGui` to set it as the startup project, and run it. If the build is successful, the `MeoAsstGui` window will appear. You can connect to the emulator in order to confirm again that the development environment has been configured correctly.
6. Run a build to test whether the development environment has been configured correctly. Chosse `Release` & `x64`, right-click `MaaWpfGui` to set it as the startup project, and run it. If the build is successful, the `MaaWpfGui` window will appear. You can connect to the emulator in order to confirm again that the development environment has been configured correctly.
7. Now you are free to contribute to MAA.
8. Remember to commit once you have proper number of changes. Don't forget to write a commit message.
If you are a beginner of git, you might want to make changes on a newly created branch instead of committing to `dev` directly
@@ -75,4 +75,4 @@ You are all set with the clang-format integrated in Visual Studio supporting c++
You can also format with `tools\ClangFormatter\clang-formatter.py` directly, by executing in the root folder of the project:
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MeoAssistant`
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MaaCore`

View File

@@ -155,7 +155,7 @@ This project provides JSON schema check for `tasks.json`. The schema file can be
### Visual Studio
Visual Studio has been configured with `MeoAssistant.vcxporj`. Developers should be able to use it directly after loading the project.
Visual Studio has been configured with `MaaCore.vcxporj`. Developers should be able to use it directly after loading the project.
### Visual Studio Code

View File

@@ -15,7 +15,7 @@
1. `Visual Studio 2022 community` をダウンロードしてインストールします。インストール時に `C++ベースのデスクトップ開発` と `.NETデスクトップ開発` を選択する必要があります。
5. ダブルクリックして `MAA.sln` ファイルを開きます。 Visual Studioは、プロジェクト全体を自動的に読み込みます。
6. プログラミング環境が正常に構築されているかどうかをテストし、パラメーター `Release`、`x64` を選択し、スタートアッププロジェクトとして `MeoAsstGui` を右クリックして設定してから、`開始` をクリックして、`デバッグを続行` を選択します。 GUIが正常に開かれれば、環境が正常に構築されたことを意味します。もっと安定したい場合は、引き続きシミュレーターに接続してMAAを実行してみます。
6. プログラミング環境が正常に構築されているかどうかをテストし、パラメーター `Release`、`x64` を選択し、スタートアッププロジェクトとして `MaaWpfGui` を右クリックして設定してから、`開始` をクリックして、`デバッグを続行` を選択します。 GUIが正常に開かれれば、環境が正常に構築されたことを意味します。もっと安定したい場合は、引き続きシミュレーターに接続してMAAを実行してみます。
7. ここまで楽しくコードを変更できます~
8. 開発中は、一定量修正するたびにcommitを忘れず、コメントを書くことを忘れないでください。
9. 開発が完了したら、ローカルブランチを(自分の)リモートリポジトリにプッシュします。
@@ -60,6 +60,6 @@
`tools\ClangFormatter\clang-formatter.py` を使用して、clang-formatを直接呼び出して書式設定することもできます。プロジェクトのルートディレクトリで
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MeoAssistant`
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MaaCore`
を実行するだけです。

View File

@@ -27,12 +27,12 @@ sudo ldconfig
其他發行版若源中沒有 zlib, 也可嘗試透過 [原始碼](https://github.com/madler/zlib) 編譯
## MeoAssistant
## MaaCore
1. 直接拷貝上面編譯的第三方庫到 `3rdparty/lib` 或者 手動修改 `CMakeLists.txt` 指定第三方庫路徑
2. `3rdparty/include/opencv` 中的標頭檔是 `4.5.3` 版本的,若是使用其他版本,請注意標頭檔衝突問題(直接將你的 `opencv` 標頭檔覆蓋過去就好)
3. 安裝 `adb`
4. 複製資源檔案到 `libMeoAssistant.so` 同一目錄下
4. 複製資源檔案到 `libMaaCore.so` 同一目錄下
```sh
cd tools
@@ -44,7 +44,7 @@ sudo ldconfig
## 集成文件
[~~或許算不上文件~~](https://github.com/MistEO/MeoAssistantArknights/wiki)
[~~或許算不上文件~~](https://github.com/MistEO/MaaCoreArknights/wiki)
### Python
@@ -56,4 +56,4 @@ sudo ldconfig
### C sharp
可參考 [MeoAsstGui](../src/MeoAsstGui/Helper/AsstProxy.cs) 中的實現
可參考 [MaaWpfGui](../src/MaaWpfGui/Helper/AsstProxy.cs) 中的實現

View File

@@ -15,7 +15,7 @@
1. 下載並安裝 `Visual Studio 2022 community`, 安裝的時候需要選中 `基於c++的桌面開發` 和 `.NET桌面開發`
5. 雙擊打開 `MAA.sln` 檔案。 Visual Studio 會自動加載整個項目。
6. 測試一下是否成功搭建編程環境,選擇參數 `Release`, `x64`, 右鍵 `MeoAsstGui` 設為啟動項目;點擊啟動,選擇繼續調試。如果成功打開了 GUI就說明成功搭建了環境。如果求穩可以繼續連接模擬器跑一下 MAA
6. 測試一下是否成功搭建編程環境,選擇參數 `Release`, `x64`, 右鍵 `MaaWpfGui` 設為啟動項目;點擊啟動,選擇繼續調試。如果成功打開了 GUI就說明成功搭建了環境。如果求穩可以繼續連接模擬器跑一下 MAA
7. 到這裡,你就可以愉快地 ~~瞎 ㄐㄅ 改~~ 發電了
8. 開發過程中,每一定數量,記得提交一個 commit, 別忘了寫上 message
假如你不熟悉 git 的使用,你可能想要新增一个分支,而不是直接提交在 `dev` 上
@@ -75,4 +75,4 @@
你也可以使用 `tools\ClangFormatter\clang-formatter.py` 來直接執行你的 clang-format 來進行格式化,只需要在項目根目錄下執行:
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MeoAssistant`
- `python tools\ClangFormatter\clang-formatter.py --clang-format=PATH\TO\YOUR\clang-format.exe --input=src\MaaCore`

View File

@@ -155,7 +155,7 @@
### Visual Studio
`MeoAssistant.vcxporj` 中已對其進行配置,開箱即用。提示效果較為晦澀,且有部分資訊缺失。
`MaaCore.vcxporj` 中已對其進行配置,開箱即用。提示效果較為晦澀,且有部分資訊缺失。
### Visual Studio Code

View File

@@ -1,4 +1,4 @@
module MeoAssistant {
module MaaCore {
umbrella header "AsstCaller.h"
export *
link framework "Accelerate"

View File

@@ -9,7 +9,7 @@ import 'package:path/path.dart' as p;
class MaaCore implements MaaCoreInterface {
// Native Symbols
// MeoAssistant
// MaaCore
static late AsstLoadResourceFunc _asstLoadResource;
static late AsstCreateExFunc _asstCreateEx;
static late AsstConnectFunc _asstConnect;
@@ -51,13 +51,13 @@ class MaaCore implements MaaCoreInterface {
return [];
}
static String get meoAssistantLibName {
static String get MaaCoreLibName {
if (Platform.isLinux) {
return 'libMeoAssistant.so';
return 'libMaaCore.so';
} else if (Platform.isWindows) {
return 'MaaCore.dll';
}
return 'libMeoAssistant.dylib';
return 'libMaaCore.dylib';
}
static String get callbackLibName {
@@ -125,7 +125,7 @@ class MaaCore implements MaaCoreInterface {
}
static void _loadNativeSymbols(String libDir) {
_loadMeoAssistant(libDir);
_loadMaaCore(libDir);
_loadCallbackLib(libDir);
_symbolsLoaded = true;
}
@@ -137,7 +137,7 @@ class MaaCore implements MaaCoreInterface {
_asstCallback = lib.lookup<AsstCallbackNative>('callback');
}
static void _loadMeoAssistant(String libDir) {
static void _loadMaaCore(String libDir) {
if (Platform.isWindows) {
for (var dep in _deps) {
print("load dep: $dep");
@@ -145,7 +145,7 @@ class MaaCore implements MaaCoreInterface {
print("loaded dep: $dep");
}
}
final lib = DynamicLibrary.open(p.join(libDir, meoAssistantLibName));
final lib = DynamicLibrary.open(p.join(libDir, MaaCoreLibName));
_asstLoadResource =
lib.lookup<AsstLoadResourceNative>('AsstLoadResource').asFunction();
_asstCreateEx = lib.lookup<AsstCreateExNative>('AsstCreateEx').asFunction();

View File

@@ -32,8 +32,8 @@
1. 把他丢进 Maa 文件夹下,形成如下文件结构.备注: 启动脚本[Maa-HTTP-Server-startup.bat](Maa-HTTP-Server-startup.bat).
```text
MeoAssistantArknights_v3.9.0-beta.8
│ MeoAsstGui.exe
MaaCoreArknights_v3.9.0-beta.8
│ MaaWpfGui.exe
│ MaaCore.dll
│ ...
└───Java-HTTP
@@ -108,7 +108,7 @@
```json
{
"adbPath": "C:\\MeoAssistantArknights3\\platform-tools\\adb.exe",
"adbPath": "C:\\MaaCoreArknights3\\platform-tools\\adb.exe",
"host": "127.0.0.1:62001",
"detailJson": ""
}
@@ -144,7 +144,6 @@
---
---
##### 接口名称 添加任务
@@ -400,7 +399,7 @@
{
"id": "ccd76e0c367511158ca774ff951a22e8bb62f5d3",
"host": "127.0.0.1:62026",
"adbPath": "C:\\Users\\atmzx\\Desktop\\MeoAssistantArknights3\\platform-tools\\adb.exe",
"adbPath": "C:\\Users\\atmzx\\Desktop\\MaaCoreArknights3\\platform-tools\\adb.exe",
"uuid": "",
"status": 0
}
@@ -441,7 +440,6 @@
###### 4) 请求返回结果: 图片内容, PNG 格式
### WebSocket 部分
请求地址(没错跟HTTP同样是8848钛金端口
@@ -511,7 +509,7 @@
"command": "connect",
"msgId": 114514,
"data": {
"adbPath": "C:\\Users\\atmzx\\Desktop\\MeoAssistantArknights3\\platform-tools\\adb.exe",
"adbPath": "C:\\Users\\atmzx\\Desktop\\MaaCoreArknights3\\platform-tools\\adb.exe",
"host": "127.0.0.1:62001"
}
}
@@ -561,7 +559,7 @@ appendTask setTaskParams start stop等接口不再描述均可遵循以上规
"details": {
"uuid": "",
"details": {
"adb": "C:\\MeoAssistantArknights3\\platform-tools\\adb.exe",
"adb": "C:\\MaaCoreArknights3\\platform-tools\\adb.exe",
"address": "127.0.0.1:62001",
"config": "General",
"width": 1280,

View File

@@ -20,13 +20,13 @@ public class MaaJavaSample {
*/
public static void main(String[] args) {
//设定JNA寻找maa的dll的地址同时也要把这个路径添加到环境变量中的Path中
String maaPath = "C:/Users/iguigui/Desktop/MeoAssistantArknights3";
String maaPath = "C:/Users/iguigui/Desktop/MaaCoreArknights3";
System.setProperty("jna.library.path", maaPath);
//adb地址自己看着办
String adbPath = maaPath + "/platform-tools/adb.exe";
//第一步加载Maa调用实例加载失败请检查jna.library.path和path参数
MeoAssistant instance = Native.load("MeoAssistant", MeoAssistant.class);
MaaCore instance = Native.load("MaaCore", MaaCore.class);
System.out.println("获取Maa版本号:" + instance.AsstGetVersion());
//第二步加载Maa资源初始化

View File

@@ -6,7 +6,7 @@ import com.sun.jna.win32.StdCallLibrary;
//本质上是对C接口的抽象层
//请参考C接口 https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/include/AsstCaller.h
public interface MeoAssistant extends StdCallLibrary {
public interface MaaCore extends StdCallLibrary {
//回调接口定义
interface AsstApiCallback extends StdCallCallback {

View File

@@ -2,7 +2,7 @@ package com.iguigui.maaj.service
import com.iguigui.maaj.dto.CallBackLog
import com.iguigui.maaj.dto.*
import com.iguigui.maaj.easySample.MeoAssistant
import com.iguigui.maaj.easySample.MaaCore
import com.iguigui.maaj.logger
import com.iguigui.maaj.util.Json
import com.sun.jna.Pointer
@@ -11,17 +11,17 @@ import java.util.concurrent.atomic.AtomicLong
import kotlin.reflect.KFunction1
class MaaInstance(
private val instance: MeoAssistant,
private val instance: MaaCore,
val id: String,
val adbPath: String,
val host: String,
private val detailJson: String,
val callBackAction: KFunction1<CallBackLog, Unit>
) :
MeoAssistant.AsstApiCallback {
MaaCore.AsstApiCallback {
// constructor(
// instance: MeoAssistant,
// instance: MaaCore,
// id: String,
// adbPath: String,
// host: String,

View File

@@ -1,7 +1,7 @@
package com.iguigui.maaj.service
import com.iguigui.maaj.dto.*
import com.iguigui.maaj.easySample.MeoAssistant
import com.iguigui.maaj.easySample.MaaCore
import com.iguigui.maaj.logger
import com.sun.jna.Native
import io.ktor.websocket.*
@@ -18,12 +18,12 @@ object MaaService {
private val wsConnection = Collections.synchronizedSet<Connection?>(LinkedHashSet())
val meoAssistant: MeoAssistant by lazy {
val MaaCore: MaaCore by lazy {
var maaPath = File(File("").absolutePath).parent
logger.info("maaPath $maaPath")
// maaPath = "C:\\Users\\atmzx\\Desktop\\MeoAssistantArknights3"
// maaPath = "C:\\Users\\atmzx\\Desktop\\MaaCoreArknights3"
System.setProperty("jna.library.path", maaPath)
val load = Native.load("MeoAssistant", MeoAssistant::class.java)
val load = Native.load("MaaCore", MaaCore::class.java)
load.AsstLoadResource(maaPath)
load
}
@@ -33,8 +33,8 @@ object MaaService {
// if (instancePool.containsKey(id)) {
// return ConnectResponse(id, true)
// }
val maaInstance = MaaInstance(meoAssistant, id, adbPath, host, detailJson, ::callBackLog)
maaInstance.pointer = meoAssistant.AsstCreateEx(maaInstance, maaInstance.id)
val maaInstance = MaaInstance(MaaCore, id, adbPath, host, detailJson, ::callBackLog)
maaInstance.pointer = MaaCore.AsstCreateEx(maaInstance, maaInstance.id)
val connect = maaInstance.connect()
if (!connect) {
return ConnectResponse("", false)
@@ -54,7 +54,7 @@ object MaaService {
fun stop(id: String) = instancePool[id]?.stop() ?: false
fun getVersion(): String = meoAssistant.AsstGetVersion()
fun getVersion(): String = MaaCore.AsstGetVersion()
private fun sha1(password: String): String {
val messageDigest = MessageDigest.getInstance("SHA")

View File

@@ -234,7 +234,7 @@
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{362d1e30-f5ae-4279-9985-65c27b3ba300}</ProjectGuid>
<RootNamespace>MeoAssistant</RootNamespace>
<RootNamespace>MaaCore</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>MaaCore</ProjectName>
</PropertyGroup>
@@ -386,4 +386,4 @@
<UserProperties _1_1_4_1_1_4resource_4config_1json__JsonSchema="" _1_1_4_1_1_4resource_4tasks_1json__JsonSchema="../docs/maa_tasks_schema.json" />
</VisualStudio>
</ProjectExtensions>
</Project>
</Project>

View File

@@ -1,4 +1,4 @@
# MeoAssistant
# MaaCore
MAA 底层 C++ 模块

View File

@@ -220,7 +220,7 @@ void asst::StageDropsTaskPlugin::upload_to_penguin()
std::string stage_id = m_cur_info_json.get("stage", "stageId", std::string());
if (stage_id.empty()) {
cb_info["why"] = "未知关卡";
cb_info["details"] = json::object { { "stage_code", m_stage_code } };
cb_info["details"] = json::object{ { "stage_code", m_stage_code } };
callback(AsstMsg::SubTaskError, cb_info);
return;
}
@@ -253,7 +253,7 @@ void asst::StageDropsTaskPlugin::upload_to_penguin()
format_drop.as_object().erase("itemName");
all_drops.array_emplace(std::move(format_drop));
}
body["source"] = "MeoAssistant";
body["source"] = "MaaCore";
body["version"] = Version;
std::string extra_param;

Some files were not shown because too many files have changed in this diff Show More