Windows installer: fix the Windows build and register the browser host
- main.rs: the Windows clipboard branch dropped the copy's Result (only the non-Windows branch was checked), which failed to compile for Windows; both now report a failed copy. - windows/hooks.nsh: the NSIS installer writes the native messaging manifests next to kestrove-nmh.exe and registers them under HKCU for Chrome, Chromium, Edge, Brave, Vivaldi and Firefox; uninstall removes them. Per-user install. - scripts/windows.sh: cross-build with cargo-xwin, compile the installer with NSIS 3.11 in a Debian 13 container (Homebrew's makensis 3.13 crashes on macOS). Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -290,13 +290,14 @@ fn copy_secret(app: State<'_, App>, id: String, field: Option<String>) -> CmdRes
|
||||
}
|
||||
let cb = guard.as_mut().expect("clipboard initialized above");
|
||||
#[cfg(windows)]
|
||||
{
|
||||
let copied = {
|
||||
// docs/04: keep secrets out of clipboard history, cloud sync and monitors.
|
||||
use arboard::SetExtWindows;
|
||||
cb.set().exclude_from_monitoring().exclude_from_cloud().exclude_from_history().text(secret.to_string())
|
||||
}
|
||||
};
|
||||
#[cfg(not(windows))]
|
||||
{ cb.set_text(secret.to_string()) }.map_err(|e| e.to_string())?;
|
||||
let copied = cb.set_text(secret.to_string());
|
||||
copied.map_err(|e| e.to_string())?;
|
||||
drop(guard);
|
||||
thread::spawn(move || {
|
||||
thread::sleep(CLIPBOARD_CLEAR);
|
||||
|
||||
Reference in New Issue
Block a user