-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.ps1
35 lines (26 loc) · 1.17 KB
/
start.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$envFilePath = ".\.env"
$content = Get-Content -Path $envFilePath
if (-Not $content) {
Write-Output "Create a file with named '.env' (See README)"
Exit
}
$RadonUlzerfilePathLine = $content | Where-Object { $_ -match '^RadonUlzer_PATH=' }
if ($RadonUlzerfilePathLine) {
$RadonUlzerFilePath = $RadonUlzerfilePathLine -split '=' | Select-Object -Last 1
Write-Output "Der Dateipfad ist: $RadonUlzerFilePath"
} else {
Write-Output "Key RadonUlzer_PATH not found"
Exit
}
$SpaceShipRadarfilePathLine = $content | Where-Object { $_ -match '^SpaceShipRadar_PATH=' }
if ($SpaceShipRadarfilePathLine) {
$SpaceShipRadarFilePath = $SpaceShipRadarfilePathLine -split '=' | Select-Object -Last 1
Write-Output "Der Dateipfad ist: $SpaceShipRadarFilePath"
} else {
Write-Output "Key SpaceShipRadar_PATH not found"
Exit
}
# activate venv
# .\venv\Scripts\activate
Start-Process powershell "& '${env:WEBOTS_HOME}\msys64\mingw64\bin\webots-controller.exe' --robot-name=Zumo2 --stdout-redirect $RadonUlzerFilePath;"
Start-Process powershell "& '${env:WEBOTS_HOME}\msys64\mingw64\bin\webots-controller.exe' --robot-name=MyBot --stdout-redirect $SpaceShipRadarFilePath;"