Add -allplatforms option to plugin build tool

This commit is contained in:
Steve Streeting 2023-06-29 11:28:59 +01:00
parent 4cde892af6
commit 06388fb283

View File

@ -2,6 +2,7 @@
param (
[string]$mode,
[string]$src,
[switch]$allplatforms = $false,
[switch]$nocloseeditor = $false,
[switch]$dryrun = $false,
[switch]$help = $false
@ -21,6 +22,7 @@ function Print-Usage {
Write-Output " "
Write-Output " -src : Source folder (current folder if omitted)"
Write-Output " : (should be root of project)"
Write-Output " -allplatforms : Build for all platforms, not just the current one"
Write-Output " -dryrun : Don't perform any actual actions, just report on what you would do"
Write-Output " -help : Print this help"
Write-Output " "
@ -74,14 +76,17 @@ try {
$runUAT = Join-Path $ueinstall "Engine/Build/BatchFiles/RunUAT$batchSuffix"
$targetPlatform = Get-Platform
$argList = [System.Collections.ArrayList]@()
$argList.Add("BuildPlugin") > $null
$argList.Add("-Plugin=`"$pluginfile`"") > $null
$argList.Add("-Package=`"$($config.BuildDir)`"") > $null
$argList.Add("-Rocket") > $null
if (-not $allplatforms) {
$targetPlatform = Get-Platform
$argList.Add("-TargetPlatforms=$targetPlatform") > $null
}
if ($dryrun) {
Write-Output ""