mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
tools: IDF Windows installer offline mode support
This commit is contained in:

committed by
Juraj Michálek

parent
67ba80f2ec
commit
70e06a46ba
31
tools/windows/tool_setup/Scripts/Test-IdfPowerShell.ps1
Normal file
31
tools/windows/tool_setup/Scripts/Test-IdfPowerShell.ps1
Normal file
@@ -0,0 +1,31 @@
|
||||
param (
|
||||
[string]$PythonPath = "C:\Python38\",
|
||||
[string]$IdfPath = "C:\Users\ContainerAdministrator\Desktop\esp-idf"
|
||||
)
|
||||
|
||||
$env:PATH+=";${PythonPath}"
|
||||
Set-Location "${IdfPath}"
|
||||
$env:PYTHONPATH="C:\Users\ContainerAdministrator\Desktop\esp-idf\tools\"
|
||||
|
||||
# Timeout is necessary to fix the problem when installer is writing some final files
|
||||
# it seems that installer exits, but locks were not released yet
|
||||
Start-Sleep -s 5
|
||||
|
||||
$WSShell = New-Object -comObject WScript.Shell
|
||||
$Shortcut = $WSShell.CreateShortcut('C:\Users\ContainerAdministrator\Desktop\ESP-IDF PowerShell.lnk')
|
||||
$Command = '. ' + $Shortcut.Arguments -replace '""', '"'
|
||||
$Command = $Command -replace " -ExecutionPolicy Bypass -NoExit -File", ""
|
||||
$Command
|
||||
Invoke-Expression -Command $Command
|
||||
|
||||
cd examples\get-started\blink\
|
||||
idf.py build
|
||||
|
||||
# Check whether the repository is clean
|
||||
$GitChanges=(git status -s).Lenght
|
||||
if ($GitChanges -gt 0) {
|
||||
"* Warning! Git repository dirty."
|
||||
$GitChanges
|
||||
} else {
|
||||
"Git repository clean."
|
||||
}
|
Reference in New Issue
Block a user