本文介绍了如何在Linux中使用electronic-packager创建自定义图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循本教程:



解决方案

尝试此命令: electron-packager。MyApp --platform = linux --arch = x64 --version = 0.37.2 --icon =< path / to / your-icon-name>


Following this tutorial:

https://www.youtube.com/watch?v=dz5SnmBzBXc

I did this: electron-packager . MyApp --platform=linux --arch=x64 --version=0.37.2 && cp icon.png MyApp-linux-x64/resources/atom.png

The icon is saved into the resources folder, but the icon doesn't show in my Ubuntu left panel (I just see the default cog).

What the correct way of setting up the icon for Linux?

EDIT:

I also tried this: var mainWindow = new BrowserWindow({ icon: 'file://' + __dirname + '/resources/atom.png',

No luck.

EDIT 2

Here's a screenshot of the whole thing:

解决方案

Try this command: electron-packager . MyApp --platform=linux --arch=x64 --version=0.37.2 --icon=<path/to/your-icon-name>

这篇关于如何在Linux中使用electronic-packager创建自定义图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 12:09