Skip to content

Commit

Permalink
update windows bulds
Browse files Browse the repository at this point in the history
  • Loading branch information
admercs committed Feb 25, 2024
1 parent 9f80125 commit 2930c45
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
20 changes: 10 additions & 10 deletions scripts/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ param(
### Imports
###

# NOTE: Prefer Import-Module to Get-Content for its scoping rules
# NOTE: Prefer Import-Module to Get-Content for its scoping rules.

# Common utilities
# imports: Add-Directories, Remove-Directories, Invoke-Fail, Test-WorkingDirectory,
Expand Down Expand Up @@ -102,9 +102,9 @@ $CMAKE_VERSION = Get-ProgramVersion -Program 'cmake'
function Build-Solution {
[OutputType()]
param(
[Parameter(Mandatory)]
[Parameter()]
[String]
$BuildMode,
$BuildMode = 'Release',
[Parameter(Mandatory)]
[String]
$SystemPlatform,
Expand All @@ -118,12 +118,12 @@ function Build-Solution {
[String]$IgnoreErrorCodes = $IgnoreErrors -Join ';'
if ( $BuildMode -eq 'Release' ) {
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}",
"/p:Platform=${SystemPlatform}", "/p:Configuration=Debug", 'AutonomySim.sln' -Wait -NoNewWindow
"/p:Platform=${SystemPlatform}", "/p:Configuration=Debug", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Continue
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}",
"/p:Platform=${SystemPlatform}", "/p:Configuration=Release", 'AutonomySim.sln' -Wait -NoNewWindow
"/p:Platform=${SystemPlatform}", "/p:Configuration=Release", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Continue
}
else {
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}", "/p:Platform=${SystemPlatform}", "/p:Configuration=${BuildMode}", 'AutonomySim.sln' -Wait -NoNewWindow
Start-Process -FilePath 'msbuild.exe' -ArgumentList "-maxcpucount:${SystemCpuMax}", "-noerr:${IgnoreErrorCodes}", "/p:Platform=${SystemPlatform}", "/p:Configuration=${BuildMode}", 'AutonomySim.sln' -Wait -NoNewWindow -ErrorAction Continue
}
if (!$?) { exit $LASTEXITCODE } # exit on error
return $null
Expand All @@ -144,12 +144,12 @@ function Copy-GeneratedBinaries {
)
# Copy binaries and includes for MavLinkCom in deps
New-Item -ItemType Directory -Path ("$MavLinkTargetLib", "$MavLinkTargetInclude") -Force | Out-Null
Copy-Item -Path '.\MavLinkCom\lib' -Destination "$MavLinkTargetLib"
Copy-Item -Path '.\MavLinkCom\include' -Destination "$MavLinkTargetInclude"
Copy-Item -Path '.\MavLinkCom\lib' -Destination "$MavLinkTargetLib" -Recurse -Verbose
Copy-Item -Path '.\MavLinkCom\include' -Destination "$MavLinkTargetInclude" -Recurse -Verbose
# Copy outputs into Unreal/Plugins directory
New-Item -ItemType Directory -Path "$AutonomyLibPluginDir" -Force | Out-Null
Copy-Item -Path '.\AutonomyLib' -Destination "$AutonomyLibPluginDir"
Copy-Item -Path '.\AutonomySim.props' -Destination "$AutonomyLibPluginDir"
Copy-Item -Path '.\AutonomyLib' -Destination "$AutonomyLibPluginDir" -Recurse -Verbose
Copy-Item -Path '.\AutonomySim.props' -Destination "$AutonomyLibPluginDir" -Recurse -Verbose
return $null
}

Expand Down
8 changes: 4 additions & 4 deletions scripts/mod_docs.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function Build-Documentation {
param()
# Create and copy docs into build directory
New-Item -ItemType Directory -Path "$BUILD_DIR" -Force | Out-Null
Copy-Item -Path "docs" -Destination "${BUILD_DIR}\docs_root\docs" -Container -Force -Recurse # -Exclude @("temp")
Copy-Item -Path "docs" -Destination "${BUILD_DIR}\docs_root\docs" -Force -Recurse # -Exclude @("temp")
Copy-Item -Path ".\*.md" -Destination "${BUILD_DIR}\docs_root" -Force
Move-Item -Path "${BUILD_DIR}\docs_root\docs\mkdocs.yml" -Destination "$BUILD_DIR" -Force
if ( $Verbose.IsPresent ) {
Expand All @@ -43,9 +43,9 @@ function Build-Documentation {
Start-Process -FilePath "mkdocs.exe" -ArgumentList "build" -Wait -NoNewWindow
Set-Location "$PROJECT_DIR"
# Copy docs_root into docs_build
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\images" -Destination "${BUILD_DIR}\build\images" -Container -Force -Recurse
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\misc" -Destination "${BUILD_DIR}\build\misc" -Container -Force -Recurse
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\paper" -Destination "${BUILD_DIR}\build\paper" -Container -Force -Recurse
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\images" -Destination "${BUILD_DIR}\build\images" -Force -Recurse
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\misc" -Destination "${BUILD_DIR}\build\misc" -Force -Recurse
Copy-Item -Path "${BUILD_DIR}\docs_root\docs\paper" -Destination "${BUILD_DIR}\build\paper" -Force -Recurse
if ( $Verbose.IsPresent ) {
Write-Output 'Next Steps:'
Write-Output ' 1. git checkout gh-pages'
Expand Down
8 changes: 4 additions & 4 deletions scripts/mod_rpclib.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ function Build-RpcLib {
[String]$RPCLIB_TARGET_INCLUDE = '.\AutonomyLib\deps\rpclib\include'
New-Item -ItemType Directory -Path ("$RPCLIB_TARGET_LIB", "$RPCLIB_TARGET_INCLUDE") -Force | Out-Null
# copy directories robustly
Copy-Item -Path "${RPCLIB_PATH}\include" -Destination "${RPCLIB_TARGET_INCLUDE}"
Copy-Item -Path "${RPCLIB_PATH}\include" -Destination "${RPCLIB_TARGET_INCLUDE}" -Recurse -Force
if ( $BUILD_MODE -eq 'Release' ) {
Copy-Item -Path "${RPCLIB_PATH}\build\Debug" -Destination "${RPCLIB_TARGET_LIB}\Debug"
Copy-Item -Path "${RPCLIB_PATH}\build\Release" -Destination "${RPCLIB_TARGET_LIB}\Release"
Copy-Item -Path "${RPCLIB_PATH}\build\Debug" -Destination "${RPCLIB_TARGET_LIB}\Debug" -Recurse -Force
Copy-Item -Path "${RPCLIB_PATH}\build\Release" -Destination "${RPCLIB_TARGET_LIB}\Release" -Recurse -Force
}
else {
Copy-Item -Path "${RPCLIB_PATH}\build\${BUILD_MODE}" -Destination "${RPCLIB_TARGET_LIB}\$BUILD_MODE"
Copy-Item -Path "${RPCLIB_PATH}\build\${BUILD_MODE}" -Destination "${RPCLIB_TARGET_LIB}\$BUILD_MODE" -Recurse -Force
}
return $null
}
Expand Down

0 comments on commit 2930c45

Please sign in to comment.