12 lines
887 B
PowerShell
12 lines
887 B
PowerShell
param([ValidateSet('Editor','Game','Package')][string]$Mode='Editor',[string]$EngineRoot='C:/Program Files/Epic Games/UE_5.8')
|
|
$ErrorActionPreference='Stop'
|
|
$projectRoot=(Resolve-Path (Join-Path $PSScriptRoot '../..')).Path
|
|
$projectFile=Join-Path $projectRoot 'ueRouge.uproject'
|
|
if($Mode -eq 'Package'){
|
|
& (Join-Path $EngineRoot 'Engine/Build/BatchFiles/RunUAT.bat') BuildCookRun -project="$projectFile" -noP4 -platform=Win64 -clientconfig=Development -build -cook -stage -pak -archive -archivedirectory="$projectRoot/Builds/Windows/x64" -utf8output -unattended
|
|
}else{
|
|
$targetName=if($Mode -eq 'Editor'){'ueRougeEditor'}else{'ueRouge'}
|
|
& (Join-Path $EngineRoot 'Engine/Build/BatchFiles/Build.bat') $targetName Win64 Development "$projectFile" -WaitMutex -NoHotReloadFromIDE -NoUBTMakefiles -UTF8Output
|
|
}
|
|
if($LASTEXITCODE -ne 0){throw "UE $Mode build failed ($LASTEXITCODE)"}
|