fix: 支持 Linux 本机构建环境

This commit is contained in:
2026-08-05 17:11:05 +08:00
parent c5956365fa
commit c8ca009d13
12 changed files with 106 additions and 54 deletions

View File

@@ -18,6 +18,7 @@ const fs = require("fs");
const path = require("path");
const crypto = require("crypto");
const { spawnSync } = require("child_process");
const { blenderExecutable } = require("./lib/tool-paths");
const repoRoot = path.resolve(__dirname, "..");
const baselineRoot = path.join(repoRoot, "outputs", "_refactor-baseline");
@@ -169,8 +170,8 @@ function fileStat(file) {
}
function blendDigest(config, blend, outFile) {
const blenderApp = config.blenderApp || "/Applications/Blender.app";
const blender = path.join(blenderApp, "Contents", "MacOS", "Blender");
const blenderApp = config.blenderApp || (process.platform === "darwin" ? "/Applications/Blender.app" : "/usr/bin/blender");
const blender = blenderExecutable(blenderApp);
const run = spawnSync(blender, [
"--background", "--factory-startup",
"--python", path.join(repoRoot, "blender", "tools", "scene_digest.py"),