Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINUX: Desktop file improvements #99

Open
akien-mga opened this issue Jul 29, 2016 · 7 comments
Open

LINUX: Desktop file improvements #99

akien-mga opened this issue Jul 29, 2016 · 7 comments

Comments

@akien-mga
Copy link
Contributor

Hi there,

There are currently several issues with the Linux .desktop files as they are generated by the buildsystem, for example:

[Desktop Entry]
Version=1.0
Name=CavePacker
GenericName=CavePacker
Comment=CavePacker is a Sokoban game.\n\nIt is a puzzle game where you have to move the packages onto their targets without getting stuck. The lesser steps you made for solving a level, the better.\n\nYou may only push but not pull packages.\n
Exec=cavepacker
Icon=cavepacker
Terminal=false
Type=Application
Categories=Game;
StartupNotify=false
Keywords=sokoban;puzzle;packages;
  • The GenericName field should in theory describe the kind of game that this is; see it as a short description of the game. Here it could be "Sokoban game". It's not the most important though, many projects do use the same value as for Name.
  • The comment is way too long, and the newline characters likely won't be understood by most DEs.
  • The Icon path is wrong, as icons are installed as ${name}-icon.png. I would suggest to keep the field like that but fix the icons installation name (you can use the RENAME option for that when installing files with CMake).
  • The Categories field is not descriptive enough. Most DEs rely on those values to put the desktop entry in the proper submenus. Here it should be Game;LogicGame; (the ending semicolon is important - not critical, but linters will complain if it's missing).

All in all, I feel that the current system you use to generate the .desktop files by filling the templates using values from docs/${name}/ is a bit overkill. To get the values right, you'd have to add at least COMMENT and CATEGORIES files to each docs folder so that they could be parsed and used in the respective desktop files...

It might be a bit less elegant, but I think it would be much easier to just provide a hardcoded .desktop file for each game. If you really want to keep the template + parsed content scheme, then you should probably put all .deskop relevant content in one file as some XML, JSON or YAML and have CMake parse it.

More info about desktop entries:

@akien-mga
Copy link
Contributor Author

As a side note, I've finally imported caveexpress in my distro, Mageia: http://svnweb.mageia.org/packages/cauldron/caveexpress/current/SPECS/caveexpress.spec?view=markup
Thanks for your great work to ease the packaging work :)

@mgerhardy
Copy link
Owner

I did what was requested for the Categories in 89d196f

Will check out the others asap

@mgerhardy
Copy link
Owner

or better here: 0f47afd

@akien-mga
Copy link
Contributor Author

akien-mga commented Jul 30, 2016

I did what was requested for the Categories in 89d196f

Ah I had missed that. It works for CaveExpress but not for CavePacker, I guess you'd have to replace Category for CATEGORY.

@mgerhardy
Copy link
Owner

Thanks, that typo is fixed now in master

@mgerhardy
Copy link
Owner

The problem with renaming the icons in the install step is, that all the other installers and packages (windows, osx, ios, android, steamlink, ...) rely on the name. So I will most likely just fix the desktop file template.

@mgerhardy
Copy link
Owner

mgerhardy commented Jul 30, 2016

which reminds me... what about appdata.xml? Do you make use of this file, too?

https://people.freedesktop.org/~hughsient/appdata/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants