save current

This commit is contained in:
KingKDot
2026-07-06 20:19:38 -05:00
parent f7e9da26f8
commit 04b04831da
13 changed files with 426 additions and 145 deletions
@@ -393,6 +393,28 @@ function detectAgentVersion(clientDir: string): string {
}
}
function nvcodecHeaderPath(clientDir: string): string {
return path.join(clientDir, "third_party", "nvcodec", "nvEncodeAPI.h");
}
function ensureNVCodecHeaderForWindowsCgo(
clientDir: string,
sendToStream: (data: any) => void,
): void {
const headerPath = nvcodecHeaderPath(clientDir);
if (fs.existsSync(headerPath)) {
sendToStream({
type: "output",
text: `Native NVENC header: ${headerPath}\n`,
level: "info",
});
return;
}
throw new Error(
"Native NVENC streaming requires Overlord-Client/third_party/nvcodec/nvEncodeAPI.h for Windows CGO builds. Restore the vendored header or run scripts/vendor-nvcodec-headers from the repo root.",
);
}
function writeSgnTextArtifact(
sgnPath: string,
txtPath: string,
@@ -1032,6 +1054,10 @@ func runBoundFiles() {
}
}
if (effectiveOs === "windows" && env.CGO_ENABLED === "1") {
ensureNVCodecHeaderForWindowsCgo(clientDir, sendToStream);
}
let ldflags = config.stripDebug !== false ? "-s -w -buildid=" : "";
if (config.serverUrl) {