forked from bdring/Grbl_Esp32
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-all.ps1
More file actions
22 lines (18 loc) · 733 Bytes
/
Copy pathbuild-all.ps1
File metadata and controls
22 lines (18 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This Windows PowerShell script uses PlatformIO to compile Grbl_ESP32
# for every machine configuration in the Machines/ directory.
# It is useful for automated testing.
# Setting PYTHONIOENCODING avoids an obscure crash related to code page mismatch
$env:PYTHONIOENCODING="utf-8"
Function BuildMachine($names) {
$basename = $names[0]
$env:PLATFORMIO_BUILD_FLAGS = "-DMACHINE_FILENAME=$basename"
$displayname = $basename
Write-Output "Building machine $displayname"
platformio run 2>&1 | Select-String error,Took
Write-Output " "
}
# Build all the machines
foreach ($filepath in Get-ChildItem -file .\Grbl_Esp32\Machines\*) {
BuildMachine($filepath.name, "")
}
Remove-Item env:PLATFORMIO_BUILD_FLAGS