Search code examples
jsonflatpak

Ship file with flatpak


I have a json file with some data that I want to ship with my application.

I want to include it on the folder /app/share/<app-name>/data/<file>.json.

I have researched, looked on the flatpak manifest documentation and the manifest of other applications, but I saw no mention to this option.

So, how would be the proper way of adding this file on the manifest?


Solution

  • You can do this by adding this file as part of the "sources" field in your module, and then installing it.

    An example of this in the Flathub repo for Spotify. There, we definitely have a need for shipping separate files that make the integration into your DE seamless, as Spotify doesn't ship those. Concretely, let's look at the desktop launch file that is added: