Aller directement au contenu

Développer une application avec un manifeste de Flatpak

Ce flux de travail est utilisé pour le développement ou le test des modifications apportées à une application avec un manifeste Flatpak grâce à flatpak-builder.

One-time setup

Créez une télécommande locale au niveau de l'utilisateur nommée « flathub-apps-built-locally » pour contenir vos applications Flatpak créées à partir des sources :

flatpak remote-add --user --if-not-exists flathub-apps-built-locally https://flathub.org/repo/flathub.flatpakrepo

Create a folder to hold source code. This is skippable if it already exists:

mkdir -p ~/kde/src/

Utiliser

Go into the folder where you store source code:

cd ~/kde/src/

Check out the source code of the app you’d like to build. For example, KDE’s Filelight disk space analyzer app:

git clone git@invent.kde.org:utilities/filelight.git

Go into the newly-checked-out git repo for the app:

cd ~/kde/src/filelight

Now make changes, check out a branch to test, etc.

Then build a Flatpak version of the app:

flatpak-builder build --user --install-deps-from=flathub-apps-built-locally --force-clean --ccache --install .flatpak-manifest.json

At this point, flatpak-builder has created a Flatpak repo named filelight-origin and exported the freshly built Filelight Flatpak to this repo.

Lancer le maintenant :

org.kde.filelight

Informations supplémentaires


Article rédigé par sous licence CC-BY-4.0.