feat: declare and execute SCUM guided installs

This commit is contained in:
npc0-hue
2026-07-27 20:09:14 +08:00
parent 08fa5488f2
commit 2ae27bb746
21 changed files with 185 additions and 9 deletions
+14
View File
@@ -545,6 +545,13 @@ type RuntimeServerVerificationCheck struct {
Required bool
}
// RuntimeServerPrerequisite is a plugin-declared named prerequisite resolved
// only through Run's fixed, platform-specific installer catalog.
type RuntimeServerPrerequisite struct {
Key string
Kind string
}
// RuntimeServerDeploymentProfile is a frozen, game-specific deployment
// template. It contains logical references only; Run resolves them locally.
type RuntimeServerDeploymentProfile struct {
@@ -556,6 +563,7 @@ type RuntimeServerDeploymentProfile struct {
InstallRootKey string
ConfigKey string
ConfigFormat string
Prerequisites []RuntimeServerPrerequisite
ConfigMappings []RuntimeServerConfigMapping
DiscoveryMarkers []RuntimeServerDiscoveryMarker
VerificationChecks []RuntimeServerVerificationCheck
@@ -847,6 +855,8 @@ type ServerDeploymentUpdate struct {
StopCommand string
StatusCommand string
Shell ServerCommandShell
ShellSet bool
ClearFields []string
}
// ServerDeploymentView is the intentionally redacted read model.
@@ -1068,6 +1078,7 @@ type ServerDeploymentPlan struct {
InstallRootKey string
ConfigKey string
ConfigFormat string
Prerequisites []RuntimeServerPrerequisite
ConfigMappings []RuntimeServerConfigMapping
DiscoveryMarkers []RuntimeServerDiscoveryMarker
VerificationChecks []RuntimeServerVerificationCheck
@@ -1773,6 +1784,7 @@ func CopyServerInstance(instance ServerInstance) ServerInstance {
}
func CopyRuntimeServerDeploymentProfile(profile RuntimeServerDeploymentProfile) RuntimeServerDeploymentProfile {
profile.Prerequisites = append([]RuntimeServerPrerequisite(nil), profile.Prerequisites...)
profile.SupportedTargets = append([]RuntimeTarget(nil), profile.SupportedTargets...)
profile.ConfigMappings = append([]RuntimeServerConfigMapping(nil), profile.ConfigMappings...)
profile.DiscoveryMarkers = append([]RuntimeServerDiscoveryMarker(nil), profile.DiscoveryMarkers...)
@@ -1792,6 +1804,7 @@ func CopyServerDeploymentPlan(plan *ServerDeploymentPlan) *ServerDeploymentPlan
return nil
}
copy := *plan
copy.Prerequisites = append([]RuntimeServerPrerequisite(nil), plan.Prerequisites...)
copy.ConfigMappings = append([]RuntimeServerConfigMapping(nil), plan.ConfigMappings...)
copy.DiscoveryMarkers = append([]RuntimeServerDiscoveryMarker(nil), plan.DiscoveryMarkers...)
copy.VerificationChecks = append([]RuntimeServerVerificationCheck(nil), plan.VerificationChecks...)
@@ -1824,6 +1837,7 @@ func CopyServerDeploymentDefinition(definition ServerDeploymentDefinition) Serve
}
func CopyServerDeploymentUpdate(update ServerDeploymentUpdate) ServerDeploymentUpdate {
update.ClearFields = CopyStringSlice(update.ClearFields)
update.RuntimeBindings = CopyStringMap(update.RuntimeBindings)
update.CreateInputs = CopyStringMap(update.CreateInputs)
return update