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

@@ -4,6 +4,7 @@ const fs = require("fs");
const path = require("path");
const { spawnSync } = require("child_process");
const { readAreaConfig } = require("./lib/area-config");
const { blenderExecutable: resolveBlenderExecutable } = require("./lib/tool-paths");
const {
SCENE_LAYERS,
SCENE_FILE,
@@ -314,6 +315,7 @@ function exportCesium(area) {
const startedAt = new Date(started).toISOString();
runCommand(blenderExecutable(area), [
"--background",
"--factory-startup",
"--python",
path.join(repoRoot, "blender", "export_cesium.py"),
"--",
@@ -440,7 +442,7 @@ function compressCesiumGlb(area) {
}
function blenderExecutable(area) {
return path.join(area.blenderApp, "Contents", "MacOS", "Blender");
return resolveBlenderExecutable(area.blenderApp);
}
function ensureFile(file, label) {