feat: declare and execute SCUM guided installs
This commit is contained in:
@@ -170,6 +170,18 @@ func ValidateGamePluginRuntimeProfiles(profiles domain.GamePluginRuntimeProfiles
|
||||
if len(profile.SupportedTargets) == 0 {
|
||||
violations = append(violations, prefix+".supportedTargets must not be empty")
|
||||
}
|
||||
prerequisiteKeys := map[string]struct{}{}
|
||||
for j, prerequisite := range profile.Prerequisites {
|
||||
prerequisitePrefix := fmt.Sprintf("%s.prerequisites[%d]", prefix, j)
|
||||
violations = append(violations, validateProfileKey(prerequisitePrefix+".key", prerequisite.Key)...)
|
||||
if _, exists := prerequisiteKeys[prerequisite.Key]; exists {
|
||||
violations = append(violations, prerequisitePrefix+".key duplicates another prerequisite")
|
||||
}
|
||||
prerequisiteKeys[prerequisite.Key] = struct{}{}
|
||||
if !oneOf(prerequisite.Kind, "steamcmd", "windows-vcredist", "windows-directx") {
|
||||
violations = append(violations, prerequisitePrefix+".kind is invalid")
|
||||
}
|
||||
}
|
||||
for j, target := range profile.SupportedTargets {
|
||||
if !validPluginSupportedOS(target.OS) || !oneOf(target.Arch, "amd64", "arm64") {
|
||||
violations = append(violations, fmt.Sprintf("%s.supportedTargets[%d] is invalid", prefix, j))
|
||||
|
||||
Reference in New Issue
Block a user