I have written an application and I would like to package it via FLATPAK. I put the files that make up the program inside a folder called "files", inside which there are three folders "bin", "share" and "lib". I then created the "manifest.json" file in which I wrote the following code:
"app-id": "org.tarro.lamiavideoteca",
"runtime": "org.freedesktop.Platform",
"runtime-version": "23.08",
"sdk": "org.freedesktop.Sdk",
"command": "lamiavideoteca",
"modules": [
{
"name": "lamiavideoteca",
"buildsystem": "simple",
"build-commands": [
"cp -r files/lib build-dir/",
"cp -r files/bin build-dir/",
"cp -r files/share build-dir/" ],
"sources": [
{
"type": "dir",
"path": "files/lib"
},
{
"type": "dir",
"path": "files/share"
},
{
"type": "dir",
"path": "files/bin"
}
]
}
]
From the terminal I give the following command:
flatpak-builder build-dir manifest.json
However, I get the following error:
Running: cp -r files/lib build-dir/ cp: cannot stat 'files/lib': No such file or directory Error: module lamiavideoteca: Processo figlio uscito con codice 1
The folder exists so I can't figure it out
PS. I've already tried to package my application via SNAP, but even though the package is generated, the executable doesn't look for libraries in the "lib" directory within the snap, but in the operating system's /usr/lib directory. So after a week and several questions asked on the net I decided to abandon (momentarily the SNAP) and to find with FLATPAK. I would also like to add that I was able to use deb and AppImage, but I would like to learn how to do it through FLATPAK as I think it is a great packaging system to spread your applications in the Linux world. Thanks for the help.
What I have tried:
I tried everything. I even relied on ChatGPT to review the code, but I couldn't.