Record selected windows by cropping full-screen captures

This commit is contained in:
young
2026-09-04 19:48:22 +10:00
parent fc5a2e614b
commit ed32f05f52
35 changed files with 517 additions and 159 deletions
+7
View File
@@ -1,9 +1,11 @@
import { spawnSync } from "node:child_process";
import { chmod, mkdir } from "node:fs/promises";
import os from "node:os";
import path from "node:path";
const projectRoot = process.cwd();
const nativeRoot = path.join(projectRoot, "electron", "native");
const moduleCacheRoot = path.join(os.tmpdir(), "recordly-swift-module-cache");
if (process.platform !== "darwin") {
console.log("[build-native-helpers] Skipping: host platform is not macOS.");
@@ -61,6 +63,11 @@ for (const target of getTargetConfigs()) {
["-O", "-target", target.swiftTarget, sourcePath, "-o", outputPath],
{
encoding: "utf8",
env: {
...process.env,
CLANG_MODULE_CACHE_PATH: path.join(moduleCacheRoot, "clang"),
SWIFT_MODULECACHE_PATH: path.join(moduleCacheRoot, "swift"),
},
timeout: 120000,
},
);