Documentation
¶
Overview ¶
Package appimage stages Linux application runtimes and publishes type-2 AppImages.
Index ¶
- func Create(ctx context.Context, options Options) error
- func CreateNative(ctx context.Context, options Options) error
- func FindRuntimeFiles(ctx context.Context, root string, names []string) ([]string, error)
- func Launcher(binary string) []byte
- func OutputName(name, arch string) (string, error)
- func RelocateWebKitHelpers(appDir string, helperDirs []string) error
- type Binary
- type Command
- type Options
- type Runner
- type Tools
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNative ¶
CreateNative builds a type-2 AppImage without executing target binaries or packaging tools. Its target runtime is an explicitly pinned external artifact.
func FindRuntimeFiles ¶
FindRuntimeFiles searches runtime directories first, with a full-root fallback for nonstandard installations. Directory symlinks are not followed.
func OutputName ¶
func RelocateWebKitHelpers ¶
RelocateWebKitHelpers points the bundled WebKit library at the helper processes copied into the AppDir. WebKitGTK looks for them in a directory compiled into the library (only developer builds honour WEBKIT_EXEC_PATH), so as deployed the AppImage only starts where the build machine's path exists, e.g. /usr/lib/x86_64-linux-gnu on Debian and Ubuntu, and there it runs the system's helpers. Everywhere else WebKit fails with "Unable to spawn a new child process".
Each helper directory moves to usr/lib/<name> and the library's copy of its path becomes "././<name>/", NUL-padded to the original length. WebKit hands that string to bubblewrap both as a bind destination, resolved against the sandbox root, and as the exec path, resolved against the working directory. bwrap can create a top-level destination in its read-only root where a nested one under /lib fails, and appRun starts the application in $APPDIR/usr/lib, which WebKit binds at the same absolute path, so the exec path resolves inside the sandbox too. Only the whole NUL-terminated string is rewritten: the injected-bundle directory shares the prefix on Debian-family systems and must stay absolute, because a relative bind destination there fails the same way; appRun redirects it to the bundled copy.
Types ¶
type Options ¶
type Options struct {
Root, Name, Arch, Output, Icon, IconName, DesktopFile, WorkDir, CacheDir string
Binaries []Binary
LibraryDirs []string
RuntimeRoot string
RuntimePath string
GTKVersion int
// UpdateInfo is passed to linuxdeploy's AppImage plugin; it must emit a zsync sidecar.
UpdateInfo string
WebKit bool
// GTKPlugin is the existing external plugin artifact, not a native replacement.
GTKPlugin []byte
Tools Tools
ForceTools bool
Env map[string]string
Runner Runner
Client *http.Client
Progress func(string)
}
func (Options) PrepareRuntime ¶
func (Options) PrepareTools ¶
PrepareTools resolves and downloads the external tools before action identity is calculated.
func (Options) RuntimeIdentity ¶
RuntimeIdentity fingerprints the exact selected deployment, including data added since a previous build. Call it after executable inputs materialize.