diff --git a/.devcontainer/0/post-create.sh b/.devcontainer/0/post-create.sh index 7827ebaac7..ef351ea576 100644 --- a/.devcontainer/0/post-create.sh +++ b/.devcontainer/0/post-create.sh @@ -5,10 +5,15 @@ WORKSPACE=$(pwd) echo "====================" cd "$WORKSPACE" -echo "Setting up git safe.directory for $WORKSPACE and its submodules..." +echo "Setting up git safe.directory..." git config --global --add safe.directory "$WORKSPACE" git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"' +echo "====================" +cd "$WORKSPACE" +echo "Updating submodules..." +git submodule update --init --recursive + echo "====================" cd "$WORKSPACE"/docs echo "Installing node modules..." diff --git a/.devcontainer/1/Dockerfile b/.devcontainer/1/Dockerfile index 91f4b22161..89a6816e16 100644 --- a/.devcontainer/1/Dockerfile +++ b/.devcontainer/1/Dockerfile @@ -13,9 +13,7 @@ ARG NODEJS_VERSION=24 RUN sudo apt update \ && sudo apt upgrade -y \ && sudo apt install -y \ - cmake clangd-${CLANGD_VERSION} - -RUN sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-${CLANGD_VERSION} 100 + cmake # Install Miniconda RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh \ diff --git a/.devcontainer/1/post-create.sh b/.devcontainer/1/post-create.sh index 6610f452b0..3f4d557181 100644 --- a/.devcontainer/1/post-create.sh +++ b/.devcontainer/1/post-create.sh @@ -5,10 +5,15 @@ WORKSPACE=$(pwd) echo "====================" cd "$WORKSPACE" -echo "Setting up git safe.directory for $WORKSPACE and its submodules..." +echo "Setting up git safe.directory..." git config --global --add safe.directory "$WORKSPACE" git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"' +echo "====================" +cd "$WORKSPACE" +echo "Updating submodules..." +git submodule update --init --recursive + echo "====================" cd "$WORKSPACE"/docs echo "Installing node modules..." @@ -39,4 +44,4 @@ echo "Installing MaaDeps..." python tools/maadeps-download.py # Link clang-format & clangd to /usr/local/bin for easy access sudo ln -s $WORKSPACE/src/MaaUtils/MaaDeps/x-tools/llvm/bin/clang-format /usr/local/bin/clang-format -# sudo ln -s $WORKSPACE/src/MaaUtils/MaaDeps/x-tools/llvm/bin/clangd /usr/local/bin/clangd +sudo ln -s $WORKSPACE/src/MaaUtils/MaaDeps/x-tools/llvm/bin/clangd /usr/local/bin/clangd diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 138753e749..4491054549 100644 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -3,6 +3,11 @@ WORKSPACE=$(pwd) echo "====================" cd "$WORKSPACE" -echo "Setting up git safe.directory for $WORKSPACE and its submodules..." +echo "Setting up git safe.directory..." git config --global --add safe.directory "$WORKSPACE" git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"' + +echo "====================" +cd "$WORKSPACE" +echo "Updating submodules..." +git submodule update --init --recursive diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bec47f195..56e76985cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -479,6 +479,7 @@ jobs: - name: Build XCFramework run: | xcodebuild -create-xcframework -library libMaaCore.dylib -headers ../include -output MaaCore.xcframework + xcodebuild -create-xcframework -library libMaaUtils.dylib -output MaaUtils.xcframework xcodebuild -create-xcframework -library libfastdeploy_ppocr.dylib -output fastdeploy_ppocr.xcframework xcodebuild -create-xcframework -library libonnxruntime.*.dylib -output ONNXRuntime.xcframework xcodebuild -create-xcframework -library libopencv*.dylib -output OpenCV.xcframework @@ -601,7 +602,7 @@ jobs: env: GH_TOKEN: ${{ secrets.MISTEOWORKFLOW }} - - name: Create issue if failed + - name: Create issue on failure if: failure() uses: actions-cool/issues-helper@v3 with: diff --git a/.github/workflows/release-ota.yml b/.github/workflows/release-ota.yml index a76ecb9c5a..89d3413c6e 100644 --- a/.github/workflows/release-ota.yml +++ b/.github/workflows/release-ota.yml @@ -139,7 +139,7 @@ jobs: prerelease: ${{ fromJSON(needs.create-tag.outputs.prerelease) }} overwrite: true - - name: Create issue if failed + - name: Create issue on failure if: failure() uses: actions-cool/issues-helper@v3 with: @@ -192,7 +192,7 @@ jobs: prerelease: ${{ fromJSON(needs.create-tag.outputs.prerelease) }} overwrite: true - - name: Create issue if failed + - name: Create issue on failure if: failure() uses: actions-cool/issues-helper@v3 with: diff --git a/.github/workflows/release-preparation.yml b/.github/workflows/release-preparation.yml index 7d49cfe3f0..355b3424d8 100644 --- a/.github/workflows/release-preparation.yml +++ b/.github/workflows/release-preparation.yml @@ -100,10 +100,12 @@ jobs: configuration-path: ".github/release_reviewers.yaml" update-submodules: + name: Update Submodules if: github.event.pull_request.draft == false && startsWith(github.event.pull_request.title, 'Release v') runs-on: ubuntu-latest steps: - - run: | - gh workflow run --repo $GITHUB_REPOSITORY update-submodules.yml + - name: Trigger submodule update workflow env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh workflow run --repo $GITHUB_REPOSITORY update-submodules.yml diff --git a/.github/workflows/res-update-game.yml b/.github/workflows/res-update-game.yml index dcb4ba4a4e..be61112a11 100644 --- a/.github/workflows/res-update-game.yml +++ b/.github/workflows/res-update-game.yml @@ -359,7 +359,7 @@ jobs: # run: | # gh workflow run release-nightly-ota.yml -f release_body="Auto Release of Resource Updates" - - name: Comment on issue if failed + - name: Add a comment on failure if: failure() && github.ref == 'refs/heads/dev' run: | # Minimize old failure comments @@ -374,7 +374,7 @@ jobs: } }' done - + # Add new failure comment gh issue comment 14493 -R ${{ github.repository }} --body "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/smoke-testing.yml b/.github/workflows/smoke-testing.yml index 75fe78e0a0..a1da6e5d3a 100644 --- a/.github/workflows/smoke-testing.yml +++ b/.github/workflows/smoke-testing.yml @@ -56,6 +56,7 @@ jobs: path: | ./install/libfastdeploy_ppocr.dylib ./install/libMaaCore.dylib + ./install/libMaaUtils.dylib ./install/libonnxruntime.1.19.2.dylib ./install/libopencv_world4.4.11.0.dylib ./install/smoke_test @@ -118,6 +119,7 @@ jobs: key: ${{ steps.cache_key.outputs.key }} path: | ./install/libfastdeploy_ppocr.dylib + ./install/libMaaUtils.dylib ./install/libMaaCore.dylib ./install/libonnxruntime.1.19.2.dylib ./install/libopencv_world4.4.11.0.dylib diff --git a/.github/workflows/update-submodules.yml b/.github/workflows/update-submodules.yml index f5a90743fa..92237aee44 100644 --- a/.github/workflows/update-submodules.yml +++ b/.github/workflows/update-submodules.yml @@ -1,4 +1,4 @@ -name: Submodules Update +name: Submodule Update on: schedule: diff --git a/.gitignore b/.gitignore index a96f0dcf42..4126c9c26b 100644 --- a/.gitignore +++ b/.gitignore @@ -457,6 +457,7 @@ tools/RoguelikeRecruitmentTool/output .lycheecache # MaaDeps +MaaDeps src/MaaUtils/* # ResourceUpdater workflow diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e29bf5b5d..6e453e895f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -156,3 +156,27 @@ We have continued to fix numerous bugs; for example, the external notification f * polish PixelAnalyzer a bit (#14538) @Alan-Charred * remove global templates for 3294b29f54dadc4198a40538e85b71902c79c875 @Constrat * remove cancelled() and add mentions @Constrat + +## v5.27.1 + +### 新增 | New + +* SideStory「雪山降临1101」导航 @SherkeyXD + +### 修复 | Fix + +* macos GUI缺少MaaUtils库导致无法启动 @hguandl @MistEO +* 关卡复核错误 @ABA2396 + +### 文档 | Docs + +* fix boolean capitalization in C# documentation comments (#14599) @Copilot @lucienshawls + +### 其他 | Other + +* 繁中服第十五章 & 重複訪問好友 text (#14594) @momomochi987 +* Apply suggestion from @Copilot @MistEO @Copilot +* KR varius translations (#14591) @HX3N +* 调整devcontainer环境构建流程,使其适应MaaUtils (#14580) @lucienshawls +* ClickStageName 同步 ClickedCorrectStage ocrReplace @ABA2396 + diff --git a/cmake/macos.cmake b/cmake/macos.cmake index c243519410..197eb2fdfd 100644 --- a/cmake/macos.cmake +++ b/cmake/macos.cmake @@ -4,6 +4,12 @@ if (BUILD_XCFRAMEWORK) COMMAND xcodebuild -create-xcframework -library libMaaCore.dylib -headers ${PROJECT_SOURCE_DIR}/include -output MaaCore.xcframework DEPENDS MaaCore ) + + add_custom_command(OUTPUT MaaUtils.xcframework + COMMAND rm -rf MaaUtils.xcframework + COMMAND xcodebuild -create-xcframework -library libMaaUtils.dylib -output MaaUtils.xcframework + DEPENDS MaaUtils + ) add_custom_command(OUTPUT OpenCV.xcframework COMMAND rm -rf OpenCV.xcframework @@ -21,7 +27,7 @@ if (BUILD_XCFRAMEWORK) ) add_custom_target(MaaXCFramework ALL - DEPENDS MaaCore MaaCore.xcframework OpenCV.xcframework ONNXRuntime.xcframework fastdeploy_ppocr.xcframework + DEPENDS MaaCore MaaCore.xcframework MaaUtils MaaUtils.xcframework OpenCV.xcframework ONNXRuntime.xcframework fastdeploy_ppocr.xcframework ) endif (BUILD_XCFRAMEWORK) diff --git a/resource/global/txwy/resource/tasks/tasks.json b/resource/global/txwy/resource/tasks/tasks.json index 02ac92e6ca..30506a21e6 100644 --- a/resource/global/txwy/resource/tasks/tasks.json +++ b/resource/global/txwy/resource/tasks/tasks.json @@ -711,7 +711,7 @@ "text": ["切換"] }, "StartButton1": { - "text": ["開始行動"] + "text": ["開始行動", "開始作戰", "開始推演"] }, "PRTS3": { "text": ["角色"] @@ -786,7 +786,7 @@ "text": ["訪問下位"] }, "VisitLimited": { - "text": ["今日參與", "已達上限"] + "text": ["今日參與", "已達上限", "重複訪問", "無法獲得"] }, "CreditShop-NoMoney": { "text": ["信用不足", "無法購買"] @@ -1085,7 +1085,8 @@ "text": ["部署費用"] }, "BattleStartPre": { - "text": ["開始行動", "開始突襲", "開始試煉", "開始試束", "開始測試"] + "ocrReplace": [["開始試.*", "開始試煉"]], + "text": ["開始行動", "開始突襲", "開始試煉", "開始測試", "開始作戰", "開始推演"] }, "BattleStartOCR": { "text": ["行動", "開始"] diff --git a/resource/tasks/Stages/OS.json b/resource/tasks/Stages/OS.json new file mode 100644 index 0000000000..32eb808e9a --- /dev/null +++ b/resource/tasks/Stages/OS.json @@ -0,0 +1,58 @@ +{ + "OS-4": { + "algorithm": "JustReturn", + "sub": ["OS-4@OS-OpenOpt"], + "next": ["OS-4@SideStoryStage", "OS-4@SwipeToStage"] + }, + "OS-4@SideStoryStage": { + "text": ["OS-4"] + }, + "OS-7": { + "algorithm": "JustReturn", + "sub": ["OS-7@OS-OpenOpt"], + "next": ["OS-7@SideStoryStage", "OS-7@SwipeToStage"] + }, + "OS-7@SideStoryStage": { + "text": ["OS-7"] + }, + "OS-8": { + "algorithm": "JustReturn", + "sub": ["OS-8@OS-OpenOpt"], + "next": ["OS-8@SideStoryStage", "OS-8@SwipeToStage"] + }, + "OS-8@SideStoryStage": { + "text": ["OS-8"] + }, + "OS-9": { + "algorithm": "JustReturn", + "sub": ["OS-9@OS-OpenOpt"], + "next": ["OS-9@SideStoryStage", "OS-9@SwipeToStage"] + }, + "OS-9@SideStoryStage": { + "text": ["OS-9"] + }, + "OS-OpenOpt": { + "algorithm": "JustReturn", + "next": ["OS-OpenOcr", "OS-Open"] + }, + "OS-Open": { + "baseTask": "SS-Open", + "postDelay": 3000, + "template": ["StageSideStory.png", "StageActivity.png"], + "next": ["OSChapterToOS"] + }, + "OS-OpenOcr": { + "baseTask": "SS-OpenOcr", + "postDelay": 3000, + "text": ["雪山降临1101", "变革之路", "喀兰之心"], + "next": ["OSChapterToOS"] + }, + "OSChapterToOS": { + "algorithm": "OcrDetect", + "action": "ClickSelf", + "text": ["圣巡之旅"], + "postDelay": 2000, + "roi": [878, 592, 104, 33], + "next": ["#self", "SideStoryStage", "ChapterSwipeToTheRight"] + } +} diff --git a/resource/tasks/tasks.json b/resource/tasks/tasks.json index a834de27ca..02652481f8 100644 --- a/resource/tasks/tasks.json +++ b/resource/tasks/tasks.json @@ -396,8 +396,17 @@ "isAscii": true, "text": [], "next": ["ClickedCorrectStageOrSwipe", "#self"], + "ocrReplaceDoc": "和 ClickedCorrectStage 同步,但去除 OPERATION", "ocrReplace": [ ["-\\]", "-1"], + [" ", ""], + ["s", "S"], + ["c", "C"], + ["o", "O"], + [":", ""], + ["'", ""], + ["(H\\d+)O(?=-)", "$010"], + ["(-\\d+)O", "$010"], [".*?([A-Z]{2}-EX-\\d+)", "$1"] ] }, @@ -418,15 +427,19 @@ "fullMatch": true, "isAscii": true, "text": [], + "ocrReplaceDoc": "和 ClickedCorrectStage 同步", "ocrReplace": [ ["OPERATION", ""], + ["-\\]", "-1"], [" ", ""], ["s", "S"], ["c", "C"], + ["o", "O"], [":", ""], ["'", ""], ["(H\\d+)O(?=-)", "$010"], - ["(-\\d+)O", "$010"] + ["(-\\d+)O", "$010"], + [".*?([A-Z]{2}-EX-\\d+)", "$1"] ], "roi": [845, 72, 220, 50] }, diff --git a/src/MaaCore/CMakeLists.txt b/src/MaaCore/CMakeLists.txt index f4140e36bd..3f1140b80c 100644 --- a/src/MaaCore/CMakeLists.txt +++ b/src/MaaCore/CMakeLists.txt @@ -22,7 +22,7 @@ if(WIN32) endif() if(LINUX) - target_link_libraries(MaaCore pthread) + target_link_libraries(MaaCore pthread dl) endif() file(GLOB_RECURSE MaaCore_PUBLIC_HEADERS ${PROJECT_SOURCE_DIR}/include/*.h) diff --git a/src/MaaMacGui b/src/MaaMacGui index ad72e49b1d..e4c26279ff 160000 --- a/src/MaaMacGui +++ b/src/MaaMacGui @@ -1 +1 @@ -Subproject commit ad72e49b1db49681edcceb87dd8404943b0049e2 +Subproject commit e4c26279ff4e833065b968ac59def87309f2b078 diff --git a/src/MaaWpfGui/Helper/ConfigurationHelper.cs b/src/MaaWpfGui/Helper/ConfigurationHelper.cs index b997fbcf9f..008d07a66f 100644 --- a/src/MaaWpfGui/Helper/ConfigurationHelper.cs +++ b/src/MaaWpfGui/Helper/ConfigurationHelper.cs @@ -313,7 +313,7 @@ public class ConfigurationHelper /// /// Load configuration file /// - /// True if success, false if failed + /// true if succeeded, false if failed public static bool Load() { EnsureConfigDirectoryExists(); diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml index 882f623f5e..ecdf0dd2c8 100644 --- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml +++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml @@ -166,12 +166,12 @@ 전기주전자 획득 분대 월간 분대 파밍, 최대한 많은 구역 클리어 심층 조사 파밍, 최대한 많은 구역 클리어 - 刷常乐节点,第一层进洞,找不到需要的节点就重开 - 目标常乐节点 - 令 - 掷地有声 - 黍 - 种因得果 - 年 - 三缺一 - 发现目标常乐节点 {0} + 유희 노드 파밍, 1층 동굴 진입, 필요한 노드를 찾지 못하면 재시작 + 목표 유희 노드 + 링 - 지지유성 (掷地有声) + 슈 - 종인득과 (种因得果) + 니엔 - 삼결일 (三缺一) + 목표 유희 노드 발견 {0} 시작 분대 모집 조합 시작 {key=Operator} @@ -218,9 +218,9 @@ 방문객 분대 (游客分队) 사세대 분대 (司岁台分队) 천사부 분대 (天师府分队) - 花团锦簇分队(占位) - 棋行险着分队(占位) - 岁影回音分队(占位) + 화단금족 분대 (花团锦簇分队) + 기행험착 분대 (棋行险着分队) + 세영회음 분대 (岁影回音分队) 특근 분대 (特勤分队) 지휘 분대 집합 분대 @@ -243,8 +243,8 @@ 번영의 배지 빌드 포인트 단조 레드 골드 - 当前使用无存档任务模式。请手动删除现有存档后再尝试。若您希望保留存档,请考虑切换模式。 - 当前任务模式需要您拥有可合成道具的存档。请考虑切换模式。 + 현재 세이브 X 모드를 사용 중입니다. 기존 세이브를 수동으로 삭제한 후 다시 시도해 주세요. 세이브를 유지하려면 모드 전환을 고려하세요. + 현재 세이브 O 모드는 합성 가능한 도구가 있는 세이브가 필요합니다. 모드 전환을 고려하세요. 미변경 미선택 공식 서버 @@ -1010,14 +1010,14 @@ C:\\leidian\\LDPlayer9 노드: 작전 노드: 긴급 작전 노드: 험난한 길 - 节点: 拾遗 - 节点: 传说 - 节点: 故肆 - 节点: 易与 - 节点: 筹谋 - 节点: 常乐 - 节点: 杂疑 - 节点: 灾祸 + 노드: 수집 (拾遗) + 노드: 전설 (传说) + 노드: 옛 상점 (故肆) + 노드: 쉬운 거래 (易与) + 노드: 전략 (筹谋) + 노드: 유희 (常乐) + 노드: 의혹 (杂疑) + 노드: 재앙 (灾祸) 이벤트: {0}개의 옵션이 감지되었습니다: 선택 가능한 옵션: {0} @@ -1143,7 +1143,7 @@ C:\\leidian\\LDPlayer9 6. MAA의 로그 파일에는 깨진 문자가 포함되어 있지 않아야 합니다. 「ERROR: 데이터 분석 실패」 외의 오류 정보가 로그에 표시되면 로그를 삭제하고 소프트웨어를 다시 설치하세요.\n 7. 야간 모드는 안전합니다. 그러나 MAA가 오전 3시 33분에 자동으로 시작되어 「알 수 없는 작업」 을 실행하는 경우 전원을 뽑고 해가 뜰 때까지 기다렸다가 다시 사용하세요.\n 8. 마지막 규칙은 존재하지 않습니다. 이 규칙을 본 경우 잊어버리고 MAA를 정상적으로 사용하세요.\n -9. MAA에서炒...锟斤拷拷拷拷喜报拷拷拷饭을 클릭하지 마세요.\n +9. MAA에서 박사...나웳궯이혈족웳되자를 클릭하지 마세요.\n 10. MirrorChyan는 안전합니다. 약간의 대가를 지불하면 그녀의 보호를 받을 수 있습니다.\n 11. MAA는 미래 버전을 지원하지 않습니다. 소프트웨어가 미발표 버전 번호(예: v10.0.0)로 자동 업데이트된 경우 실행하지 말고 공식 발표를 기다리세요.\n 12. MAA에는 음성 프롬프트가 없습니다. 속삭임, 웃음소리 또는 프로그램 생성이 아닌 음성이 들리면 스피커를 끄고 알 수 없는 스크립트가 실행 중인지 확인하세요.\n diff --git a/src/MaaWpfGui/Services/Web/IHttpService.cs b/src/MaaWpfGui/Services/Web/IHttpService.cs index a666d6e485..c321984044 100644 --- a/src/MaaWpfGui/Services/Web/IHttpService.cs +++ b/src/MaaWpfGui/Services/Web/IHttpService.cs @@ -97,6 +97,6 @@ public interface IHttpService /// The URI of the file /// On disk filename /// File content type - /// True if success, False if failed + /// true if succeeded, false if failed Task DownloadFileAsync(Uri uri, string fileName, string? contentType = null); } diff --git a/tools/build_macos_universal.zsh b/tools/build_macos_universal.zsh index bed0b0b111..6291c113ea 100755 --- a/tools/build_macos_universal.zsh +++ b/tools/build_macos_universal.zsh @@ -45,6 +45,7 @@ cp build-"${arch}"/compile_commands.json build pushd build xcodebuild -create-xcframework -library libMaaCore.dylib -headers ../include -output MaaCore.xcframework +xcodebuild -create-xcframework -library libMaaUtils.dylib -output MaaUtils.xcframework xcodebuild -create-xcframework -library libfastdeploy_ppocr.dylib -output fastdeploy_ppocr.xcframework xcodebuild -create-xcframework -library libonnxruntime.*.dylib -output ONNXRuntime.xcframework xcodebuild -create-xcframework -library libopencv*.dylib -output OpenCV.xcframework diff --git a/tools/maadeps-download.py b/tools/maadeps-download.py index 23af74f535..1bdd899eeb 100644 --- a/tools/maadeps-download.py +++ b/tools/maadeps-download.py @@ -9,7 +9,7 @@ from maadeps_download import detect_host_triplet from maadeps_download import main as download_main REPO = "MaaAssistantArknights/MaaDeps" -VERSION = "v2.10.0-maa.1" +VERSION = "v2.10.1-maa.1" if __name__ == "__main__": if len(sys.argv) == 2: