Documentation
¶
Overview ¶
Package windowsinstaller is the Windows installer runtime embedded as source by the nsgo tool. It builds with Go alone, independently of the UI engine.
Index ¶
- func AppendPayload(executable string, payload io.Reader) error
- func Extract(destination string, m Manifest, archive *zip.Reader, ...) error
- func OpenPayload(executable string) (*zip.Reader, io.Closer, error)
- func RemoveFiles(destination string, m Manifest, keepUninstaller bool) error
- func ValidPath(name string) bool
- type FileType
- type Manifest
- type Name
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendPayload ¶
AppendPayload adds a ZIP and a fixed footer after the Go PE image. Signing happens afterward: Authenticode covers this overlay as well as the image.
func Extract ¶
func Extract(destination string, m Manifest, archive *zip.Reader, progress func(uint64, uint64)) error
Extract validates the entire archive before touching destination, then writes only the manifest's files. Root confines junctions and symlinks as well as ..; an unrelated file in a user-selected installation directory stays untouched.
func OpenPayload ¶
OpenPayload reads the archive in place instead of loading the app into RAM. A signature's certificate table and its alignment padding follow the footer.
func RemoveFiles ¶
RemoveFiles removes manifest files and empty directories, never recursively. The uninstaller runs from a temporary copy, so its installed image can go too.
Types ¶
type Manifest ¶
type Manifest struct {
ID, Name, Version, Exe, Publisher string
ARM64, Command, Uninstall bool
Files, Dirs []string
FileTypes []FileType
URLSchemes []string
Names []Name
}
Manifest describes one per-user installation. The tool embeds it in both programs, so uninstall removes an explicit file list rather than a directory.
func (Manifest) UninstallKey ¶
UninstallKey is compatible with earlier NSIS installations of this app.