import { type ResolvedAssociations } from '../associations.js'; import { type TarEntry } from './deb.js'; /** * Produce a distributable installer for `--target -` (reuses * `bundle`'s `--target` parsing — see bundle.ts's `parseTarget`), defaulting * to the host platform/`config.targets[0]` the same way `bundle` does. Routes * to the darwin `.dmg` path (below), the win32 NSIS/MSI path * (`installerWin32`), or the Linux `.deb` path (`installerLinux`). */ export default function installer(argv: string[]): Promise; /** * Resolved `installer.windows` branding assets (absolute host-filesystem * paths), shared by both the NSIS and MSI builders — see each field's doc * comment in config.ts for the exact size/format each installer expects and * which NSIS/MSI setting it maps to. Any field is `null` when unset (or * configured but missing on disk, after a warning) — each generator omits * the corresponding customization, no fallback asset shipped for `banner`/ * `sidebar`/`license` (NSIS side; the MSI's license page provides its own * placeholder — see `resolveMsiLicenseRtf`). */ interface WindowsBranding { icon: string | null; banner: string | null; sidebar: string | null; license: string | null; } /** * Builds the NSIS script text. Uses Modern UI 2 (`MUI2.nsh`, bundled with * every NSIS install) for the wizard pages, `NSISdl` (also bundled) to fetch * the WebView2 Evergreen Bootstrapper when the runtime isn't already present, * and installs per-user (`$LOCALAPPDATA\Programs\`, no admin) or * per-machine (`$PROGRAMFILES64\`, admin required) depending on * `installMode` — see `config.installer.windows.installMode`'s doc comment. * * `locales` (top-level `config.locales`) drives which `MUI_LANGUAGE`s get * declared (see `nsisLanguages`). There's no language-picker dialog — both * `.onInit` and `un.onInit` auto-detect the OS UI language and select the * matching declared language (`nsisLanguageDetection`), the same * OS-language-follows behavior `detect_locale()` gives the native menu bar. * An unmatched OS language falls back to the first declared language, same * as NSIS's own default. * `branding` (`config.installer.windows.{icon,banner,sidebar,license}`) maps * onto `MUI_ICON`/`MUI_UNICON`, `MUI_HEADERIMAGE_BITMAP`, * `MUI_WELCOMEFINISHPAGE_BITMAP`, and an optional `MUI_PAGE_LICENSE` (added * only when `branding.license` is set). * * `$INSTDIR`/`$SMPROGRAMS`/etc. below are genuine NSIS runtime variables * (single `$`, resolved on the *target* Windows machine at install time) — * distinct from the `${...}` JS template interpolations used throughout to * splice in already-known values (product name, paths, …) at *generation* * time. Every value that ends up inside an NSIS double-quoted string goes * through `nsisEscape` first so a stray `$`/`"` in config text (product name, * publisher, …) can't corrupt the script. */ export declare function nsisAssociationRegistry(opts: { appId: string; productName: string; description?: string; executableName: string; regRoot: 'HKCU' | 'HKLM'; associations: ResolvedAssociations; }): { install: string; uninstall: string; }; export declare function nsiScript(opts: { appId: string; productName: string; description?: string; version: string; publisher: string; bundleDir: string; setupPath: string; installMode: 'perUser' | 'perMachine'; locales?: string[]; branding: WindowsBranding; associations: ResolvedAssociations; }): Promise; /** * Generates the `.wxs` (WiX v4) source, wired up with the standard * `WixUI_InstallDir` wizard from `WixToolset.UI.wixext` (referenced via the * `ui:` namespace/`` element — the extension itself is passed to * `wix build` via `-ext`, see `buildMsiInstaller`): welcome → license → * install-dir → install → finish, matching the NSIS installer's flow. * `licenseRtf` backs the license page (`WixUILicenseRtf`, always set — see * `resolveMsiLicenseRtf`); `branding.banner`/`branding.sidebar` back * `WixUIBannerBmp`/`WixUIDialogBmp` when configured, else the extension's own * plain default imagery is used; `branding.icon` backs `ARPPRODUCTICON` (Add/ * Remove Programs) when configured. */ export declare function wixAssociationComponents(opts: { appId: string; displayName: string; description?: string; associations: ResolvedAssociations; }): { components: string; featureRefs: string; }; export declare function wxsScript(opts: { appId: string; displayName: string; description?: string; version: string; publisher: string; upgradeCode: string; productCode: string; bundleDir: string; branding: WindowsBranding; licenseRtf: string; associations: ResolvedAssociations; }): Promise; /** * Debian package names: lowercase letters/digits/`+`/`.`/`-`, starting with * an alphanumeric (Debian Policy §5.6.7) — derived from `productName` with * the same "collapse to a separator, fall back to a generic name" convention * `sanitizeAssemblyName`/`sanitizeLinuxExecName` use in bundle.ts (kept as * its own copy here since dpkg's charset is stricter — no underscore, and * lowercase-only — matching this file's existing precedent of not sharing * per-installer-format sanitizers, e.g. `resolveWindowsPublisher`'s copy). */ export declare function sanitizeDebName(productName: string): string; /** `control.tar.gz`'s `control` file — Package/Version/Architecture/Maintainer/Description plus the fixed `Section: utils` / `Priority: optional` murasaki always declares. */ export declare function debControlFile(opts: { debName: string; version: string; debArch: string; maintainer: string; description: string; }): string; /** * `md5sum`-format checksums of every regular file in `entries` (directories * excluded), path relative to the tar root without the leading `./` — the * format `dpkg` itself expects at `control.tar.gz`'s `md5sums`. */ export declare function debMd5sumsFile(entries: TarEntry[]): string; export {}; //# sourceMappingURL=installer.d.ts.map