Ship the WeChat hot-update catalogs and the camp, TideWhale T2, UI atlas, and animation-lab work.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-10-24 18:04:41 +08:00
co-authored by Cursor
parent 6ebc9401ce
commit 45e62132c8
1432 changed files with 2971856 additions and 2798 deletions
+31
View File
@@ -0,0 +1,31 @@
"""Replay wasm-opt outside Unity build output, with an explicit worker limit."""
import argparse
import json
import os
from pathlib import Path
import re
import subprocess
import time
parser = argparse.ArgumentParser()
parser.add_argument("--cores", type=int, default=4)
args = parser.parse_args()
repo = Path(__file__).resolve().parent.parent
output = repo / "Tools/output/hybridclr_genall"
output.mkdir(parents=True, exist_ok=True)
editor_log = Path(os.environ["LOCALAPPDATA"]) / "Unity/Editor/Editor.log"
commands = re.findall(r"emcc: error: '(.*?)' failed", editor_log.read_text(encoding="utf-8", errors="replace"))
command = next(c for c in reversed(commands) if "wasm-opt" in c)
stem = "wasm_opt_cores_" + str(args.cores)
target = output / (stem + ".wasm")
command = re.sub(r" -o \S+", ' -o "' + target.as_posix() + '"', command)
environment = os.environ.copy()
environment["BINARYEN_CORES"] = str(args.cores)
started = time.monotonic()
result = subprocess.run(command, cwd=repo / "AIClient", env=environment, capture_output=True, timeout=240)
(output / (stem + ".log")).write_bytes(result.stdout + result.stderr)
report = {"cores": args.cores, "returncode": result.returncode,
"seconds": round(time.monotonic() - started, 3),
"outputBytes": target.stat().st_size if target.exists() else 0}
(output / (stem + ".json")).write_text(json.dumps(report, indent=2), encoding="utf-8")
print(json.dumps(report))