Commit Graph

4 Commits (13dfcce22ff7942a196412ffbbe23798a8c4e607)

Author SHA1 Message Date
mula.liu 13dfcce22f Windows-friendly elevation hints
- new squid_core::elevation_hint(): sudo on Unix, elevated Administrator
  terminal on Windows; used by the locked-item notes in clean/uninstall
  and the user-only safety refusal.
- the Permission error no longer tells Windows users to grant Full Disk
  Access (a macOS-only concept).
2026-10-15 15:26:12 +08:00
mula.liu 5619b1467d Windows: safety layer, rule engine fixes, and 30 built-in cleanup rules
- paths: platform-semantic comparisons. Component keys are lower-cased
  and canonical \\?\\ verbatim prefixes folded away on Windows, so
  is_within/same_path/depth_below/relative_below match how the OS
  actually resolves paths; pretty() got the same treatment.
- safety: drive roots and UNC roots are hard-denied (is_root_like);
  Windows hard-deny grows env-derived entries (SystemRoot, ProgramFiles,
  ProgramData, USERPROFILE, ...); DENY_EXACT gains the AppData tree and
  shell folders; OUTSIDE_HOME_OK becomes platform-supplied
  (%ProgramData%, %PUBLIC% mirror /Applications); a path containing
  $Recycle.Bin / System Volume Information / Recovery is always refused;
  the canonicalize-vs-expected symlink probe now compares with
  platform semantics instead of raw equality.
- rules: $VAR heads stop at backslashes too; ${VAR} resolves in every
  occurrence; glob component matching is case-insensitive on Windows;
  protect patterns normalise \\ to / so protections keep working there;
  anchor_for keeps drive prefixes instead of bailing out, and folds
  Prefix+RootDir into a rooted C:\ anchor.
- rules/windows.toml: 30 rules for Win10/11 (temp, WER/crash dumps,
  browser caches, shell caches, dev caches, Windows.old, Package Cache)
  embedded under cfg(windows) and parse-checked on every host.
2026-10-15 15:23:19 +08:00
mula.liu 122e81cb4d Windows: real platform layer, recycle-bin trash backend, cross-compile CI
- squid-core: trash moves behind a platform seam — Windows recycles via
  IFileOperation (shell owns $Recycle.Bin bookkeeping; ledger records no
  physical path there), Unix keeps the rename/copy path untouched
- squid-core: default cleanup anchors per platform; Unix-only helpers
  (getuid, statvfs-style trash dirs, symlink copy) gated
- squid-platform: windows.rs rewritten — installed apps from the uninstall
  registry (HKLM 64/32-bit views + HKCU, SystemComponent/patch filtering),
  BIOS/NT version keys for hardware/OS strings, sysinfo for volumes and
  running processes; winreg replaces the PowerShell stub
- squid-stats: COMPUTERNAME hostname off-unix; battery parsers gated
- CI: .gitlab-ci.yml with a Linux job that cross-checks the whole workspace
  against x86_64-pc-windows-msvc, plus a manual tagged Windows job driven by
  scripts/ci-windows.ps1 (build + test on a real machine)
- host (macOS) tests, clippy -D warnings and fmt stay green
2026-10-15 14:56:55 +08:00
mula.liu 54585ffc40 squid 0.1.0: macOS 磁盘清理(CLI + TUI) 2026-10-13 17:00:50 +08:00