update electron to v43

This commit is contained in:
olcxja 2026-07-09 22:38:33 +02:00
commit fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions

View file

@ -1,8 +1,8 @@
import { TargetSpecificOptions } from "../../core";
import { CommonWindowsInstallerConfiguration } from "../..";
interface CustomNsisBinary {
import { TargetSpecificOptions } from "../../core";
export interface CustomNsisBinary {
/**
* @default https://github.com/electron-userland/electron-builder-binaries/releases/download
* @default https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-3.0.4.1/nsis-3.0.4.1.7z
*/
readonly url: string | null;
/**
@ -21,6 +21,20 @@ interface CustomNsisBinary {
*/
readonly debugLogging?: boolean | null;
}
export interface CustomNsisResources {
/**
* @default https://github.com/electron-userland/electron-builder-binaries/releases/download/nsis-resources-3.4.1/nsis-resources-3.4.1.7z
*/
readonly url: string;
/**
* @default Dqd6g+2buwwvoG1Vyf6BHR1b+25QMmPcwZx40atOT57gH27rkjOei1L0JTldxZu4NFoEmW4kJgZ3DlSWVON3+Q==
*/
readonly checksum: string;
/**
* @default 3.4.1
*/
readonly version: string;
}
export interface CommonNsisOptions {
/**
* Whether to create [Unicode installer](http://nsis.sourceforge.net/Docs/Chapter1.html#intro-unicode).
@ -28,7 +42,11 @@ export interface CommonNsisOptions {
*/
readonly unicode?: boolean;
/**
* See [GUID vs Application Name](../configuration/nsis#guid-vs-application-name).
* The GUID for the installer. Used to identify the application for upgrade and uninstall operations.
* If not specified, a deterministic GUID is generated from the app ID (`appId`) but this means
* changing your `appId` will break silent upgrades of existing installs.
*
* @see [GUID vs Application Name](https://www.electron.build/docs/nsis#guid-vs-application-name)
*/
readonly guid?: string | null;
/**
@ -37,7 +55,7 @@ export interface CommonNsisOptions {
*/
readonly warningsAsErrors?: boolean;
/**
* @private
* Forces zip compression format instead of LZMA. Used internally for differential update packages.
* @default false
*/
readonly useZip?: boolean;
@ -45,6 +63,10 @@ export interface CommonNsisOptions {
* Allows you to provide your own `makensis`, such as one with support for debug logging via LogSet and LogText. (Logging also requires option `debugLogging = true`)
*/
readonly customNsisBinary?: CustomNsisBinary | null;
/**
* Allows you to provide your own `nsis-resources`
*/
readonly customNsisResources?: CustomNsisResources | null;
}
export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerConfiguration, TargetSpecificOptions {
/**
@ -63,6 +85,12 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
* @default false
*/
readonly perMachine?: boolean;
/**
* Whether to set per-machine or per-user installation as default selection on the install mode installer page.
*
* @default false
*/
readonly selectPerMachineByDefault?: boolean;
/**
* *assisted installer only.* Allow requesting for elevation. If false, user will have to restart installer with elevated permissions.
* @default true
@ -79,32 +107,32 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
*/
readonly removeDefaultUninstallWelcomePage?: boolean;
/**
* The path to installer icon, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* The path to installer icon, relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* Defaults to `build/installerIcon.ico` or application icon.
*/
readonly installerIcon?: string | null;
/**
* The path to uninstaller icon, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* The path to uninstaller icon, relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* Defaults to `build/uninstallerIcon.ico` or application icon.
*/
readonly uninstallerIcon?: string | null;
/**
* *assisted installer only.* `MUI_HEADERIMAGE`, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* *assisted installer only.* `MUI_HEADERIMAGE`, relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* @default build/installerHeader.bmp
*/
readonly installerHeader?: string | null;
/**
* *one-click installer only.* The path to header icon (above the progress bar), relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* *one-click installer only.* The path to header icon (above the progress bar), relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* Defaults to `build/installerHeaderIcon.ico` or application icon.
*/
readonly installerHeaderIcon?: string | null;
/**
* *assisted installer only.* `MUI_WELCOMEFINISHPAGE_BITMAP`, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* *assisted installer only.* `MUI_WELCOMEFINISHPAGE_BITMAP`, relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* Defaults to `build/installerSidebar.bmp` or `${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp`. Image size 164 × 314 pixels.
*/
readonly installerSidebar?: string | null;
/**
* *assisted installer only.* `MUI_UNWELCOMEFINISHPAGE_BITMAP`, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* *assisted installer only.* `MUI_UNWELCOMEFINISHPAGE_BITMAP`, relative to the [build resources](https://www.electron.build/docs/contents#extraresources) or to the project directory.
* Defaults to `installerSidebar` option or `build/uninstallerSidebar.bmp` or `build/installerSidebar.bmp` or `${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp`
*/
readonly uninstallerSidebar?: string | null;
@ -112,7 +140,23 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
* The uninstaller display name in the control panel.
* @default ${productName} ${version}
*/
readonly uninstallDisplayName?: string;
readonly uninstallDisplayName?: string | null;
/**
* The URL to the uninstaller help page in the control panel. Defaults to [homepage](https://www.electron.build/docs/configuration#homepage) from application package.json.
*/
readonly uninstallUrlHelp?: string | null;
/**
* The URL to the uninstaller info about page in the control panel. Defaults to [homepage](https://www.electron.build/docs/configuration#homepage) from application package.json.
*/
readonly uninstallUrlInfoAbout?: string | null;
/**
* The URL to the uninstaller update info page in the control panel. Defaults to [homepage](https://www.electron.build/docs/configuration#homepage) from application package.json.
*/
readonly uninstallUrlUpdateInfo?: string | null;
/**
* The URL to the uninstaller readme page in the control panel. Defaults to [homepage](https://www.electron.build/docs/configuration#homepage) from application package.json.
*/
readonly uninstallUrlReadme?: string | null;
/**
* The path to NSIS include script to customize installer. Defaults to `build/installer.nsh`. See [Custom NSIS script](#custom-nsis-script).
*/
@ -131,7 +175,7 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
*/
readonly license?: string | null;
/**
* The [artifact file name template](/configuration/configuration#artifact-file-name-template). Defaults to `${productName} Setup ${version}.${ext}`.
* The [artifact file name template](https://www.electron.build/docs/configuration#artifact-file-name-template). Defaults to `${productName} Setup ${version}.${ext}`.
*/
readonly artifactName?: string | null;
/**
@ -140,9 +184,9 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
*/
readonly deleteAppDataOnUninstall?: boolean;
/**
* @private
* Marks the package as built with differential download support for the update server.
*/
differentialPackage?: boolean;
readonly differentialPackage?: boolean;
/**
* Whether to display a language selection dialog. Not recommended (by default will be detected using OS language).
* @default false
@ -170,6 +214,12 @@ export interface NsisOptions extends CommonNsisOptions, CommonWindowsInstallerCo
* @default [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"]
*/
readonly preCompressedFileExtensions?: Array<string> | string | null;
/**
* Disable building an universal installer of the archs specified in the target configuration
* *Not supported for nsis-web*
* @default true
*/
readonly buildUniversalInstaller?: boolean;
}
/**
* Portable options.
@ -193,6 +243,11 @@ export interface PortableOptions extends TargetSpecificOptions, CommonNsisOption
* The image to show while the portable executable is extracting. This image must be a bitmap (`.bmp`) image.
*/
readonly splashImage?: string | null;
/**
* Disable building an universal installer of the archs specified in the target configuration
* @default true
*/
readonly buildUniversalInstaller?: boolean;
}
/**
* Web Installer options.
@ -208,8 +263,12 @@ export interface NsisWebOptions extends NsisOptions {
*/
readonly appPackageUrl?: string | null;
/**
* The [artifact file name template](/configuration/configuration#artifact-file-name-template). Defaults to `${productName} Web Setup ${version}.${ext}`.
* The [artifact file name template](https://www.electron.build/docs/configuration#artifact-file-name-template). Defaults to `${productName} Web Setup ${version}.${ext}`.
*/
readonly artifactName?: string | null;
/**
* Override for `NsisOptions.buildUniversalInstaller`. nsis-web requires universal installer
* @default true
*/
readonly buildUniversalInstaller?: true;
}
export {};