#requires -Version 7.0
param([ValidateSet('Debug','Release')][string]$Configuration = 'Release', [switch]$NoDesktop)
$ErrorActionPreference = 'Stop'
$taskRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
Push-Location $taskRoot
try {
dotnet build Server/XFEWarframe.Server/XFEWarframe.Server.csproj -c $Configuration --nologo
if ($LASTEXITCODE -ne 0) { throw 'Server build failed' }
if (-not $NoDesktop) {
if (-not $IsWindows) { throw 'WinUI must be built on Windows. Use -NoDesktop to build only the server.' }
foreach ($projectName in @('Admin','Player','Installer')) {
$role = if ($projectName -eq 'Admin') { 'Admin' } else { 'Client' }
dotnet build "$role/XFEWarframe.$projectName/XFEWarframe.$projectName.csproj" -c $Configuration --nologo
if ($LASTEXITCODE -ne 0) { throw "$projectName build failed" }
}
& (Join-Path $PSScriptRoot 'Build-Bridge.ps1') -Configuration $Configuration -IfNeeded
}
} finally { Pop-Location }
#requires -Version 7.0
param([ValidateSet('Debug','Release')][string]$Configuration = 'Release', [switch]$NoDesktop)
$ErrorActionPreference = 'Stop'
$taskRoot = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
Push-Location $taskRoot
try {
dotnet build Server/XFEWarframe.Server/XFEWarframe.Server.csproj -c $Configuration --nologo
if ($LASTEXITCODE -ne 0) { throw 'Server build failed' }
if (-not $NoDesktop) {
if (-not $IsWindows) { throw 'WinUI must be built on Windows. Use -NoDesktop to build only the server.' }
foreach ($projectName in @('Admin','Player','Installer')) {
$role = if ($projectName -eq 'Admin') { 'Admin' } else { 'Client' }
dotnet build "$role/XFEWarframe.$projectName/XFEWarframe.$projectName.csproj" -c $Configuration --nologo
if ($LASTEXITCODE -ne 0) { throw "$projectName build failed" }
}
& (Join-Path $PSScriptRoot 'Build-Bridge.ps1') -Configuration $Configuration -IfNeeded
}
} finally { Pop-Location }