Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Code owners list only the high-risk paths: the release and the checks themselves. GitHub asks the owner to review
# a pull request that touches one of them. Everything else is merged once CI is green. How pull requests are
# reviewed and merged: https://github.com/ModAVD/ModAVD/blob/main/CONTRIBUTING.en.md
# 只列高风险路径:动了这些路径的 PR,GitHub 会自动请负责人审查;其余的 CI 绿了就能合。
# 流程见 https://github.com/ModAVD/ModAVD/blob/main/CONTRIBUTING.md

# Workflows and their permissions (one of them builds the release), Dependabot, this file
/.github/ @qiyinxi

# The CI gate, the privacy scan and its allowlist
/scripts/repo_checks.py @qiyinxi
/scripts/privacy.py @qiyinxi
/scripts/privacy-allowlist.json @qiyinxi

# Release checksums
/release/ @qiyinxi
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!--
中文或英文都可以。PR 怎么审、怎么合:https://modavd.github.io/develop/#review-and-merge
Write in Chinese or English. How pull requests are reviewed and merged: https://modavd.github.io/en/develop/#review-and-merge
-->

## 改了什么 / What changed



## 怎么验证的 / How it was verified

<!--
实际跑过的检查、条件和结果;没测的照实写。用了 AI 工具的,写它实际跑过什么。
The checks you actually ran, the conditions and the results; say plainly what was not tested. If an AI tool was used, say what it actually ran.
-->



## 核对 / Checklist

- [ ] 用户看得见的改动带了 `changelog.d/<名字>.<feat|fix|change|remove>.md`(只动开发、测试、CI、文档的不用) / A change users can see comes with `changelog.d/<name>.<feat|fix|change|remove>.md` (not needed for development, tests, CI or docs)
- [ ] 中英成对的文档(`X.md`、`X.en.md`)两份都改了;只会一种语言的在上面说一声 / Both files of a Chinese / English pair (`X.md`, `X.en.md`) are changed; if you write only one of the languages, say so above

<!--
对应的 issue 写在下面这一行;没有就删掉。不写 Fixes / Closes:issue 在发版时关。
Name the issue on the line below, or delete the line if there is none. Do not write Fixes / Closes: issues are closed at release time.
-->
Refs ModAVD/ModAVD#
33 changes: 33 additions & 0 deletions CONTRIBUTING.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Contributing to ModAVDExtras

[简体中文](CONTRIBUTING.md) | **English**

For the general rules of the ModAVD organization, see [CONTRIBUTING.en.md of ModAVD](https://github.com/ModAVD/ModAVD/blob/main/CONTRIBUTING.en.md) and [Contributing](https://modavd.github.io/en/develop/) on the docs site. In short: open an issue to discuss first, open the PR from your own fork, use your GitHub noreply email for your commits, do not write `Co-authored-by`, and if you use an AI tool, have it test its own work and say so in the PR.

These are the rules of this repository.

## License boundary

- This library is LGPL-3.0-or-later and **only accepts code written for this project**.
- Do not put code from GPL or AGPL projects here, whether copied, rewritten or translated. MaaCore (MAA) is AGPL-3.0, so its code (for example `MumuExtras`, `MumuController`, `SwipeHelper`) can only stay in the adapter that goes to the MAA upstream and cannot come into this repository.
- When you need a reference, use a cleaner source: the AOSP emulator source (Apache-2.0), the public headers of Android and Linux, or write it yourself from the behavior. Say in the PR description what you referred to.
- Check this point specifically when reviewing a PR.

## Interface

- `include/modavd_extras.h` is the public promise: functions and fields are only added, never removed, and when you add one, increase `MODAVD_API_VERSION` by one. The `size` field at the start of a struct must not change.
- The library never falls back to adb by itself. On an error it returns an error code.
- The exports of the compatibility shell `shim/` must stay the same as now: only the four capture functions, and no input functions. `tests/test_shim.c` checks this.

## Tests

- When you change code, say in the PR what you ran: `build.ps1` (Windows) or CMake plus `ctest` (Linux, macOS).
- New features and bug fixes come with unit tests. The tests do not need an emulator. They use the fake shared memory in `tests/fake_frame.h`.
- Before you commit, break the code under test on purpose in one or two places, make sure the tests turn red, and put the result in the PR.
- Put tests on a ModAVD instance (capture latency, comparison with the old shell) in the PR: how many runs, what resolution, and the load at the time.

## Workflows

Pin third-party actions to a 40-character commit SHA. Do not use `pull_request_target` or self-hosted runners. A PR that changes a workflow is reviewed by someone else.

`scripts/privacy.py` is byte for byte the same as in the ModAVD main repository, and CI checks this. When you change the scanner, change ModAVD first and then sync it here unchanged. `privacy-allowlist.json` is still maintained in this repository.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 参与 ModAVDExtras

**简体中文** | [English](CONTRIBUTING.en.md)

ModAVD 组织的通用规矩见 [ModAVD 的 CONTRIBUTING.md](https://github.com/ModAVD/ModAVD/blob/main/CONTRIBUTING.md) 和文档站的[参与开发](https://modavd.github.io/develop/):先开 issue 商量,从自己的 fork 开 PR,署名用 GitHub 的 noreply 邮箱,不写 `Co-authored-by`,用 AI 工具要让它自己测过并在 PR 里写明。

下面是这个仓库自己的几条。
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ ModAVDExtras is a small C library that reads the screen of a [ModAVD](https://gi
- Status: Windows has used this capture code for over a month through the shell below; on Apple Silicon macOS a contributor tested capture with the official Emulator 37.2.13 and API 35 ARM64; Linux builds and passes the unit tests in CI but has not been tested with an emulator. From v0.1.2 the [releases](https://github.com/ModAVD/ModAVDExtras/releases) carry `modavd_extras.dll` (Windows x64), `libmodavd_extras.dylib` (macOS arm64) and `libmodavd_extras.so` (Linux x64), plus the Windows-only shell.
- Build: `build.ps1` on Windows (Visual Studio 2022 Build Tools, CMake, Ninja); CMake on Linux and macOS. The unit tests need no emulator.
- License: LGPL-3.0-or-later ([LICENSE](LICENSE), [COPYING](COPYING)). Only code written for this project goes in; code from GPL or AGPL projects such as MaaCore does not.
- Contributing: see [CONTRIBUTING.en.md](CONTRIBUTING.en.md).
4 changes: 2 additions & 2 deletions changelog.d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- **文件名**:`<名字>.<类型>.md`。名字用小写字母、数字、`-`、`_`,起一个不会和别的改动重复的(比如 issue 号加几个词:`210-resize-crash.fix.md`)。
- **类型**:`feat` 新增,`fix` 修复,`change` 变更,`remove` 移除。
- **内容**:只有一行,不超过 60 字,不能有 `--`。写用户会看到的结果,不写原因和实现,比如「调高分辨率后开机不再卡死退出」。
- **内容**:只有一行,不超过 60 字,不能有 `--`。写用户会看到的结果,不写原因和实现,比如「调高分辨率后开机不再卡死退出」。发版公告是中文的,这一行写中文;不会写中文就用英文写,在 PR 里说一声,由维护者在合并前改成中文。
- 想让公告指向 issue 而不是 PR,就自己在行尾写上,issue 都在 ModAVD 仓库,要写全称:`……不再卡死退出 (ModAVD/ModAVD#210)`;这样工具不再补 PR 编号。
- 只和开发、测试、CI、文档有关的 PR 不用加。
- 已经发过版的文件不要改内容、也不要重复用它的名字;以后的改动另起一个文件。
Expand All @@ -17,7 +17,7 @@ A change that users can see adds one file here, in the same pull request, with a

- **Name**: `<name>.<type>.md`, the name in lowercase letters, digits, `-`, `_`, and unique (for example the issue number and a few words: `210-resize-crash.fix.md`).
- **Type**: `feat` (新增), `fix` (修复), `change` (变更), `remove` (移除).
- **Content**: one line in Chinese, at most 60 characters, without `--`. Say what users will notice, not the cause or the implementation.
- **Content**: one line, at most 60 characters, without `--`. Say what users will notice, not the cause or the implementation, for example "Starting no longer hangs after raising the resolution". The release notes are in Chinese, so the line is in Chinese; if you do not write Chinese, write it in English and say so in the pull request, and the maintainer will put it into Chinese before merging.
- To point at an issue instead of the pull request, end the line with it yourself, in full: `…… (ModAVD/ModAVD#210)`.
- Pull requests that only touch development, tests, CI or documentation need no file.
- Do not edit or reuse a file that has already been released; a later change takes a new file.
Loading