如何为Linux设置应用程序的桌面图标:KDE,Gnome等? [英] How to set my application's desktop icon for Linux: KDE, Gnome etc?

查看:432
本文介绍了如何为Linux设置应用程序的桌面图标:KDE,Gnome等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可在Windows,Linux和Macintosh上运行的跨平台程序。我的Windows版本有一个Icon,但我不知道如何为我的Linux版本制作一个。
是否有KDE,Gnome等的标准格式或者我必须为每个格式做一些特殊的事情吗?

I have a cross platform program that runs on Windows, Linux and Macintosh. My windows version has an Icon but I don't know how to make have one for my Linux build. Is there a standard format for KDE, Gnome etc. or will I have to do something special for each one?

我的应用程序是用c ++编写的并且分发为source所以最终用户将使用gcc编译它。

My app is in c++ and distributed as source so the end user will compile it with gcc.

如果我可以在我的exe二进制文件中直接嵌入最好的图标。

If I can have the icon embedded directly inside my exe binary that would be the best.

推荐答案

对于Gnome和Kde,您可能希望在应用程序中包含一个桌面文件,用于定义如何启动它。该规范可以在此处找到。如果您的应用程序附带了安装程序,您可能希望让它生成此桌面文件并将其放在正确的位置以生成菜单条目等等

For Gnome and Kde, you would probably want to include a desktop file with your app that defines how it will be launched. The specification can be found here. If you have an installer included with your app, you would probably want to have it generate this desktop file and put it in the right places to make menu entries and whatnot

这篇关于如何为Linux设置应用程序的桌面图标:KDE,Gnome等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆