feat(desktop): 支持粘贴配对并修复串流与设备切换

- 支持 Ctrl+V 粘贴配对文本和二维码图片,预览确认后识别校验
- 修复控制发送阻塞、TLS 读写争锁、设备切换沿用旧连接及串流误关窗
- 优化媒体加密上下文、UDP 接收缓冲和异步诊断日志
- 安装器按路径停止主控与信令进程,统一递增版本、打包和清理旧产物
- 发布 0.1.3+4,通过三端编译、20 项 Flutter 测试和 58 项 Rust 单元测试
This commit is contained in:
tongtong committed 2026-11-28 16:08:07 +08:00
1 parent f6b7730684
commit 3cd72d70e1
38 files changed
+1173 -196

No files matched your search

+18
View File
@@ -20,9 +20,11 @@ Compression=lzma2
SolidCompression=yes
WizardStyle=modern
CloseApplications=yes
RestartApplications=no
[Tasks]
Name: desktopicon; Description: "Create a desktop shortcut"; Flags: unchecked
[Files]
Source: "stop-installed-processes.ps1"; Flags: dontcopy
Source: "{#VCRedist}"; DestDir: "{tmp}"; DestName: "vc_redist.x64.exe"; Flags: deleteafterinstall
Source: "{#BundleDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
@@ -31,3 +33,19 @@ Name: "{autodesktop}\TTSTDConnect"; Filename: "{app}\ttstd_sender.exe"; Tasks: d
[Run]
Filename: "{tmp}\vc_redist.x64.exe"; Parameters: "/install /passive /norestart"; StatusMsg: "Installing Microsoft Visual C++ Runtime"; Flags: waituntilterminated
Filename: "{app}\ttstd_sender.exe"; Description: "Launch TTSTDConnect"; Flags: nowait postinstall skipifsilent
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ExitCode: Integer;
begin
Result := '';
ExtractTemporaryFile('stop-installed-processes.ps1');
if not Exec(ExpandConstant('{sys}\WindowsPowerShell\v1.0\powershell.exe'),
'-NoProfile -NonInteractive -ExecutionPolicy Bypass -File "' +
ExpandConstant('{tmp}\stop-installed-processes.ps1') + '" -InstallDir "' +
ExpandConstant('{app}') + '"', '', SW_HIDE, ewWaitUntilTerminated, ExitCode) then
Result := 'Unable to stop the installed application and signaling server.';
if (Result = '') and (ExitCode <> 0) then
Result := 'The installed application or signaling server could not be stopped. Close it and retry.';
end;
+3 -1
View File
@@ -40,7 +40,9 @@ if (-not $Bundle) {
Invoke-Step "$root/flutter_sender" flutter @('build', 'windows', '--release')
$Bundle = Join-Path $output ('stage-' + [guid]::NewGuid().ToString('N'))
New-Item -ItemType Directory -Path $Bundle | Out-Null
Copy-Item "$root/flutter_sender/build/windows/x64/runner/Release/*" $Bundle -Recurse
Get-ChildItem "$root/flutter_sender/build/windows/x64/runner/Release" -File |
Where-Object { $_.Extension -in '.exe', '.dll' } | Copy-Item -Destination $Bundle
Copy-Item "$root/flutter_sender/build/windows/x64/runner/Release/data" $Bundle -Recurse
Copy-Item "$root/rust_core/target/x86_64-pc-windows-msvc/release/ttstdconnect_core.dll" $Bundle
Invoke-Step "$root/signaling_server" go @('build', '-o', "$Bundle/signaling_server.exe", '.')
}
@@ -0,0 +1,18 @@
param([Parameter(Mandatory = $true)][string]$InstallDir)
$ErrorActionPreference = 'Stop'
$installPath = [IO.Path]::GetFullPath($InstallDir)
$ownedPaths = @('ttstd_sender.exe', 'signaling_server.exe') | ForEach-Object { Join-Path $installPath $_ }
# Match full executable paths, never terminate another installation by name alone.
Get-CimInstance Win32_Process -Filter "Name = 'ttstd_sender.exe' OR Name = 'signaling_server.exe'" | ForEach-Object {
if ($_.ExecutablePath -and $ownedPaths -contains $_.ExecutablePath) {
$process = Get-Process -Id $_.ProcessId -ErrorAction SilentlyContinue
if ($process) {
Write-Output "Stopping installed process: $($_.ExecutablePath) ($($_.ProcessId))"
if ($process.CloseMainWindow()) { $null = $process.WaitForExit(3000) }
if (-not $process.HasExited) {
$process.Kill()
if (-not $process.WaitForExit(5000)) { throw "Process did not stop: $($_.ProcessId)" }
}
}
}
}