跳到正文
cccskills
免费在 GitHub 公开

godot-wechat-minigame-adapter

Apply the bundled self-contained Godot WeChat Mini Game adapter kit to an official Godot checkout. Use when the user wants to port official Godot to WeChat Mini Game, refresh a nearby 4.6-based port, or inspect the shipped patch/source bundle for WXMEMFS, `wx.request`, audio cleanup, display/input, WXGLX dual-path rendering, `.wasm.br`, and `wx.exitMiniProgram`. This skill is version-locked to the bundled upstream base and must not be described as a generic “Godot 4.x” patch dump.

中文简介正在准备中。当前显示原文说明。

实测评分 未实测

查看安装方法

包含的文件(43)

  • SKILL.md6.0 KB
  • agents/openai.yaml269 B
  • assets/min-runtime/godot-loader.js16.6 KB
  • assets/min-runtime/godot-sdk.js7.8 KB
  • patches/fixes/4.7-webgl-context/001-context-swap-control.patch4.2 KB
  • patches/fixes/4.7-webgl-context/README.md1.5 KB
  • patches/godot-4.6.2-rc-a16e481cf4/core/001-build-and-runtime-glue.patch12.4 KB
  • patches/godot-4.6.2-rc-a16e481cf4/core/002-native-audio-routing.patch6.3 KB
  • patches/godot-4.6.2-rc-a16e481cf4/core/003-wxglx-nine-patch-expansion.patch5.7 KB
  • patches/godot-4.6.2-rc-a16e481cf4/core/004-wxglx-nine-patch-runtime-scope.patch7.2 KB
  • patches/godot-4.6.2-rc-a16e481cf4/core/series.txt142 B
  • patches/godot-4.6.2-rc-a16e481cf4/manifest.json993 B
  • patches/godot-4.6.2-rc-a16e481cf4/optional/001-audio-worker.patch820 B
  • patches/godot-4.6.2-rc-a16e481cf4/optional/series.txt23 B
  • references/compatibility-matrix.md1.2 KB
  • references/migration-modules.md5.8 KB
  • references/recent-commit-deltas.md2.2 KB
  • references/runtime-shell.md3.8 KB
  • references/validation-checklist.md3.4 KB
  • references/wxglx-adaptation.md8.8 KB
  • scripts/apply_godot_patchset.py5.6 KB
  • scripts/compress_wasm.bat100 B
  • scripts/compress_wasm.sh91 B
  • scripts/godot_process.js5.3 KB
  • scripts/install_min_runtime.py1.1 KB
  • scripts/validate_template_runtime.js2.8 KB
  • sources/godot-4.6.2-rc-a16e481cf4/compress_wasm.bat237 B
  • sources/godot-4.6.2-rc-a16e481cf4/compress_wasm.sh215 B
  • sources/godot-4.6.2-rc-a16e481cf4/godot_process.js5.3 KB
  • sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/audio.worker.js6.6 KB
  • sources/godot-4.6.2-rc-a16e481cf4/optional/platform/web/js/libs/lib.wx.api.d.ts516.7 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_blob.js27.1 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_audio.js88.8 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_crypto.js116 B
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_display.js26.4 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_fetch.js8.9 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_fs.js29.4 KB
  • sources/godot-4.6.2-rc-a16e481cf4/platform/web/js/libs/library_godot_input.js23.2 KB
  • tests/test_godot_process_commit_frame.js2.6 KB
  • tests/test_min_runtime_loader.js3.8 KB
  • tests/test_template_glx_config.js1.3 KB
  • tests/test_wechat_audio_context_source_reuse.js3.9 KB
  • tests/test_wxglx_nine_patch_patch.js2.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Godot WeChat Minigame Adapter

This skill is an open-source, self-contained adapter kit. It must work from:

  • an official Godot checkout at the bundled base commit
  • this skill directory

Do not rely on any private donor repo. If the target repo is not aligned to the bundled base, say that clearly and switch to a delta-refresh workflow instead of claiming drop-in support.

Supported Base

  • Primary supported upstream: origin/4.6 at commit a16e481cf424f8e39dc2cdea1a6bdc1e309acdc1
  • Public bundle id: godot-4.6.2-rc-a16e481cf4

Read references/compatibility-matrix.md before editing if the target is not exactly on that base.

Start Mode

Pick one mode before editing:

  1. Exact-base apply

    • Recommended.
    • The target repo is an official Godot checkout at a16e481cf424f8e39dc2cdea1a6bdc1e309acdc1.
    • Run the bundled apply script first.
  2. Near-base refresh

    • The target repo is close to the bundled base, but not exact.
    • Use the bundled sources and patches as the public source of truth.
    • Expect manual conflict resolution and replay only after checking references/recent-commit-deltas.md.

Hard Rules

  • Treat patches/ and sources/ in this skill as the authoritative public package.
  • Apply core first. Optional modules come later.
  • Do not pull missing code from C:\toolkit\godot4-custom or any other machine-local repo.
  • Do not describe this skill as “supports all Godot 4.x” or “works on any 4.6 build” unless you actually verified that target.
  • Keep donor-only features out of the default public path.
  • Do not infer WXGLX capability from godot-loader.js. The engine must be built with the GLX library and engine-side integration before the loader may select wxwebgl2.
  • Pin one rendering mode before the first canvas context is created. Never switch between WXGLX and standard WebGL during a running session.

Workflow

1. Verify the Target

  • Confirm the repo root and current commit:
    git rev-parse HEAD
    git status --short
    
  • If the target is on the supported base, use exact-base apply.
  • If not, state the mismatch and read references/compatibility-matrix.md.

2. Apply the Public Bundle

Run from anywhere:

python <skill-dir>\scripts\apply_godot_patchset.py <target-repo>

Useful flags:

  • --include-optional audio-worker
  • --include-optional dev-types
  • --allow-base-mismatch
  • --allow-dirty

The script copies the bundled public source files, then applies the bundled patch series.

3. Vendor the Runtime Shell

If the downstream minigame host project still expects the old external SDK globals:

python <skill-dir>\scripts\install_min_runtime.py <dest-dir>

Then load:

  1. godot-sdk.js
  2. godot-loader.js
  3. generated godot.js

4. Build and Package

Run from the target Godot repo root:

scons platform=web target=template_release threads=no wasm_simd=no
node <skill-dir>\scripts\godot_process.js
cmd /c <skill-dir>\scripts\compress_wasm.bat

For a forward-ported source tree that already contains the complete WXGLX engine integration described in references/wxglx-adaptation.md:

scons platform=web target=template_release threads=no wasm_simd=no use_wx_glx=yes
cmd /c <skill-dir>\scripts\compress_wasm.bat

Do not add use_wx_glx=yes to the version-locked 4.6 bundle unless its manifest also ships the GLX static library and every engine-side integration point.

On Unix-like shells:

sh <skill-dir>/scripts/compress_wasm.sh

5. Validate

  • Read references/validation-checklist.md.
  • For WXGLX-capable builds, also read and run the dual-path checks in references/wxglx-adaptation.md.
  • Do not call the port complete until the runtime shell, WXMEMFS persistence, large fetches, audio replay, display/input, and exit path all pass.

Package Layout

  • patches/godot-4.6.2-rc-a16e481cf4/
    • Version-locked patch bundle for the supported upstream base.
  • sources/godot-4.6.2-rc-a16e481cf4/
    • Public source files copied into the target repo before patch application.
  • assets/min-runtime/
    • Minimal replacement for the old external godot-minigame-sdk.

Read references/migration-modules.md for the exact core vs optional module split.

References

  • references/compatibility-matrix.md
    • Supported base, near-base policy, and intentionally excluded donor features.
  • references/migration-modules.md
    • Public package map: which files are shipped as source, which ship as patch, and which are optional.
  • references/recent-commit-deltas.md
    • Recent deltas already baked into the bundled base, plus what to replay when moving forward from it.
  • references/runtime-shell.md
    • The minimal runtime shell contract for godot-sdk.js and godot-loader.js.
  • references/wxglx-adaptation.md
    • Complete WXGLX build integration, startup mode pinning, standard-WebGL fallback, frame presentation, packaging, and regression checks.
  • references/validation-checklist.md
    • Build, packaging, and smoke-test gates.

Output Standard

When using this skill on a real repo, always leave behind:

  • the exact upstream commit or mismatch you worked against
  • the apply command you ran
  • which optional modules were included, if any
  • the exact validation steps run
  • any patch rejects or manual conflict resolutions
  • any intentionally skipped donor features that remain out of scope
  • whether the output is standard-WebGL-only or WXGLX-capable, and which startup mode was tested

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

报告此技能的问题