初始提交卡包 USB 工程
纳入固件源码、屏幕组件、nand_xfer 工具和文档。忽略本机构建产物、sdkconfig,以及含本机路径的依赖锁。 Co-authored-by: Cursor <[email protected]>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
$ErrorActionPreference = 'Stop'
|
||||
$project = $PSScriptRoot
|
||||
$venv = Join-Path $project '.venv_gui'
|
||||
$py = Join-Path $venv 'Scripts\python.exe'
|
||||
Push-Location $project
|
||||
try {
|
||||
if (-not (Test-Path -LiteralPath $py)) {
|
||||
& py -3 -m venv $venv
|
||||
if ($LASTEXITCODE -ne 0) { throw "venv failed: $LASTEXITCODE" }
|
||||
}
|
||||
& $py -m pip install -q --upgrade pip pyinstaller pyserial
|
||||
if ($LASTEXITCODE -ne 0) { throw "pip failed: $LASTEXITCODE" }
|
||||
& $py -m PyInstaller --noconfirm --clean --workpath gui_build --distpath dist nand_put_gui.spec
|
||||
if ($LASTEXITCODE -ne 0) { throw "PyInstaller failed: $LASTEXITCODE" }
|
||||
$exe = Join-Path $project 'dist\NAND_Xfer.exe'
|
||||
if (-not (Test-Path -LiteralPath $exe)) { throw "Missing $exe" }
|
||||
Write-Host "GUI exe: $exe"
|
||||
} finally { Pop-Location }
|
||||
Reference in New Issue
Block a user