Vývoj aplikácie s manifestom Flatpaku
Tento postup sa používa na vývoj alebo testovanie zmien v aplikácii s manifestom Flatpaku pomocou flatpak-builder.
One-time setup
Vytvorte lokálny používateľský zdroj s názvom „flathub-apps-built-locally“, kam sa uložia vaše aplikácie Flatpak zostavené zo zdrojového kódu:
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/
Použitie
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.
Teraz ho spustite:
org.kde.filelight
Viac informácií
- https://docs.flatpak.org/en/latest/getting-started.html
- https://develop.kde.org/docs/packaging/flatpak/packaging/
Článok napísal Nate Graham pod licenciou CC-BY-4.0.