From 55b5483e6854360f65c9ab2bc821b4fee4046dab Mon Sep 17 00:00:00 2001 From: npc0-hue Date: Mon, 24 Aug 2026 10:14:04 +0800 Subject: [PATCH] Declare SCUM runtime executable for extensions --- plugins/examples/scum-server-plugin/actions/start.json | 1 + plugins/manifests/lifecycle-action.schema.json | 1 + plugins/tests/manifest-validation.test.ts | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/examples/scum-server-plugin/actions/start.json b/plugins/examples/scum-server-plugin/actions/start.json index f2a352b..4aee5c1 100644 --- a/plugins/examples/scum-server-plugin/actions/start.json +++ b/plugins/examples/scum-server-plugin/actions/start.json @@ -4,6 +4,7 @@ "mode": "supervised", "outputMode": "pipes", "executableKey": "bin/scum-start.cmd", + "targetExecutableKey": "SCUM/Binaries/Win64/SCUMServer.exe", "arguments": [], "environment": { "GAME_ID": "scum", diff --git a/plugins/manifests/lifecycle-action.schema.json b/plugins/manifests/lifecycle-action.schema.json index d097973..6aeb075 100644 --- a/plugins/manifests/lifecycle-action.schema.json +++ b/plugins/manifests/lifecycle-action.schema.json @@ -10,6 +10,7 @@ "action": { "enum": ["install", "start", "stop", "restart", "status"] }, "mode": { "enum": ["oneshot", "supervised", "control"] }, "executableKey": { "$ref": "game-plugin.manifest.schema.json#/$defs/relativePathRef" }, + "targetExecutableKey": { "$ref": "game-plugin.manifest.schema.json#/$defs/relativePathRef" }, "arguments": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 240 }, diff --git a/plugins/tests/manifest-validation.test.ts b/plugins/tests/manifest-validation.test.ts index e08b171..3265d2e 100644 --- a/plugins/tests/manifest-validation.test.ts +++ b/plugins/tests/manifest-validation.test.ts @@ -219,7 +219,7 @@ describe("plugin manifest validation", () => { expect(assetPaths).toEqual(expect.arrayContaining(["actions/install.json", "actions/start.json", "bin/scum-install-update.cmd", "bin/scum-start.cmd", "assets/map/scum-map-overview.jpg"])); expect(installAction).toMatchObject({ executableKey: "bin/scum-install-update.cmd", environment: { SERVER_STEAM_APP_ID: "3792580", SERVER_STEAMCMD_UPDATE_ARGS: "+login anonymous +app_update 3792580 +quit" } }); expect(installAction.timeoutMs).toBe(7200000); - expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", outputMode: "pipes", environment: { SERVER_LOG_FLAG: "-log -stdout -FullStdOutLogOutput" } }); + expect(startAction).toMatchObject({ executableKey: "bin/scum-start.cmd", targetExecutableKey: "SCUM/Binaries/Win64/SCUMServer.exe", outputMode: "pipes", environment: { SERVER_LOG_FLAG: "-log -stdout -FullStdOutLogOutput" } }); expect(installScript).not.toContain("taskkill /IM SCUMServer.exe /F"); expect(installScript).toContain("call :stop_matching_scum"); expect(installScript).toContain("Get-CimInstance Win32_Process");