即使在打包后,Electron 应用程序通知也会指出发送通知的应用程序是 electro.app.<App Name>

Tap*_*ose 0 cross-platform desktop-application electron

在制作了一个基本的 CPU 监视器应用程序(https://drive.google.com/drive/folders/1f5yGQc4LFGj2baEjyHl5TT_LD5kM09uZ?usp=sharing)(当 CPU 利用率超过一定百分比时发送通知)后,我打包了该项目。但通知指出创建通知的应用程序electron.app.CPU Monitor代替了CPU Monitor. 如何排除不需要的electron.app部分?

通知截图

小智 7

最近似乎已经回答了这个问题:how can you overwrite or remove the signature \xe2\x80\x9celectron.app.Electron\xe2\x80\x9d from the Desktop notification

\n

在Windows上,似乎必须事先调用app.setAppUserModelId() :

\n
if (process.platform === \'win32\')\n{\n    app.setAppUserModelId(app.name)\n}\n
Run Code Online (Sandbox Code Playgroud)\n