1 | import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from "../index";
|
2 | export declare type MacOsTargetName = "default" | "dmg" | "mas" | "mas-dev" | "pkg" | "7z" | "zip" | "tar.xz" | "tar.lz" | "tar.gz" | "tar.bz2" | "dir";
|
3 | export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
4 | /**
|
5 | * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.
|
6 | *
|
7 | * For example, `"category": "public.app-category.developer-tools"` will set the application category to *Developer Tools*.
|
8 | *
|
9 | * 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).
|
10 | */
|
11 | readonly category?: string | null;
|
12 | /**
|
13 | * 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).
|
14 | */
|
15 | readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null;
|
16 | /**
|
17 | * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](/code-signing) instead of specifying this option.
|
18 | * MAS installer identity is specified in the [mas](/configuration/mas).
|
19 | */
|
20 | readonly identity?: string | null;
|
21 | /**
|
22 | * The path to application icon.
|
23 | * @default build/icon.icns
|
24 | */
|
25 | readonly icon?: string | null;
|
26 | /**
|
27 | * 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).
|
28 | * MAS entitlements is specified in the [mas](/configuration/mas).
|
29 | */
|
30 | readonly entitlements?: string | null;
|
31 | /**
|
32 | * 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).
|
33 | * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.darwin.inherit.plist).
|
34 | *
|
35 | * This option only applies when signing with `entitlements` provided.
|
36 | */
|
37 | readonly entitlementsInherit?: string | null;
|
38 | /**
|
39 | * Path to login helper entitlement file.
|
40 | * 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.
|
41 | * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.
|
42 | */
|
43 | readonly entitlementsLoginHelper?: string | null;
|
44 | /**
|
45 | * The path to the provisioning profile to use when signing, absolute or relative to the app root.
|
46 | */
|
47 | readonly provisioningProfile?: string | null;
|
48 | /**
|
49 | * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).
|
50 | */
|
51 | readonly bundleVersion?: string | null;
|
52 | /**
|
53 | * The `CFBundleShortVersionString`. Do not use it unless you need to.
|
54 | */
|
55 | readonly bundleShortVersion?: string | null;
|
56 | /**
|
57 | * 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.
|
58 | * @default false
|
59 | */
|
60 | readonly darkModeSupport?: boolean;
|
61 | /**
|
62 | * The bundle identifier to use in the application helper's plist.
|
63 | * @default ${appBundleIdentifier}.helper
|
64 | */
|
65 | readonly helperBundleId?: string | null;
|
66 | /**
|
67 | * The bundle identifier to use in the Renderer helper's plist.
|
68 | * @default ${appBundleIdentifier}.helper.Renderer
|
69 | */
|
70 | readonly helperRendererBundleId?: string | null;
|
71 | /**
|
72 | * The bundle identifier to use in the Plugin helper's plist.
|
73 | * @default ${appBundleIdentifier}.helper.Plugin
|
74 | */
|
75 | readonly helperPluginBundleId?: string | null;
|
76 | /**
|
77 | * The bundle identifier to use in the GPU helper's plist.
|
78 | * @default ${appBundleIdentifier}.helper.GPU
|
79 | */
|
80 | readonly helperGPUBundleId?: string | null;
|
81 | /**
|
82 | * The bundle identifier to use in the EH helper's plist.
|
83 | * @default ${appBundleIdentifier}.helper.EH
|
84 | */
|
85 | readonly helperEHBundleId?: string | null;
|
86 | /**
|
87 | * The bundle identifier to use in the NP helper's plist.
|
88 | * @default ${appBundleIdentifier}.helper.NP
|
89 | */
|
90 | readonly helperNPBundleId?: string | null;
|
91 | /**
|
92 | * Whether to sign app for development or for distribution.
|
93 | * @default distribution
|
94 | */
|
95 | readonly type?: "distribution" | "development" | null;
|
96 | /**
|
97 | * The extra entries for `Info.plist`.
|
98 | */
|
99 | readonly extendInfo?: any;
|
100 | /**
|
101 | * Paths of any extra binaries that need to be signed.
|
102 | */
|
103 | readonly binaries?: Array<string> | null;
|
104 | /**
|
105 | * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.
|
106 | */
|
107 | readonly minimumSystemVersion?: string | null;
|
108 | /**
|
109 | * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.
|
110 | */
|
111 | readonly requirements?: string | null;
|
112 | /**
|
113 | * The electron locales. By default Electron locales used as is.
|
114 | */
|
115 | readonly electronLanguages?: Array<string> | string;
|
116 | /** @private */
|
117 | readonly cscInstallerLink?: string | null;
|
118 | /** @private */
|
119 | readonly cscInstallerKeyPassword?: string | null;
|
120 | /**
|
121 | * Extra files to put in archive. Not applicable for `tar.*`.
|
122 | */
|
123 | readonly extraDistFiles?: Array<string> | string | null;
|
124 | /**
|
125 | * Whether your app has to be signed with hardened runtime.
|
126 | * @default true
|
127 | */
|
128 | readonly hardenedRuntime?: boolean;
|
129 | /**
|
130 | * Whether to let electron-osx-sign validate the signing or not.
|
131 | * @default false
|
132 | */
|
133 | readonly gatekeeperAssess?: boolean;
|
134 | /**
|
135 | * Whether to let electron-osx-sign verify the contents or not.
|
136 | * @default true
|
137 | */
|
138 | readonly strictVerify?: Array<string> | string | boolean;
|
139 | /**
|
140 | * Regex or an array of regex's that signal skipping signing a file.
|
141 | */
|
142 | readonly signIgnore?: Array<string> | string | null;
|
143 | /**
|
144 | * Specify the URL of the timestamp authority server
|
145 | */
|
146 | readonly timestamp?: string | null;
|
147 | }
|
148 | export interface DmgOptions extends TargetSpecificOptions {
|
149 | /**
|
150 | * 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.
|
151 | * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.
|
152 | * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).
|
153 | */
|
154 | background?: string | null;
|
155 | /**
|
156 | * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.
|
157 | */
|
158 | backgroundColor?: string | null;
|
159 | /**
|
160 | * 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.
|
161 | * Defaults to the application icon (`build/icon.icns`).
|
162 | */
|
163 | icon?: string | null;
|
164 | /**
|
165 | * The size of all the icons inside the DMG.
|
166 | * @default 80
|
167 | */
|
168 | readonly iconSize?: number | null;
|
169 | /**
|
170 | * The size of all the icon texts inside the DMG.
|
171 | * @default 12
|
172 | */
|
173 | readonly iconTextSize?: number | null;
|
174 | /**
|
175 | * The title of the produced DMG, which will be shown when mounted (volume name).
|
176 | *
|
177 | * Macro `${productName}`, `${version}` and `${name}` are supported.
|
178 | * @default ${productName} ${version}
|
179 | */
|
180 | readonly title?: string | null;
|
181 | /**
|
182 | * 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.
|
183 | */
|
184 | contents?: Array<DmgContent>;
|
185 | /**
|
186 | * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).
|
187 | * @default UDZO
|
188 | */
|
189 | format?: "UDRW" | "UDRO" | "UDCO" | "UDZO" | "UDBZ" | "ULFO";
|
190 | /**
|
191 | * The DMG window position and size. With y co-ordinates running from bottom to top.
|
192 | *
|
193 | * The Finder makes sure that the window will be on the user’s 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.
|
194 | * 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 user’s screen.
|
195 | */
|
196 | window?: DmgWindow;
|
197 | /**
|
198 | * 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).
|
199 | * @default false
|
200 | */
|
201 | readonly internetEnabled?: boolean;
|
202 | /**
|
203 | * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.
|
204 | * @default false
|
205 | */
|
206 | readonly sign?: boolean;
|
207 | /**
|
208 | * @private
|
209 | * @default true
|
210 | */
|
211 | writeUpdateInfo?: boolean;
|
212 | }
|
213 | export interface DmgWindow {
|
214 | /**
|
215 | * The X position relative to left of the screen.
|
216 | * @default 400
|
217 | */
|
218 | x?: number;
|
219 | /**
|
220 | * The Y position relative to bottom of the screen.
|
221 | * @default 100
|
222 | */
|
223 | y?: number;
|
224 | /**
|
225 | * The width. Defaults to background image width or 540.
|
226 | */
|
227 | width?: number;
|
228 | /**
|
229 | * The height. Defaults to background image height or 380.
|
230 | */
|
231 | height?: number;
|
232 | }
|
233 | export interface DmgContent {
|
234 | /**
|
235 | * The device-independent pixel offset from the left of the window to the **center** of the icon.
|
236 | */
|
237 | x: number;
|
238 | /**
|
239 | * The device-independent pixel offset from the top of the window to the **center** of the icon.
|
240 | */
|
241 | y: number;
|
242 | type?: "link" | "file" | "dir";
|
243 | /**
|
244 | * The name of the file within the DMG. Defaults to basename of `path`.
|
245 | */
|
246 | name?: string;
|
247 | /**
|
248 | * The path of the file within the DMG.
|
249 | */
|
250 | path?: string;
|
251 | }
|
252 | export interface MasConfiguration extends MacConfiguration {
|
253 | /**
|
254 | * 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).
|
255 | * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.plist).
|
256 | */
|
257 | readonly entitlements?: string | null;
|
258 | /**
|
259 | * 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).
|
260 | * Otherwise [default](https://github.com/electron-userland/electron-osx-sign/blob/master/default.entitlements.mas.inherit.plist).
|
261 | */
|
262 | readonly entitlementsInherit?: string | null;
|
263 | /**
|
264 | * Paths of any extra binaries that need to be signed.
|
265 | */
|
266 | readonly binaries?: Array<string> | null;
|
267 | }
|