]> granicus.if.org Git - esp-idf/blob - install.ps1
can: Fix reset mode entry and exit calls
[esp-idf] / install.ps1
1 if ($env:MSYSTEM -ne $null) {
2     Write-Output "This .ps1 file is for Windows Powershell only. When using MSYS, run:`n. ./export.sh."
3     exit 1
4 }
5
6
7 $IDF_PATH = $PSScriptRoot
8
9
10 Write-Output "Installing ESP-IDF tools"
11 Start-Process -Wait -NoNewWindow -FilePath "python.exe" -Args "$IDF_PATH/tools/idf_tools.py install"
12 if ($LASTEXITCODE -ne 0)  { exit $LASTEXITCODE } # if error
13
14 Write-Output "Setting up Python environment"
15 Start-Process -Wait  -NoNewWindow -FilePath "python.exe" -Args "$IDF_PATH/tools/idf_tools.py install-python-env"
16 if ($LASTEXITCODE -ne 0)  { exit $LASTEXITCODE} # if error
17
18
19 Write-Output "
20 All done! You can now run:
21     export.ps1
22 "