# Add Flatpak build system and support \(\#12006\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/f7115be3d18c8964d45fb8efc1941080b20acc32)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: f7115be3d18c8964d45fb8efc1941080b20acc32

Requested commit: f7115be3d18c8964d45fb8efc1941080b20acc32

Commit: f7115be3d18c8964d45fb8efc1941080b20acc32

Tree: 904851e688c710cf620efed270be3c67b6e41b44

Author: Owen Law

Committer: GitHub

## Message

```
Add Flatpak build system and support (#12006)

ping #6687 

This is the third iteration of this PR ([v2
here](https://github.com/zed-industries/zed/pull/11949)) and uses a
different approach to the first two (the process wrapper lib was a
maintainability nightmare). While the first two attempted to spawn the
necessary processes using flatpak-spawn and host-spawn from the app
inside the sandbox, this version first spawns the cli binary which then
restart's itself *outside* of the sandbox using flatpak-spawn. The
restarted cli process than can call the bundled app binary normally,
with no need for flatpak-spawn because it is already outside of the
sandbox. This is done instead of keeping the cli in the sandbox because
ipc becomes very difficult and broken when trying to do it across the
sandbox.

Gnome software (example using nightly channel and release notes
generated using the script):
<img
src="https://github.com/zed-industries/zed/assets/81528246/6391d217-0f44-4638-9569-88c46e5fc4ba"
width="600"/>

TODO in this PR:
- [x] Bundle libs.
- [x] Cleanup release note converter.

Future work:

- [ ] Auto-update dialog
- [ ] Flatpak auto-update (complete 'Auto-update dialog' first)
- [ ] Experimental
[bundle](https://docs.flatpak.org/en/latest/single-file-bundles.html)
releases for feedback (?).

*(?) = Maybe / Request for feedback*

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
```

## Parents

- [7e3ab9acc93d29c12aee4ab381dd723ca303caf4](https://git.cafe/gitcafe/zed/commit/7e3ab9acc93d29c12aee4ab381dd723ca303caf4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/f7115be3d18c8964d45fb8efc1941080b20acc32?format=markdown)
