feat: add typed data and views with scoped device power

This commit is contained in:
Codex
2026-10-25 14:35:24 +08:00
parent 5b99a7e9fc
commit ca60398dea
65 changed files with 4238 additions and 231 deletions
+16
View File
@@ -0,0 +1,16 @@
[CmdletBinding()]
param([switch]$SkipTests)
$ErrorActionPreference = 'Stop'
$compiler = Join-Path $env:WINDIR 'Microsoft.NET\Framework64\v4.0.30319\csc.exe'
if (!(Test-Path -LiteralPath $compiler)) { throw 'The .NET Framework 4 C# compiler is required.' }
$outputDir = Join-Path $PSScriptRoot 'build'
New-Item -ItemType Directory -Force -Path $outputDir | Out-Null
$sources = @(Get-ChildItem -LiteralPath (Join-Path $PSScriptRoot 'src') -Filter '*.cs' | ForEach-Object FullName)
$sources += Join-Path $PSScriptRoot 'tests\SelfTests.cs'
& $compiler /nologo /warnaserror+ /optimize+ /target:exe /platform:anycpu "/out:$outputDir\HomeVisionPower.exe" /reference:System.ServiceProcess.dll /reference:System.Web.Extensions.dll /reference:System.Security.dll $sources
if ($LASTEXITCODE -ne 0) { throw 'Compilation failed.' }
if (!$SkipTests) {
& (Join-Path $outputDir 'HomeVisionPower.exe') --self-test
if ($LASTEXITCODE -ne 0) { throw 'Self-tests failed.' }
}
Write-Output "Built $outputDir\HomeVisionPower.exe"