Documentation
¶
Overview ¶
Package appmeta is the desktop app metadata and bundler used by `alacris-go app`. It does not import the webview; the CLI stays in the root module.
Index ¶
- Constants
- func BundleDir(c Config, binaryPath, destDir string) (string, error)
- func Init(opts InitOptions) error
- func Pack(c Config, dest, goos string) (string, error)
- func RunningVersion() string
- type Bundle
- type Config
- type InitOptions
- type LinuxBundle
- type MacOSBundle
- type UpdaterConfig
- type WindowsBundle
Constants ¶
const FileName = "alacris.app.json"
Variables ¶
This section is empty.
Functions ¶
func BundleDir ¶
BundleDir writes the OS-specific wrapper around an already-built binary and returns the path the user should distribute.
func Init ¶
func Init(opts InitOptions) error
Init writes a desktop-first alacris-go project into dir.
func Pack ¶ added in v0.7.0
Pack runs optional OS tools on a tree BundleDir already wrote: codesign, hdiutil, nfpm, go-winres. Missing tools are skipped, not errors.
func RunningVersion ¶ added in v0.7.3
func RunningVersion() string
RunningVersion is the alacris-go version this CLI was built from, or empty for a development tree. Used to pin the scaffold go.mod so `app init` does not write v0.0.0, which consumers cannot resolve.
Types ¶
type Bundle ¶
type Bundle struct {
MacOS MacOSBundle `json:"macOS,omitempty"`
Windows WindowsBundle `json:"windows,omitempty"`
Linux LinuxBundle `json:"linux,omitempty"`
}
Bundle holds per-OS packaging options.
type Config ¶
type Config struct {
Name string `json:"name"`
Identifier string `json:"identifier"`
Version string `json:"version"`
Main string `json:"main,omitempty"`
Icon string `json:"icon,omitempty"`
Copyright string `json:"copyright,omitempty"`
Category string `json:"category,omitempty"`
DeepLinkScheme string `json:"deepLinkScheme,omitempty"`
Bundle Bundle `json:"bundle,omitempty"`
Updater *UpdaterConfig `json:"updater,omitempty"`
}
Config is bundle metadata. Window size and live wiring stay in Go.
func (Config) BinaryName ¶
BinaryName is the executable name inside a bundle.
type InitOptions ¶
type InitOptions struct {
Dir string
Name string
Identifier string
Module string
// AlacrisVersion is the module version to pin in the scaffold go.mod
// (v0.7.2). Empty means this CLI is a development build: omit the
// require and tell the user to `go get @latest`. Never write v0.0.0 —
// that tag does not exist, and a nested-module require of it cannot
// be resolved.
AlacrisVersion string
}
InitOptions control what `alacris-go app init` writes.
type LinuxBundle ¶
type LinuxBundle struct {
Desktop string `json:"desktop,omitempty"`
Categories []string `json:"categories,omitempty"`
}
LinuxBundle names the .desktop categories and package formats.
type MacOSBundle ¶
type MacOSBundle struct {
SigningIdentity string `json:"signingIdentity,omitempty"`
Notarize bool `json:"notarize,omitempty"`
}
MacOSBundle is written into Info.plist and used by `app build` on Darwin.
type UpdaterConfig ¶
UpdaterConfig is copied into the generated latest.json stub.
type WindowsBundle ¶
type WindowsBundle struct {
FileDescription string `json:"fileDescription,omitempty"`
}
WindowsBundle names how Windows resources are produced.