Skip to content

electron: Various tweaks #577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions docs/electron.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Electron
========

Due to the nature of Electron, building Electron applications as Flatpaks
requires a few extra steps compared with other applications. Thankfully,
several tools and resources are available which make this much easier.
Due to the nature of `Electron <https://www.electronjs.org/>`_, building
Electron applications as Flatpaks requires a few extra steps compared with other
applications. Thankfully, several tools and resources are available which make
this much easier.

This guide provides information on how building Electron applications differs
from other applications. It also includes information on the tooling for
Expand Down Expand Up @@ -251,21 +252,22 @@ often best to link to it from the main manifest, which is done by adding
Launching the app
-----------------

The Electron app is run through a simple script. This can be given any name
but must be specified in the manifest's ``"command":`` property. See below
a sample wrapper for launching app:
The Electron app is run through a simple shell script that wraps
`zypak <https://github.com/refi64/zypak>`_. This script can be given any name
but must be specified in the manifest's ``command`` property. See below for a
sample wrapper to launch the app:

.. code-block:: yaml

- type: script
dest-filename: run.sh
commands:
- zypak-wrapper.sh /app/main/electron-sample-app "$@"
- zypak-wrapper /app/main/electron-sample-app "$@"

Build commands
--------------

Last but not least, since the simple build option is being used, a list of
Last but not least, since the ``simple`` buildsystem is being used, a list of
build commands must be provided. As can be seen, ``npm`` is run with the
``npm_config_offline=true`` environment variable, installing dependencies from
packages that have already been cached. These are copied to ``/app/main/``.
Expand Down