Skip to content

Commit 0b634a7

Browse files
committed
Windows fixes
1 parent d52ba75 commit 0b634a7

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

build.ps1

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
.PARAMETER with_tests
88
Build tests
99
.PARAMETER standalone
10-
Add ros2 binaries
10+
Add ros2 binaries. Currently standalone flag is fixed to true, so there is no way to build without standalone libs. Parameter kept for future releases
1111
.PARAMETER clean_install
1212
Makes a clean installation. Removes install dir before deploying
1313
#>
@@ -24,25 +24,20 @@ if(-Not (Test-Path -Path "$scriptPath\src\ros2cs")) {
2424
exit 1
2525
}
2626

27-
2827
Write-Host $msg -ForegroundColor Green
29-
$options=""
30-
if($with_tests) {
31-
$options="--with-tests"
32-
}
33-
if($standalone) {
34-
$options="--standalone"
28+
$options = @{
29+
with_tests = $with_tests
30+
standalone = $standalone
3531
}
3632

37-
3833
if($clean_install) {
3934
Write-Host "Cleaning install directory..." -ForegroundColor White
4035
Remove-Item -Path "$scriptPath\install" -Force -Recurse -ErrorAction Ignore
4136
}
42-
& "$scriptPath\src\ros2cs\build.ps1" $options
37+
& "$scriptPath\src\ros2cs\build.ps1" @options
4338
if($?) {
44-
mkdir $scriptPath\install\asset | Out-Null
45-
(Copy-Item -verbose -Path $scriptPath\src\Ros2ForUnity -Destination $scriptPath\install\asset\Ros2ForUnity 4>&1).Message
39+
md -Force $scriptPath\install\asset | Out-Null
40+
Copy-Item -Path $scriptPath\src\Ros2ForUnity -Destination $scriptPath\install\asset\ -Recurse -Force
4641

4742
$plugin_path=Join-Path -Path $scriptPath -ChildPath "\install\asset\Ros2ForUnity\Plugins\"
4843
Write-Host "Deploying build to $plugin_path" -ForegroundColor Green

0 commit comments

Comments
 (0)