fix: 支持 Linux 本机构建环境
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user