From 26a0f59901a95b9123a5e446147feb592aa66023 Mon Sep 17 00:00:00 2001 From: home-PC Date: Tue, 19 May 2026 01:41:37 +0800 Subject: [PATCH] =?UTF-8?q?fix(release):=20=E6=94=AF=E6=8C=81=E5=8D=95?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=8F=91=E5=B8=83=E4=BA=A7=E7=89=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改为从应用程序自身提取托盘图标,移除发布目录中的外部 app.ico 依赖。 确保 v0.1.0 发布目录只包含 OmniNotify.exe,便于手动上传到 Gitea Release。 --- App.xaml.cs | 3 +-- OmniNotify.csproj | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/App.xaml.cs b/App.xaml.cs index e5262fe..efa027c 100644 --- a/App.xaml.cs +++ b/App.xaml.cs @@ -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 }; diff --git a/OmniNotify.csproj b/OmniNotify.csproj index ce84f78..2c1cc84 100644 --- a/OmniNotify.csproj +++ b/OmniNotify.csproj @@ -10,8 +10,4 @@ app.ico - - - -