Compare commits

...

3 Commits

Author SHA1 Message Date
kdletters ab9820990c 补充 Windows 构建节点 Python 安装口径
Project CI / AI game creator shell Rust shard 3/4 (push) Failing after 7m28s
Project CI / AI game creator shell Rust shard 4/4 (push) Failing after 7m55s
Project CI / AI game creator shell Rust shard 2/4 (push) Failing after 8m2s
Project CI / AI game creator shell Rust crates (push) Successful in 1m8s
Project CI / AI game creator shell Rust smoke (push) Successful in 2m21s
Project CI / AI game creator shell Rust shard 1/4 (push) Failing after 10m4s
Project CI / Frontend tests (push) Failing after 4m17s
Project CI / Repository checks (push) Successful in 4m21s
Project CI / Backend tests (push) Successful in 6m49s
Project CI / Native shell tests (push) Successful in 7m48s
Project CI / AI game creator shell web tests (push) Successful in 2m58s
- 排障记录写明新节点静默安装 Python 3 的确切命令,并说明 CMake 用 Build Tools 自带版本
2026-09-21 06:58:45 +08:00
kdletters 510e550f19 补充 Windows 构建节点修复的实跑证据
- Godot 编辑器插件接入文档记录 Jenkins Windows 节点在本修复分支上的 dry-run 实跑结果:preflight、原生载荷 staging、NSIS 安装包与渠道清单
2026-09-21 06:58:39 +08:00
kdletters 6dadd76c1b 修复 Windows AGC 构建节点的 Godot 原生扩展工具链
- AGC_WINDOWS_PATH 增加 Build Tools 自带 CMake 与 Python 3.12 目录,阶段 PATH 不再漏掉 Godot 原生扩展所需工具
- Toolchain preflight 校验 CMake 3.25 及以上、Python 3 和 Visual Studio 17 2022 生成器,缺失时在构建前失败关闭
- 同步 Godot 编辑器插件接入文档与共享记忆排障记录
2026-09-21 06:41:03 +08:00
3 changed files with 27 additions and 3 deletions
@@ -1,5 +1,9 @@
# 踩坑与排障记录
## Jenkins Windows 节点的 PATH 白名单决定 Godot 原生扩展能否构建
`Genarrative-Agc-Windows-Build` 在阶段里用 `AGC_WINDOWS_PATH` 整体替换 PATH、不继承节点机器的 PATH,所以 Godot C++ 引导需要的 CMake 与 Python 必须显式写进这份白名单,装在机器 PATH 上并不生效。2026-09-21 的 #97#99 连续失败都停在 `Get-Command cmake.exe`#93#96 是更早的手写 C ABI 在 MSVC C 模式下的对齐问题):节点只有 Visual Studio Build Tools`C:\BuildTools`)自带的 CMake 3.31,缺 Python 3。修复后白名单包含 `C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin``C:\Python312``C:\Python312\Scripts`preflight 校验 CMake ≥3.25、Python 3 和 Visual Studio 17 2022 生成器;把 `cmake.exe` 单独复制到别的目录会丢掉 `share/cmake-*/Modules`,不能替代加入安装目录。新节点的 Python 用 `python-3.12.10-amd64.exe /quiet InstallAllUsers=1 TargetDir=C:\Python312 PrependPath=1 Include_launcher=1 InstallLauncherAllUsers=1` 静默安装即可,CMake 不必另装。
## Tauri `--no-sign` 会连带跳过 updater 签名
AGC macOS 发布入口一度传入 `--no-sign`(目的是绕过没有 Apple 证书的代码签名),结果 Tauri 打印 `Warn Updater signing is skipped due to --no-sign flag.`,产物只有 `*.app.tar.gz` 而没有 `.sig`,发布入口按设计在「缺少更新包签名」处失败关闭(2026-09-20 首次 Jenkins 实跑命中)。正确做法是不传 `--no-sign`,改为剥离 `APPLE_*` 凭据让 Tauri 跳过 Apple 签名——minisign 更新包签名与 Apple 代码签名这两个开关在 Tauri 里并不独立。Apple 签名状态要按 `codesign -dv` 实测记录,不能硬编码。
@@ -34,6 +34,7 @@ DLL 原件随 AGC 安装包放在插件资源目录中;Godot Windows 加载器
## 分发与描述文件
- 原生引导使用官方 `godot-cpp` 的 C++ 类型和初始化接口,不自行声明 Variant 存储或直接装配 ABI 函数指针。绑定源码固定到 `godot-4.5-stable``e83fd0904c13356ed1d4c3d09f8bb9132bdc6b77`,以该版本的稳定 API 构建并在 Godot 4.7.2 验证;产品最低版本仍为 4.7,因为嵌入脚本使用该版本能力。Windows x64 构建使用 Visual Studio C++、CMake 和 Python,静态链接绑定及 C++ runtime,用户无需这些构建工具。
- Jenkins 的 `Genarrative-Agc-Windows-Build``AGC_WINDOWS_PATH` 整体替换阶段 PATH,因此 Godot 原生扩展所需的 CMake 与 Python 3 必须显式列入该白名单(当前为 Build Tools 自带的 `C:\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin``C:\Python312`);Toolchain preflight 校验 CMake ≥3.25、Python 3 和 Visual Studio 17 2022 生成器,缺失即失败关闭。
- 构建仅从已固定的官方归档获取绑定源码,并核对 SHA256;下载和生成内容只进入 `.build/`。CMake 构建包含引导源码、嵌入脚本、绑定版本/归档摘要和构建配置的身份指纹。许可证与来源继续随 DLL 分发,安装包不包含 SDK、源码缓存、生成绑定或构建工具。
- C++ 状态仅在扩展有效期间持有 GDScript 引用和桥节点身份;终止回调先停用仍存活的桥,再释放绑定对象,不能让静态 Godot 对象析构晚于绑定退出。延迟 bootstrap、原生卸载、Node 已退出及同 PID 重连均须实测。受管文件、会话身份、协议、执行回执与不确定阻断沿用现有合同。
- EDITOR 阶段晚加载不会取得 CORE 阶段终止回调;引导终止时须通过官方绑定接口解除 Node/GDScript 的实例包装回调,并完成单例包装清理。只移除 C++ 包装,不同步销毁仍在 GDScript 调用栈或等待 `queue_free` 的引擎对象;先用 Variant 保活脚本,再解除 Ref 和绑定,避免卸载 DLL 后跳到失效回调。
@@ -101,6 +102,7 @@ Windows x64、Godot 4.7.2 标准编辑器的本地实现验收通过。证据保
| 共享权限与前端 | `godot-web-final-tests.log`:28 项通过;Rust 命令权限契约通过,AGC typecheck 通过;Godot 命令继续使用默认 confirm |
| 现有宿主回归 | EditorAdapter、Unity、Runner 重启 fence 和缺失 endpoint 清理的定向测试通过;构建脚本、workspace、CI 路由和 rustfmt hook 定向测试通过 |
| 原生 GUI | `godot-plugin-verified-20260920/evidence/native-gui-smoke.log`:同一编辑器内返回 42/null、读取场景、增加节点后撤销、await、编译/运行错误、卸载、重连及再次卸载成功 |
| Jenkins Windows 节点 | 2026-09-21 在修复分支按 `Genarrative-Agc-Windows-Build` 等价流程实跑(dry-run):preflight 报告 `cmake=3.31.6-msvc6``python=3.12.10`Godot 原生载荷 staging 出 345600 字节 `agc_godot_editor.dll` 与元数据,NSIS `陶泥儿_0.1.88_x64-setup.exe`、签名、渠道清单和更新摘要全部生成 |
| 多实例与只读安装 | 同目录 `parallel-live-modules.json``parallel-verified-summary.json`:两个编辑器同时使用不同缓存路径的官方 `~DLL`,均返回 42、确认卸载,安装原件只读且未变 |
| 安装位置更新 | 同目录 `install-location-smoke.log`:旧连接卸载、新安装来源生成新代次和引用、返回 42、清理两代缓存;两个安装来源及原有工程文件均未变 |
| 真实 Runner | 同目录 `runner-smoke-psapi.log`standalone Runner 经正式执行/ACK 路径取得真实 Godot 回执,拒绝错误 ACK,接受正确 ACK,完成场景修改/撤销及断开;`runner-restart-before.log``runner-restart-after.log`:新 Runner 无需重新连接即可恢复原归属并清理旧桥 |
@@ -15,7 +15,7 @@ pipeline {
GENARRATIVE_NPM_VERSION = '10.9.7'
AGC_OSS_BUCKET = 'agc-dev'
AGC_OSS_ENDPOINT = 'oss-rg-china-mainland.aliyuncs.com'
AGC_WINDOWS_PATH = 'C:\\Tools\\Git\\cmd;C:\\Program Files\\nodejs;C:\\Program Files\\dotnet;C:\\Users\\Administrator\\.cargo\\bin;C:\\Tools\\ossutil;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\'
AGC_WINDOWS_PATH = 'C:\\Tools\\Git\\cmd;C:\\Program Files\\nodejs;C:\\Program Files\\dotnet;C:\\Users\\Administrator\\.cargo\\bin;C:\\Tools\\ossutil;C:\\BuildTools\\Common7\\IDE\\CommonExtensions\\Microsoft\\CMake\\CMake\\bin;C:\\Python312;C:\\Python312\\Scripts;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\'
}
parameters {
@@ -82,15 +82,31 @@ pipeline {
if ($actualNpm -ne $env:GENARRATIVE_NPM_VERSION) {
throw "npm 版本不匹配:期望 $($env:GENARRATIVE_NPM_VERSION),实际 $actualNpm"
}
foreach ($commandName in @('node', 'npm', 'rustc', 'cargo', 'dotnet')) {
foreach ($commandName in @('node', 'npm', 'rustc', 'cargo', 'dotnet', 'cmake', 'python')) {
if (-not (Get-Command $commandName -ErrorAction SilentlyContinue)) {
throw "Windows AGC 节点缺少 $commandName,请安装并加入 Jenkins Agent PATH。"
throw "Windows AGC 节点缺少 $commandName,请安装并加入 AGC_WINDOWS_PATH。"
}
}
$dotnetSdks = @(dotnet --list-sdks)
if ($LASTEXITCODE -ne 0 -or -not ($dotnetSdks -match '^10[.]')) {
throw 'Windows AGC 节点需要 .NET 10 SDK 才能构建 Unity Attach helper。'
}
$cmakeVersion = ((cmake --version) | Select-Object -First 1).Trim()
if ($cmakeVersion -notmatch '([0-9]+)[.]([0-9]+)[.]([0-9]+)') {
throw "无法解析 CMake 版本:$cmakeVersion"
}
$cmakeMajor = [int]$Matches[1]
$cmakeMinor = [int]$Matches[2]
if ($cmakeMajor -lt 3 -or ($cmakeMajor -eq 3 -and $cmakeMinor -lt 25)) {
throw "Godot 原生扩展需要 CMake 3.25 及以上,当前:$cmakeVersion"
}
if (-not (@(cmake --help) -match 'Visual Studio 17 2022')) {
throw "Windows AGC 节点缺少 Visual Studio 2022 C++ 生成器,无法构建 Godot 原生扩展。"
}
$pythonVersion = ((python --version 2>&1) | Select-Object -First 1).Trim()
if ($pythonVersion -notmatch '^Python 3[.]') {
throw "Godot 原生扩展需要 Python 3,当前:$pythonVersion"
}
$ossutil = ([string]$env:OSSUTIL_BIN).Trim()
if (-not $ossutil) { $ossutil = 'ossutil' }
if (-not (Get-Command $ossutil -ErrorAction SilentlyContinue)) {
@@ -101,6 +117,8 @@ pipeline {
Write-Host "rustc=$((rustc --version).Trim())"
Write-Host "cargo=$((cargo --version).Trim())"
Write-Host "dotnet-sdk=$((dotnet --version).Trim())"
Write-Host "cmake=$cmakeVersion"
Write-Host "python=$pythonVersion"
Write-Host "jenkins-user=$([System.Security.Principal.WindowsIdentity]::GetCurrent().Name)"
Write-Host "local-app-data=$env:LOCALAPPDATA"
$targetTools = Join-Path $PWD 'apps/ai-game-creator-shell/src-tauri/target/.tauri'