UNPKG

4.76 kBTypeScriptView Raw
1import { PlatformSpecificBuildOptions, TargetConfigType } from "../index";
2import { CustomWindowsSign } from "../windowsCodeSign";
3export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
4 /**
5 * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` (portable app without installation), `appx`, `msi`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
6 * AppX package can be built only on Windows 10.
7 *
8 * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.
9 *
10 * For `portable` app, `PORTABLE_EXECUTABLE_DIR` env is set (dir where portable executable located).
11 *
12 * @default nsis
13 */
14 readonly target?: TargetConfigType;
15 /**
16 * The path to application icon.
17 * @default build/icon.ico
18 */
19 readonly icon?: string | null;
20 /**
21 * The trademarks and registered trademarks.
22 */
23 readonly legalTrademarks?: string | null;
24 /**
25 * Array of signing algorithms used. For AppX `sha256` is always used.
26 * @default ['sha1', 'sha256']
27 */
28 readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
29 /**
30 * The custom function (or path to file or module id) to sign Windows executable.
31 */
32 readonly sign?: CustomWindowsSign | string | null;
33 /**
34 * 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.
35 * Please see [Code Signing](../code-signing.md).
36 */
37 readonly certificateFile?: string | null;
38 /**
39 * 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.
40 * Please see [Code Signing](../code-signing.md).
41 */
42 readonly certificatePassword?: string | null;
43 /**
44 * 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).
45 */
46 readonly certificateSubjectName?: string | null;
47 /**
48 * 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).
49 */
50 readonly certificateSha1?: string | null;
51 /**
52 * The path to an additional certificate file you want to add to the signature block.
53 */
54 readonly additionalCertificateFile?: string | null;
55 /**
56 * The URL of the RFC 3161 time stamp server.
57 * @default http://timestamp.comodoca.com/rfc3161
58 */
59 readonly rfc3161TimeStampServer?: string | null;
60 /**
61 * The URL of the time stamp server.
62 * @default http://timestamp.verisign.com/scripts/timstamp.dll
63 */
64 readonly timeStampServer?: string | null;
65 /**
66 * [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.
67 * Defaults to common name from your code signing certificate.
68 */
69 readonly publisherName?: string | Array<string> | null;
70 /**
71 * Whether to verify the signature of an available update before installation.
72 * The [publisher name](#publisherName) will be used for the signature verification.
73 *
74 * @default true
75 */
76 readonly verifyUpdateCodeSignature?: boolean;
77 /**
78 * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.
79 * Cannot be specified per target, allowed only in the `win`.
80 * @default asInvoker
81 */
82 readonly requestedExecutionLevel?: RequestedExecutionLevel | null;
83 /**
84 * Whether to sign and add metadata to executable. Advanced option.
85 * @default true
86 */
87 readonly signAndEditExecutable?: boolean;
88 /**
89 * Whether to sign DLL files. Advanced option.
90 * @see https://github.com/electron-userland/electron-builder/issues/3101#issuecomment-404212384
91 * @default false
92 */
93 readonly signDlls?: boolean;
94 /**
95 * The electron-updater compatibility semver range. e.g. `>= 2.16`, `>=1.0.0`. Defaults to `>=1.0.0`
96 *
97 * 1.0.0 sha2
98 * 2.15.0 path
99 * 2.16.0 files
100 */
101 readonly electronUpdaterCompatibility?: string | null;
102}
103export declare type RequestedExecutionLevel = "asInvoker" | "highestAvailable" | "requireAdministrator";