release: 发布 v0.2.0
本次发布聚焦降低误报风险、规范发布产物和重构仓库文档。 主要变更: - 删除开机自启功能,移除 Windows 启动项注册表写入逻辑。 - 新增标准应用清单,声明应用以普通用户权限运行。 - 新增 framework-dependent 发布脚本,保持发布包不内置 .NET 运行时。 - 禁用单文件、自解压、裁剪和 ReadyToRun 发布方式,保持产物结构透明。 - 将发布资产命名规范化为 omni-notify-v0.2.0-win-x64.zip。 - 重写文档结构:README.md 面向用户,docs/development.md 面向开发者。 - 删除过时且内容重复的 PRD.md 与 docs/usage.md。 验证: - dotnet build .\OmniNotify.csproj -c Release 构建通过。 - 发布脚本成功生成 v0.2.0 win-x64 压缩包。 - 发布目录未包含 coreclr.dll、hostfxr.dll、hostpolicy.dll 等 .NET 运行时文件。
This commit is contained in:
27
Services.cs
27
Services.cs
@@ -1,10 +1,8 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using System.Windows;
|
||||
using Microsoft.Win32;
|
||||
|
||||
namespace OmniNotify;
|
||||
|
||||
@@ -61,7 +59,6 @@ public sealed class AppStore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class NotificationRouter
|
||||
{
|
||||
private readonly AppState _state;
|
||||
@@ -169,7 +166,6 @@ public sealed class NotificationRouter
|
||||
StateChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class LocalHttpServer : IDisposable
|
||||
{
|
||||
private readonly NotificationRouter _router;
|
||||
@@ -273,26 +269,3 @@ public sealed class LocalHttpServer : IDisposable
|
||||
_listener?.Close();
|
||||
}
|
||||
}
|
||||
|
||||
public static class StartupManager
|
||||
{
|
||||
private const string AppName = "OmniNotify";
|
||||
|
||||
public static void Apply(bool enabled)
|
||||
{
|
||||
using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
|
||||
if (key is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
key.SetValue(AppName, Process.GetCurrentProcess().MainModule?.FileName ?? "");
|
||||
}
|
||||
else
|
||||
{
|
||||
key.DeleteValue(AppName, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user