flatpak-docs icon indicating copy to clipboard operation
flatpak-docs copied to clipboard

A section about exporting files is missing

Open kparal opened this issue 7 years ago • 6 comments

The current documentation doesn't describe nor provides any examples how to properly export a desktop file, a project icon, and an AppStream file. It's currently very hard to find that information, since most projects on flathub include this as part of the upstream release, and therefore don't contain any specific instructions in their manifests. Please create a new section showing how to export these files.

kparal avatar Nov 30 '17 14:11 kparal

At a high level it is pretty simple, all data files you install just must match your id and it will "just work".

That certainly needs to be made explicit somewhere though.

TingPing avatar Mar 22 '18 16:03 TingPing

Some of this verges on writing documentation for how to integrate on Linux desktops more generally. I've created issue #99 for this.

allanday avatar Mar 22 '18 16:03 allanday

I'm wondering if /app/extra/export/share/ path has special meaning, which is undocumented, as here?: https://github.com/flathub/us.zoom.Zoom/blob/2974a744c4b78a03c0655f0cd781c170a60e9168/us.zoom.Zoom.json#L37

bam80 avatar Nov 14 '18 18:11 bam80

@bam80 files that must be visible outside the sandbox are placed there, however, it isn't necessary given that flatpak-builder will automatically do it for you provided that you follow the conventions outlined here:

https://github.com/flatpak/flatpak-docs/blob/master/docs/conventions.rst

The reason it is necessary in your example is that the icon is downloaded on the user's machine during the install phase (as part of the extra data), at which point flatpak-builder has already finished running.

This should be documented somewhere, but I'm not sure if a new section should be added or if a clarifying note should be included in the freedesktop conventions. It would possibly make more sense to have this in a section about extra-data, as that's when it becomes relevant.

cpba avatar Nov 15 '18 11:11 cpba

@cpba thanks. I understand that it's necessary only when the files become available at install time. But as a single possible way to export them at that time, it MUST be documented somewhere! For now, I've found out it even possible occasionally because of that sample.

bam80 avatar Nov 15 '18 11:11 bam80

this is now documented in https://docs.flatpak.org/en/latest/conventions.html#desktop-files

Flatpak will export the following desktop filename patterns: $FLATPAK_ID.desktop, $FLATPAK_ID.foo.desktop, $FLATPAK_ID-foo.desktop.

Flatpak will export the following icon name patterns: $FLATPAK_ID, $FLATPAK_ID.foo, $FLATPAK_ID-foo. They may end with an extension suffix like .png, .svg.

bbhtt avatar Mar 26 '24 02:03 bbhtt