- Flutter 桌面端通过 dart:ffi 调用 Rust Core cdylib - 实现 ECDH P-256 密钥协商、HKDF 子密钥派生、AES-256-GCM 控制帧 - Android 被控端用派生密钥做控制帧加密与媒体包 MAC - 新增 libopus JNI 骨架,默认回退 MediaCodec - 新增 aosp/zhanxun/neutral 签名变体与系统 sharedUserId - 本机独立信令服务与设置页开关 - 新增 .gitignore 排除所有编译产物与打包目录
41 lines
1.4 KiB
PowerShell
41 lines
1.4 KiB
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$root = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path
|
|
$flutterDir = Join-Path $root "flutter_sender"
|
|
$signalDir = Join-Path $root "signaling_server"
|
|
$rustDir = Join-Path $root "rust_core"
|
|
$dist = Join-Path $root "dist\TTSTDConnect-Windows"
|
|
|
|
foreach ($required in @($flutterDir, $signalDir, $rustDir)) {
|
|
if (-not (Test-Path $required)) {
|
|
throw "Missing project directory: $required"
|
|
}
|
|
}
|
|
|
|
Write-Host "Building Flutter Windows app..."
|
|
Push-Location $flutterDir
|
|
flutter build windows --release
|
|
Pop-Location
|
|
|
|
New-Item -ItemType Directory -Force -Path $dist | Out-Null
|
|
$flutterOutput = Join-Path $flutterDir "build\windows\x64\runner\Release"
|
|
Copy-Item -Recurse -Force (Join-Path $flutterOutput "*") $dist
|
|
|
|
Write-Host "Building embedded signaling server..."
|
|
Push-Location $signalDir
|
|
go build -o (Join-Path $dist "signaling_server.exe") .
|
|
Pop-Location
|
|
|
|
Write-Host "Building Rust Core cdylib..."
|
|
Push-Location $rustDir
|
|
cargo build --release
|
|
Pop-Location
|
|
$coreDll = Join-Path $rustDir "target\release\ttstdconnect_core.dll"
|
|
if (-not (Test-Path $coreDll)) {
|
|
throw "Rust Core dynamic library not found: $coreDll"
|
|
}
|
|
Copy-Item -Force $coreDll (Join-Path $dist "ttstdconnect_core.dll")
|
|
|
|
Write-Host "Package ready: $dist"
|
|
Write-Host "Default mode: local signaling on port 8080. Use Settings to disable it or switch to an external server."
|