Documentation
¶
Overview ¶
Package enginebin answers one question for the whole server: which of the heavy conversion programs — ffmpeg, ImageMagick, LibreOffice, Ghostscript, poppler, rsvg — are installed here, and which binary each one is.
Why there is exactly one answer ¶
Until v0.43.0 two probes asked it separately and disagreed. The About page (internal/capability) counted ImageMagick as present when `magick` OR `convert` was on PATH; the app runtime (internal/wasmplugin) additionally checked that `convert` really was ImageMagick. On Windows `convert` resolves to C:\Windows\System32\convert.exe — the FAT→NTFS volume converter — so the About page said "ImageMagick: OK" while Apps and the converter said it was not installed (release-candidate sweep, 2026-09-21). Every screen now reads Probe(), so the answer a person sees cannot depend on which page they are looking at.
The probe runs once per process. Installing an engine therefore takes a restart to show up — on every screen at once, which is the point: a live re-probe on one page and a boot-time answer on another is the disagreement this package exists to remove.
Index ¶
Constants ¶
const ( FFmpeg = "ffmpeg" ImageMagick = "imagemagick" LibreOffice = "libreoffice" Ghostscript = "ghostscript" Poppler = "poppler" RSVG = "rsvg" )
Engine ids. They are also the `engines:<id>` permission names a plugin asks for, so they never change spelling.
Variables ¶
var Candidates = map[string][]string{ FFmpeg: {"ffmpeg"}, ImageMagick: {"magick", "convert"}, LibreOffice: {"soffice", "libreoffice"}, Ghostscript: {"gs"}, Poppler: {"pdftoppm"}, RSVG: {"rsvg-convert"}, }
Candidates lists, per engine, the binaries that count as it, in order of preference.
⚠ ImageMagick: `magick` FIRST. It is the ImageMagick 7 entry point and the only name that is ImageMagick on every platform; `convert` is the legacy ImageMagick 6 name and, on Windows, a system tool that happens to share it.
Functions ¶
func DisplayName ¶
DisplayName is an engine as a person reads it — the product's own spelling. The id stays the machine's word (permissions, logs).
func SetForTest ¶
SetForTest replaces the process-wide answer (nil = probe again on next use) and returns a function that puts the previous one back.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set is one probe's answer: engine id → resolved binary.
func Probe ¶
func Probe() *Set
Probe is the server's one answer, computed on first use and kept for the life of the process.