From 9c8aba89848b47fd33015d4cb3888668293fb853 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20H=C4=83loiu?= Date: Sat, 28 May 2022 21:43:43 +0300 Subject: [PATCH] docs: add Flatpak documentation (#6893) --- docs/configuration/configuration.md | 2 +- docs/configuration/flatpak.md | 84 +++++++++++++++++++ docs/configuration/linux.md | 2 +- mkdocs.yml | 3 +- .../src/options/linuxOptions.ts | 2 +- scripts/jsdoc2md2html.js | 4 + 6 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 docs/configuration/flatpak.md diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index 084395589d7..ad076af76e5 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -69,7 +69,7 @@ Env file `electron-builder.env` in the current dir ([example](https://github.com
  • deb DebOptions - Debian package options.
  • snap SnapOptions - Snap options.
  • appImage AppImageOptions - AppImage options.
  • -
  • flatpak FlatpakOptions | “undefined” - Flatpak options.
  • +
  • flatpak FlatpakOptions - Flatpak options.
  • pacman LinuxTargetSpecificOptions
  • rpm LinuxTargetSpecificOptions
  • freebsd LinuxTargetSpecificOptions
  • diff --git a/docs/configuration/flatpak.md b/docs/configuration/flatpak.md new file mode 100644 index 00000000000..4a3b47cdc49 --- /dev/null +++ b/docs/configuration/flatpak.md @@ -0,0 +1,84 @@ +!!! warning "Single-file Flatpak bundles" + Currently `electron-builder` does **not** support publishing apps to Flatpak repositories like [Flathub](https://flathub.org/). This means the Flatpak support in `electron-builder` is limited to generating [single-file bundles](https://docs.flatpak.org/en/latest/single-file-bundles.html) which have various limitations compared to app bundles installed from a repository. + + For what it's worth, there are [some](https://discourse.flathub.org/t/seeking-contractors-for-work-on-flathub-project/1889) [plans](https://discourse.flathub.org/t/is-it-possible-to-publish-a-self-contained-flatpak-file-to-flathub/2083) to make it easier to publish Electron apps to Flathub. When that happens, it should be easier to create a Flathub publisher for `electron-builder` (which would work similary to the other publishers). + +The top-level [flatpak](configuration.md#Configuration-flatpak) key contains a set of options instructing electron-builder on how it should build a [Flatpak](https://flatpak.org/) bundle. + +!!! info "Build dependencies" + The `flatpak` and `flatpak-builder` packages need to be installed in order to build Flatpak bundles. + + + +

    Inherited from CommonLinuxOptions:

    + +

    Inherited from TargetSpecificOptions:

    + + + + +--- + +## Troubleshooting + +If the Flatpak build process fails with an error message like "flatpak failed with status code X", setting the `DEBUG="@malept/flatpak-bundler"` environment variable should provide more context about the error. + +!!! example "Enable Flatpak build debug logging" + `env DEBUG="@malept/flatpak-bundler" electron-builder build --linux flatpak` diff --git a/docs/configuration/linux.md b/docs/configuration/linux.md index ef81cfe8086..ae900817fe0 100644 --- a/docs/configuration/linux.md +++ b/docs/configuration/linux.md @@ -3,7 +3,7 @@ The top-level [linux](configuration.md#Configuration-linux) key contains set of