docs: 更新开发指南

This commit is contained in:
uye
2026-01-13 21:52:17 +08:00
parent 73badc0a67
commit 7369c28a1e
5 changed files with 65 additions and 36 deletions

View File

@@ -58,15 +58,24 @@ We've preset several different development environments for you to choose from:
```
5. Configure development environment
- Download and install `CMake`
- Download and install `Visual Studio 2026 Community`, selecting `Desktop development with C++` and `.NET Desktop Development` during installation.
6. Double-click `MAA.sln` to open the project in Visual Studio.
7. Configure Visual Studio settings
- Select `RelWithDebInfo` and `x64` in the top configuration bar (Skip for Release builds or ARM platforms)
- Right-click `MaaWpfGui` → Properties → Debug → Enable native debugging (This enables breakpoints in C++ Core)
6. Execute cmake project configuration
8. Now you're ready to happily ~~mess around~~ start developing!
9. Commit regularly with meaningful messages during development
```cmd
mkdir -p build
cmake -G "Visual Studio 18 2026" -B build -DBUILD_WPF_GUI=ON -DBUILD_DEBUG_DEMO=ON
```
7. Double-click `build/MAA.slnx` to open the project in Visual Studio.
8. Configure Visual Studio settings
- Select `Debug` and `x64` in the top configuration bar
- Right-click `MaaWpfGui` - Set as Startup Project
- Press F5 to run
9. Now you're ready to happily ~~mess around~~ start developing!
10. Commit regularly with meaningful messages during development
If you're not familiar with git usage, you might want to create a new branch for changes instead of committing directly to `dev`:
```bash
@@ -76,14 +85,14 @@ We've preset several different development environments for you to choose from:
This keeps your changes isolated from upstream `dev` updates.
10. After development, push your local branch (e.g. `dev`) to your remote repository:
11. After development, push your local branch (e.g. `dev`) to your remote repository:
```bash
git push origin dev
```
11. Submit a Pull Request at the [MAA main repository](https://github.com/MaaAssistantArknights/MaaAssistantArknights). Ensure your changes are based on the `dev` branch, not `master`.
12. To sync upstream changes:
12. Submit a Pull Request at the [MAA main repository](https://github.com/MaaAssistantArknights/MaaAssistantArknights). Ensure your changes are based on the `dev` branch, not `master`.
13. To sync upstream changes:
1. Add upstream repository:
```bash
@@ -108,7 +117,7 @@ We've preset several different development environments for you to choose from:
git merge # merge
```
4. Repeat steps 7, 8, 9, 10.
4. Repeat steps 8, 9, 10, 11.
::: tip
After opening Visual Studio, Git operations can be performed using VS's built-in "Git Changes" instead of command-line tools.

View File

@@ -64,15 +64,24 @@ icon: iconoir:developer
```
5. 開発環境の設定
- `CMake` をダウンロードしてインストール
- `Visual Studio 2026 Community` をインストール時、`C++ によるデスクトップ開発` と `.NET デスクトップ開発` を選択必須
6. `MAA.sln` をダブルクリックで開き、Visual Studio にプロジェクトを自動ロード
7. VS の設定
- 上部設定バーで `RelWithDebInfo` `x64` を選択Release ビルド/ARM プラットフォームの場合は不要)
- `MaaWpfGui` 右クリック → プロパティ → デバッグ → ネイティブデバッグを有効化C++ Core へのブレークポイント設定可能)
6. cmake プロジェクト設定を実行
8. これで自由に ~~改造~~ 開発を始められます
9. 一定量の変更ごにコミット(メッセージ記入必須)
```cmd
mkdir -p build
cmake -G "Visual Studio 18 2026" -B build -DBUILD_WPF_GUI=ON -DBUILD_DEBUG_DEMO=ON
```
7. `build/MAA.slnx` をダブルクリックで開き、Visual Studio にプロジェクトを自動ロード
8. VS の設定
- 上部設定バーで `Debug` `x64` を選択
- `MaaWpfGui` 右クリック → スタートアップ プロジェクトに設定
- F5 キーを押して実行
9. これで自由に ~~改造~~ 開発を始められます
10. 一定量の変更ごにコミット(メッセージ記入必須)
Git 未経験者は dev ブランチ直接変更ではなく新規ブランチ作成推奨:
```bash
@@ -82,14 +91,14 @@ icon: iconoir:developer
これで dev の更新影響を受けずに開発可能
10. 開発完了後、変更をリモートリポジトリへプッシュ:
11. 開発完了後、変更をリモートリポジトリへプッシュ:
```bash
git push origin dev
```
11. [MAA メインリポジトリ](https://github.com/MaaAssistantArknights/MaaAssistantArknights) で Pull Request を提出master ではなく dev ブランチを指定)
12. 上流リポジトリの更新を同期する場合:
12. [MAA メインリポジトリ](https://github.com/MaaAssistantArknights/MaaAssistantArknights) で Pull Request を提出master ではなく dev ブランチを指定)
13. 上流リポジトリの更新を同期する場合:
1. 上流リポジトリを追加:
```bash
@@ -114,7 +123,7 @@ icon: iconoir:developer
git merge
```
4. ステップ7、8、9、10 を繰り返し
4. ステップ8、9、10、11 を繰り返し
::: tip
Visual Studio 起動後、Git 操作は「Git 変更」画面からコマンドライン不要で可能

View File

@@ -63,6 +63,7 @@ icon: iconoir:developer
```
5. 개발 환경 구성
- `CMake` 다운로드 및 설치
- Visual Studio 2026 Community 설치 시 `C++ 데스크톱 개발` 및 `.NET 데스크톱 개발` 필수 선택
6. cmake 프로젝트 구성 실행
@@ -72,10 +73,11 @@ icon: iconoir:developer
cmake -G "Visual Studio 18 2026" -B build -DBUILD_WPF_GUI=ON -DBUILD_DEBUG_DEMO=ON
```
7. `build/MAA.sln` 파일을 더블 클릭하여 엽니다. Visual Studio가 자동으로 전체 프로젝트를 로드합니다.
7. `build/MAA.slnx` 파일을 더블 클릭하여 엽니다. Visual Studio가 자동으로 전체 프로젝트를 로드합니다.
8. VS 설정
- 상단 구성에서 RelWithDebInfo x64 선택 (릴리스 빌드/ARM 플랫폼 시 생략)
- MaaWpfGui 우클릭 → 속성 → 디버그 → 네이티브 디버깅 활성화 (C++ 코어 중단점 사용 가능)
- 상단 구성에서 `Debug` `x64` 선택
- `MaaWpfGui` 우클릭 → 시작 프로젝트로 설정
- F5 키를 눌러 실행
9. 이제 자유롭게 ~~개조~~ 개발 시작!
10. 주기적 커밋 (메시지 필수 작성)
@@ -120,7 +122,7 @@ icon: iconoir:developer
git merge
```
4. 단계 7, 8, 9, 10 반복 수행
4. 단계 8, 9, 10, 11 반복 수행
::: tip
Visual Studio 실행 시 Git 작업은 "Git 변경" 탭에서 명령어 없이 처리 가능

View File

@@ -68,7 +68,7 @@ icon: iconoir:developer
cmake -G "Visual Studio 18 2026" -B build -DBUILD_WPF_GUI=ON -DBUILD_DEBUG_DEMO=ON
```
7. 双击打开 `build/MAA.sln` 文件Visual Studio 会自动加载整个项目。
7. 双击打开 `build/MAA.slnx` 文件Visual Studio 会自动加载整个项目。
8. 设置 VS
- VS 上方配置选择 `Debug` `x64`
- 右键 `MaaWpfGui` - 设为启动项目
@@ -117,7 +117,7 @@ icon: iconoir:developer
git merge # 合并
```
4. 重复上述 7, 8, 9, 10 中的操作
4. 重复上述 8, 9, 10, 11 中的操作
::: tip
在打开 VS 之后,和 Git 有关的操作可以不用命令行工具,直接使用 VS 自带的“Git 更改”即可

View File

@@ -58,15 +58,24 @@ icon: iconoir:developer
```
5. 配置編程環境
- 下載並安裝 `CMake`
- 下載並安裝 `Visual Studio 2026 Community`, 安裝的時候需要選中 `基於 C++ 的桌面開發` 和 `.NET 桌面開發`。
6. 雙擊打開 `MAA.sln` 文件Visual Studio 會自動載入整個項目。
7. 設置 VS
- VS 上方配置選擇 `RelWithDebInfo` `x64` (如果編譯 Release 包 或 ARM 平台,請忽略這步)
- 右鍵 `MaaWpfGui` - 屬性 - 除錯 - 啟用本地除錯(這樣就能把斷點掛到 C++ Core 那邊了)
6. 執行 cmake 項目配置
8. 到這裡,你就可以愉快地 ~~瞎 JB 改~~ 發電了
9. 開發過程中,每一定數量,記得提交一個 Commit, 別忘了寫上 Message
```cmd
mkdir -p build
cmake -G "Visual Studio 18 2026" -B build -DBUILD_WPF_GUI=ON -DBUILD_DEBUG_DEMO=ON
```
7. 雙擊打開 `build/MAA.slnx` 文件Visual Studio 會自動載入整個項目。
8. 設置 VS
- VS 上方配置選擇 `Debug` `x64`
- 右鍵 `MaaWpfGui` - 設為啟動項目
- 按 F5 運行
9. 到這裡,你就可以愉快地 ~~瞎 JB 改~~ 發電了
10. 開發過程中,每一定數量,記得提交一個 Commit, 別忘了寫上 Message
假如你不熟悉 git 的使用,你可能想要新建一個分支進行更改,而不是直接提交在 `dev` 上
```bash
@@ -76,14 +85,14 @@ icon: iconoir:developer
這樣你的提交就能在新的分支上生長,不會受到 `dev` 更新的打擾
10. 完成開發後,推送你修改過的本地分支(以 `dev` 為例到遠程Fork 的倉庫)
11. 完成開發後,推送你修改過的本地分支(以 `dev` 為例到遠程Fork 的倉庫)
```bash
git push origin dev
```
11. 打開 [MAA 主倉庫](https://github.com/MaaAssistantArknights/MaaAssistantArknights)。提交一個 Pull Request等待管理員通過。別忘了你是在 dev 分支上修改,別提交到 master 分支去了
12. 當 MAA 原倉庫出現更改(別人做的),你可能需要把這些更改同步到你的分支
12. 打開 [MAA 主倉庫](https://github.com/MaaAssistantArknights/MaaAssistantArknights)。提交一個 Pull Request等待管理員通過。別忘了你是在 dev 分支上修改,別提交到 master 分支去了
13. 當 MAA 原倉庫出現更改(別人做的),你可能需要把這些更改同步到你的分支
1. 關聯 MAA 原倉庫
```bash
@@ -108,7 +117,7 @@ icon: iconoir:developer
git merge # 合併
```
4. 重複上述 7, 8, 9, 10 中的操作
4. 重複上述 8, 9, 10, 11 中的操作
::: tip
在打開 VS 之後,和 Git 有關的操作可以不用命令行工具,直接使用 VS 自帶的“Git 更改”即可