feat: declare and execute SCUM guided installs
This commit is contained in:
@@ -89,11 +89,17 @@ type RuntimeServerDeploymentProfileBody struct {
|
||||
InstallRootKey string `json:"installRootKey"`
|
||||
ConfigKey string `json:"configKey"`
|
||||
ConfigFormat string `json:"configFormat"`
|
||||
Prerequisites []RuntimeServerPrerequisiteBody `json:"prerequisites,omitempty"`
|
||||
ConfigMappings []RuntimeServerConfigMappingBody `json:"configMappings"`
|
||||
DiscoveryMarkers []RuntimeServerDiscoveryMarkerBody `json:"discoveryMarkers"`
|
||||
VerificationChecks []RuntimeServerVerificationCheckBody `json:"verificationChecks"`
|
||||
}
|
||||
|
||||
type RuntimeServerPrerequisiteBody struct {
|
||||
Key string `json:"key"`
|
||||
Kind string `json:"kind"`
|
||||
}
|
||||
|
||||
type RuntimeLogSourceBody struct {
|
||||
Key string `json:"key"`
|
||||
Kind string `json:"kind"`
|
||||
@@ -297,6 +303,9 @@ func (body GamePluginRuntimeProfilesBody) ToDomain() domain.GamePluginRuntimePro
|
||||
}
|
||||
for _, item := range body.ServerDeployments {
|
||||
profile := domain.RuntimeServerDeploymentProfile{Key: item.Key, Version: item.Version, SteamAppID: item.SteamAppID, ExecutableKey: item.ExecutableKey, InstallRootKey: item.InstallRootKey, ConfigKey: item.ConfigKey, ConfigFormat: item.ConfigFormat}
|
||||
for _, prerequisite := range item.Prerequisites {
|
||||
profile.Prerequisites = append(profile.Prerequisites, domain.RuntimeServerPrerequisite{Key: prerequisite.Key, Kind: prerequisite.Kind})
|
||||
}
|
||||
for _, target := range item.SupportedTargets {
|
||||
profile.SupportedTargets = append(profile.SupportedTargets, domain.RuntimeTarget{OS: target.OS, Arch: target.Arch})
|
||||
}
|
||||
@@ -370,6 +379,9 @@ func runtimeProfilesFromDomain(profiles domain.GamePluginRuntimeProfiles) GamePl
|
||||
}
|
||||
for _, item := range profiles.ServerDeployments {
|
||||
bodyProfile := RuntimeServerDeploymentProfileBody{Key: item.Key, Version: item.Version, SteamAppID: item.SteamAppID, ExecutableKey: item.ExecutableKey, InstallRootKey: item.InstallRootKey, ConfigKey: item.ConfigKey, ConfigFormat: item.ConfigFormat}
|
||||
for _, prerequisite := range item.Prerequisites {
|
||||
bodyProfile.Prerequisites = append(bodyProfile.Prerequisites, RuntimeServerPrerequisiteBody{Key: prerequisite.Key, Kind: prerequisite.Kind})
|
||||
}
|
||||
for _, target := range item.SupportedTargets {
|
||||
bodyProfile.SupportedTargets = append(bodyProfile.SupportedTargets, RuntimeTargetBody{OS: target.OS, Arch: target.Arch})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user