Documentation
¶
Overview ¶
Package darwin handles macOS-specific build steps — wrapping the raw binary into a .app bundle and (host-darwin only) further wrapping that into a .dmg disk image. Pure-Go .app construction works from any host; .dmg requires the macOS-only `hdiutil` tool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSkippedDMG = errors.New("dmg: hdiutil unavailable on non-darwin host")
ErrSkippedDMG is returned when DMG creation is skipped because the host OS is not darwin (hdiutil is macOS-only). Callers may treat this as a non-fatal warning.
Functions ¶
func PackageApp ¶
PackageApp wraps a built darwin binary into a standard .app bundle:
bin/<app>.app/ ├── Contents/ │ ├── Info.plist │ ├── MacOS/<app> (the binary, copied) │ └── Resources/icon.icns (rendered from the brand W)
Returns the bundle root path. The source binary at binPath is COPIED (not moved) so the raw artifact remains available for the self-updater and for naming-consistent CI uploads.
func PackageDMG ¶
PackageDMG wraps an existing .app bundle into a UDZO-compressed .dmg disk image via the macOS `hdiutil` tool. Returns the .dmg path on success; returns ErrSkippedDMG when the host is not darwin (the .app bundle alone is still useful in that case).
volName is the visible name when the user mounts the disk image; dmgPath is the output filename (typically <app>-darwin-<arch>.dmg).
Types ¶
This section is empty.