Fix flatpak packaging to a working state

This should make testing Flatpak builds a lot easier.

To build, enter `flatpak/` directory and run:

    flatpak-builder --repo=repo builddir com.mitchellh.ghostty.yml

alternatively, using org.flatpak.Builder flatpak:

    flatpak run -p org.flatpak.Builder \
      --repo=repo \
      builddir \
      com.mitchellh.ghostty.yml

The resulting flatpak can be installed using

    flatpak install ./repo com.mitchellh.ghostty

Credit of AppStream metadata goes to @yorickpeterse.
This commit is contained in:
Leorize
2025-03-12 03:19:16 -05:00
committed by Mitchell Hashimoto
parent 17b0bf585d
commit ebc169dbaf
8 changed files with 468 additions and 59 deletions

View File

@@ -202,6 +202,12 @@ pub fn init(b: *std.Build, cfg: *const Config) !GhosttyResources {
"share/applications/com.mitchellh.ghostty.desktop",
).step);
// AppStream metainfo so that application has rich metadata within app stores
try steps.append(&b.addInstallFile(
b.path("dist/linux/com.mitchellh.ghostty.metainfo.xml"),
"share/metainfo/com.mitchellh.ghostty.metainfo.xml",
).step);
// Right click menu action for Plasma desktop
try steps.append(&b.addInstallFile(
b.path("dist/linux/ghostty_dolphin.desktop"),