Help me to create FLATPAK of my program

Hello everyone. I created a program to catalog the Films that one owns, called LaMiaVideoteca. I’ve ported it to both Windows and Linux. On the latter I can already package it in deb and AppImage. I would now like to package it in FLATPAK (via SNAP I failed). So, I created a folder called lamiavideoteca, inside which I put the executable, the images (which the program needs), the libraries that the application needs, the share folder containing the icon and the file for the shortcut (. Desktop). I generated a org.tarro.lamiavideoteca.yml file in which I put the following code:

id: org.flatpak.LaMiaVideoteca

runtime: org.freedesktop.Platform

runtime-version: '23.08'

sdk: org.freedesktop.Sdk

command: LaMiaVideoteca

modules:

- name: LaMiaVideoteca

buildsystem: simple

build-commands:

- install -D LaMiaVideoteca /app/bin/LaMiaVideoteca

- cp -r Copertine /app/bin/Copertine

- cp -r lib /app/bin/lib

sources:

- type: file

path: LaMiaVideoteca

The compilation I do from the folder where the org.tarro.lamiavideoteca.yml is located with the flatpak-builder build-dir org.tarro.lamiavideoteca.yml command fails telling me that the Covers and lib directories do not exist, BUT they EXIST. Someone would know how to help me. Thanks for the help.

I think best place for help is
For snap

For flatpak

They can help you from package to verification.

1 Like

On fedora the /app directory does not exist by default.
You must structure it properly for use on fedora.
Also, since the /app/bin directory appear intended to contain binaries you must adapt that to the fedora file system structure.

Fedora library files for a 64 bit system mostly reside in /usr/lib64
Binary files mostly reside in /usr/bin

Snaps are mostly discouraged on fedora since it is not native to fedora.

I tried to ask on https://discourse.flathub.org. Thanks

@enrico94 I should ask what tools you are using to create the application. Gnome recommends Builder and it’s pretty easy for this type of application.

Here’s what a .yaml file “could” look like for your app :

id: org.flatpak.LaMiaVideoteca
runtime: org.freedesktop.Platform
runtime-version: '23.08'
sdk: org.freedesktop.Sdk
command: LaMiaVideoteca

modules:
  - name: LaMiaVideoteca
    buildsystem: simple
    build-commands:
      - install -D LaMiaVideoteca /app/bin/LaMiaVideoteca
      - install -D -m 644 Copertine/* /app/share/Copertine
      - install -D -m 644 lib/* /app/lib
    sources:
      - type: file
        path: LaMiaVideoteca

There are a couple things to note here and you might have some snags, Post if you have questions.