first commit

This commit is contained in:
ykcheungab
2026-08-06 15:18:27 +08:00
commit a5a73d76d1
37 changed files with 2697 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
param(
[string]$EnvName = "sensor-bench-build-py310"
)
$ErrorActionPreference = "Stop"
$RepoRoot = Resolve-Path (Join-Path $PSScriptRoot "..")
$DistDir = Join-Path $RepoRoot "dist"
$WorkDir = Join-Path $RepoRoot "build\pyinstaller_work"
$SpecPath = Join-Path $PSScriptRoot "sensor_bench.spec"
if (-not (Get-Command conda -ErrorAction SilentlyContinue)) {
throw "conda was not found on PATH. Open an Anaconda Prompt or initialize conda for PowerShell."
}
Push-Location $RepoRoot
try {
conda run -n $EnvName python -m pip install --upgrade pip
conda run -n $EnvName python -m pip install -e ".[pack]"
conda run -n $EnvName python -m pip install --upgrade orisys
conda run -n $EnvName python tests/test_smoke.py
if (Test-Path $WorkDir) {
Remove-Item -Recurse -Force $WorkDir
}
if (Test-Path (Join-Path $DistDir "SensorBench")) {
Remove-Item -Recurse -Force (Join-Path $DistDir "SensorBench")
}
conda run -n $EnvName python -m PyInstaller --noconfirm --clean --distpath "$DistDir" --workpath "$WorkDir" "$SpecPath"
Copy-Item -Recurse -Force (Join-Path $RepoRoot "config") (Join-Path $DistDir "SensorBench")
Copy-Item -Recurse -Force (Join-Path $RepoRoot "steps") (Join-Path $DistDir "SensorBench")
conda run -n $EnvName python build/verify_dist.py
Write-Host "Build complete: dist\SensorBench\SensorBench.exe"
}
finally {
Pop-Location
}