fix display pairing and add scoped family voice announcements

This commit is contained in:
Codex
2026-10-18 22:03:51 +08:00
parent fdb239b3ed
commit d0b3db7f82
32 changed files with 776 additions and 124 deletions
+7 -5
View File
@@ -1,9 +1,11 @@
param([string]$ToolRoot='C:\Users\Administrator\Documents\ChatGPT\优创未来\services\toplc-vpn-android\.tools')
param([string]$ToolRoot='C:\Users\Administrator\Documents\ChatGPT\优创未来\services\toplc-vpn-android\.tools',[switch]$Terminal)
$ErrorActionPreference='Stop'
$source=Split-Path -Parent $MyInvocation.MyCommand.Path
$stage=Join-Path 'C:\CodexBuild' ('ZhaoDisplay-'+[guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $stage | Out-Null
Copy-Item -LiteralPath (Join-Path $source 'AndroidManifest.xml') -Destination $stage
$manifest=if($Terminal){'AndroidManifest-terminal.xml'}else{'AndroidManifest.xml'}
$apkName=if($Terminal){'ZhaoTerminal.apk'}else{'ZhaoDisplay.apk'}
Copy-Item -LiteralPath (Join-Path $source $manifest) -Destination (Join-Path $stage 'AndroidManifest.xml')
Copy-Item -LiteralPath (Join-Path $source 'res'),(Join-Path $source 'src') -Destination $stage -Recurse
$jdk=Join-Path $ToolRoot 'jdk-staging\jdk-21.0.12.1+1'
$sdk=Join-Path $ToolRoot 'android-sdk'
@@ -53,8 +55,8 @@ if(!(Test-Path -LiteralPath $keystore)){
if($LASTEXITCODE){throw 'Signing key generation failed'}
}
New-Item -ItemType Directory -Force -Path "$source\build" | Out-Null
& "$bt\apksigner.bat" sign --ks $keystore --ks-pass pass:android --key-pass pass:android --ks-key-alias zhaodisplay --out "$source\build\ZhaoDisplay.apk" "$build\aligned.apk"
& "$bt\apksigner.bat" sign --ks $keystore --ks-pass pass:android --key-pass pass:android --ks-key-alias zhaodisplay --out "$source\build\$apkName" "$build\aligned.apk"
if($LASTEXITCODE){throw 'APK signing failed'}
& "$bt\apksigner.bat" verify "$source\build\ZhaoDisplay.apk"
& "$bt\apksigner.bat" verify "$source\build\$apkName"
if($LASTEXITCODE){throw 'APK verification failed'}
Write-Output "$source\build\ZhaoDisplay.apk"
Write-Output "$source\build\$apkName"