Skip to content

Configuration Reference

Carlos Hernandez edited this page Oct 15, 2026 · 6 revisions

Configuration Reference

Everything embala builds is driven by a single embala.toml. One [package] table describes the product; each optional format table ([msi], [app], [pkg], [nupkg], [setup]) opts that format into the build. Run embala build and every format with a section is produced; pass --formats msi,setup to narrow it.

Two rules hold everywhere and are worth internalizing before the field tables:

  • Keys are kebab-case, and unknown keys are rejected. Every table is parsed with unknown-field rejection, so a typo like display_name or mian-executable fails the parse rather than being silently ignored. If a key you set seems to have no effect, it didn't parse — check the spelling and the kebab-casing.
  • Relative paths resolve against the config file's directory, not your current directory. Every src, every icon, every license and script path is joined onto the folder that holds embala.toml. You can run embala build --config path/to/embala.toml from anywhere and the payload paths still resolve.

New to embala? Start with Getting-Started for a first build, then use this page as the field-by-field reference.

[package]

Product metadata shared by every format. Required.

Field Type Required / default Meaning
name string required Machine name. Must match [a-z0-9-]+ (lowercase ASCII letters, digits, hyphens). Used in output filenames.
display-name string required Human-facing product name (the .app bundle name, MSI product name, shortcut labels).
version string required Numeric x.y.z only — exactly three dot-separated segments, each digits. No pre-release tags, no fourth segment.
identifier string required Reverse-DNS identifier, e.g. com.example.app. At least two segments; each segment is alphanumeric or hyphen and non-empty.
publisher string required Publisher / vendor name.
description string required Short product description.
homepage string optional Project homepage URL.
license string optional SPDX license expression, e.g. MIT. A string, not a file path — see Gotchas.
copyright string optional Copyright line.
tags array of strings optional Each tag must be non-empty and contain no whitespace (tags are space-joined into the Chocolatey nuspec, so a space inside one would split it).
icon path optional Icon file. Serves as the .app icon fallback (must be a PNG there — it is rendered into the icns set) and is embedded into the nupkg (PNG or JPEG, at most 1 MiB).
require-license-acceptance bool default false Chocolatey license-acceptance gate. When true, [nupkg].license-url is required.

The name, version, and identifier constraints are strict because they feed Windows Installer and Chocolatey, which reject anything looser. The exact failures:

  • package.name must match [a-z0-9-]+
  • package.version must be numeric x.y.z — MSI requires it
  • package.identifier must be reverse-DNS-like, e.g. com.example.app

Payload files: files = [{ src, dest }]

[msi], [pkg], [nupkg], [setup], and each [setup] component share one file-entry shape:

Field Type Meaning
src path Source file on disk, resolved relative to the config file's directory.
dest string Install-relative destination path inside the package (format-specific).
files = [{ src = "dist/hello.exe", dest = "hello.exe" }]

dest is also the identity embala uses for shortcut and main-executable targets in [setup] (see Validation).

[pkg] file entries also accept an optional mode (see [pkg]). In every other section, mode is an unknown field and the config fails to parse.

[msi]

Windows Installer package.

Field Type Required / default Meaning
arch x86_64 | aarch64 required Target architecture. Only these two — 32-bit is rejected.
files array of { src, dest } required Payload files; dest is relative to the install directory.
main-executable string required The primary executable's dest.
service table optional Registers one payload file as a Windows service: name and start (auto | demand | disabled) are required; display-name, description, arguments and executable (a dest, default main-executable) are optional. See Windows service.
add-to-path bool default false Appends the install directory to the system PATH; uninstall removes it.

[app]

macOS .app bundle. The bundle is emitted unsigned; see Code-Signing to sign it.

Field Type Required / default Meaning
executable path required The Mach-O binary to place at Contents/MacOS/<name>.
icon path optional PNG icon. Falls back to [package].icon when omitted; if both are absent the bundle ships without an icon.
minimum-system-version string optional Sets LSMinimumSystemVersion in Info.plist, e.g. 11.0.

[pkg]

macOS flat installer package (.pkg).

Field Type Required / default Meaning
files array of { src, dest, mode } required Payload files; dest is relative to install-location. mode is optional permission bits written as a TOML octal integer, e.g. 0o600. Without it the file is 0755 if src is executable, else 0644.
directories array of { dest, mode } default [] Directories to ship with an explicit mode (e.g. { dest = "keys", mode = 0o700 }), even when no file is under them. mode defaults to 0755. Directories that are only implied by file dests stay 0755.
install-location string required Absolute install root, e.g. /usr/local.
enable-user-home bool default false Marks the package installable into the user's home domain (installer -target CurrentUserHomeDirectory), so it installs without sudo. Primarily for user-scope and test installs.
scripts path optional Directory packed like pkgbuild --scripts. A top-level preinstall and postinstall run as install hooks and must be executable; everything else ships beside them. See Install scripts.

[nupkg]

Chocolatey package. It carries two shapes selected by style, and the other fields are coupled to that choice:

Field Type Required / default Meaning
style embedded | download required embedded ships the payload inside the package; download fetches it at install time.
files array of { src, dest } default [] For embedded, the payload. For download, exactly one entry whose dest names the downloaded file.
url string download only Download URL. Required for download, forbidden for embedded.
checksum string download only Payload checksum. Required for download, forbidden for embedded.
project-source-url string optional Project source URL for the nuspec.
package-source-url string optional Package source URL for the nuspec.
release-notes string optional Release notes for the nuspec.
icon-url string optional Icon URL for the nuspec.
license-url string optional License URL. Required when [package].require-license-acceptance = true.

Field coupling, enforced at parse time:

  • style = "download" requires both url and checksum — nupkg: style "download" requires both url and checksum.
  • style = "embedded" forbids url and checksum — nupkg: url/checksum are only valid with style "download".
  • download needs exactly one files entry (its dest names the downloaded payload) — more or fewer fails the build.

The .nupkg is never code-signed; Chocolatey packages aren't Authenticode-signed.

[setup]

Standalone Windows setup.exe installer. It has two front-ends: a declarative set of tables that embala lowers into an install script, or a raw script you supply directly. The two are mutually exclusive (see Validation).

Field Type Required / default Meaning
arch x86_64 | aarch64 required Target architecture; selects the embedded uninstall stub.
files array of { src, dest } required Top-level payload installed unconditionally.
main-executable string optional A dest from the installed files; drives the primary shortcut target and the Add/Remove Programs DisplayIcon. Must match an installed dest.
install-mode per-user | per-machine | user-choice default per-user Install scope. user-choice lets the user pick at install time.
icon path optional Installer icon (PNG or ICO), patched into the stub's PE resources at build time — it becomes setup.exe's Explorer icon and the wizard/uninstall window icon. Falls back to [package].icon when unset. See Setup-Exe § Branding.
banner path optional Wizard welcome/finish banner. Must be a BMP (magic BM, validated at config load). Rendered 164×314 logical px in the left column of the welcome and finish pages.
license path optional Path to a license text file shown during install. A file path, not an SPDX string — see Gotchas.
components array of component tables default [] Optional selectable feature groups (below).
shortcuts array of shortcut tables default [] Start-menu / desktop shortcuts (below).
uninstall-options array of option tables default [] Checkboxes the uninstaller's confirm dialog shows (below). Allowed with both the declarative and the raw-script config.
script path optional Escape hatch: a raw install script that ships verbatim. Excludes components, shortcuts, and main-executable.
uninstall-script path optional Raw uninstall script, shipped verbatim on either the declarative or the raw path.

Every setup.exe also carries an automatic VERSIONINFO resource built from [package] (ProductName, CompanyName, description, copyright, and numeric/string versions) — there is no field for it. See Setup-Exe § Branding.

[[setup.components]]

A selectable feature group. Its files install only when the component is selected.

Field Type Required / default Meaning
id string required Unique component id (duplicates are rejected).
label string required Label shown in the component picker.
description string optional Longer description for the picker.
default bool default false Whether the component is pre-selected.
files array of { src, dest } default [] Payload installed when the component is selected.

[[setup.shortcuts]]

Field Type Required / default Meaning
name string required Shortcut display name.
target string required A dest from the installed files the shortcut points at. Must match an installed dest.
args string optional Command-line arguments for the shortcut.
icon string optional Icon for the shortcut.
location start-menu | desktop default start-menu Where the shortcut is created.

[[setup.uninstall-options]]

A checkbox shown in the uninstaller's confirm dialog (a "delete all app data" toggle is the canonical case). The uninstall script reads the result with embala.ui.selected(id); see Lua-Scripting and the uninstall flow in Setup-Exe.

Field Type Required / default Meaning
id string required Unique, non-empty option id read back via ui.selected(id).
label string required Non-empty checkbox label shown in the confirm dialog.
default bool default false Whether the checkbox starts ticked.

Raw script authoring (the script / uninstall-script API) is out of scope for this page; it is covered in Lua-Scripting.

[sign]

Optional. embala never implements a signature format — it shells out to a command you supply, once per artifact, with $f replaced by the artifact's absolute path. [sign.windows] and [sign.macos] each take a command (which must contain $f), and [sign.windows] additionally accepts signed-stub.

The full treatment — what actually clears SmartScreen and Gatekeeper, tool compatibility, timestamping, the signed-uninstaller flow, and SignPath — is in Code-Signing. It isn't repeated here.

Validation

Beyond the per-field rules above, embala enforces cross-field constraints at config-parse time. Each fails the build with a clear message:

Rule Why On failure
[setup].script cannot combine with components, shortcuts, or main-executable The raw script owns install behavior; the declarative sugar would be silently dropped. setup: \script` cannot be combined with `components`, `shortcuts`, or `main-executable``
[setup].main-executable must match an installed dest exactly It names a file the install lays down (top-level or component). setup: main-executable ... is not among the installed file dests
Each [setup] shortcut target must match an installed dest exactly Same reason — a shortcut can't point at a file that isn't installed. setup: shortcut ... target ... is not among the installed file dests
[setup] component ids must be unique Duplicate ids are ambiguous. setup: duplicate component id ...
[setup] uninstall-option ids must be unique and non-empty, and labels non-empty The id is the ui.selected key; an empty label is a blank checkbox. setup: uninstall-option id must be non-empty / setup: uninstall-option ... label must be non-empty / setup: duplicate uninstall-option id ...
[setup].banner must be a BMP It is patched as a raw bitmap resource; a non-BMP would render as garbage. setup: banner ... must be a BMP (magic "BM")
[nupkg] style = "download" needs url, checksum, and exactly one files entry The URL downloads one payload; its dest names the file. nupkg: style "download" requires both url and checksum / needs exactly one files entry
require-license-acceptance = true needs [nupkg].license-url Chocolatey rejects an acceptance-required package with no license URL. package.require-license-acceptance = true requires nupkg.license-url
[pkg] mode must be 0o000-0o777 setuid, setgid and sticky bits are not supported. mode 0o4755 must be permission bits only (0o000-0o777)
[pkg] files and directories dests must be unique, and no file may sit where a directory is declared or implied One path can't be two things in the payload. pkg: two entries share the dest ... / pkg dest ... is both a file and a directory
Each [sign] command must be non-empty and contain $f $f is where the artifact path is substituted; without it the tool signs nothing. sign.<platform>: command must be non-empty and contain $f

Payload src paths, the [setup].license file, the [setup].icon/banner files, and [setup] scripts must also exist on disk (resolved against the config file's directory) or the build fails when that format is built. The same goes for [pkg].scripts, which must be a directory whose preinstall and postinstall, if present, are executable. [msi] checks its service when the MSI is built: the name rules and an executable that matches a files dest.

Gotchas

  • license means two different things. [package].license is an SPDX string (e.g. MIT) that goes into package metadata. [setup].license is a path to a license text file displayed during Windows install. Same word, different type — don't put a file path in [package].license or an SPDX id in [setup].license.
  • Architecture is x86_64 or aarch64 only. Both [msi].arch and [setup].arch reject anything else, including 32-bit values like x86 — the build fails at parse time. arm64 Windows installers are supported and shipped; the x86_64 path is verified end-to-end on real Windows, while the aarch64 artifacts are cross-compile-tested but not yet verified on ARM64 hardware.
  • The .app icon must be PNG. [app].icon (and the [package].icon it falls back to) is decoded as PNG and rendered into the macOS icns set; a non-PNG file fails the .app build. The nupkg embedded icon is looser — PNG or JPEG, capped at 1 MiB.

Output filenames

Each format writes into the output directory (dist by default, or --out-dir). The names are derived from [package]:

Format Output name
msi <name>-<version>-<arch>.msi
app <display-name>.app (a bundle directory)
pkg <name>-<version>.pkg
nupkg <name>-<version>.nupkg
setup <name>-<version>-<arch>-setup.exe

<arch> is the format's configured arch (x86_64 or aarch64). Note the .app bundle is named from display-name, while every other format uses the machine name.

A complete example

One config exercising all five formats:

[package]
name = "hello"
display-name = "Embala Hello"
version = "0.1.0"
identifier = "ca.hrndz.embala.hello"
publisher = "Carlos Hernandez"
description = "Embala end-to-end test fixture"
homepage = "https://github.com/hurricanehrndz/embala"
license = "MIT"
copyright = "© 2026 Carlos Hernandez"
tags = ["cli", "embala", "demo"]
icon = "icon.png"

[msi]
arch = "x86_64"
main-executable = "hello.exe"
files = [{ src = "dist/hello.exe", dest = "hello.exe" }]

[app]
executable = "dist/hello-mac"

[pkg]
install-location = "/usr/local"
enable-user-home = true
files = [{ src = "hello.sh", dest = "bin/embala-hello" }]

[nupkg]
style = "embedded"
project-source-url = "https://github.com/hurricanehrndz/embala"
package-source-url = "https://github.com/hurricanehrndz/embala"
release-notes = "https://github.com/hurricanehrndz/embala/releases"
icon-url = "https://github.com/hurricanehrndz/embala/raw/main/fixtures/hello/icon.png"
license-url = "https://github.com/hurricanehrndz/embala/blob/main/LICENSE"
files = [{ src = "dist/hello.exe", dest = "hello.exe" }]

[setup]
arch = "x86_64"
main-executable = "hello.exe"
license = "license.txt"
files = [{ src = "dist/hello.exe", dest = "hello.exe" }]
components = [
  { id = "docs", label = "Documentation", description = "Offline readme", default = true, files = [{ src = "readme.txt", dest = "readme.txt" }] },
]

Clone this wiki locally