fix(release): 支持单文件发布产物
改为从应用程序自身提取托盘图标,移除发布目录中的外部 app.ico 依赖。 确保 v0.1.0 发布目录只包含 OmniNotify.exe,便于手动上传到 Gitea Release。
This commit is contained in:
@@ -86,10 +86,9 @@ public partial class App : System.Windows.Application
|
||||
|
||||
private void CreateTrayIcon()
|
||||
{
|
||||
var iconPath = Path.Combine(AppContext.BaseDirectory, "app.ico");
|
||||
_notifyIcon = new Forms.NotifyIcon
|
||||
{
|
||||
Icon = new System.Drawing.Icon(iconPath),
|
||||
Icon = System.Drawing.Icon.ExtractAssociatedIcon(Environment.ProcessPath ?? "") ?? System.Drawing.SystemIcons.Application,
|
||||
Text = "Omni-Notify",
|
||||
Visible = true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user