mgerhardy / caveexpress

CaveExpress is a classic 2D platformer with physics-based gameplay and dozens of levels. CavePacker is a Sokoban game.
http://www.caveproductions.org/
Other
144 stars 20 forks source link

LINUX: Desktop file improvements #99

Open akien-mga opened 8 years ago

akien-mga commented 8 years ago

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;

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 commented 8 years ago

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 commented 8 years ago

I did what was requested for the Categories in 89d196f2338b1498406e4ce9e14592a92a061c51

Will check out the others asap

mgerhardy commented 8 years ago

or better here: 0f47afd5f1831e1233d0b5aa4a96dba708925e0b

akien-mga commented 8 years ago

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 commented 8 years ago

Thanks, that typo is fixed now in master

mgerhardy commented 8 years ago

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 commented 8 years ago

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

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