This commit is contained in:
2022-09-30 05:39:11 +00:00
parent 41ee9463ae
commit 4687fa49bc
11418 changed files with 1312504 additions and 0 deletions

View File

@ -0,0 +1,61 @@
import { TargetSpecificOptions } from "../core";
export interface AppXOptions extends TargetSpecificOptions {
/**
* The application id. Defaults to `identityName`. Cant start with numbers.
*/
readonly applicationId?: string;
/**
* The background color of the app tile. See [Visual Elements](https://msdn.microsoft.com/en-us/library/windows/apps/br211471.aspx).
* @default #464646
*/
readonly backgroundColor?: string | null;
/**
* A friendly name that can be displayed to users. Corresponds to [Properties.DisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211432.aspx).
* Defaults to the application product name.
*/
readonly displayName?: string | null;
/**
* The name. Corresponds to [Identity.Name](https://msdn.microsoft.com/en-us/library/windows/apps/br211441.aspx). Defaults to the [application name](/configuration/configuration#Metadata-name).
*/
readonly identityName?: string | null;
/**
* The Windows Store publisher. Not used if AppX is build for testing. See [AppX Package Code Signing](#appx-package-code-signing) below.
*/
readonly publisher?: string | null;
/**
* A friendly name for the publisher that can be displayed to users. Corresponds to [Properties.PublisherDisplayName](https://msdn.microsoft.com/en-us/library/windows/apps/br211460.aspx).
* Defaults to company name from the application metadata.
*/
readonly publisherDisplayName?: string | null;
/**
* The list of [supported languages](https://docs.microsoft.com/en-us/windows/uwp/globalizing/manage-language-and-region#specify-the-supported-languages-in-the-apps-manifest) that will be listed in the Windows Store.
* The first entry (index 0) will be the default language.
* Defaults to en-US if omitted.
*/
readonly languages?: Array<string> | string | null;
/**
* Whether to add auto launch extension. Defaults to `true` if [electron-winstore-auto-launch](https://github.com/felixrieseberg/electron-winstore-auto-launch) in the dependencies.
*/
readonly addAutoLaunchExtension?: boolean;
/**
* Relative path to custom extensions xml to be included in an `appmanifest.xml`.
*/
readonly customExtensionsPath?: string;
/**
* Whether to overlay the app's name on top of tile images on the Start screen. Defaults to `false`. (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-shownameontiles) in the dependencies.
* @default false
*/
readonly showNameOnTiles?: boolean;
/**
* @private
* @default false
*/
readonly electronUpdaterAware?: boolean;
/**
* Whether to set build number. See https://github.com/electron-userland/electron-builder/issues/3875
* @default false
*/
readonly setBuildNumber?: boolean;
/** @private */
readonly makeappxArgs?: Array<string> | null;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=AppXOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,47 @@
import { WinPackager } from "../winPackager";
export interface CommonWindowsInstallerConfiguration {
readonly oneClick?: boolean;
/**
* Whether to install per all users (per-machine).
* @default false
*/
readonly perMachine?: boolean;
/**
* Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
* @default true
*/
readonly runAfterFinish?: boolean;
/**
* Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).
* @default true
*/
readonly createDesktopShortcut?: boolean | "always";
/**
* Whether to create start menu shortcut.
* @default true
*/
readonly createStartMenuShortcut?: boolean;
/**
* Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value.
* @default false
*/
readonly menuCategory?: boolean | string;
/**
* The name that will be used for all shortcuts. Defaults to the application name.
*/
readonly shortcutName?: string | null;
}
export interface FinalCommonWindowsInstallerOptions {
isAssisted: boolean;
isPerMachine: boolean;
shortcutName: string;
menuCategory: string | null;
isCreateDesktopShortcut: DesktopShortcutCreationPolicy;
isCreateStartMenuShortcut: boolean;
}
export declare function getEffectiveOptions(options: CommonWindowsInstallerConfiguration, packager: WinPackager): FinalCommonWindowsInstallerOptions;
export declare enum DesktopShortcutCreationPolicy {
FRESH_INSTALL = 0,
ALWAYS = 1,
NEVER = 2
}

View File

@ -0,0 +1,78 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getEffectiveOptions = getEffectiveOptions;
exports.DesktopShortcutCreationPolicy = void 0;
function _builderUtil() {
const data = require("builder-util");
_builderUtil = function () {
return data;
};
return data;
}
function _sanitizeFilename() {
const data = _interopRequireDefault(require("sanitize-filename"));
_sanitizeFilename = function () {
return data;
};
return data;
}
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function getEffectiveOptions(options, packager) {
const appInfo = packager.appInfo;
let menuCategory = null;
if (options.menuCategory != null && options.menuCategory !== false) {
if (options.menuCategory === true) {
const companyName = packager.appInfo.companyName;
if (companyName == null) {
throw new (_builderUtil().InvalidConfigurationError)(`Please specify "author" in the application package.json — it is required because "menuCategory" is set to true.`);
}
menuCategory = (0, _sanitizeFilename().default)(companyName);
} else {
menuCategory = options.menuCategory.split(/[/\\]/).map(it => (0, _sanitizeFilename().default)(it)).join("\\");
}
}
return {
isPerMachine: options.perMachine === true,
isAssisted: options.oneClick === false,
shortcutName: (0, _builderUtil().isEmptyOrSpaces)(options.shortcutName) ? appInfo.productFilename : packager.expandMacro(options.shortcutName),
isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),
isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,
menuCategory
};
}
function convertToDesktopShortcutCreationPolicy(value) {
if (value === false) {
return DesktopShortcutCreationPolicy.NEVER;
} else if (value === "always") {
return DesktopShortcutCreationPolicy.ALWAYS;
} else {
return DesktopShortcutCreationPolicy.FRESH_INSTALL;
}
}
var DesktopShortcutCreationPolicy;
exports.DesktopShortcutCreationPolicy = DesktopShortcutCreationPolicy;
(function (DesktopShortcutCreationPolicy) {
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["FRESH_INSTALL"] = 0] = "FRESH_INSTALL";
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["ALWAYS"] = 1] = "ALWAYS";
DesktopShortcutCreationPolicy[DesktopShortcutCreationPolicy["NEVER"] = 2] = "NEVER";
})(DesktopShortcutCreationPolicy || (exports.DesktopShortcutCreationPolicy = DesktopShortcutCreationPolicy = {}));
// __ts-babel@6.0.4
//# sourceMappingURL=CommonWindowsInstallerConfiguration.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":["../../src/options/CommonWindowsInstallerConfiguration.ts"],"names":[],"mappings":";;;;;;;;AAAA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;AACA;AAAA;;AAAA;AAAA;AAAA;;AAAA;AAAA;;;;AAqDM,SAAU,mBAAV,CAA8B,OAA9B,EAA4E,QAA5E,EAAiG;AACrG,QAAM,OAAO,GAAG,QAAQ,CAAC,OAAzB;AAEA,MAAI,YAAY,GAAkB,IAAlC;;AACA,MAAI,OAAO,CAAC,YAAR,IAAwB,IAAxB,IAAgC,OAAO,CAAC,YAAR,KAAyB,KAA7D,EAAoE;AAClE,QAAI,OAAO,CAAC,YAAR,KAAyB,IAA7B,EAAmC;AACjC,YAAM,WAAW,GAAG,QAAQ,CAAC,OAAT,CAAiB,WAArC;;AACA,UAAI,WAAW,IAAI,IAAnB,EAAyB;AACvB,cAAM,KAAI,wCAAJ,EAA8B,iHAA9B,CAAN;AACD;;AACD,MAAA,YAAY,GAAG,iCAAiB,WAAjB,CAAf;AACD,KAND,MAOK;AACH,MAAA,YAAY,GAAI,OAAO,CAAC,YAAR,CAAgC,KAAhC,CAAsC,OAAtC,EAA+C,GAA/C,CAAmD,EAAE,IAAI,iCAAiB,EAAjB,CAAzD,EAA+E,IAA/E,CAAoF,IAApF,CAAhB;AACD;AACF;;AAED,SAAO;AACL,IAAA,YAAY,EAAE,OAAO,CAAC,UAAR,KAAuB,IADhC;AAEL,IAAA,UAAU,EAAE,OAAO,CAAC,QAAR,KAAqB,KAF5B;AAIL,IAAA,YAAY,EAAE,oCAAgB,OAAO,CAAC,YAAxB,IAAwC,OAAO,CAAC,eAAhD,GAAkE,QAAQ,CAAC,WAAT,CAAqB,OAAO,CAAC,YAA7B,CAJ3E;AAKL,IAAA,uBAAuB,EAAE,sCAAsC,CAAC,OAAO,CAAC,qBAAT,CAL1D;AAML,IAAA,yBAAyB,EAAE,OAAO,CAAC,uBAAR,KAAoC,KAN1D;AAOL,IAAA;AAPK,GAAP;AASD;;AAED,SAAS,sCAAT,CAAgD,KAAhD,EAAmF;AACjF,MAAI,KAAK,KAAK,KAAd,EAAqB;AACnB,WAAO,6BAA6B,CAAC,KAArC;AACD,GAFD,MAGK,IAAI,KAAK,KAAK,QAAd,EAAwB;AAC3B,WAAO,6BAA6B,CAAC,MAArC;AACD,GAFI,MAGA;AACH,WAAO,6BAA6B,CAAC,aAArC;AACD;AACF;;AAED,IAAY,6BAAZ;;;AAAA,CAAA,UAAY,6BAAZ,EAAyC;AACvC,EAAA,6BAAA,CAAA,6BAAA,CAAA,eAAA,CAAA,GAAA,CAAA,CAAA,GAAA,eAAA;AAAe,EAAA,6BAAA,CAAA,6BAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAA;AAAQ,EAAA,6BAAA,CAAA,6BAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAA;AACxB,CAFD,EAAY,6BAA6B,6CAA7B,6BAA6B,GAAA,EAAA,CAAzC,E","sourcesContent":["import { InvalidConfigurationError, isEmptyOrSpaces } from \"builder-util\"\nimport sanitizeFileName from \"sanitize-filename\"\nimport { WinPackager } from \"../winPackager\"\n\nexport interface CommonWindowsInstallerConfiguration {\n readonly oneClick?: boolean\n\n /**\n * Whether to install per all users (per-machine).\n * @default false\n */\n readonly perMachine?: boolean\n\n /**\n * Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.\n * @default true\n */\n readonly runAfterFinish?: boolean\n\n /**\n * Whether to create desktop shortcut. Set to `always` if to recreate also on reinstall (even if removed by user).\n * @default true\n */\n readonly createDesktopShortcut?: boolean | \"always\"\n\n /**\n * Whether to create start menu shortcut.\n * @default true\n */\n readonly createStartMenuShortcut?: boolean\n\n /**\n * Whether to create submenu for start menu shortcut and program files directory. If `true`, company name will be used. Or string value.\n * @default false\n */\n readonly menuCategory?: boolean | string\n\n /**\n * The name that will be used for all shortcuts. Defaults to the application name.\n */\n readonly shortcutName?: string | null\n}\n\nexport interface FinalCommonWindowsInstallerOptions {\n isAssisted: boolean\n isPerMachine: boolean\n\n shortcutName: string\n menuCategory: string | null\n\n isCreateDesktopShortcut: DesktopShortcutCreationPolicy\n isCreateStartMenuShortcut: boolean\n}\n\nexport function getEffectiveOptions(options: CommonWindowsInstallerConfiguration, packager: WinPackager): FinalCommonWindowsInstallerOptions {\n const appInfo = packager.appInfo\n\n let menuCategory: string | null = null\n if (options.menuCategory != null && options.menuCategory !== false) {\n if (options.menuCategory === true) {\n const companyName = packager.appInfo.companyName\n if (companyName == null) {\n throw new InvalidConfigurationError(`Please specify \"author\" in the application package.json — it is required because \"menuCategory\" is set to true.`)\n }\n menuCategory = sanitizeFileName(companyName)\n }\n else {\n menuCategory = (options.menuCategory as string).split(/[/\\\\]/).map(it => sanitizeFileName(it)).join(\"\\\\\")\n }\n }\n\n return {\n isPerMachine: options.perMachine === true,\n isAssisted: options.oneClick === false,\n\n shortcutName: isEmptyOrSpaces(options.shortcutName) ? appInfo.productFilename : packager.expandMacro(options.shortcutName!!),\n isCreateDesktopShortcut: convertToDesktopShortcutCreationPolicy(options.createDesktopShortcut),\n isCreateStartMenuShortcut: options.createStartMenuShortcut !== false,\n menuCategory,\n }\n}\n\nfunction convertToDesktopShortcutCreationPolicy(value: boolean | undefined | string): DesktopShortcutCreationPolicy {\n if (value === false) {\n return DesktopShortcutCreationPolicy.NEVER\n }\n else if (value === \"always\") {\n return DesktopShortcutCreationPolicy.ALWAYS\n }\n else {\n return DesktopShortcutCreationPolicy.FRESH_INSTALL\n }\n}\n\nexport enum DesktopShortcutCreationPolicy {\n FRESH_INSTALL, ALWAYS, NEVER\n}"],"sourceRoot":""}

View File

@ -0,0 +1,45 @@
/**
* File associations.
*
* macOS (corresponds to [CFBundleDocumentTypes](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-101685)) and NSIS only.
*
* On Windows works only if [nsis.perMachine](https://electron.build/configuration/configuration#NsisOptions-perMachine) is set to `true`.
*/
export interface FileAssociation {
/**
* The extension (minus the leading period). e.g. `png`.
*/
readonly ext: string | Array<string>;
/**
* The name. e.g. `PNG`. Defaults to `ext`.
*/
readonly name?: string | null;
/**
* *windows-only.* The description.
*/
readonly description?: string | null;
/**
* *linux-only.* The mime-type.
*/
readonly mimeType?: string | null;
/**
* The path to icon (`.icns` for MacOS and `.ico` for Windows), relative to `build` (build resources directory). Defaults to `${firstExt}.icns`/`${firstExt}.ico` (if several extensions specified, first is used) or to application icon.
*
* Not supported on Linux, file issue if need (default icon will be `x-office-document`).
*/
readonly icon?: string | null;
/**
* *macOS-only* The apps role with respect to the type. The value can be `Editor`, `Viewer`, `Shell`, or `None`. Corresponds to `CFBundleTypeRole`.
* @default Editor
*/
readonly role?: string;
/**
* *macOS-only* Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to `LSTypeIsPackage`.
*/
readonly isPackage?: boolean;
/**
* *macOS-only* The apps rank with respect to the type. The value can be `Owner`, `Default`, `Alternate`, or `None`. Corresponds to `LSHandlerRank`.
* @default Default
*/
readonly rank?: string;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=FileAssociation.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,18 @@
import { TargetSpecificOptions } from "../core";
import { CommonWindowsInstallerConfiguration } from "./CommonWindowsInstallerConfiguration";
export interface MsiOptions extends CommonWindowsInstallerConfiguration, TargetSpecificOptions {
/**
* One-click installation.
* @default true
*/
readonly oneClick?: boolean;
/**
* The [upgrade code](https://msdn.microsoft.com/en-us/library/windows/desktop/aa372375(v=vs.85).aspx). Optional, by default generated using app id.
*/
readonly upgradeCode?: string | null;
/**
* If `warningsAsErrors` is `true` (default): treat warnings as errors. If `warningsAsErrors` is `false`: allow warnings.
* @default true
*/
readonly warningsAsErrors?: boolean;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=MsiOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,136 @@
import { AsarIntegrityOptions } from "../asar/integrity";
import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from "../core";
import { FileAssociation } from "./FileAssociation";
export interface FileSet {
/**
* The source path relative to the project directory.
*/
from?: string;
/**
* The destination path relative to the app's content directory for `extraFiles` and the app's resource directory for `extraResources`.
*/
to?: string;
/**
* The [glob patterns](/file-patterns).
*/
filter?: Array<string> | string;
}
export interface AsarOptions extends AsarIntegrityOptions {
/**
* Whether to automatically unpack executables files.
* @default true
*/
smartUnpack?: boolean;
ordering?: string | null;
}
export interface PlatformSpecificBuildOptions extends TargetSpecificOptions {
/**
* The application id. Used as [CFBundleIdentifier](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070) for MacOS and as
* [Application User Model ID](https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx) for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
* @default com.electron.${name}
*/
readonly appId?: string | null;
/**
* The [artifact file name template](/configuration/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).
*/
readonly artifactName?: string | null;
/**
* The compression level. If you want to rapidly test build, `store` can reduce build time significantly. `maximum` doesn't lead to noticeable size difference, but increase build time.
* @default normal
*/
readonly compression?: CompressionLevel | null;
files?: Array<FileSet | string> | FileSet | string | null;
extraResources?: Array<FileSet | string> | FileSet | string | null;
extraFiles?: Array<FileSet | string> | FileSet | string | null;
/**
* Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).
*
* Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#configuration-asarUnpack) - please file an issue if this doesn't work.
* @default true
*/
readonly asar?: AsarOptions | boolean | null;
/**
* A [glob patterns](/file-patterns) relative to the [app directory](#MetadataDirectories-app), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive.
*/
readonly asarUnpack?: Array<string> | string | null;
/** @private */
readonly icon?: string | null;
/**
* The file associations.
*/
readonly fileAssociations?: Array<FileAssociation> | FileAssociation;
/**
* The URL protocol schemes.
*/
readonly protocols?: Array<Protocol> | Protocol;
/**
* Whether to fail if app will be not code signed.
*/
readonly forceCodeSigning?: boolean;
/**
* The [electron-updater compatibility](/auto-update#compatibility) semver range.
*/
readonly electronUpdaterCompatibility?: string | null;
publish?: Publish;
/**
* Whether to infer update channel from application version pre-release components. e.g. if version `0.12.1-alpha.1`, channel will be set to `alpha`. Otherwise to `latest`.
* @default true
*/
readonly detectUpdateChannel?: boolean;
/**
* Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).
* @default false
*/
readonly generateUpdatesFilesForAllChannels?: boolean;
/**
* The release info. Intended for command line usage:
*
* ```
* -c.releaseInfo.releaseNotes="new features"
* ```
*/
readonly releaseInfo?: ReleaseInfo;
readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null;
/** @private */
cscLink?: string | null;
/** @private */
cscKeyPassword?: string | null;
}
export interface ReleaseInfo {
/**
* The release name.
*/
releaseName?: string | null;
/**
* The release notes.
*/
releaseNotes?: string | null;
/**
* The path to release notes file. Defaults to `release-notes-${platform}.md` (where `platform` it is current platform — `mac`, `linux` or `windows`) or `release-notes.md` in the [build resources](#MetadataDirectories-buildResources).
*/
releaseNotesFile?: string | null;
/**
* The release date.
*/
releaseDate?: string;
}
/**
* URL Protocol Schemes. Protocols to associate the app with. macOS only.
*
* Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).
*/
export interface Protocol {
/**
* The name. e.g. `IRC server URL`.
*/
readonly name: string;
/**
* The schemes. e.g. `["irc", "ircs"]`.
*/
readonly schemes: Array<string>;
/**
* *macOS-only* The apps role with respect to the type.
* @default Editor
*/
readonly role?: "Editor" | "Viewer" | "Shell" | "None";
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=PlatformSpecificBuildOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,103 @@
import { TargetSpecificOptions } from "../core";
import { CommonLinuxOptions } from "./linuxOptions";
export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
/**
* The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.
* @default strict
*/
readonly confinement?: "devmode" | "strict" | "classic" | null;
/**
* The custom environment. Defaults to `{"TMPDIR: "$XDG_RUNTIME_DIR"}`. If you set custom, it will be merged with default.
*/
readonly environment?: {
[key: string]: string;
} | null;
/**
* The 78 character long summary. Defaults to [productName](/configuration/configuration#Configuration-productName).
*/
readonly summary?: string | null;
/**
* The quality grade of the snap. It can be either `devel` (i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels).
* @default stable
*/
readonly grade?: "devel" | "stable" | null;
/**
* The list of features that must be supported by the core in order for this snap to install.
*/
readonly assumes?: Array<string> | string | null;
/**
* The list of debian packages needs to be installed for building this snap.
*/
readonly buildPackages?: Array<string> | null;
/**
* The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.
* Defaults to `["libasound2", "libgconf2-4", "libnotify4", "libnspr4", "libnss3", "libpcre3", "libpulse0", "libxss1", "libxtst6"]`.
*
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom package `foo` in addition to defaults.
*/
readonly stagePackages?: Array<string> | null;
/**
* The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).
* @default build/snap-hooks
*/
readonly hooks?: string | null;
/**
* The list of [plugs](https://snapcraft.io/docs/reference/interfaces).
* Defaults to `["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "audio-playback", "pulseaudio", "opengl"]`.
*
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom plug `foo` in addition to defaults.
*
* Additional attributes can be specified using object instead of just name of plug:
* ```
*[
* {
* "browser-sandbox": {
* "interface": "browser-support",
* "allow-sandbox": true
* },
* },
* "another-simple-plug-name"
*]
* ```
*/
readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null;
/**
* The list of [slots](https://snapcraft.io/docs/reference/interfaces).
*/
readonly slots?: Array<string> | null;
/**
* Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.
* Defaults to `["desktop-gtk2""]`.
*
* If list contains `default`, it will be replaced to default list, so, `["default", "foo"]` can be used to add custom parts `foo` in addition to defaults.
*/
readonly after?: Array<string> | null;
/**
* Whether to use template snap. Defaults to `true` if `stagePackages` not specified.
*/
readonly useTemplateApp?: boolean;
/**
* Whether or not the snap should automatically start on login.
* @default false
*/
readonly autoStart?: boolean;
/**
* Specifies any files to make accessible from locations such as `/usr`, `/var`, and `/etc`. See [snap layouts](https://snapcraft.io/docs/snap-layouts) to learn more.
*/
readonly layout?: {
[key: string]: {
[key: string]: string;
};
} | null;
/**
* Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See [Snapcraft filesets](https://snapcraft.io/docs/snapcraft-filesets) to learn more about the format.
*
* The defaults can be found in [snap.ts](https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/snap/snapcraft.yaml#L29).
*/
readonly appPartStage?: Array<string> | null;
}
export interface PlugDescriptor {
[key: string]: {
[key: string]: any;
} | null;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=SnapOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,41 @@
/**
* Squirrel.Windows options.
*/
import { TargetSpecificOptions } from "../core";
export interface SquirrelWindowsOptions extends TargetSpecificOptions {
/**
* A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.
*
* Please note — [local icon file url is not accepted](https://github.com/atom/grunt-electron-installer/issues/73), must be https/http.
*
* If you don't plan to build windows installer, you can omit it.
* If your project repository is public on GitHub, it will be `https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true` by default.
*/
readonly iconUrl?: string | null;
/**
* The path to a .gif file to display during install. `build/install-spinner.gif` will be used if exists (it is a recommended way to set)
* (otherwise [default](https://github.com/electron/windows-installer/blob/master/resources/install-spinner.gif)).
*/
readonly loadingGif?: string | null;
/**
* Whether to create an MSI installer. Defaults to `false` (MSI is not created).
*/
readonly msi?: boolean;
/**
* A URL to your existing updates. Or `true` to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.
*/
readonly remoteReleases?: string | boolean | null;
/**
* Authentication token for remote updates
*/
readonly remoteToken?: string | null;
/**
* Use `appId` to identify package instead of `name`.
*/
readonly useAppIdAsId?: boolean;
/**
* https://github.com/electron-userland/electron-builder/issues/1743
* @private
*/
readonly name?: string;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=SquirrelWindowsOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,107 @@
import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from "../index";
export interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {
/**
* Target package type: list of `AppImage`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
*
* electron-builder [docker image](/multi-platform-build#docker) can be used to build Linux targets on any platform.
*
* Please [do not put an AppImage into another archive](https://github.com/probonopd/AppImageKit/wiki/Creating-AppImages#common-mistake) like a .zip or .tar.gz.
* @default AppImage
*/
readonly target?: TargetConfigType;
/**
* The maintainer. Defaults to [author](/configuration/configuration#Metadata-author).
*/
readonly maintainer?: string | null;
/**
* The vendor. Defaults to [author](/configuration/configuration#Metadata-author).
*/
readonly vendor?: string | null;
/**
* The executable name. Defaults to `productName`.
* Cannot be specified per target, allowed only in the `linux`.
*/
readonly executableName?: string | null;
/**
* The path to icon set directory or one png file, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.
* By default will be generated automatically based on the macOS icns file.
*/
readonly icon?: string;
/**
* backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place
* @private
*/
readonly packageCategory?: string | null;
}
export interface CommonLinuxOptions {
/**
* The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).
*/
readonly synopsis?: string | null;
/**
* As [description](/configuration/configuration#Metadata-description) from application package.json, but allows you to specify different for Linux.
*/
readonly description?: string | null;
/**
* The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).
*/
readonly category?: string | null;
/**
* The mime types in addition to specified in the file associations. Use it if you don't want to register a new mime type, but reuse existing.
*/
readonly mimeTypes?: Array<string> | null;
/**
* The [Desktop file](https://developer.gnome.org/integration-guide/stable/desktop-files.html.en) entries (name to value).
*/
readonly desktop?: any | null;
/**
* The executable parameters. Pass to executableName
*/
readonly executableArgs?: Array<string> | null;
}
export interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {
/**
* Package dependencies.
*/
readonly depends?: Array<string> | null;
/**
* The compression type.
* @default xz
*/
readonly compression?: "gz" | "bzip2" | "xz" | null;
readonly icon?: string;
/**
* The package category.
*/
readonly packageCategory?: string | null;
readonly vendor?: string | null;
readonly maintainer?: string | null;
readonly afterInstall?: string | null;
readonly afterRemove?: string | null;
/**
* *Advanced only* The [fpm](https://github.com/jordansissel/fpm/wiki#usage) options.
*
* Example: `["--before-install=build/deb-preinstall.sh", "--after-upgrade=build/deb-postinstall.sh"]`
*/
readonly fpm?: Array<string> | null;
}
export interface DebOptions extends LinuxTargetSpecificOptions {
/**
* Package dependencies. Defaults to `["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"]`.
*/
readonly depends?: Array<string> | null;
/**
* The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).
*/
readonly packageCategory?: string | null;
/**
* The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.
*/
readonly priority?: string | null;
}
export interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {
/**
* The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.
*/
readonly license?: string | null;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=linuxOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,263 @@
import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from "../index";
export declare type MacOsTargetName = "default" | "dmg" | "mas" | "mas-dev" | "pkg" | "7z" | "zip" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "dir";
export interface MacConfiguration extends PlatformSpecificBuildOptions {
/**
* The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.
*
* For example, `"category": "public.app-category.developer-tools"` will set the application category to *Developer Tools*.
*
* Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).
*/
readonly category?: string | null;
/**
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
*/
readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null;
/**
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.
* MAS installer identity is specified in the [mas](/configuration/mas).
*/
readonly identity?: string | null;
/**
* The path to application icon.
* @default build/icon.icns
*/
readonly icon?: string | null;
/**
* The path to entitlements file for signing the app. `build/entitlements.mac.plist` will be used if exists (it is a recommended way to set).
* MAS entitlements is specified in the [mas](/configuration/mas).
*/
readonly entitlements?: string | null;
/**
* The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mac.inherit.plist` will be used if exists (it is a recommended way to set).
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).
*
* This option only applies when signing with `entitlements` provided.
*/
readonly entitlementsInherit?: string | null;
/**
* Path to login helper entitlement file.
* When using App Sandbox, the the `com.apple.security.inherit` key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable.
* Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.
*/
readonly entitlementsLoginHelper?: string | null;
/**
* The path to the provisioning profile to use when signing, absolute or relative to the app root.
*/
readonly provisioningProfile?: string | null;
/**
* The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).
*/
readonly bundleVersion?: string | null;
/**
* The `CFBundleShortVersionString`. Do not use it unless you need to.
*/
readonly bundleShortVersion?: string | null;
/**
* Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.
* @default false
*/
readonly darkModeSupport?: boolean;
/**
* The bundle identifier to use in the application helper's plist.
* @default ${appBundleIdentifier}.helper
*/
readonly helperBundleId?: string | null;
/**
* The bundle identifier to use in the Renderer helper's plist.
* @default ${appBundleIdentifier}.helper.Renderer
*/
readonly helperRendererBundleId?: string | null;
/**
* The bundle identifier to use in the Plugin helper's plist.
* @default ${appBundleIdentifier}.helper.Plugin
*/
readonly helperPluginBundleId?: string | null;
/**
* The bundle identifier to use in the GPU helper's plist.
* @default ${appBundleIdentifier}.helper.GPU
*/
readonly helperGPUBundleId?: string | null;
/**
* The bundle identifier to use in the EH helper's plist.
* @default ${appBundleIdentifier}.helper.EH
*/
readonly helperEHBundleId?: string | null;
/**
* The bundle identifier to use in the NP helper's plist.
* @default ${appBundleIdentifier}.helper.NP
*/
readonly helperNPBundleId?: string | null;
/**
* Whether to sign app for development or for distribution.
* @default distribution
*/
readonly type?: "distribution" | "development" | null;
/**
* The extra entries for `Info.plist`.
*/
readonly extendInfo?: any;
/**
* Paths of any extra binaries that need to be signed.
*/
readonly binaries?: Array<string> | null;
/**
* The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.
*/
readonly minimumSystemVersion?: string | null;
/**
* Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.
*/
readonly requirements?: string | null;
/**
* The electron locales. By default Electron locales used as is.
*/
readonly electronLanguages?: Array<string> | string;
/** @private */
readonly cscInstallerLink?: string | null;
/** @private */
readonly cscInstallerKeyPassword?: string | null;
/**
* Extra files to put in archive. Not applicable for `tar.*`.
*/
readonly extraDistFiles?: Array<string> | string | null;
/**
* Whether your app has to be signed with hardened runtime.
* @default true
*/
readonly hardenedRuntime?: boolean;
/**
* Whether to let electron-osx-sign validate the signing or not.
* @default false
*/
readonly gatekeeperAssess?: boolean;
/**
* Whether to let electron-osx-sign verify the contents or not.
* @default true
*/
readonly strictVerify?: Array<string> | string | boolean;
/**
* Regex or an array of regex's that signal skipping signing a file.
*/
readonly signIgnore?: Array<string> | string | null;
}
export interface DmgOptions extends TargetSpecificOptions {
/**
* The path to background image (default: `build/background.tiff` or `build/background.png` if exists). The resolution of this file determines the resolution of the installer window.
* If background is not specified, use `window.size`. Default locations expected background size to be 540x380.
* @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).
*/
background?: string | null;
/**
* The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.
*/
backgroundColor?: string | null;
/**
* The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](/configuration/configuration#MetadataDirectories-buildResources) or to the project directory.
* Defaults to the application icon (`build/icon.icns`).
*/
icon?: string | null;
/**
* The size of all the icons inside the DMG.
* @default 80
*/
readonly iconSize?: number | null;
/**
* The size of all the icon texts inside the DMG.
* @default 12
*/
readonly iconTextSize?: number | null;
/**
* The title of the produced DMG, which will be shown when mounted (volume name).
*
* Macro `${productName}`, `${version}` and `${name}` are supported.
* @default ${productName} ${version}
*/
readonly title?: string | null;
/**
* The content — to customize icon locations. The x and y coordinates refer to the position of the **center** of the icon (at 1x scale), and do not take the label into account.
*/
contents?: Array<DmgContent>;
/**
* The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).
* @default UDZO
*/
format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO";
/**
* The DMG window position and size. With y co-ordinates running from bottom to top.
*
* The Finder makes sure that the window will be on the users display, so if you want your window at the top left of the display you could use `"x": 0, "y": 100000` as the x, y co-ordinates.
* It is not to be possible to position the window relative to the [top left](https://github.com/electron-userland/electron-builder/issues/3990#issuecomment-512960957) or relative to the center of the users screen.
*/
window?: DmgWindow;
/**
* Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).
* @default false
*/
readonly internetEnabled?: boolean;
/**
* Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.
* @default false
*/
readonly sign?: boolean;
/**
* @private
* @default true
*/
writeUpdateInfo?: boolean;
}
export interface DmgWindow {
/**
* The X position relative to left of the screen.
* @default 400
*/
x?: number;
/**
* The Y position relative to bottom of the screen.
* @default 100
*/
y?: number;
/**
* The width. Defaults to background image width or 540.
*/
width?: number;
/**
* The height. Defaults to background image height or 380.
*/
height?: number;
}
export interface DmgContent {
/**
* The device-independent pixel offset from the left of the window to the **center** of the icon.
*/
x: number;
/**
* The device-independent pixel offset from the top of the window to the **center** of the icon.
*/
y: number;
type?: "link" | "file" | "dir";
/**
* The name of the file within the DMG. Defaults to basename of `path`.
*/
name?: string;
/**
* The path of the file within the DMG.
*/
path?: string;
}
export interface MasConfiguration extends MacConfiguration {
/**
* The path to entitlements file for signing the app. `build/entitlements.mas.plist` will be used if exists (it is a recommended way to set).
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).
*/
readonly entitlements?: string | null;
/**
* The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. `build/entitlements.mas.inherit.plist` will be used if exists (it is a recommended way to set).
* Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).
*/
readonly entitlementsInherit?: string | null;
/**
* Paths of any extra binaries that need to be signed.
*/
readonly binaries?: Array<string> | null;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=macOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,52 @@
import { Configuration } from "../configuration";
export interface Metadata {
/**
* The application name.
* @required
*/
readonly name?: string;
/**
* The application description.
*/
readonly description?: string;
/**
* The url to the project [homepage](https://docs.npmjs.com/files/package.json#homepage) (NuGet Package `projectUrl` (optional) or Linux Package URL (required)).
*
* If not specified and your project repository is public on GitHub, it will be `https://github.com/${user}/${project}` by default.
*/
readonly homepage?: string | null;
/**
* *linux-only.* The [license](https://docs.npmjs.com/files/package.json#license) name.
*/
readonly license?: string | null;
readonly author?: AuthorMetadata | null;
/**
* The [repository](https://docs.npmjs.com/files/package.json#repository).
*/
readonly repository?: string | RepositoryInfo | null;
/**
* The electron-builder configuration.
*/
readonly build?: Configuration;
/** @private */
readonly dependencies?: {
[key: string]: string;
};
/** @private */
readonly version?: string;
/** @private */
readonly shortVersion?: string | null;
/** @private */
readonly shortVersionWindows?: string | null;
/** @private */
readonly productName?: string | null;
/** @private */
readonly main?: string | null;
}
export interface AuthorMetadata {
readonly name: string;
readonly email?: string;
}
export interface RepositoryInfo {
readonly url: string;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=metadata.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,129 @@
import { TargetSpecificOptions } from "../core";
export declare type BackgroundAlignment = "center" | "left" | "right" | "top" | "bottom" | "topleft" | "topright" | "bottomleft" | "bottomright";
export declare type BackgroundScaling = "tofit" | "none" | "proportional";
/**
* macOS product archive options.
*/
export interface PkgOptions extends TargetSpecificOptions {
/**
* The scripts directory, relative to `build` (build resources directory).
* The scripts can be in any language so long as the files are marked executable and have the appropriate shebang indicating the path to the interpreter.
* Scripts are required to be executable (`chmod +x file`).
* @default build/pkg-scripts
* @see [Scripting in installer packages](http://macinstallers.blogspot.de/2012/07/scripting-in-installer-packages.html).
*/
readonly scripts?: string | null;
/**
* should be not documented, only to experiment
* @private
*/
readonly productbuild?: Array<string> | null;
/**
* The install location. [Do not use it](https://stackoverflow.com/questions/12863944/how-do-you-specify-a-default-install-location-to-home-with-pkgbuild) to create per-user package.
* Mostly never you will need to change this option. `/Applications` would install it as expected into `/Applications` if the local system domain is chosen, or into `$HOME/Applications` if the home installation is chosen.
* @default /Applications
*/
readonly installLocation?: string | null;
/**
* Whether can be installed at the root of any volume, including non-system volumes. Otherwise, it cannot be installed at the root of a volume.
*
* Corresponds to [enable_anywhere](https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW70).
* @default true
*/
readonly allowAnywhere?: boolean | null;
/**
* Whether can be installed into the current users home directory.
* A home directory installation is done as the current user (not as root), and it cannot write outside of the home directory.
* If the product cannot be installed in the users home directory and be not completely functional from users home directory.
*
* Corresponds to [enable_currentUserHome](https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW70).
* @default true
*/
readonly allowCurrentUserHome?: boolean | null;
/**
* Whether can be installed into the root directory. Should usually be `true` unless the product can be installed only to the users home directory.
*
* Corresponds to [enable_localSystem](https://developer.apple.com/library/content/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW70).
* @default true
*/
readonly allowRootDirectory?: boolean | null;
/**
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.
*/
readonly identity?: string | null;
/**
* The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). In addition to `txt, `rtf` and `html` supported (don't forget to use `target="_blank"` for links).
*/
readonly license?: string | null;
/**
* Options for the background image for the installer.
*/
readonly background?: PkgBackgroundOptions | null;
/**
* The path to the welcome file. This may be used to customize the text on the Introduction page of the installer.
*/
readonly welcome?: string | null;
/**
* Identifies applications that must be closed before the package is installed.\n\nCorresponds to [must-close](https://developer.apple.com/library/archive/documentation/DeveloperTools/Reference/DistributionDefinitionRef/Chapters/Distribution_XML_Ref.html#//apple_ref/doc/uid/TP40005370-CH100-SW77)
*/
readonly mustClose?: Array<string> | null;
/**
* The path to the conclusion file. This may be used to customize the text on the final "Summary" page of the installer.
*/
readonly conclusion?: string | null;
/**
* Install bundle over previous version if moved by user?
* @default true
*/
readonly isRelocatable?: boolean | null;
/**
* Don't install bundle if newer version on disk?
* @default true
*/
readonly isVersionChecked?: boolean | null;
/**
* Require identical bundle identifiers at install path?
* @default true
*/
readonly hasStrictIdentifier?: boolean | null;
/**
* Specifies how an existing version of the bundle on disk should be handled when the version in
* the package is installed.
*
* If you specify upgrade, the bundle in the package atomi-cally replaces any version on disk;
* this has the effect of deleting old paths that no longer exist in the new version of
* the bundle.
*
* If you specify update, the bundle in the package overwrites the version on disk, and any files
* not contained in the package will be left intact; this is appropriate when you are delivering
* an update-only package.
*
* Another effect of update is that the package bundle will not be installed at all if there is
* not already a version on disk; this allows a package to deliver an update for an app that
* the user might have deleted.
*
* @default upgrade
*/
readonly overwriteAction?: "upgrade" | "update" | null;
}
/**
* Options for the background image in a PKG installer
*/
export interface PkgBackgroundOptions {
/**
* Path to the image to use as an installer background.
*/
file?: string;
/**
* Alignment of the background image.
* Options are: center, left, right, top, bottom, topleft, topright, bottomleft, bottomright
* @default center
*/
alignment?: BackgroundAlignment | null;
/**
* Scaling of the background image.
* Options are: tofit, none, proportional
* @default tofit
*/
scaling?: BackgroundScaling | null;
}

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=pkgOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}

View File

@ -0,0 +1,93 @@
import { PlatformSpecificBuildOptions, TargetConfigType } from "../index";
import { CustomWindowsSign } from "../codeSign/windowsCodeSign";
export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
/**
* The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable](/configuration/nsis#portable) app without installation), `appx`, `msi`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
* AppX package can be built only on Windows 10.
*
* To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.
*
* @default nsis
*/
readonly target?: TargetConfigType;
/**
* The path to application icon.
* @default build/icon.ico
*/
readonly icon?: string | null;
/**
* The trademarks and registered trademarks.
*/
readonly legalTrademarks?: string | null;
/**
* Array of signing algorithms used. For AppX `sha256` is always used.
* @default ['sha1', 'sha256']
*/
readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
/**
* The custom function (or path to file or module id) to sign Windows executable.
*/
readonly sign?: CustomWindowsSign | string | null;
/**
* The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable `CSC_LINK` (`WIN_CSC_LINK`) for some reason.
* Please see [Code Signing](/code-signing).
*/
readonly certificateFile?: string | null;
/**
* The password to the certificate provided in `certificateFile`. Please use it only if you cannot use env variable `CSC_KEY_PASSWORD` (`WIN_CSC_KEY_PASSWORD`) for some reason.
* Please see [Code Signing](/code-signing).
*/
readonly certificatePassword?: string | null;
/**
* The name of the subject of the signing certificate. Required only for EV Code Signing and works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).
*/
readonly certificateSubjectName?: string | null;
/**
* The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if [Parallels Desktop](https://www.parallels.com/products/desktop/) Windows 10 virtual machines exits).
*/
readonly certificateSha1?: string | null;
/**
* The path to an additional certificate file you want to add to the signature block.
*/
readonly additionalCertificateFile?: string | null;
/**
* The URL of the RFC 3161 time stamp server.
* @default http://timestamp.digicert.com
*/
readonly rfc3161TimeStampServer?: string | null;
/**
* The URL of the time stamp server.
* @default http://timestamp.digicert.com
*/
readonly timeStampServer?: string | null;
/**
* [The publisher name](https://github.com/electron-userland/electron-builder/issues/1187#issuecomment-278972073), exactly as in your code signed certificate. Several names can be provided.
* Defaults to common name from your code signing certificate.
*/
readonly publisherName?: string | Array<string> | null;
/**
* Whether to verify the signature of an available update before installation.
* The [publisher name](#publisherName) will be used for the signature verification.
*
* @default true
*/
readonly verifyUpdateCodeSignature?: boolean;
/**
* The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.
* Cannot be specified per target, allowed only in the `win`.
* @default asInvoker
*/
readonly requestedExecutionLevel?: RequestedExecutionLevel | null;
/**
* Whether to sign and add metadata to executable. Advanced option.
* @default true
*/
readonly signAndEditExecutable?: boolean;
/**
* Whether to sign DLL files. Advanced option.
* @see https://github.com/electron-userland/electron-builder/issues/3101#issuecomment-404212384
* @default false
*/
readonly signDlls?: boolean;
}
export declare type RequestedExecutionLevel = "asInvoker" | "highestAvailable" | "requireAdministrator";

View File

@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
// __ts-babel@6.0.4
//# sourceMappingURL=winOptions.js.map

View File

@ -0,0 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}