M6 Windows: composizione condivisa Febe.App per Server e Desktop; Febe per Windows (WPF) con l'interfaccia in WebView2, area di notifica, istanza unica, «Browser di Febe» su WebView2 con CDP filtrato (WebView2CdpSession) e ripieghi di S2 (composizione, Edge), guscio nativo, avvisi, spostamento verificato della cartella dei dati, icona del marchio; un solo Febe.exe, installatore NSIS e zip portabile; guida docs/windows.md e prove dal vivo S1–S3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01Mzbb6zeFTjT6Rp8b92AVkA
This commit is contained in:
Claude committed 2026-10-13 21:50:25 +00:00
1 parent dc4d1fc738
commit b443adfa8b
73 files changed
+7914 -699

No files matched your search

+68
View File
@@ -0,0 +1,68 @@
namespace Febe.Desktop.Core;
/// <summary>
/// «Avvia Febe all'accensione del computer» (spec §12): the value <c>Febe</c> under
/// <c>HKCU\Software\Microsoft\Windows\CurrentVersion\Run</c>, per user, no administrator rights. Febe then starts with
/// <c>--nascosto</c>: only the icon in the notification area, the window stays closed.
/// </summary>
public static class Autostart
{
/// <summary>The registry key, under HKEY_CURRENT_USER.</summary>
public const string RunKey = @"Software\Microsoft\Windows\CurrentVersion\Run";
/// <summary>The name of the value.</summary>
public const string ValueName = "Febe";
/// <summary>The command written in the value: the quoted executable and <c>--nascosto</c>.</summary>
public static string Command(string executable)
{
ArgumentException.ThrowIfNullOrWhiteSpace(executable);
if (executable.Contains('"', StringComparison.Ordinal))
{
throw new ArgumentException("Percorso dell'eseguibile non valido.", nameof(executable));
}
return $"\"{executable}\" --nascosto";
}
/// <summary>True when <paramref name="value"/> starts this executable (a value left by another copy of Febe is not ours).</summary>
public static bool PointsTo(string? value, string executable)
{
if (string.IsNullOrWhiteSpace(value) || string.IsNullOrWhiteSpace(executable))
{
return false;
}
var text = value.Trim();
string target;
if (text.StartsWith('"'))
{
var end = text.IndexOf('"', 1);
if (end < 0)
{
return false;
}
target = text[1..end];
}
else
{
var space = text.IndexOf(' ', StringComparison.Ordinal);
target = space < 0 ? text : text[..space];
}
return string.Equals(Normalize(target), Normalize(executable), StringComparison.OrdinalIgnoreCase);
}
private static string Normalize(string path)
{
try
{
return Path.GetFullPath(path);
}
catch (Exception ex) when (ex is ArgumentException or NotSupportedException or PathTooLongException)
{
return path;
}
}
}