Skip to content

Commit

Permalink
update windows build script
Browse files Browse the repository at this point in the history
  • Loading branch information
admercs committed Feb 27, 2024
1 parent abfb33a commit 77f698f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ function Build-Solution {
[String[]]
$IgnoreErrors = @()
)
[String]$IgnoreErrorCodes = $IgnoreErrors -Join ';'
[String]$IgnoreErrorCodes = if ( $IgnoreErrors.Count -gt 0 ) { ($IgnoreErrors -Join ';') } else { '' }
if ( $BuildMode -eq 'Release' ) {
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}",
"/p:Platform=${SystemPlatform}", "/p:Configuration=Debug", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
"/p:Platform=${SystemPlatform}", "/p:Configuration=Debug", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}",
"/p:Platform=${SystemPlatform}", "/p:Configuration=Release", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
"/p:Platform=${SystemPlatform}", "/p:Configuration=Release", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
} else {
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}", "/p:Platform=${SystemPlatform}", "/p:Configuration=${BuildMode}", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}",
"/p:Platform=${SystemPlatform}", "/p:Configuration=${BuildMode}", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Stop
}
if ( ! $? ) { exit $LastExitCode } # exit on error
return $null
Expand Down Expand Up @@ -200,7 +201,9 @@ function Update-VsUnrealProjectFiles {
### Main
###

if ( $DEBUG_MODE -eq $true ) { Write-Output ( Get-WindowsInfo($SYSTEM_INFO) ) }
if ( $DEBUG_MODE -eq $true ) {
Write-Output (Get-WindowsInfo -Info $SYSTEM_INFO)
}

Write-Output ''
Write-Output '-----------------------------------------------------------------------------------------'
Expand All @@ -217,6 +220,7 @@ Write-Output " Build mode: $BUILD_MODE"
Write-Output '-----------------------------------------------------------------------------------------'
Write-Output " Debug mode: $DEBUG_MODE"
Write-Output " CI/CD mode: $AUTOMATE_MODE"
Write-Output " Build docs: $BUILD_DOCS"
Write-Output '-----------------------------------------------------------------------------------------'
Write-Output " Windows version: $SYSTEM_OS_VERSION"
Write-Output " Visual Studio version: $VS_VERSION"
Expand Down

0 comments on commit 77f698f

Please sign in to comment.