feat: add FT1 factory test host and protocol updates
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
param(
|
||||
[string]$Output = "dist"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
python -c "import PyInstaller" 2>$null
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "未找到 PyInstaller。先执行: python -m pip install pyinstaller pyserial"
|
||||
}
|
||||
|
||||
$outDir = Join-Path $root $Output
|
||||
New-Item -ItemType Directory -Force -Path $outDir | Out-Null
|
||||
python -m PyInstaller --noconfirm --clean --onefile --windowed `
|
||||
--name EG800FactoryHost `
|
||||
--distpath $outDir `
|
||||
--workpath (Join-Path $root ".pyinstaller-work") `
|
||||
--specpath (Join-Path $root ".pyinstaller-spec") `
|
||||
(Join-Path $root "factory_host.py")
|
||||
Copy-Item (Join-Path $root "factory_host_config.json") $outDir -Force
|
||||
Write-Host "输出: $(Join-Path $outDir 'EG800FactoryHost.exe')"
|
||||
Reference in New Issue
Block a user