Support CookAllMaps, MapsIncluded, MapsExcluded, via -Map=Foo+Bar argument

This commit is contained in:
Steve Streeting 2020-10-06 12:48:10 +01:00
parent eacdfac2ec
commit e166fb5e84

View File

@ -139,14 +139,27 @@ try {
Write-Warning "Unknown variant(s) ignored: $($unmatchedVariants -join ", ")" Write-Warning "Unknown variant(s) ignored: $($unmatchedVariants -join ", ")"
} }
$maps = [System.Collections.Generic.HashSet[string]]::New()
if ($config.CookAllMaps) {
Get-ChildItem -Path $(Join-Path $src "Content") -Filter *.umap -Recurse | ForEach-Object {
if ($config.MapsExcluded -notcontains $_.BaseName) {
$maps.Add($_.BaseName)
}
}
} elseif ($config.MapsIncluded) {
$config.MapsIncluded | ForEach-Object { $maps.Add($_) }
}
Write-Output "" Write-Output ""
Write-Output "Project file : $projfile" Write-Output "Project File : $projfile"
Write-Output "UE Version : $ueVersion" Write-Output "UE Version : $ueVersion"
Write-Output "UE Install : $ueinstall" Write-Output "UE Install : $ueinstall"
Write-Output "Chosen Variants : $chosenVariantNames" Write-Output "Output Folder : $($config.OutputDir)"
Write-Output "Zipped Folder : $($config.ZipDir)"
Write-Output ""
Write-Output "Chosen Variants : $chosenVariantNames"
Write-Output "Maps to Cook : $maps"
Write-Output "" Write-Output ""
Write-Output "Package configuration:"
Write-Output $config
if (([bool]$major + [bool]$minor + [bool]$patch + [bool]$hotfix) -eq 0) { if (([bool]$major + [bool]$minor + [bool]$patch + [bool]$hotfix) -eq 0) {
@ -228,7 +241,9 @@ try {
$argList.Add("-clientconfig=$($var.Configuration)") > $null $argList.Add("-clientconfig=$($var.Configuration)") > $null
$argList.Add("-targetplatform=$($var.Platform)") > $null $argList.Add("-targetplatform=$($var.Platform)") > $null
$argList.Add("-utf8output") > $null $argList.Add("-utf8output") > $null
if ($maps.Count) {
$argList.Add("-Map=$($maps -join "+")") > $null
}
Write-Output "Building variant: $($var.Name)" Write-Output "Building variant: $($var.Name)"