PasteFerry (隔空贴): clipboard and file sync across macOS, Windows and Linux. Direct-first, end-to-end encrypted. Optional official access: no server to host. Independent self-hosting remains available.
Dart airdrop-alternativeclipboardclipboard-sharingclipboard-synccopy-pastecross-platformend-to-end-encryptionfile-syncfile-transferfluttergolanglinuxmacosnat-traversalp2pself-hostedtailscaleuniversal-clipboardwebrtcwindows
fix(windows): ship the Visual C++ runtime with the app
baiyuze9065029bd402
diff --git a/design/windows-client.md b/design/windows-client.mdindex 9fe41f6..010eb70 100644--- a/design/windows-client.md+++ b/design/windows-client.md@@ -215,6 +215,7 @@ Mac 版刻意做成系统自带应用的样子(石墨 + 系统蓝、透明标- 创建开始菜单项;装完直接打开 CopySync,由界面引导「启用后台同步」,流程与 Mac 一致。- 卸载时停掉后台服务、删掉自启项,询问是否保留复制记录与设备身份。- 另出一个 zip 便携版,给不想运行安装程序的人。+- 界面程序依赖 VC++ 运行库(`msvcp140.dll`、`vcruntime140.dll`、`vcruntime140_1.dll`),Windows 不一定自带。构建时从 Visual Studio 里取这三个 DLL 放在 `CopySync.exe` 旁边(微软说的「应用本地部署」),安装包与便携版都带着,不用另装系统级的运行库。也评估过 MSIX:好处是安装干净、能自动更新;但要求必须有受信任的签名证书,且应用写入 `%LOCALAPPDATA%` 的数据会被重定向到包的私有目录,命令行工具与后台服务对不上路径。一期不用。diff --git a/docs/design/windows-client.html b/docs/design/windows-client.htmlindex 2fc602d..688e222 100644--- a/docs/design/windows-client.html+++ b/docs/design/windows-client.html@@ -95,7 +95,7 @@ copysync-cli.exe(命令行,排障用)</code></pre><h2 id="十-安装-签名与发布">十、安装、签名与发布</h2><h3 id="1-安装包">1. 安装包</h3><p>用 Inno Setup 做<strong>按用户安装</strong>的安装包(类似 VS Code 的「用户安装版」):</p>-<ul><li>装到 <code>%LOCALAPPDATA%\Programs\CopySync</code>,不需要管理员权限,不弹 UAC。</li><li>创建开始菜单项;装完直接打开 CopySync,由界面引导「启用后台同步」,流程与 Mac 一致。</li><li>卸载时停掉后台服务、删掉自启项,询问是否保留复制记录与设备身份。</li><li>另出一个 zip 便携版,给不想运行安装程序的人。</li></ul>+<ul><li>装到 <code>%LOCALAPPDATA%\Programs\CopySync</code>,不需要管理员权限,不弹 UAC。</li><li>创建开始菜单项;装完直接打开 CopySync,由界面引导「启用后台同步」,流程与 Mac 一致。</li><li>卸载时停掉后台服务、删掉自启项,询问是否保留复制记录与设备身份。</li><li>另出一个 zip 便携版,给不想运行安装程序的人。</li><li>界面程序依赖 VC++ 运行库(<code>msvcp140.dll</code>、<code>vcruntime140.dll</code>、<code>vcruntime140_1.dll</code>),Windows 不一定自带。构建时从 Visual Studio 里取这三个 DLL 放在 <code>CopySync.exe</code> 旁边(微软说的「应用本地部署」),安装包与便携版都带着,不用另装系统级的运行库。</li></ul><p>也评估过 MSIX:好处是安装干净、能自动更新;但要求必须有受信任的签名证书,且应用写入 <code>%LOCALAPPDATA%</code> 的数据会被重定向到包的私有目录,命令行工具与后台服务对不上路径。一期不用。</p><h3 id="2-代码签名">2. 代码签名</h3><p>不签名的安装包在下载、运行时会被 SmartScreen 拦一下(「Windows 已保护你的电脑」→「更多信息」→「仍要运行」),与 Mac 版没经过公证时「仍要打开」是一回事。可选的路子:</p>diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1index 85bb0b1..356b571 100644--- a/scripts/build-windows.ps1+++ b/scripts/build-windows.ps1@@ -52,6 +52,20 @@ try {}Copy-Item -Recurse -Force 'ui\build\windows\x64\runner\Release\*' $app+# 界面程序依赖 VC++ 运行库(msvcp140 等三个 DLL),Windows 不一定自带,缺了就打不开。+# 按微软的「应用本地部署」放在 exe 旁边:不用装系统级的运行库,也就不需要管理员权限+Write-Host '▶ 附带 VC++ 运行库'+$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"+$vs = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath+$crt = Get-ChildItem "$vs\VC\Redist\MSVC\*\x64\Microsoft.VC*.CRT" -Directory -ErrorAction SilentlyContinue |+ Where-Object { $_.Parent.Parent.Name -as [version] } |+ Sort-Object { $_.Parent.Parent.Name -as [version] } -Descending | Select-Object -First 1+if (-not $crt) { throw "在 $vs 里没有找到 VC++ 运行库(VC\Redist\MSVC\<版本>\x64\Microsoft.VC*.CRT)" }+foreach ($dll in 'msvcp140.dll', 'vcruntime140.dll', 'vcruntime140_1.dll') {+ Copy-Item (Join-Path $crt.FullName $dll) $app+}+Write-Host " $($crt.FullName)"+Write-Host '▶ 打包'Compress-Archive -Path $app -DestinationPath (Join-Path $out 'CopySync-windows-x64.zip')