calamares/ci/AppImage.md
Adriaan de Groot ed2f9b744d CI: AppImage support
- Add a script for building a Calamares AppImage file (this is
   useful in *some* limited contexts, not a general way to distribute
   Calamares since it's much more efficient to use installed libs).
 - Add example config files for this AppImage build.
 - Download the linuxdeploy tools if they are missing
 - Document script flags some more
2019-03-19 11:11:43 -04:00

1.9 KiB

AppImage building for Calamares

It is possible to build Calamares as an AppImage (perhaps other containerized formats as well). This might make sense for OEM phase-1 deployments in environments where Calamares is not using the native toolkit.

AppImage tools

You will need

These tools should run -- they are bundled as AppImages after all -- on any modern Linux system. The AppImage packaging documentation explains how the whole tooling works.

If the tools are not present, the build script (see below) will download them, but you should save them for later.

AppImage build

From the source directory, run ci/AppImage.sh:

  • Use --tools-dir to copy the tools from a local cache rather than downloading them again.
  • Run it with --cmake-args for special CMake handling.
  • Use --skip-build to avoid rebuilding Calamares all the time.
  • Use --config-dir to copy in Calamares configuration files (e.g. settings.conf and the module configuration files) from a given directory.

The build process will:

  • copy (or download) the AppImage tools into a fresh build directory
  • configure and build Calamares with suitable settings
  • modifies the standard .desktop file to be AppImage-compatible
  • builds the image with the AppImage tools

AppImage caveats

The resulting AppImage, Calamares-x86_64.AppImage, can be run as if it is a regular Calamares executable. For internal reasons it always passes the -X flag; any other command-line flags are passed in unchanged. Internally, XDG_*_DIRS are used to get Calamares to find the resources inside the AppImage rather than in the host system.