-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# How to build | ||
|
||
_Please note that you only need to read this chapter if you are ready to develop MaaFramework itself. If you only want to develop applications based on MaaFramework, please refer to [Quick Started](1.1-QuickStarted.md)._ | ||
|
||
## Local Development | ||
|
||
1. Download MaaDeps prebuilt | ||
|
||
```sh | ||
python3 tools/maadeps-download.py | ||
``` | ||
|
||
2. _(macOS only)_ Download fmt | ||
|
||
```sh | ||
sh tools/fetch-fmt.sh | ||
``` | ||
|
||
3. Configure cmake | ||
|
||
- Windows | ||
|
||
```bash | ||
cmake --preset "MSVC 2022" | ||
``` | ||
|
||
- Linux / macOS | ||
|
||
```bash | ||
cmake --preset "NinjaMulti" | ||
``` | ||
|
||
4. Build the project using cmake | ||
|
||
```bash | ||
cmake --build build --config Release | ||
cmake --install build --prefix install | ||
``` | ||
|
||
The generated binaries and related files are located in the `install` directory. | ||
|
||
For more details, refer to [Build CI](https://github.com/MaaAssistantArknights/MaaFramework/blob/main/.github/workflows/build.yml). | ||
|
||
## Online Development | ||
|
||
Use Codespaces (Dev Container) to set up the basic development environment with one click (Ninja, CMake, g++-13): | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=632024122) | ||
|
||
Then follow the steps in [Local Development](#local-development). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# 构建指南 | ||
|
||
_请留意,仅当您准备开发 MaaFramework 本身时,才需要阅读本章节内容。若您仅希望基于 MaaFramework 开发自己的应用,则请参考 [快速开始](1.1-快速开始.md)。_ | ||
|
||
## 本地开发 | ||
|
||
1. 下载 MaaDeps prebuilt | ||
|
||
```sh | ||
python3 tools/maadeps-download.py | ||
``` | ||
|
||
2. _(macOS only)_ 下载 fmt | ||
|
||
```sh | ||
sh tools/fetch-fmt.sh | ||
``` | ||
|
||
3. 配置 cmake | ||
|
||
- Windows | ||
|
||
```bash | ||
cmake --preset "MSVC 2022" | ||
``` | ||
|
||
- Linux / macOS | ||
|
||
```bash | ||
cmake --preset "NinjaMulti" | ||
``` | ||
|
||
4. 使用 cmake 构建工程 | ||
|
||
```bash | ||
cmake --build build --config Release | ||
cmake --install build --prefix install | ||
``` | ||
|
||
生成的二进制及相关文件在 `install` 目录下。 | ||
|
||
详情请参考 [Build CI](https://github.com/MaaAssistantArknights/MaaFramework/blob/main/.github/workflows/build.yml). | ||
|
||
## 在线开发 | ||
|
||
使用 Codespaces (Dev Container) 一键配置基础开发环境 (Ninja、Cmake、g++-13): | ||
|
||
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=master&repo=632024122) | ||
|
||
随后按照 [本地开发](#本地开发) 流程进行配置。 |