mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-13 16:30:26 +08:00
Compare commits
7 Commits
fix/quick-
...
feat/AvdEx
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c085481bc | ||
|
|
4d551d87e2 | ||
|
|
8e4e4c16ee | ||
|
|
d9c793cfd3 | ||
|
|
733ce5bd81 | ||
|
|
50000b988a | ||
|
|
98dd6f7ba1 |
68
.github/scripts/sync-optional-submodules.sh
vendored
Normal file
68
.github/scripts/sync-optional-submodules.sh
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
mode="init"
|
||||
depth=""
|
||||
declare -a paths=()
|
||||
|
||||
while (($# > 0)); do
|
||||
case "$1" in
|
||||
--init)
|
||||
mode="init"
|
||||
shift
|
||||
;;
|
||||
--remote)
|
||||
mode="remote"
|
||||
shift
|
||||
;;
|
||||
--depth)
|
||||
depth="$2"
|
||||
shift 2
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
paths+=("$@")
|
||||
break
|
||||
;;
|
||||
*)
|
||||
paths+=("$1")
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if ((${#paths[@]} == 0)); then
|
||||
echo "Usage: $0 [--init|--remote] [--depth N] path [path ...]" >&2
|
||||
exit 64
|
||||
fi
|
||||
|
||||
is_submodule_path() {
|
||||
local path="$1"
|
||||
|
||||
git config -f .gitmodules --get-regexp '^submodule\..*\.path$' 2>/dev/null \
|
||||
| awk '{ print $2 }' \
|
||||
| grep -Fxq "$path"
|
||||
}
|
||||
|
||||
for path in "${paths[@]}"; do
|
||||
if ! is_submodule_path "$path"; then
|
||||
echo "Skipping $path: not configured as a submodule in .gitmodules."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ "$mode" == "remote" ]]; then
|
||||
echo "Updating submodule: $path"
|
||||
git submodule update --remote "$path"
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -n "$depth" ]]; then
|
||||
echo "Initializing submodule: $path (depth=$depth)"
|
||||
git submodule update --init --depth "$depth" "$path"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "Initializing submodule: $path"
|
||||
git submodule update --init "$path"
|
||||
done
|
||||
189
.github/workflows/ci-avalonia.yml
vendored
Normal file
189
.github/workflows/ci-avalonia.yml
vendored
Normal file
@@ -0,0 +1,189 @@
|
||||
name: Build MAAUnified (Avalonia + MaaCore Runtime)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/MAAUnified"
|
||||
- "src/MAAUnified/**"
|
||||
- "src/MaaCore/**"
|
||||
- "src/MaaUtils/**"
|
||||
- "include/**"
|
||||
- "resource/**"
|
||||
- "tools/maadeps-download.py"
|
||||
- "CMakeLists.txt"
|
||||
- "CMakePresets.json"
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
paths:
|
||||
- "src/MAAUnified"
|
||||
- "src/MAAUnified/**"
|
||||
- "src/MaaCore/**"
|
||||
- "src/MaaUtils/**"
|
||||
- "include/**"
|
||||
- "resource/**"
|
||||
- "tools/maadeps-download.py"
|
||||
- "CMakeLists.txt"
|
||||
- "CMakePresets.json"
|
||||
|
||||
jobs:
|
||||
meta:
|
||||
name: Resolve version tag
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
tag: ${{ steps.out.outputs.tag }}
|
||||
steps:
|
||||
- id: out
|
||||
run: |
|
||||
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
|
||||
echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=preview-${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
build:
|
||||
name: Build ${{ matrix.name }}
|
||||
needs: meta
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: windows-x64
|
||||
os: windows-latest
|
||||
rid: win-x64
|
||||
self_contained: true
|
||||
cmake_preset: windows-publish-x64
|
||||
maadeps_triplet: x64-windows
|
||||
- name: linux-x64
|
||||
os: ubuntu-latest
|
||||
rid: linux-x64
|
||||
self_contained: true
|
||||
cmake_preset: linux-publish-x64
|
||||
maadeps_triplet: x64-linux
|
||||
- name: macos-x64
|
||||
os: macos-latest
|
||||
rid: osx-x64
|
||||
self_contained: true
|
||||
cmake_preset: macos-publish-x64
|
||||
maadeps_triplet: x64-osx
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Fetch required submodules
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MAAUnified src/MaaUtils
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: "10.0.x"
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: "3.x"
|
||||
|
||||
- name: Restore app
|
||||
run: dotnet restore src/MAAUnified/App/MAAUnified.App.csproj
|
||||
|
||||
- name: Restore tests
|
||||
if: matrix.name != 'macos-x64'
|
||||
run: dotnet restore src/MAAUnified/Tests/MAAUnified.Tests.csproj
|
||||
|
||||
- name: Run Linux baseline consistency gate
|
||||
if: matrix.name == 'linux-x64'
|
||||
run: >
|
||||
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
||||
--results-directory TestResults/${{ matrix.name }}
|
||||
--logger "trx;LogFileName=baseline-consistency.trx"
|
||||
--filter "FullyQualifiedName~BaselineContractTests|FullyQualifiedName~BaselineCoverageTests|FullyQualifiedName~BaselineRenderSyncTests|FullyQualifiedName~ParityMatrixSyncTests"
|
||||
|
||||
- name: Run Linux full MAAUnified test gate
|
||||
if: matrix.name == 'linux-x64'
|
||||
run: >
|
||||
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
||||
--results-directory TestResults/${{ matrix.name }}
|
||||
--logger "trx;LogFileName=full-maaunified-tests.trx"
|
||||
|
||||
- name: Run Windows platform capability contract gate
|
||||
if: matrix.name == 'windows-x64'
|
||||
run: >
|
||||
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
||||
--results-directory TestResults/${{ matrix.name }}
|
||||
--logger "trx;LogFileName=platform-capability-contract.trx"
|
||||
--filter "FullyQualifiedName~PlatformCapabilityContractTests"
|
||||
|
||||
- name: Run Windows native capability smoke gate
|
||||
if: matrix.name == 'windows-x64'
|
||||
run: >
|
||||
dotnet test src/MAAUnified/Tests/MAAUnified.Tests.csproj -c Release --no-restore --disable-build-servers -m:1
|
||||
--results-directory TestResults/${{ matrix.name }}
|
||||
--logger "trx;LogFileName=platform-windows-native-smoke.trx"
|
||||
--filter "FullyQualifiedName~PlatformWindowsNativeSmokeTests"
|
||||
|
||||
- name: Upload test result artifacts on failure
|
||||
if: failure() && matrix.name != 'macos-x64'
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: MAAUnified-TestResults-${{ matrix.name }}
|
||||
path: TestResults/${{ matrix.name }}/*.trx
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: Bootstrap MaaDeps
|
||||
run: python tools/maadeps-download.py ${{ matrix.maadeps_triplet }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build MaaCore runtime
|
||||
run: |
|
||||
cmake --preset ${{ matrix.cmake_preset }} -DINSTALL_PYTHON=OFF -DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}'
|
||||
cmake --build --preset ${{ matrix.cmake_preset }}
|
||||
cmake --install build --config RelWithDebInfo
|
||||
|
||||
- name: Publish MAAUnified app
|
||||
run: dotnet publish src/MAAUnified/App/MAAUnified.App.csproj -c Release -r ${{ matrix.rid }} --self-contained ${{ matrix.self_contained }} -o publish
|
||||
|
||||
- name: Merge MaaCore runtime (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
Copy-Item install\* publish\ -Recurse -Force
|
||||
if (!(Test-Path "publish\MaaCore.dll")) { throw "MaaCore.dll not found in publish output." }
|
||||
if (!(Test-Path "publish\resource")) { throw "resource directory not found in publish output." }
|
||||
|
||||
- name: Merge MaaCore runtime (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
cp -a install/. publish/
|
||||
if [[ "$RUNNER_OS" == "Linux" ]]; then
|
||||
test -f publish/libMaaCore.so
|
||||
else
|
||||
test -f publish/libMaaCore.dylib
|
||||
fi
|
||||
test -d publish/resource
|
||||
|
||||
- name: Package (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path release -Force | Out-Null
|
||||
$name = "MAAUnified-${{ needs.meta.outputs.tag }}-${{ matrix.name }}"
|
||||
Compress-Archive -Path publish\* -DestinationPath "release\$name.zip"
|
||||
|
||||
- name: Package (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p release
|
||||
name="MAAUnified-${{ needs.meta.outputs.tag }}-${{ matrix.name }}"
|
||||
tar -czf "release/${name}.tar.gz" -C publish .
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: MAAUnified-${{ matrix.name }}
|
||||
path: release/*
|
||||
48
.github/workflows/ci.yml
vendored
48
.github/workflows/ci.yml
vendored
@@ -110,9 +110,8 @@ jobs:
|
||||
show-progress: false
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils 3rdparty/EmulatorExtras
|
||||
|
||||
- name: Cache MaaDeps
|
||||
id: cache-maadeps
|
||||
@@ -137,19 +136,18 @@ jobs:
|
||||
cmake --install build --config RelWithDebInfo
|
||||
|
||||
- name: Download MaaFramework
|
||||
if: matrix.arch == 'x64'
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: MaaXYZ/MaaFramework
|
||||
tag: v5.9.2
|
||||
fileName: "*win-x86_64*.zip"
|
||||
fileName: ${{ matrix.arch == "arm64" && "*win-aarch64*.zip" || "*win-x86_64*.zip" }}
|
||||
extract: true
|
||||
out-file-path: MaaFramework-temp
|
||||
|
||||
- name: Copy MaaWin32ControlUnit
|
||||
if: matrix.arch == 'x64'
|
||||
- name: Copy ControlUnits
|
||||
run: |
|
||||
cp MaaFramework-temp/bin/*Win32ControlUnit* install/
|
||||
cp MaaFramework-temp/bin/*AdbControlUnit* install/
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v5
|
||||
@@ -241,10 +239,8 @@ jobs:
|
||||
show-progress: false
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
git submodule update --init --depth 1 src/maa-cli
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils 3rdparty/EmulatorExtras src/maa-cli
|
||||
|
||||
- name: Cache MaaDeps
|
||||
id: cache-maadeps
|
||||
@@ -269,6 +265,19 @@ jobs:
|
||||
env:
|
||||
CLICOLOR_FORCE: 1
|
||||
|
||||
- name: Download MaaFramework
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: MaaXYZ/MaaFramework
|
||||
latest: true
|
||||
fileName: '*linux-${{ matrix.arch }}*.zip'
|
||||
extract: true
|
||||
out-file-path: MaaFramework-temp
|
||||
|
||||
- name: Copy ControlUnits
|
||||
run: |
|
||||
cp MaaFramework-temp/bin/*AdbControlUnit* install/
|
||||
|
||||
- name: Setup cross compile toolchains for CLI
|
||||
uses: ./src/maa-cli/.github/actions/setup
|
||||
with:
|
||||
@@ -348,8 +357,8 @@ jobs:
|
||||
show-progress: false
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils
|
||||
|
||||
# ninja 1.13.1 is already installed and up-to-date.
|
||||
# - name: Install dependencies
|
||||
@@ -376,6 +385,19 @@ jobs:
|
||||
cmake --build --preset ${{ matrix.arch == 'x86_64' && 'macos-publish-x64' || 'macos-publish-arm64' }} --parallel $(sysctl -n hw.logicalcpu)
|
||||
cmake --install build --config RelWithDebInfo
|
||||
|
||||
- name: Download MaaFramework
|
||||
uses: robinraju/release-downloader@v1
|
||||
with:
|
||||
repository: MaaXYZ/MaaFramework
|
||||
latest: true
|
||||
fileName: ${{ matrix.arch == 'x86_64' && '*macos-x86_64*.zip' || '*macos-aarch64*.zip' }}
|
||||
extract: true
|
||||
out-file-path: MaaFramework-temp
|
||||
|
||||
- name: Copy ControlUnits
|
||||
run: |
|
||||
cp MaaFramework-temp/bin/*AdbControlUnit* install/
|
||||
|
||||
- name: Upload MAA to GitHub
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
|
||||
5
.github/workflows/release-nightly-ota.yml
vendored
5
.github/workflows/release-nightly-ota.yml
vendored
@@ -52,9 +52,8 @@ jobs:
|
||||
git fetch --depth=250 --tags
|
||||
|
||||
- name: Fetch submodules
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
git submodule update --init --depth 1 3rdparty/EmulatorExtras
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils 3rdparty/EmulatorExtras
|
||||
|
||||
- name: Checkout ref (if provided)
|
||||
if: inputs.ref != ''
|
||||
|
||||
4
.github/workflows/res-update-game.yml
vendored
4
.github/workflows/res-update-game.yml
vendored
@@ -165,8 +165,8 @@ jobs:
|
||||
|
||||
- name: Fetch submodules
|
||||
if: steps.resupd-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils
|
||||
|
||||
- name: Cache MaaDeps
|
||||
if: steps.resupd-cache.outputs.cache-hit != 'true'
|
||||
|
||||
4
.github/workflows/smoke-testing.yml
vendored
4
.github/workflows/smoke-testing.yml
vendored
@@ -70,8 +70,8 @@ jobs:
|
||||
|
||||
- name: Fetch submodules
|
||||
if: steps.smoke-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git submodule update --init --depth 1 src/MaaUtils
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --init --depth 1 src/MaaUtils
|
||||
|
||||
- name: Cache MaaDeps
|
||||
if: steps.smoke-cache.outputs.cache-hit != 'true'
|
||||
|
||||
7
.github/workflows/update-submodules.yml
vendored
7
.github/workflows/update-submodules.yml
vendored
@@ -17,15 +17,14 @@ jobs:
|
||||
submodules: true
|
||||
|
||||
- name: Update submodules
|
||||
run: |
|
||||
git submodule update --remote src/MaaMacGui
|
||||
git submodule update --remote src/maa-cli
|
||||
shell: bash
|
||||
run: bash ./.github/scripts/sync-optional-submodules.sh --remote src/MAAUnified src/MaaMacGui src/maa-cli
|
||||
|
||||
- name: Commit and push changes
|
||||
uses: actions-js/push@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: "feat: Update Submodules MaaMacGui, maa-cli
|
||||
message: "feat: Update Submodules MAAUnified, MaaMacGui, maa-cli
|
||||
|
||||
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -13,3 +13,7 @@
|
||||
[submodule "src/MaaUtils"]
|
||||
path = src/MaaUtils
|
||||
url = https://github.com/MaaXYZ/MaaUtils
|
||||
[submodule "src/MAAUnified"]
|
||||
path = src/MAAUnified
|
||||
url = https://github.com/MaaAssistantArknights/MaaUnified.git
|
||||
branch = main
|
||||
|
||||
@@ -78,7 +78,9 @@ We've preset several different development environments for you to choose from:
|
||||
- Press F5 to run
|
||||
|
||||
::: tip
|
||||
To debug Win32Controller (Windows window control) features, you need to manually download the corresponding platform package from [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases), and place `MaaWin32ControlUnit.dll` from the `bin` directory into MAA's DLL directory (e.g. `build/bin/Debug`). PRs for an auto-download script are welcome!
|
||||
To run Win32Controller (Windows window control) / MaaFwAdbController (MaaFramework touch mode) features, you need to manually download the package for your platform from [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases), and place `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` from the `bin` directory into MAA's DLL directory (e.g. `build/bin/Debug`). PRs for an auto-download script are welcome!
|
||||
|
||||
To debug these features, [compile the Debug version of MaaFramework yourself](https://maafw.com/docs/4.1-BuildGuide) and use the corresponding DLLs, or it will randomly crash at breakpoints.
|
||||
:::
|
||||
|
||||
9. Now you're ready to happily ~~mess around~~ start developing!
|
||||
|
||||
@@ -8,7 +8,8 @@ icon: teenyicons:linux-alt-solid
|
||||
**This tutorial requires readers to have some Linux environment configuration ability and programming foundation!** If you only want to directly install MAA instead of compiling it yourself, please read [User Manual - Linux Emulators and Containers](../manual/device/linux.md).
|
||||
|
||||
::: info Note
|
||||
MAA's build method is still under discussion. The content of this tutorial may be outdated. Please refer to the scripts in [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134). You can also refer to [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights), [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix).
|
||||
MAA's build method is still under discussion. The content of this tutorial may be outdated. Please refer to the scripts in [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A).
|
||||
You can also refer to [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) or [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix).
|
||||
:::
|
||||
|
||||
::: info
|
||||
@@ -73,6 +74,8 @@ Mac can use the `tools/build_macos_universal.zsh` script for compilation. It's r
|
||||
cmake --install build --prefix <target_directory>
|
||||
```
|
||||
|
||||
4. To debug MaaFwAdbController (MaaFramework touch mode) features, you need to [compile the Debug version of MaaFramework yourself](https://maafw.com/docs/4.1-BuildGuide) and put `libMaaAdbControlUnit.so` in the installation directory.
|
||||
|
||||
## Integration Documentation
|
||||
|
||||
[~~Perhaps not really documentation~~](../protocol/integration.md)
|
||||
@@ -85,8 +88,6 @@ You can refer to the implementation of `__main__` in [Python demo](https://githu
|
||||
|
||||
You can refer to the implementation in [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp)
|
||||
|
||||
### C Sharp
|
||||
|
||||
<!-- Do not use C#, MD003/heading-style: Heading style [Expected: atx; Actual: atx_closed] -->
|
||||
### C\#
|
||||
|
||||
You can refer to the implementation in [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs)
|
||||
|
||||
@@ -180,17 +180,28 @@ Requires official or international LDPlayer 9 V9.1.32 or newer. <!-- Official V9
|
||||
|
||||
3. Enter the number (ID) of the corresponding emulator in the LDPlayer multi-instance manager in `Instance Number`, such as `0` for the main instance.
|
||||
|
||||
### AVD Screenshot Enhanced Mode
|
||||
|
||||
Requires Android Emulator v27.2.9 or newer. (You should be fine as long as you got the emulator after Arknights launched.)
|
||||
|
||||
AVD Screenshot Enhanced Mode is implemented in MaaFramework. Touch mode must be set accordingly for Screenshot Enhanced Mode to work.
|
||||
|
||||
1. In `Settings` - `Connection` - `Connection Preset`, select `Android Virtual Device (AVD)`.
|
||||
|
||||
2. For `Touch Mode`, select `MaaFramework`.
|
||||
|
||||
## Touch Mode
|
||||
|
||||
1. [Minitouch](https://github.com/DeviceFarmer/minitouch): An Android touch event handler written in C that operates on `evdev` devices and provides a Socket interface for external programs to trigger touch events and gestures. Starting with Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode.<sup>[source](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up)</sup>
|
||||
2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch): MAA's Java reimplementation of Minitouch that uses Android's native `InputDevice` and adds extra features. Compatibility with newer Android versions is still being tested. ~~Help us test it~~
|
||||
3. Adb Input: Directly calls ADB to use Android's `input` command for touch operations. Most compatible but slowest.
|
||||
4. [MaaFramework](https://maafw.com/): Delegates screenshot and touch commands to MaaFramework's control unit. Still being tested. ~~Help us test it x2~~
|
||||
|
||||
## ADB Lite
|
||||
|
||||
MAA's independent ADB Client implementation that communicates directly with the ADB Server via TCP. Compared to the original ADB, it avoids constantly launching multiple ADB processes, reducing performance overhead, but some screenshot methods aren't available.<sup>[PR](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/3315)</sup>
|
||||
|
||||
We recommend enabling it, but specific pros and cons need feedback. ~~Help us test it x2~~
|
||||
We recommend enabling it, but specific pros and cons need feedback. ~~Help us test it x3~~
|
||||
|
||||
## Running multiple MAA and emulator instances
|
||||
|
||||
|
||||
@@ -121,6 +121,8 @@ Requirements: 16:9 screen resolution larger than 720p
|
||||
|
||||
Recommended configuration: x86_64 architecture (R - 30 - x86_64 - Android 11.0) with MAA's Linux x64 dynamic library
|
||||
|
||||
Also supports [Screenshot Enhanced Mode](../connection.md#avd-screenshot-enhanced-mode).
|
||||
|
||||
Note: Starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.
|
||||
|
||||
### ⚠️ [Genymotion](https://www.genymotion.com/)
|
||||
|
||||
@@ -35,7 +35,9 @@ Supported, but less thoroughly tested. Requires using a touch mode other than `M
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
Supported, but starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.
|
||||
Supported; also supports [Screenshot Enhanced Mode](../connection.md#avd-screenshot-enhanced-mode).
|
||||
|
||||
From Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.
|
||||
|
||||
### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (Free, optimized for Apple M-series chips)
|
||||
|
||||
@@ -61,4 +63,6 @@ Note: On macOS, the Nox ADB binary is located at `/Applications/NoxAppPlayer.app
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
Supported, but starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.
|
||||
Supported; also supports [Screenshot Enhanced Mode](../connection.md#avd-screenshot-enhanced-mode).
|
||||
|
||||
Starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.
|
||||
|
||||
@@ -67,7 +67,7 @@ const partiallySupport = shuffleArray([
|
||||
{
|
||||
name: 'AVD',
|
||||
link: 'https://developer.android.com/studio/run/managing-avds',
|
||||
note: 'Theoretically supported.\n\n- Starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.\n- AVD is designed for development debugging, not gaming. Other emulators specifically designed for gaming are recommended instead.',
|
||||
note: 'Theoretically supported, with additional support for [Screenshot Enhanced Mode](../connection.html#avd-screenshot-enhanced-mode).\n- Starting from Android 10, Minitouch is no longer available when SELinux is in `Enforcing` mode. Please switch to other touch modes, or **temporarily** switch SELinux to `Permissive` mode.\n- AVD is designed for development debugging, not gaming. Other emulators specifically designed for gaming are recommended instead.',
|
||||
},
|
||||
{
|
||||
name: 'Google Play Games (Developer)',
|
||||
|
||||
@@ -54,6 +54,13 @@ For Windows N/KN (European/Korean versions), you also need to install the [Media
|
||||
|
||||
Due to runtime libraries and system components requiring Windows 10 or above, MAA no longer supports Windows 7/8/8.1 systems.
|
||||
|
||||
### Flagged by Windows Defender / antivirus software (PUA / malware)
|
||||
|
||||
- First verify the download source. Only use official channels (official website, GitHub Releases, Winget, or official community distribution channels), and make sure you downloaded the full package (for example, `MAA-<version>-win-x64.zip`).
|
||||
- Automation tools may trigger heuristic detections in some antivirus engines. A detection result does not always mean the program is malicious.
|
||||
- If the source is trusted, submit a false-positive sample to the security vendor and wait for signature updates.
|
||||
- While waiting, you can temporarily add the MAA installation directory to antivirus allowlists. Avoid disabling real-time protection entirely.
|
||||
|
||||
## Connection errors
|
||||
|
||||
### Verify ADB and connection address are correct
|
||||
|
||||
@@ -1146,10 +1146,10 @@ value
|
||||
Invalid placeholder. Enum value: 0.
|
||||
:::
|
||||
::: field name="MinitouchEnabled" type="boolean" optional
|
||||
Deprecated. Originally for enabling minitouch; "1" - on, "0" - off. Note that the device may not support it. Enum value: 1 (deprecated).
|
||||
Deprecated. Originally for enabling Minitouch; "1" - on, "0" - off. Note that the device may not support it. Enum value: 1 (deprecated).
|
||||
:::
|
||||
::: field name="TouchMode" type="string" optional default="minitouch"
|
||||
Touch mode setting. Options: minitouch | maatouch | adb. Default minitouch. Enum value: 2.
|
||||
Touch mode setting. Options: minitouch | maatouch | adb | MaaFwAdb. Default minitouch. Enum value: 2.
|
||||
:::
|
||||
::: field name="DeploymentWithPause" type="boolean" optional
|
||||
Whether to pause when deploying operators (affects IS, Copilot and Stationary Security Service). Options: "1" | "0". Enum value: 3.
|
||||
|
||||
@@ -84,7 +84,9 @@ icon: iconoir:developer
|
||||
- F5 キーを押して実行
|
||||
|
||||
::: tip
|
||||
Win32Controller(Windows ウィンドウ制御)関連機能をデバッグする場合は、[MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) から対応プラットフォームのアーカイブをダウンロードし、`bin` ディレクトリ内の `MaaWin32ControlUnit.dll` を MAA の DLL と同じディレクトリ(例:`build/bin/Debug`)に配置してください。自動ダウンロードスクリプトの PR 歓迎!
|
||||
Win32Controller(Windows ウィンドウ制御)/ MaaFwAdbController(MaaFramework のタッチモード)関連機能を実行する場合は、[MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) から対応プラットフォームのアーカイブをダウンロードし、`bin` ディレクトリ内の `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` を MAA の DLL と同じディレクトリ(例:`build/bin/Debug`)に配置してください。自動ダウンロードスクリプトの PR 歓迎!
|
||||
|
||||
関連機能をデバッグする場合は、[MaaFramework の Debug バージョンを自分でコンパイル](https://maafw.com/docs/4.1-BuildGuide)し、対応する DLL ファイルを使用する必要があります。そうしないと、ブレークポイントデバッグ中に謎のクラッシュが発生します。
|
||||
:::
|
||||
|
||||
9. これで自由に ~~改造~~ 開発を始められます
|
||||
|
||||
@@ -8,7 +8,8 @@ icon: teenyicons:linux-alt-solid
|
||||
**このチュートリアルでは、読者にLinux環境の構成能力とプログラミングの基礎が必要です!**
|
||||
|
||||
::: info 注意
|
||||
MAAの構築方法はまだ議論されていますが、このチュートリアルの内容は古くなる可能性があります。 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134) のスクリプトに準拠してください
|
||||
MAAの構築方法はまだ議論されていますが、このチュートリアルの内容は古くなる可能性があります。[GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A) のスクリプトに準拠してください。
|
||||
また、[AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) や [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix) も参照可能です。
|
||||
:::
|
||||
|
||||
## コンパイルプロセス
|
||||
@@ -56,6 +57,8 @@ MAAの構築方法はまだ議論されていますが、このチュートリ
|
||||
cmake --install build --prefix <target_directory>
|
||||
```
|
||||
|
||||
4. MaaFwAdbController(MaaFramework のタッチモード)関連機能をデバッグする場合は、[MaaFramework の Debug バージョンを自分でコンパイル](https://maafw.com/docs/4.1-BuildGuide)し、`libMaaAdbControlUnit.so` をインストールディレクトリにコピーする必要があります。
|
||||
|
||||
## その他のインストール方法
|
||||
|
||||
- AUR: [maa-assistant-arknights](https://aur.archlinux.org/packages/maa-assistant-arknights)
|
||||
|
||||
@@ -224,14 +224,25 @@ LDPlayerの正式版9 V9.1.32 以降を使用する必要があります。<!--
|
||||
|
||||
3. `インスタンス番号` には LD マルチインスタンス内でのエミュレーターの番号を入力してください。主インスタンスの場合は `0` です。
|
||||
|
||||
### AVD スクリーンショット強化モード
|
||||
|
||||
Android Emulator v27.2.9 以降が必要です。(アークナイツのリリース以降にダウンロードしたエミュレーターであれば大丈夫です。)
|
||||
|
||||
AVD スクリーンショット強化モードは MaaFramework 内で実装されているため、MaaFramework のタッチモードを有効にすることが、この機能を利用する前提となります。
|
||||
|
||||
1. `設定` - `接続設定` - `接続構成` で `Android Virtual Device (AVD)` を選択します。
|
||||
|
||||
2. `タッチモード` で `MaaFramework` を選択します。
|
||||
|
||||
## タッチモード
|
||||
|
||||
1. [Minitouch](https://github.com/DeviceFarmer/minitouch):Android タッチイベントを操作するための C 言語で書かれたツールで、`evdev` デバイスを操作し、外部プログラムがタッチイベントとジェスチャーをトリガーできる Socket インターフェースを提供します。Android 10 以降、SELinux が `Enforcing` モードの場合、Minitouch は使用できなくなりました。<sup>[出典](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up)</sup>
|
||||
2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch):MAA による Java で Minitouch を再実装し、Android の `InputDevice` を使用し、追加の機能を付加しました。高バージョンの Android での利用可能性はまだテスト中です。~~テストを手伝ってください~~
|
||||
3. Adb Input:直接 ADB を呼び出して、Android の `input` コマンドを使用してタッチ操作を行います。最も互換性があり、最も遅い速度です。
|
||||
4. [MaaFramework](https://maafw.com/):MaaFramework の制御ユニットのスクリーンショットとタッチ機能を呼び出します。利用可能性はまだテスト中です。~~テストを手伝ってください x2~~
|
||||
|
||||
## ADB Lite
|
||||
|
||||
MAA によって独自に実装された ADB クライアントで、オリジナルの ADB よりも多重の ADB プロセスを開始せずに済み、パフォーマンスの低下を抑えることができますが、一部のスクリーンショット方法は使用できません。
|
||||
|
||||
推奨されますが、具体的な利点と欠点はまだフィードバックを得ていません。~~テストを手伝ってください x2~~
|
||||
推奨されますが、具体的な利点と欠点はまだフィードバックを得ていません。~~テストを手伝ってください x3~~
|
||||
|
||||
@@ -121,6 +121,8 @@ MAA Wine Bridge で生成された `MaaDesktopIntegration.so` を `MAA.exe` と
|
||||
|
||||
推奨構成: x86_64 のフレームワーク (R - 30 - x86_64 - Android 11.0) と MAA のLinux x64 ダイナミック ライブラリ
|
||||
|
||||
[スクリーンショット強化モード](../connection.md#avd-スクリーンショット強化モード)の追加サポートもあります。
|
||||
|
||||
- Android 10 以降、SELinux が `Enforcing` モードの場合、Minitouch は使用できません、別のタッチモードに切り替えてください。または SELinux を **一時的に** `Permissive` モードに切り替え。
|
||||
|
||||
### ⚠️ [Genymotion](https://www.genymotion.com/)
|
||||
|
||||
@@ -39,7 +39,9 @@ icon: basil:apple-solid
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
サポートされています。Android 10 以降、SELinux が\`Enforcing\`モードの場合、Minitouch は使用できません、別のタッチモードに切り替えてください。または SELinux を **一時的に** \`Permissive\`モードに切り替え。
|
||||
サポートされています。[スクリーンショット強化モード](../connection.md#avd-スクリーンショット強化モード)の追加サポートもあります。
|
||||
|
||||
Android 10 以降、SELinux が `Enforcing` モードの場合、Minitouch は使用できません、別のタッチモードに切り替えてください。または SELinux を **一時的に** `Permissive` モードに切り替え。
|
||||
|
||||
### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (無料、Apple Mシリーズチップ向けに最適化されたバージョン)
|
||||
|
||||
@@ -69,4 +71,4 @@ Mac 版の開発は人手不足のため、更新速度が比較的遅いです
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
サポートされています。
|
||||
サポートされています。[スクリーンショット強化モード](../connection.md#avd-スクリーンショット強化モード)の追加サポートもあります。
|
||||
|
||||
@@ -25,12 +25,12 @@ const fullySupport = [
|
||||
{
|
||||
name: 'MuMu Player',
|
||||
link: 'https://www.mumuplayer.com/',
|
||||
note: 'サポートされています、[スクリーンショット強化モード](../connection.html#MuMu スクリーンショット強化モード)の追加サポートもある。 Hyper-Vとの互換性が確認されています。\n\n- “完了後にエミュレータを終了する”機能に異常が発生する場合がありますので、その場合はMuMu公式までご連絡ください。\n- 複数のインスタンスを開くには、MuMu Multiple OpenerのADBボタンから対応するインスタンスのポート情報を確認し、MAA設定-接続設定の接続アドレスのポート番号を対応するポートに変更する必要があります。\n- `ビデオメモリ使用ポリシー`を`リソース使用量が少ない`に設定しないでください。',
|
||||
note: 'サポートされています、[スクリーンショット強化モード](../connection.html#MuMu スクリーンショット強化モード)の追加サポートもあります。 Hyper-Vとの互換性が確認されています。\n\n- “完了後にエミュレータを終了する”機能に異常が発生する場合がありますので、その場合はMuMu公式までご連絡ください。\n- 複数のインスタンスを開くには、MuMu Multiple OpenerのADBボタンから対応するインスタンスのポート情報を確認し、MAA設定-接続設定の接続アドレスのポート番号を対応するポートに変更する必要があります。\n- `ビデオメモリ使用ポリシー`を`リソース使用量が少ない`に設定しないでください。',
|
||||
},
|
||||
{
|
||||
name: 'LDPlayer',
|
||||
link: 'https://www.ldplayer.net/',
|
||||
note: 'サポートされています、[スクリーンショット強化モード](../connection.html#LDPlayer スクリーンショット強化モード)の追加サポートもある。 Hyper-Vとの互換性が確認されています。\n\n- LDPlayer 9のインストーラーは、インストールプロセス中に自動的にHyper-Vをサイレントで無効にしますので、必要な場合は注意してください。',
|
||||
note: 'サポートされています、[スクリーンショット強化モード](../connection.html#LDPlayer スクリーンショット強化モード)の追加サポートもあります。 Hyper-Vとの互換性が確認されています。\n\n- LDPlayer 9のインストーラーは、インストールプロセス中に自動的にHyper-Vをサイレントで無効にしますので、必要な場合は注意してください。',
|
||||
},
|
||||
]),
|
||||
// keep internal sorting for bluestacks.
|
||||
@@ -67,7 +67,7 @@ const partiallySupport = shuffleArray([
|
||||
{
|
||||
name: 'AVD',
|
||||
link: 'https://developer.android.com/studio/run/managing-avds',
|
||||
note: '理論的なサポートされています。\n\n- Android 10 以降、SELinux が`Enforcing`モードの場合、Minitouch は使用できません、別のタッチモードに切り替えてください。または SELinux を **一時的に** `Permissive`モードに切り替え。\n- AVD はデバッグ用に構築されており、ゲーム用に設計された他のエミュレーターを使用することをおすすめします。',
|
||||
note: '理論的なサポートされています。\n\n- [スクリーンショット強化モード](../connection.html#avd-スクリーンショット強化モード)の追加サポートもあります。\n- Android 10 以降、SELinux が`Enforcing`モードの場合、Minitouch は使用できません、別のタッチモードに切り替えてください。または SELinux を **一時的に** `Permissive`モードに切り替え。\n- AVD はデバッグ用に構築されており、ゲーム用に設計された他のエミュレーターを使用することをおすすめします。',
|
||||
},
|
||||
{
|
||||
name: 'Google Play ゲーム(開発者)',
|
||||
|
||||
@@ -1145,10 +1145,10 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key,
|
||||
無効なプレースホルダ。列挙値:0。
|
||||
:::
|
||||
::: field name="MinitouchEnabled" type="boolean" optional
|
||||
廃止済み。元は minitouch を有効にするかどうか。"1" オン、"0" オフ。デバイスがサポートされていない可能性がります。列挙値:1(廃止済み)。
|
||||
廃止済み。元は Minitouch を有効にするかどうか。"1" オン、"0" オフ。デバイスがサポートされていない可能性がります。列挙値:1(廃止済み)。
|
||||
:::
|
||||
::: field name="TouchMode" type="string" optional default="minitouch"
|
||||
タッチ モード設定。可能な値:minitouch | maatouch | adb。デフォルト minitouch。列挙値:2。
|
||||
タッチ モード設定。可能な値:minitouch | maatouch | adb | MaaFwAdb。デフォルト minitouch。列挙値:2。
|
||||
:::
|
||||
::: field name="DeploymentWithPause" type="boolean" optional
|
||||
暫停状態でオペレーターを配置するかどうか。自動戦闘、統合戦略、保全駐在に同時に影響。可能な値:"1" または "0"。列挙値:3。
|
||||
|
||||
@@ -83,7 +83,9 @@ icon: iconoir:developer
|
||||
- F5 키를 눌러 실행
|
||||
|
||||
::: tip
|
||||
Win32Controller(Windows 창 제어) 관련 기능을 디버깅하려면 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases)에서 해당 플랫폼 압축 파일을 다운로드하고, `bin` 디렉토리의 `MaaWin32ControlUnit.dll`을 MAA DLL과 같은 디렉토리(예: `build/bin/Debug`)에 배치해야 합니다. 자동 다운로드 스크립트 PR 환영!
|
||||
Win32Controller(Windows 창 제어) / MaaFwAdbController(MaaFramework 터치 수행 방식) 관련 기능을 실행하려면 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases)에서 해당 플랫폼 압축 파일을 다운로드하고, `bin` 디렉토리의 `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll`을 MAA DLL과 같은 디렉토리(예: `build/bin/Debug`)에 배치해야 합니다. 자동 다운로드 스크립트 PR 환영!
|
||||
|
||||
若需调试相关功能,则需要自行编译 MaaFramework 的 Debug 版本,使用对应的 DLL 文件,否则在断点调试时会神秘闪退。
|
||||
:::
|
||||
|
||||
9. 이제 자유롭게 ~~개조~~ 개발 시작!
|
||||
|
||||
@@ -8,7 +8,7 @@ icon: teenyicons:linux-alt-solid
|
||||
**이 가이드는 독자가 일정한 Linux 환경 설정 능력과 프로그래밍 기초를 가지고 있다고 가정합니다!** MAA를 직접 컴파일하는 대신 단순히 설치하길 원한다면 [사용자 매뉴얼 - Linux 지원](../manual/device/linux.md)를 참고하세요.
|
||||
|
||||
::: info 주의
|
||||
MAA의 빌드 방법은 여전히 논의 중입니다. 이 가이드의 내용은 최신 내용이 아닐 수 있으므로 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134)의 스크립트를 참고하는 것이 좋습니다.
|
||||
MAA의 빌드 방법은 여전히 논의 중입니다. 이 가이드의 내용은 최신 내용이 아닐 수 있으므로 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A)의 스크립트를 참고하는 것이 좋습니다.
|
||||
또한 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 또는 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)를 참고할 수도 있습니다.
|
||||
:::
|
||||
|
||||
@@ -80,7 +80,7 @@ MaaAssistantArknights/MaaMacGui 프로젝트의 [README.md](https://github.com/M
|
||||
cmake --install build --prefix <target_directory>
|
||||
```
|
||||
|
||||
4. 완료, 디렉터리에서 빌드 파일을 확인할 수 있을 것입니다.
|
||||
4. 若需调试 MaaFwAdbController(MaaFramework 触控模式)相关功能,需要[自行编译 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,将 `libMaaAdbControlUnit.so` 放到安装目录下。
|
||||
|
||||
::::
|
||||
|
||||
@@ -96,8 +96,6 @@ MaaAssistantArknights/MaaMacGui 프로젝트의 [README.md](https://github.com/M
|
||||
|
||||
[CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp)의 구현을 참고하세요.
|
||||
|
||||
### C Sharp
|
||||
|
||||
<!-- Do not use C#, MD003/heading-style: Heading style [Expected: atx; Actual: atx_closed] -->
|
||||
### C\#
|
||||
|
||||
[MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs)의 구현을 참고하세요.
|
||||
|
||||
@@ -194,11 +194,22 @@ MAA 폴더에 직접 압축을 푸는 것을 권장합니다. 그러면 ADB 경
|
||||
|
||||
3. `인스턴스 번호`에 LD 멀티플레이어에서 해당 에뮬레이터의 일련번호(ID)를 입력합니다. 예: 메인 멀티플레이어의 경우 `0`
|
||||
|
||||
### AVD 스크린샷 향상 모드
|
||||
|
||||
需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟开服之后下载的就没问题。)
|
||||
|
||||
因为 AVD 截图增强模式在 MaaFramework 中实现,所以必须选择 MaaFramework 触控模式才能启用 AVD 截图增强。
|
||||
|
||||
1. `设置` - `连接设置` - `连接配置` 选择 `Android 虚拟设备(AVD)`。
|
||||
|
||||
2. `触控模式` 选择 `MaaFramework`。
|
||||
|
||||
## 터치 모드
|
||||
|
||||
1. [Minitouch](https://github.com/DeviceFarmer/minitouch): C로 작성된 Android 터치 이벤트 핸들러로, 외부 프로그램이 터치 이벤트와 제스처를 트리거할 수 있는 소켓 인터페이스를 제공합니다. Android 10부터는 SELinux가 `Enforcing` 모드일 때 Minitouch가 더 이상 사용되지 않습니다.
|
||||
2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch): MAA가 Java 기반으로 Minitouch를 재구현한 것입니다. 높은 버전의 Android에서도 사용 가능성이 테스트 중입니다.
|
||||
3. Adb Input: ADB 명령어를 직접 호출하여 터치 작업을 수행하며, 호환성이 가장 좋지만, 속도는 가장 느립니다.
|
||||
4. [MaaFramework](https://maafw.com/): 调用 MaaFramework 控制单元的截图和触控功能。可用性尚待测试。~~帮我们做做测试 x2~~
|
||||
|
||||
## ADB Lite
|
||||
|
||||
|
||||
@@ -121,6 +121,8 @@ MAA Wine Bridge에서 생성된 `MaaDesktopIntegration.so`를 `MAA.exe`와 같
|
||||
|
||||
권장 구성: MAA의 리눅스 x64 동적 라이브러리와 함께 x86_64 프레임워크 (R - 30 - x86_64 - Android 11.0) 사용
|
||||
|
||||
[스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다.
|
||||
|
||||
참고: Android 10 이상에서는 SELinux가 `Enforcing` 모드인 경우 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 전환하세요.
|
||||
|
||||
### ⚠️ [Genymotion](https://www.genymotion.com/)
|
||||
|
||||
@@ -35,7 +35,9 @@ icon: basil:apple-solid
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
지원됩니다. 그러나 Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요.
|
||||
지원됩니다, [스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다.
|
||||
|
||||
Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요.
|
||||
|
||||
### ✅ [블루스택 에어](https://www.bluestacks.com/mac) (무료, Apple M 시리즈 칩에 최적화된 버전)
|
||||
|
||||
@@ -65,4 +67,6 @@ Mac 버전 개발에 인력이 부족하여 업데이트 속도가 비교적 느
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
지원됩니다. 그러나 Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요.
|
||||
지원됩니다, [스크린샷 향상 모드](../connection.md#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다.
|
||||
|
||||
Android 10부터는 SELinux가 `Enforcing` 모드일 때 `Minitouch`를 사용할 수 없습니다. 다른 터치 모드로 전환하거나 SELinux를 **임시**로 `Permissive` 모드로 변경하세요.
|
||||
|
||||
@@ -67,7 +67,7 @@ const partiallySupport = shuffleArray([
|
||||
{
|
||||
name: 'AVD',
|
||||
link: 'https://developer.android.com/studio/run/managing-avds',
|
||||
note: '이론적으로 지원됩니다.\n\n- Android 10부터 SELinux가 `Enforcing` 모드일 때 Minitouch를 사용할 수 없으므로 다른 터치 모드로 전환하거나 SELinux를 **임시로** `Permissive` 모드로 전환하세요.\n- AVD는 디버깅을 위해 만들어졌으므로 게임용으로 설계된 다른 에뮬레이터를 사용하는 것이 더 좋습니다.',
|
||||
note: '이론적으로 지원됩니다.\n\n- [스크린샷 향상 모드](../connection.html#avd-스크린샷-향상-모드)에 대한 추가 지원이 있습니다.\n- Android 10부터 SELinux가 `Enforcing` 모드일 때 Minitouch를 사용할 수 없으므로 다른 터치 모드로 전환하거나 SELinux를 **임시로** `Permissive` 모드로 전환하세요.\n- AVD는 디버깅을 위해 만들어졌으므로 게임용으로 설계된 다른 에뮬레이터를 사용하는 것이 더 좋습니다.',
|
||||
},
|
||||
{
|
||||
name: 'Google Play Games (개발자용)',
|
||||
|
||||
@@ -1134,10 +1134,10 @@ Value
|
||||
무효 점유. 열거값: 0
|
||||
:::
|
||||
::: field name="MinitouchEnabled" type="boolean" optional
|
||||
폐기됨. 원 minitouch 활성화 여부; "1" 켜기, "0" 끄기. 장치가 지원하지 않을 수 있음. 열거값: 1 (폐기됨)
|
||||
폐기됨. 원 Minitouch 활성화 여부; "1" 켜기, "0" 끄기. 장치가 지원하지 않을 수 있음. 열거값: 1 (폐기됨)
|
||||
:::
|
||||
::: field name="TouchMode" type="string" optional default="minitouch"
|
||||
터치 모드 설정. 옵션: minitouch | maatouch | adb. 기본값 minitouch. 열거값: 2
|
||||
터치 모드 설정. 옵션: minitouch | maatouch | adb | MaaFwAdb. 기본값 minitouch. 열거값: 2
|
||||
:::
|
||||
::: field name="DeploymentWithPause" type="boolean" optional
|
||||
오퍼레이터 배치 시 일시정지 여부, 자동지휘/통합 전략/보안파견에 모두 영향. 옵션: "1" 켜기, "0" 끄기. 열거값: 3
|
||||
|
||||
@@ -78,7 +78,9 @@ icon: iconoir:developer
|
||||
- 按 F5 运行
|
||||
|
||||
::: tip
|
||||
若需调试 Win32Controller(Windows 窗口控制)相关功能,需要自行从 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) 下载对应平台的压缩包,将 `bin` 目录中的 `MaaWin32ControlUnit.dll` 放到 MAA 的 DLL 同目录下(如 `build/bin/Debug`)。欢迎 PR 一个自动下载脚本!
|
||||
若需运行 Win32Controller(Windows 窗口控制)/ MaaFwAdbController(MaaFramework 触控模式)相关功能,需要自行从 [MaaFramework Releases](https://github.com/MaaXYZ/MaaFramework/releases) 下载对应平台的压缩包,将 `bin` 目录中的 `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` 放到 MAA 的 DLL 同目录下(如 `build/bin/Debug`)。欢迎 PR 一个自动下载脚本!
|
||||
|
||||
若需调试相关功能,则需要[自行编译 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,使用对应的 DLL 文件,否则在断点调试时会神秘闪退。
|
||||
:::
|
||||
|
||||
9. 到这里,你就可以愉快地 ~~瞎 JB 改~~ 发电了
|
||||
|
||||
@@ -8,8 +8,8 @@ icon: teenyicons:linux-alt-solid
|
||||
**本教程需要读者有一定的 Linux 环境配置能力及编程基础!**,若您仅希望直接安装MAA而非自行编译,请阅读[用户手册 - Linux 模拟器与容器](../manual/device/linux.md)。
|
||||
|
||||
::: info 注意
|
||||
MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134) 中的脚本为准
|
||||
你也可参考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)
|
||||
MAA 的构建方法仍在讨论中, 本教程的内容可能过时, 请以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A) 中的脚本为准。
|
||||
你也可参考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)。
|
||||
:::
|
||||
|
||||
::: info
|
||||
@@ -80,9 +80,8 @@ Mac 可以使用 `tools/build_macos_universal.zsh` 脚本进行编译
|
||||
cmake --install build --prefix <target_directory>
|
||||
```
|
||||
|
||||
4. 结束,你应该能在目录下看到构建文件了
|
||||
|
||||
::::
|
||||
4. 若需调试 MaaFwAdbController(MaaFramework 触控模式)相关功能,需要[自行编译 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,将 `libMaaAdbControlUnit.so` 放到安装目录下。
|
||||
::::
|
||||
|
||||
## 集成文档
|
||||
|
||||
@@ -96,8 +95,6 @@ Mac 可以使用 `tools/build_macos_universal.zsh` 脚本进行编译
|
||||
|
||||
可参考 [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp) 中的实现
|
||||
|
||||
### C Sharp
|
||||
|
||||
<!-- Do not use C#, MD003/heading-style: Heading style [Expected: atx; Actual: atx_closed] -->
|
||||
### C\#
|
||||
|
||||
可参考 [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs) 中的实现
|
||||
|
||||
@@ -186,17 +186,28 @@ MAA 可以通过当前**正在运行的单个模拟器**自动检测并填充 AD
|
||||
|
||||
3. `实例编号` 填写雷电多开器内对应模拟器的编号(ID),如主多开为 `0`。
|
||||
|
||||
### AVD 截图增强模式
|
||||
|
||||
需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟开服之后下载的就没问题。)
|
||||
|
||||
AVD 截图增强模式在 MaaFramework 中实现,必须选择 MaaFramework 触控模式才能启用 AVD 截图增强。
|
||||
|
||||
1. `设置` - `连接设置` - `连接配置` 选择 `Android 虚拟设备(AVD)`。
|
||||
|
||||
2. `触控模式` 选择 `MaaFramework`。
|
||||
|
||||
## 触控模式
|
||||
|
||||
1. [Minitouch](https://github.com/DeviceFarmer/minitouch):使用 C 编写的 Android 触控事件器,操作 `evdev` 设备,提供 Socket 接口供外部程序触发触控事件和手势。从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。<sup>[源](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up)</sup>
|
||||
2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch):由 MAA 基于 Java 对 Minitouch 的重新实现,使用安卓原生的 `InputDevice`,并添加了额外特性。高版本 Android 可用性尚待测试。~~帮我们做做测试~~
|
||||
3. Adb Input:直接调用 ADB 使用安卓的 `input` 命令进行触控操作,兼容性最强,速度最慢。
|
||||
4. [MaaFramework](https://maafw.com/):调用 MaaFramework 控制单元的截图和触控功能。可用性尚待测试。~~帮我们做做测试 x2~~
|
||||
|
||||
## ADB Lite
|
||||
|
||||
由 MAA 独立实现的 ADB Client,使用 TCP 直接与 ADB Server 通信。相较原版 ADB 可以避免不停开启多个 ADB 进程,减少性能开销,但部分截图方式不可用。<sup>[PR](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/3315)</sup>
|
||||
|
||||
推荐启用,但具体优缺点尚待反馈。~~帮我们做做测试 x2~~
|
||||
推荐启用,但具体优缺点尚待反馈。~~帮我们做做测试 x3~~
|
||||
|
||||
## MAA 和模拟器多开
|
||||
|
||||
|
||||
@@ -121,6 +121,8 @@ MAA WPF GUI 当前可以通过 Wine 运行。MAA 已采用自包含部署方式
|
||||
|
||||
推荐配置: x86_64 的框架 (R - 30 - x86_64 - Android 11.0) 配合 MAA 的 Linux x64 动态库
|
||||
|
||||
额外支持[截图增强模式](../connection.md#avd-截图增强模式)。
|
||||
|
||||
注意:从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。
|
||||
|
||||
### ⚠️ [Genymotion](https://www.genymotion.com/)
|
||||
|
||||
@@ -35,11 +35,13 @@ icon: basil:apple-solid
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
支持,但从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。
|
||||
支持,且额外支持[截图增强模式](../connection.md#avd-截图增强模式)。
|
||||
|
||||
### ✅ [蓝叠模拟器air版](https://www.bluestacks.com/mac) (免费,针对 Apple M 系列芯片进行优化的版本)
|
||||
从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。
|
||||
|
||||
支持,经测试,可用 maatouch 经`127.0.0.1:5555`连接。
|
||||
### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (免费,针对 Apple M 系列芯片进行优化的版本)
|
||||
|
||||
支持,经测试,可使用 MaaTouch 通过 `127.0.0.1:5555` 连接。
|
||||
|
||||
需要在模拟器 `设置` - `高级` 中打开 `Android调试(ADB)`。
|
||||
|
||||
@@ -61,8 +63,10 @@ icon: basil:apple-solid
|
||||
|
||||
完美支持。
|
||||
|
||||
补充:mac 下夜神模拟器的 ADB 二进制文件的位置为 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` ,在父目录 `MacOS` 下可使用 `adb devices` 命令查看 ADB 端口。
|
||||
补充:macOS 下夜神模拟器的 ADB 二进制文件的位置为 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb` ,在父目录 `MacOS` 下可使用 `adb devices` 命令查看 ADB 端口。
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
支持,但从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。
|
||||
支持,且额外支持[截图增强模式](../connection.md#avd-截图增强模式)。
|
||||
|
||||
从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用。请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。
|
||||
|
||||
@@ -72,12 +72,12 @@ const partiallySupport = shuffleArray([
|
||||
{
|
||||
name: 'AVD',
|
||||
link: 'https://developer.android.com/studio/run/managing-avds',
|
||||
note: '理论支持。\n\n- 从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。\n- AVD 是为调试而生的,更建议使用其他为游戏而设计的模拟器。',
|
||||
note: '理论支持,且额外支持[截图增强模式](../connection.html#avd-截图增强模式)。\n- 从 Android 10 开始,Minitouch 在 SELinux 为 `Enforcing` 模式时不再可用,请切换至其他触控模式,或将 SELinux **临时**切换为 `Permissive` 模式。\n- AVD 是为调试而生的,更建议使用其他为游戏而设计的模拟器。',
|
||||
},
|
||||
{
|
||||
name: 'Google Play 游戏(开发者)',
|
||||
link: 'https://developer.android.com/games/playgames/emulator?hl=zh-cn',
|
||||
note: '理论支持。必须开启 Hyper-V,且必须登录谷歌账户。\n\n- 需要使用 [自定义连接](../connection.html) 的方式来连接,ADB 端口为 `6520`。\n- 由于 Android 10 及更新版本的 SELinux 策略,Minitouch 无法正常工作,请切换到其他触控模式。\n- 每次启动模拟器后的首次连接都会失败,需勾选 `连接失败后尝试关闭并重启ADB进程`。',
|
||||
note: '理论支持。必须启用 Hyper-V,且必须登录谷歌账户。\n\n- 需要使用 [自定义连接](../connection.html) 的方式来连接,ADB 端口为 `6520`。\n- 由于 Android 10 及更新版本的 SELinux 策略,Minitouch 无法正常工作,请切换到其他触控模式。\n- 每次启动模拟器后的首次连接都会失败,需勾选 `连接失败后尝试关闭并重启ADB进程`。',
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
@@ -54,6 +54,13 @@ winget install "Microsoft.VCRedist.2015+.x64" --override "/repair /passive /nore
|
||||
|
||||
由于 MAA 依赖的运行库和系统组件要求 Windows 10 及以上版本,MAA 不再支持 Windows 7 / 8 / 8.1 系统。
|
||||
|
||||
### 被 Windows Defender / 杀毒软件误报(PUA / 病毒)
|
||||
|
||||
- 请先确认下载来源可信,仅使用官网、GitHub Releases、Winget 或官方群文件;并确认下载的是完整安装包(如 `MAA-<版本>-win-x64.zip`)。
|
||||
- 自动化工具可能会触发部分杀毒软件的启发式检测,出现误报并不一定代表软件存在恶意行为。
|
||||
- 若确认来源可信,建议向对应安全厂商提交误报样本,等待其病毒库修正。
|
||||
- 在等待修正期间,可临时将 MAA 安装目录加入杀毒软件白名单;不建议直接关闭系统实时防护。
|
||||
|
||||
## 连接错误
|
||||
|
||||
### 确认 ADB 及连接地址正确
|
||||
|
||||
@@ -1145,10 +1145,10 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key,
|
||||
无效占位。枚举值:0。
|
||||
:::
|
||||
::: field name="MinitouchEnabled" type="boolean" optional
|
||||
已弃用。原为是否启用 minitouch;"1" 开,"0" 关。注意设备可能不支持。枚举值:1(已弃用)。
|
||||
已弃用。原为是否启用 Minitouch;"1" 开,"0" 关。注意设备可能不支持。枚举值:1(已弃用)。
|
||||
:::
|
||||
::: field name="TouchMode" type="string" optional default="minitouch"
|
||||
触控模式设置。可选值:minitouch | maatouch | adb。默认 minitouch。枚举值:2。
|
||||
触控模式设置。可选值:minitouch | maatouch | adb | MaaFwAdb。默认 minitouch。枚举值:2。
|
||||
:::
|
||||
::: field name="DeploymentWithPause" type="boolean" optional
|
||||
是否暂停下干员,同时影响抄作业、肉鸽、保全。可用值:"1" 或 "0"。枚举值:3。
|
||||
|
||||
@@ -78,7 +78,9 @@ icon: iconoir:developer
|
||||
- 按 F5 執行。
|
||||
|
||||
::: tip
|
||||
若需針對 Win32Controller(Windows 視窗控制)相關功能進行除錯,需要自行從 [MaaFramework Releases](https://github.com/MaaModular/MaaFramework/releases) 下載對應平台的壓縮檔案,將 `bin` 目錄中的 `MaaWin32ControlUnit.dll` 放到 MAA 的 DLL 同目錄下(例如 `build/bin/Debug`)。歡迎 PR 一個自動下載腳本!
|
||||
若需執行 Win32Controller(Windows 視窗控制)/ MaaFwAdbController(MaaFramework 觸控模式)相關功能,需要自行從 [MaaFramework Releases](https://github.com/MaaModular/MaaFramework/releases) 下載對應平台的壓縮檔案,將 `bin` 目錄中的 `MaaWin32ControlUnit.dll` / `MaaAdbControlUnit.dll` 放到 MAA 的 DLL 同目錄下(例如 `build/bin/Debug`)。歡迎 PR 一個自動下載腳本!
|
||||
|
||||
若需針對相關功能進行除錯,則需要自行編譯 MaaFramework 的 Debug 版本,使用對應的 DLL 檔案,否則在斷點除錯時會神秘閃退。
|
||||
:::
|
||||
|
||||
9. 到這裡,你就可以愉快地 ~~瞎雞巴改~~ 發電了
|
||||
|
||||
@@ -8,7 +8,7 @@ icon: teenyicons:linux-alt-solid
|
||||
**本教學需要讀者具備一定的 Linux 環境配置能力與程式設計基礎!** 若您僅希望直接安裝 MAA 而非自行編譯,請參閱[用戶手冊 - Linux 模擬器與容器](../manual/device/linux.md)。
|
||||
|
||||
::: info 注意
|
||||
MAA 的建置方法仍在討論中,本教學內容可能過時,請以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/.github/workflows/ci.yml#L134) 中的腳本為準。
|
||||
MAA 的建置方法仍在討論中,本教學內容可能過時,請以 [GitHub workflow file](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/dev-v2/.github/workflows/ci.yml#L224#:~:text=ubuntu%3A) 中的腳本為準。
|
||||
您也可以參考 [AUR PKGBUILD](https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=maa-assistant-arknights) 或 [nixpkgs](https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/by-name/ma/maa-assistant-arknights/package.nix)。
|
||||
:::
|
||||
|
||||
@@ -80,7 +80,7 @@ Mac 使用者可以使用 `tools/build_macos_universal.zsh` 腳本進行編譯
|
||||
cmake --install build --prefix <target_directory>
|
||||
```
|
||||
|
||||
4. 結束,您現在應該能在目錄下看到建置完成的檔案了。
|
||||
4. 若需針對 MaaFwAdbController(MaaFramework 觸控模式)相關功能進行除錯,需要[自行編譯 MaaFramework](https://maafw.com/docs/4.1-BuildGuide) 的 Debug 版本,將 `libMaaAdbControlUnit.so` 放到安裝目錄下。
|
||||
|
||||
::::
|
||||
|
||||
@@ -96,8 +96,6 @@ Mac 使用者可以使用 `tools/build_macos_universal.zsh` 腳本進行編譯
|
||||
|
||||
可參考 [CppSample](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/Cpp/main.cpp) 中的實作方式。
|
||||
|
||||
### C Sharp
|
||||
|
||||
<!-- Do not use C#, MD003/heading-style: Heading style [Expected: atx; Actual: atx_closed] -->
|
||||
### C\#
|
||||
|
||||
可參考 [MaaWpfGui](https://github.com/MaaAssistantArknights/MaaAssistantArknights/blob/master/src/MaaWpfGui/Main/AsstProxy.cs) 中的實作方式。
|
||||
|
||||
@@ -186,17 +186,28 @@ MAA 可以透過目前**正在執行中的單一模擬器**,自動偵測並填
|
||||
|
||||
3. `執行個體編號` 填寫雷電多開器內對應的模擬器序號(ID),主多開為 `0`。
|
||||
|
||||
### AVD 截圖增強模式
|
||||
|
||||
需使用 Android Emulator v27.2.9 及更新版本。(只要是方舟開服之後下載的就沒問題。)
|
||||
|
||||
AVD 截圖增強模式在 MaaFramework 中實現,必須選擇 MaaFramework 觸控模式才能啟用 AVD 截圖增強。
|
||||
|
||||
1. `設定` - `連線設定` - `連線配置` 選擇 `Android 虛擬裝置(AVD)`。
|
||||
|
||||
2. `觸控模式` 選擇 `MaaFramework`。
|
||||
|
||||
## 觸控模式
|
||||
|
||||
1. [Minitouch](https://github.com/DeviceFarmer/minitouch):基於 C 語言編寫的 Android 觸控事件驅動程式,透過操作 `evdev` 裝置,提供 Socket 介面供外部程式觸發觸控事件與手勢。自 Android 10 開始,若系統的 SELinux 為 `Enforcing`(強制)模式,Minitouch 將無法運作。<sup>[來源](https://github.com/DeviceFarmer/minitouch?tab=readme-ov-file#for-android-10-and-up)</sup>
|
||||
2. [MaaTouch](https://github.com/MaaAssistantArknights/MaaTouch):由 MAA 基於 Java 對 Minitouch 的重新實作,改用 Android 原生的 `InputDevice`介面,並加入額外特性。目前在高版本 Android 上的相容性仍待測試,~~幫我們做做測試~~。
|
||||
3. Adb Input:直接呼叫 ADB 執行 Android 內建的 `input` 指令來進行觸控操作。此方式的相容性最強,但執行速度最慢。
|
||||
4. [MaaFramework](https://maafw.com/):呼叫 MaaFramework 控制單元的螢幕截圖和觸控功能。可用性尚待測試。~~幫我們做做測試 x2~~
|
||||
|
||||
## ADB Lite
|
||||
|
||||
由 MAA 獨立實現的 ADB 用戶端,使用 TCP 直接與 ADB Server 通信。相較原版 ADB 可避免頻繁開啟 ADB 程序並減少效能開銷,但部分截圖方式不支援。<sup>[PR](https://github.com/MaaAssistantArknights/MaaAssistantArknights/pull/3315)</sup>
|
||||
|
||||
推薦開啟,但具體表現尚待回饋。~~幫我們做做測試 x2~~
|
||||
推薦開啟,但具體表現尚待回饋。~~幫我們做做測試 x3~~
|
||||
|
||||
## MAA 與模擬器多開
|
||||
|
||||
|
||||
@@ -121,6 +121,8 @@ MAA WPF GUI 當前可以透過 Wine 執行。MAA 已採用自包含部署方式
|
||||
|
||||
推薦配置:x86_64 的架構 (R - 30 - x86_64 - Android 11.0) 配合 MAA 的 Linux x64 動態函式庫
|
||||
|
||||
額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。
|
||||
|
||||
請注意:從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。
|
||||
|
||||
### ⚠️ [Genymotion](https://www.genymotion.com/)
|
||||
|
||||
@@ -35,11 +35,13 @@ icon: basil:apple-solid
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
支援,但從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。
|
||||
支援,且額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。
|
||||
|
||||
### ✅ [BlueStacks 藍疊模擬器 Air 版](https://www.bluestacks.com/mac) (免費,針對 Apple M 系列晶片進行優化的版本)
|
||||
從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。
|
||||
|
||||
支援,經測試,可用 maatouch 透過 `127.0.0.1:5555` 連線。
|
||||
### ✅ [BlueStacks Air](https://www.bluestacks.com/mac) (免費,針對 Apple M 系列晶片進行優化的版本)
|
||||
|
||||
支援,經測試,可用 MaaTouch 透過 `127.0.0.1:5555` 連線。
|
||||
|
||||
需要在模擬器 `設定` - `進階` 中打開 `Android 調試 (ADB)`。
|
||||
|
||||
@@ -61,8 +63,10 @@ icon: basil:apple-solid
|
||||
|
||||
完美支援。
|
||||
|
||||
補充:mac 下夜神模擬器的 ADB 執行檔路徑為 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb`,在父目錄 `MacOS` 下可使用 `adb devices` 指令查看 ADB 連接埠。
|
||||
補充:macOS 下夜神模擬器的 ADB 執行檔路徑為 `/Applications/NoxAppPlayer.app/Contents/MacOS/adb`,在父目錄 `MacOS` 下可使用 `adb devices` 指令查看 ADB 連接埠。
|
||||
|
||||
### ✅ [AVD](https://developer.android.com/studio/run/managing-avds)
|
||||
|
||||
支援,但從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。
|
||||
支援,且額外支援[截圖增強模式](../connection.md#avd-截圖增強模式)。
|
||||
|
||||
從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用。請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。
|
||||
|
||||
@@ -72,7 +72,7 @@ const partiallySupport = shuffleArray([
|
||||
{
|
||||
name: 'AVD',
|
||||
link: 'https://developer.android.com/studio/run/managing-avds',
|
||||
note: '理論支援。\n\n- 從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。\n- AVD 是為開發除錯而生的,更建議使用其他為遊戲設計的模擬器。',
|
||||
note: '理論支援,且額外支援[截圖增強模式](../connection.html#avd-截圖增強模式)。\n- 從 Android 10 開始,Minitouch 在 SELinux 為 `Enforcing` 模式時不再可用,請切換至其他觸控模式,或將 SELinux **臨時**切換為 `Permissive` 模式。\n- AVD 是為開發除錯而生的,更建議使用其他為遊戲設計的模擬器。',
|
||||
},
|
||||
{
|
||||
name: 'Google Play 遊戲(開發者版本)',
|
||||
|
||||
@@ -1145,10 +1145,10 @@ bool ASSTAPI AsstSetInstanceOption(AsstHandle handle, AsstInstanceOptionKey key,
|
||||
無效佔位。列舉值:0。
|
||||
:::
|
||||
::: field name="MinitouchEnabled" type="boolean" optional
|
||||
已棄用。原為是否啟用 `minitouch`;"1" 開,"0" 關。請注意設備可能不支援。列舉值:1(已棄用)。
|
||||
已棄用。原為是否啟用 Minitouch;"1" 開,"0" 關。請注意設備可能不支援。列舉值:1(已棄用)。
|
||||
:::
|
||||
::: field name="TouchMode" type="string" optional default="minitouch"
|
||||
觸控模式設定。可選值:`minitouch` | `maatouch` | `adb`。預設為 `minitouch`。列舉值:2。
|
||||
觸控模式設定。可選值:minitouch | maatouch | adb | MaaFwAdb。預設為 minitouch。列舉值:2。
|
||||
:::
|
||||
::: field name="DeploymentWithPause" type="boolean" optional
|
||||
是否暫停下幹員,同時影響抄作業、肉鴿、保全派駐。可用值:"1" 或 "0"。列舉值:3。
|
||||
|
||||
1
src/MAAUnified
Submodule
1
src/MAAUnified
Submodule
Submodule src/MAAUnified added at 2544c5eeaf
@@ -1,5 +1,6 @@
|
||||
#include "MaaFwAdbController.h"
|
||||
|
||||
#include <numeric>
|
||||
#include <thread>
|
||||
|
||||
#include "Common/AsstMsg.h"
|
||||
@@ -184,15 +185,78 @@ const std::string& MaaFwAdbController::get_uuid() const
|
||||
|
||||
bool MaaFwAdbController::screencap(cv::Mat& image_payload, bool allow_reconnect [[maybe_unused]])
|
||||
{
|
||||
using namespace std::chrono;
|
||||
LogTraceFunction;
|
||||
if (!m_unit_handle) {
|
||||
LogWarn << "MaaAdbControlUnit is not initialized";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_unit_handle->screencap(image_payload)) {
|
||||
LogWarn << "MaaAdbControlUnit screencap failed";
|
||||
return false;
|
||||
if (!m_tested_screencap) {
|
||||
image_payload = cv::Mat(); // 清空缓存
|
||||
Log.info("Test MaaAdbControlUnit screencap cost");
|
||||
auto min_cost = milliseconds(LLONG_MAX);
|
||||
auto start_time = steady_clock::now();
|
||||
|
||||
if (!m_unit_handle->screencap(image_payload)) {
|
||||
LogWarn << "MaaAdbControlUnit screencap failed";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_tested_screencap = true;
|
||||
auto duration = duration_cast<milliseconds>(steady_clock::now() - start_time);
|
||||
if (duration < min_cost) {
|
||||
min_cost = duration;
|
||||
}
|
||||
Log.info("MaaAdbControlUnit screencap cost", duration.count(), "ms");
|
||||
json::value info = json::object {
|
||||
{ "uuid", m_uuid },
|
||||
{ "what", "FastestWayToScreencap" },
|
||||
{ "details",
|
||||
json::object {
|
||||
{ "method", "MaaAdbControlUnit" },
|
||||
{ "cost", min_cost.count() },
|
||||
} },
|
||||
};
|
||||
callback(AsstMsg::ConnectionInfo, info);
|
||||
}
|
||||
else {
|
||||
auto start_time = steady_clock::now();
|
||||
bool screencap_ret = (m_unit_handle->screencap(image_payload));
|
||||
auto duration = duration_cast<milliseconds>(steady_clock::now() - start_time);
|
||||
m_screencap_cost.emplace_back(screencap_ret ? duration.count() : -1); // 记录截图耗时
|
||||
++m_screencap_times;
|
||||
|
||||
if (m_screencap_cost.size() > 30) {
|
||||
m_screencap_cost.pop_front();
|
||||
}
|
||||
if (m_screencap_times > 9) { // 每 10 次截图计算一次平均耗时
|
||||
m_screencap_times = 0;
|
||||
auto filtered_cost = m_screencap_cost | std::views::filter([](auto num) { return num > 0; });
|
||||
if (filtered_cost.empty()) {
|
||||
return screencap_ret;
|
||||
}
|
||||
// 过滤后的有效截图用时次数
|
||||
auto filtered_count = m_screencap_cost.size() - std::ranges::count(m_screencap_cost, -1);
|
||||
auto [screencap_cost_min, screencap_cost_max] = std::ranges::minmax(filtered_cost);
|
||||
json::value info = json::object {
|
||||
{ "uuid", m_uuid },
|
||||
{ "what", "ScreencapCost" },
|
||||
{ "details",
|
||||
json::object {
|
||||
{ "min", screencap_cost_min },
|
||||
{ "max", screencap_cost_max },
|
||||
{ "avg",
|
||||
filtered_count > 0
|
||||
? std::accumulate(filtered_cost.begin(), filtered_cost.end(), 0ll) / filtered_count
|
||||
: -1 },
|
||||
} },
|
||||
};
|
||||
if (m_screencap_cost.size() > filtered_count) {
|
||||
info["details"]["fault_times"] = m_screencap_cost.size() - filtered_count;
|
||||
}
|
||||
callback(AsstMsg::ConnectionInfo, info);
|
||||
}
|
||||
}
|
||||
|
||||
if (m_screen_size.first == 0) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <deque>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
@@ -58,11 +59,16 @@ public:
|
||||
|
||||
virtual std::pair<int, int> get_screen_res() const noexcept override;
|
||||
|
||||
private:
|
||||
protected:
|
||||
bool m_inited = false;
|
||||
std::string m_uuid;
|
||||
std::pair<int, int> m_screen_size = { 0, 0 };
|
||||
long long m_last_command_duration = 0; // 上次命令执行用时
|
||||
std::deque<long long> m_screencap_cost; // 截图用时
|
||||
int m_screencap_times = 0; // 截图次数
|
||||
bool m_tested_screencap = false;
|
||||
|
||||
private:
|
||||
MaaFwAdbControlUnitAPI* m_unit_handle = nullptr;
|
||||
bool init_library();
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class RoguelikeSettingsUserControlModel : TaskSettingsViewModel, Roguelik
|
||||
{
|
||||
var roguelikeMode = RoguelikeMode;
|
||||
|
||||
var baseList = new List<ModeItem>
|
||||
var baseList = new List<GenericCombinedData<Mode>>
|
||||
{
|
||||
new() { Display = LocalizationHelper.GetString("RoguelikeStrategyExp"), Value = Mode.Exp },
|
||||
new() { Display = LocalizationHelper.GetString("RoguelikeStrategyGold"), Value = Mode.Investment },
|
||||
@@ -129,7 +129,7 @@ public class RoguelikeSettingsUserControlModel : TaskSettingsViewModel, Roguelik
|
||||
break;
|
||||
}
|
||||
|
||||
RoguelikeModeList = baseList;
|
||||
RoguelikeModeList = new ObservableCollection<GenericCombinedData<Mode>>(baseList);
|
||||
RoguelikeMode = RoguelikeModeList.Any(x => x.Value == roguelikeMode) ? roguelikeMode : RoguelikeModeList.First().Value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user