packaging/flatpak/README.md
Install Flatpak and the build tools:
# Fedora
sudo dnf install flatpak flatpak-builder
# Ubuntu/Debian
sudo apt install flatpak flatpak-builder
# Arch
sudo pacman -S flatpak flatpak-builder
Install the required runtimes:
flatpak install flathub org.freedesktop.Platform//24.08
flatpak install flathub org.freedesktop.Sdk//24.08
flatpak install flathub org.freedesktop.Sdk.Extension.openjdk21//24.08
Flatpak builds run without network access, so all Maven/Gradle dependencies must be pre-downloaded and listed in a JSON manifest.
Add the plugin to your root build.gradle.kts:
plugins {
id("io.github.jwharm.flatpak-gradle-generator") version "1.7.0"
}
Then generate the sources file:
./gradlew flatpakGradleGenerator --no-configuration-cache
This creates flatpak-sources.json in the project root. Move it to this directory:
mv flatpak-sources.json packaging/flatpak/
The manifest uses pre-computed SHA256 hashes. To verify or update them:
# Gradle distribution
curl -sL https://services.gradle.org/distributions/gradle-8.14.3-bin.zip | sha256sum
# JBR x64 (check latest at https://github.com/JetBrains/JetBrainsRuntime/releases)
curl -sL https://cache-redirector.jetbrains.com/intellij-jbr/jbr-21.0.10-linux-x64-b1163.105.tar.gz | sha256sum
# JBR aarch64
curl -sL https://cache-redirector.jetbrains.com/intellij-jbr/jbr-21.0.10-linux-aarch64-b1163.105.tar.gz | sha256sum
Edit zed.rainxch.githubstore.metainfo.xml to point to hosted screenshot images.
Flathub requires at least one screenshot with a publicly accessible URL.
cd packaging/flatpak
# Build
flatpak-builder --force-clean build-dir zed.rainxch.githubstore.yml
# Test run
flatpak-builder --run build-dir zed.rainxch.githubstore.yml githubstore
# Install locally
flatpak-builder --user --install --force-clean build-dir zed.rainxch.githubstore.yml
# Validate AppStream metainfo
flatpak run org.freedesktop.appstream-glib validate zed.rainxch.githubstore.metainfo.xml
# Lint manifest (requires org.flatpak.Builder)
flatpak run --command=flatpak-builder-lint org.flatpak.Builder manifest zed.rainxch.githubstore.yml
https://github.com/flathub/flathubnew-pr branchflatpak-sources.json to the repo rootbot, buildflathub/zed.rainxch.githubstore| File | Purpose |
|---|---|
zed.rainxch.githubstore.yml | Flatpak build manifest |
zed.rainxch.githubstore.desktop | Desktop launcher entry |
zed.rainxch.githubstore.metainfo.xml | AppStream metadata for Flathub listing |
githubstore.sh | Shell launcher (invokes java -jar with bundled JRE) |
disable-android-for-flatpak.sh | Strips Android targets for sandbox build |
flatpak-sources.json | Pre-downloaded Gradle dependencies (generated) |