Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
CONTRIBUTING: when a PR merges and how patches are numbered
v0lumehib59ef67cdf13
diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.mdindex d02be12c..3b29444d 100644--- a/.github/copilot-instructions.md+++ b/.github/copilot-instructions.md@@ -5,7 +5,7 @@ Read [AGENTS.md](../AGENTS.md) (the fork's, at the root) and [CONTRIBUTING.md](.- `frontend/` and `frontend-qt/` are this fork's own: change them directly. `cd frontend && swift test` is the check.- The engine (`dm/`, `scripts/`, `docs/`, `ref/`) is not in this repository: it is seedds/nxnative at `.upstream-ref` plus `patches/`, built into `engine/` by `python3 tools/engine.py sync`. Do not add files under those paths in a PR (the `pr-scope` check fails it). A change to the engine is a pull request to seedds/nxnative first, and a patch in `patches/` (a commit in `engine/`, then `python3 tools/engine.py export`) only while the fork has to carry it.- Never touch the shader translation chain (`dm/gfx/tools/dmsh_*`, `dm/gfx/nvn/dmsh_chain.h`, `dmsh_chain.lock`, the translator).-- A feature PR waits 48 hours for the owner before it merges. Releases (version bumps, tags, update-history rows) are the owner's.+- A fix merges when CI is green and no review objection is open (changes requested or an unanswered review comment). Only the owner overrides an objection. A feature PR waits 48 hours for the owner before it merges. Whoever merges a patch renumbers it from `patches/series` on `main`, so do not rebase to chase free numbers. Releases (version bumps, tags, update-history rows) are the owner's.- No AI attribution anywhere: no "Generated with", no `Co-Authored-By` for a tool, in commits, PRs or issues.- Never attach or commit keys, game files or anything extracted from a game.- You work on a Linux runner and cannot build or run the macOS app. The macOS jobs of `tests.yml` are the check: do not claim a Swift or Metal change works until they are green.diff --git a/.github/pull_request_template.md b/.github/pull_request_template.mdindex 8190995d..2f42b502 100644--- a/.github/pull_request_template.md+++ b/.github/pull_request_template.md@@ -2,7 +2,7 @@## Fix or feature-<!-- Tick one. A fix merges once CI is green, a feature after 48 hours. Maintainers label it `bug` or `enhancement`. -->+<!-- Tick one. A fix merges when CI is green and no review objection is open, a feature after 48 hours. A patch is renumbered at merge. Maintainers label it `bug` or `enhancement`. -->- [ ] Fix- [ ] Featurediff --git a/AGENTS.md b/AGENTS.mdindex eb1d4682..8f09d257 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -7,6 +7,6 @@ This is the fork's guide. The engine has its own, upstream's: [engine/AGENTS.md]- **Here first, upstream in parallel.** A fix to the engine, to a game profile or to upstream's docs may land here first, as a patch. The same change goes to seedds/nxnative as a pull request in parallel, from a branch off their main (`git -C engine fetch seedds`, `engine/` has the remote). If you cannot open that pull request, a maintainer sends it. A patch here is a bridge until upstream has it, and the next bump drops it once the change is in. [patches/README.md](patches/README.md#here-first-upstream-in-parallel) has the rule and the `Upstream-Status` values.- **How a commit in `engine/` becomes a patch.** Work in `engine/` (it holds upstream's tree with our patches as commits on top): change, test, commit with a message that says what and why. `python3 tools/engine.py export` turns the commits made since the last sync into `patches/NNNN-*.patch` with the header `Upstream-Status`, `Reason` and `Issue` (fill them in, `--status`, `--reason` and `--issue` set them) and adds them to `patches/series`. `python3 tools/engine.py check` must pass (headers, no patch on the shader chain, the series applies to the pin). The same commit goes to seedds/nxnative as a pull request in parallel. The patch says `pending` until that pull request is open, then `forwarded seedds/nxnative#<n>`. Commit `patches/` in a PR here. `sync` never throws away work in `engine/`: it stops and names `export`.- **Never add engine files to this repository.** Files under `dm/`, `scripts/`, `docs/` and `ref/` at the root are ignored by `.gitignore`, and the `pr-scope` check fails a PR that adds them. A direct edit of engine files is lost on the next sync.-- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: a fix merges once CI is green, a feature after 48 hours, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game.+- **Issues and pull requests.** Follow [CONTRIBUTING.md](CONTRIBUTING.md), section "For AI agents and other tools", and the forms and the PR template in `.github/`. Fix or feature: a fix merges when CI is green and no review objection is open (Andy can override one), a feature after 48 hours, a patch is renumbered by whoever merges it, releases and version bumps are the owner's. No AI attribution in commits, PRs or issues. Never attach or commit keys, game files or data extracted from a game.- **Checks.** `cd frontend && swift build && swift test` for the Mac launcher (its tests read `engine/`, so sync first), `python3 -m unittest discover -s frontend-qt/tests` for the Qt front end (and `python3 frontend-qt/gen_localization.py` leaves `frontend-qt/nspb_qt/localization.py` unchanged), `python3 -m unittest discover tools/tests` for the tools. The engine's own tests run in `engine/` as `tests.yml` does.- **Language and text.** Everything is in English except the Chinese pages (`*.zh-CN.md`) and the launcher's strings. No semicolons in UI strings, READMEs and docs.diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex a125bbde..25fed591 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -57,6 +57,16 @@ If the maintainers do not want a change, they say so early, explain why, and cloA PR that waits on its author for 30 days is closed with a note that it can be reopened.+### When a PR merges++This holds for every PR. A PR from outside also gets the check above.++A fix merges when CI is green and every review objection is resolved or overridden by Andy ([@LNPANDY](https://github.com/LNPANDY)). A review is not required. An open objection blocks the merge. That is a review with changes requested or a review comment nobody answered.++A feature merges after 48 hours.++A patch in `patches/` takes the next free number from `patches/series` on `main` at merge time. Whoever merges renumbers the patch and notes it in the PR. You do not need to rebase to chase free numbers.+## For AI agents and other toolsIssue forms and the PR template apply in the browser only. `gh issue create`, the API and MCP tools skip the forms, so follow them yourself:diff --git a/CONTRIBUTING.zh-CN.md b/CONTRIBUTING.zh-CN.mdindex 35d01bb8..abeefeb3 100644--- a/CONTRIBUTING.zh-CN.md+++ b/CONTRIBUTING.zh-CN.md@@ -34,3 +34,13 @@如果维护者不想要某项改动,会尽早说明,解释原因,并关闭该 PR。他们可以保留其中一部分,并把你列为共同作者。PR 如果等待作者回复满 30 天,会被关闭,并附一条说明,之后可以重新打开。++### PR 何时合并++以下对所有 PR 都适用。来自外部的 PR 还要先经过上面的检查。++修复在 CI 通过、且所有审查异议都已解决或被 Andy([@LNPANDY](https://github.com/LNPANDY))明确推翻后合并。审查不是必需的。未解决的异议会阻止合并,也就是要求修改的审查,或没人回复的审查评论。++功能在 48 小时后合并。++`patches/` 中的补丁在合并时取 `main` 上 `patches/series` 的下一个空闲编号。执行合并的人负责重新编号,并在 PR 中注明。你不需要为了追空闲编号而反复 rebase。diff --git a/patches/README.md b/patches/README.mdindex 1093309b..4476e9d9 100644--- a/patches/README.md+++ b/patches/README.md@@ -71,7 +71,8 @@ the system's temporary folder. `dm/fork_patches.txt` is generated by `sync` insi2. `python3 tools/engine.py export` writes `patches/NNNN-<subject>.patch` for each commit made since the last sync, adds it to`series`, and puts the header template into the message (`Upstream-Status: pending`, `Reason: TODO`, `Issue: TODO`, which`--status`, `--reason` and `--issue` set). Fill the three lines in. `export HEAD~2..HEAD` or `export <commit>` names the commits.- Rename the file if you want a shorter name, because the name is what `fork_patches.txt` and `status` show.+ Rename the file if you want a shorter name, because the name is what `fork_patches.txt` and `status` show. The number is a placeholder:+ whoever merges the pull request renumbers the patch to the next free number in `series` on `main` and says so in the PR.3. `python3 tools/engine.py check` must pass. Commit `patches/` (and nothing from `engine/`) in a pull request here. The next `sync`rebuilds `engine/` from the series, and keeps your commits on a backup branch.4. Send the same change to seedds/nxnative as a pull request from a branch off *their* main (`git -C engine fetch seedds`,