AppImageSpec icon indicating copy to clipboard operation
AppImageSpec copied to clipboard

Name of desktop file in appdir root SHOULD match?

Open kossebau opened this issue 7 years ago • 2 comments

The current section about "filesystem image" has this recommendation for the name of the desktop file in the root dir:

  • SHOULD contain exactly one $APPNAME.desktop file in its root directory with $APPNAME being the name of the payload application

This conflicts slightly with the fact that for existing applications which follow latest xdg recommendations the desktop file names these days have tld-prefixes (e.g. "org.kde.kdevelop.desktop", "org.kde.krita.desktop", "org.qt-project.qtcreator.desktop").

Also does it not match the AppDir specification at docs.appimage.org where it says:

The name of the file doesn’t matter, as long as it carries the .desktop extension.

The latter is reflected also by code like from the appimagetool which picks up whatever first desktop file there is gchar *desktop_file = find_first_matching_file_nonrecursive(source, "*.desktop");

So please sync the specs and extend it with some examples of applications that normally have a desktop file with a tld-prefixed name. That should help developers manually compiling appdir content to know what names are fine to use.

kossebau avatar Dec 25 '18 18:12 kossebau

I think we should change the AppImage spec to reflect the current situation instead of increasing the number of constraints in appimagetool. I don't think more strict rules here have any positive effect, they might even break existing third-party tools. The "AppDir spec" is more precise, and I think we should use it to adjust the AppImage spec. (Of course, the AppImage spec is always the top priority document which we rely on, but it should be correct.)

TheAssassin avatar Dec 25 '18 19:12 TheAssassin

When I wrote the spec I meant to re-use what was already out there, with as little additional "glue" added as we could get away with:

  • The ROX AppDir specification did not mandate a desktop file to be in the top-level directory of the AppDir
  • However, for desktop integration purposes, we need metadata for exactly one main application. For this purpose, we use a single desktop file in the top-level of the AppDir. Unfortunately, desktop files specify much less metadata (e.g., the application version, author, license are missing) [compare that to macOS Info.plist files]
  • AppStream added some of this metadata, unfortunately in a "hard" and ever-changing XML format. I think(!) that AppStream calls the filename of the desktop file, without the filename extension", the ID of the application and uses that to match the AppStream metainfo file to the corresponding desktop file. Unfortunately, it recommends a (in my personal view) rather convoluted reverse-TLD notation, which I see as overly complicated. I think krita.desktop is much nicer than org.kde.krita.desktop, especially for indie apps that may not even have a TLD. Luckily, everything still seems to be working even when reverse-TLD notation is not used

probonopd avatar Dec 26 '18 23:12 probonopd