.. | ||
build-flatpak.sh | ||
com.veilid.veilidchat.desktop | ||
com.veilid.veilidchat.metainfo.xml | ||
com.veilid.veilidchat.png | ||
com.veilid.veilidchat.yml | ||
README.md |
Prerequisites
flatpak install -y org.gnome.Platform/x86_64/45
flatpak install -y org.gnome.Sdk/x86_64/45
Building the Flatpak
We imagine this is a separate git repo containing the information specifically for building the flatpak, as that is how an app is built for FlatHub.
Important configuration files are as follows:
com.veilid.veilidchat.yml
-- Flatpak manifest, contains the Flatpak configuration and information on where to get the build filesbuild-flatpak.sh
-- Shell script that will be called by the manifest to assemble the flatpak
Build
This should be built on an older version on Linux so that it will run on the widest possible set of Linux installations. Recommend docker or a CI pipeline like GitHub actions using the oldest supported Ubuntu LTS.
Create Flatpak repo of the app
This is esentially what will happen when being built by FlatHub.
flatpak-builder --force-clean build-dir com.veilid.veilidchat.yml --repo=repo
Publish to app store
When this succeeds you can proceed to submit to an app store like Flathub.
The remainder is optional if we want to try installing locally, however only the first step is needed to succeed in order to publish to FlatHub.
Bundle the Flatpak repo into an installable .flatpak
file
This part is not done when building for FlatHub.
flatpak build-bundle repo com.veilid.veilidchat.flatpak com.veilid.veilidchat
We now have a .flatpak
file that we can install on any machine with
Flatpak:
flatpak install --user com.veilid.veilidchat.flatpak
We can see that it is installed:
flatpak list --app | grep com.veilid.veilidchat
Flutter App com.veilid.veilidchat 1.0.0 master flutterapp-origin user
If we search for "Flutter App" in the system application menu there should be an entry for the app with the proper name and icon.
We can also uninstall our test flatpak:
flatpak remove com.veilid.veilidchat