install.ps1 657 B

12345678910111213141516171819202122
  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. $IDF_PATH = $PSScriptRoot
  6. Write-Output "Installing ESP-IDF tools"
  7. Start-Process -Wait -NoNewWindow -FilePath "python.exe" -Args "$IDF_PATH/tools/idf_tools.py install"
  8. if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # if error
  9. Write-Output "Setting up Python environment"
  10. Start-Process -Wait -NoNewWindow -FilePath "python.exe" -Args "$IDF_PATH/tools/idf_tools.py install-python-env"
  11. if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE} # if error
  12. Write-Output "
  13. All done! You can now run:
  14. export.ps1
  15. "