Documentation
¶
Overview ¶
Package windows handles Windows-specific build steps — currently the .syso resource that embeds the brand icon plus version metadata into the .exe. Compiles on every host (no Windows-only deps), so cross-builds from mac/linux still produce a metadata-rich .exe.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrSkippedMSI = errors.New("msi: wixl not found on PATH")
ErrSkippedMSI is returned when MSI creation is skipped because the host has no usable MSI builder on PATH (`wixl` from msitools). Callers may treat this as a non-fatal warning — the .exe alone is still a valid distributable.
Functions ¶
func EmbedResource ¶
EmbedResource generates a COFF .syso resource alongside main.go so the next `go build` for GOOS=windows picks up the brand W icon plus version metadata (FileDescription, FileVersion, ProductName, etc.).
Returns a cleanup func the caller defers — once `go build` finishes, the temporary .ico and the rsrc_windows_<arch>.syso file are removed.
outputPath is used only as the OriginalFilename hint inside the version resource; nothing is written there.
func PackageMSI ¶ added in v0.8.3
PackageMSI wraps a freshly compiled .exe into a Windows Installer .msi package via `wixl` (msitools).
The MSI is always per-user: installs to %LocalAppData%\Programs\<AppName>\<AppName>.exe, registers a Start Menu shortcut and an Add/Remove Programs entry, and never adds the app to autostart (that stays an in-app toggle). Per-user matters because it skips the UAC prompt and — critically — leaves the .exe in a location the running app can rewrite, so the in-app self-updater keeps working on installed builds the same way it works on portable .exe builds.
Returns the .msi path on success; returns ErrSkippedMSI when wixl is not on PATH (mirrors the darwin .dmg skip pattern so cross-builds from hosts without wixl still produce a usable .exe).
Types ¶
This section is empty.