You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Code Signing.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,13 @@
1
1
macOS and Windows code signing is supported. Windows is dual code-signed (SHA1 & SHA256 hashing algorithms).
2
+
2
3
On a macOS development machine valid and appropriate identity from your keychain will be automatically used.
3
4
4
5
| Env Name | Description
5
6
| -------------- | -----------
6
7
| `CSC_LINK` | The HTTPS link (or base64-encoded data, or `file://` link) to certificate (`*.p12` or `*.pfx` file).
7
8
| `CSC_KEY_PASSWORD` | The password to decrypt the certificate given in `CSC_LINK`.
8
9
| `CSC_NAME` | *macOS-only* Name of certificate (to retrieve from login.keychain). Useful on a development machine (not on CI) if you have several identities (otherwise don't specify it).
10
+
| `CSC_IDENTITY_AUTO_DISCOVERY`| `true` or `false`. Defaults to `true` — on a macOS development machine valid and appropriate identity from your keychain will be automatically used.
9
11
10
12
If you are building Windows on macOS and need to set a different certificate and password (than the ones set in `CSC_*` env vars) you can use `WIN_CSC_LINK` and `WIN_CSC_KEY_PASSWORD`.
11
13
@@ -34,6 +36,7 @@ Please note — Gatekeeper only recognises [Apple digital certificates](http://s
34
36
3. Select all required certificates (hint: use cmd-click to select several):
35
37
*`Developer ID Application:` to sign app for macOS.
36
38
*`3rd Party Mac Developer Application:` and `3rd Party Mac Developer Installer:` to sign app for MAS (Mac App Store).
39
+
*`Developer ID Application:` and `Developer ID Installer` to sign app and installer for distribution outside of the Mac App Store.
37
40
38
41
Please note – you can select as many certificates, as need. No restrictions on electron-builder side.
39
42
All selected certificates will be imported into temporary keychain on CI server.
Copy file name to clipboardExpand all lines: docs/Options.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ MacOS specific build options.
158
158
| Name | Description
159
159
| --- | ---
160
160
| category | <aname="MacOptions-category"></a><p>The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.</p> <p>For example, <code>"category": "public.app-category.developer-tools"</code> will set the application category to *Developer Tools*.</p> <p>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).</p>
161
-
| target | <aname="MacOptions-target"></a>Target package type: list of `default`, `dmg`, `mas`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
161
+
| target | <aname="MacOptions-target"></a>The target package type: list of `default`, `dmg`, `mas`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
162
162
| identity | <aname="MacOptions-identity"></a><p>The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing). MAS installer identity is specified in the [.build.mas](#MasBuildOptions-identity).</p>
163
163
| icon | <aname="MacOptions-icon"></a>The path to application icon. Defaults to `build/icon.icns` (consider using this convention instead of complicating your configuration).
164
164
| entitlements | <aname="MacOptions-entitlements"></a><p>The path to entitlements file for signing the app. <code>build/entitlements.mac.plist</code> will be used if exists (it is a recommended way to set). MAS entitlements is specified in the [.build.mas](#MasBuildOptions-entitlements).</p>
Copy file name to clipboardExpand all lines: src/codeSign.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,9 @@ import BluebirdPromise from "bluebird-lst-c"
7
7
import{randomBytes}from"crypto"
8
8
import{TmpDir}from"./util/tmp"
9
9
10
-
constappleCertificatePrefixes=["Developer ID Application:","3rd Party Mac Developer Application:","Developer ID Installer:","3rd Party Mac Developer Installer:"]
10
+
constappleCertificatePrefixes=["Developer ID Application:","Developer ID Installer:","3rd Party Mac Developer Application:","3rd Party Mac Developer Installer:"]
11
11
12
-
exporttypeCertType="Developer ID Application"|"3rd Party Mac Developer Application"|"Developer ID Installer"|"3rd Party Mac Developer Installer"|"Mac Developer"
12
+
exporttypeCertType="Developer ID Application"|"Developer ID Installer"|"3rd Party Mac Developer Application"|"3rd Party Mac Developer Installer"|"Mac Developer"
installerName=awaitfindIdentity("3rd Party Mac Developer Installer",masQualifier,keychainName)
130
-
if(installerName==null){
131
-
thrownewError('Cannot find valid "3rd Party Mac Developer Installer" identity to sign MAS installer, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing')
thrownewError(`Cannot find valid "${name}" identity to sign MAS installer, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing`)
188
+
}
189
+
else{
190
+
thrownewError(`Cannot find valid "${name}" to sign standalone installer, see https://github.com/electron-userland/electron-builder/wiki/Code-Signing`)
Target package type: list of `default`, `dmg`, `mas`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
21
+
The target package type: list of `default`, `dmg`, `mas`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`. Defaults to `default` (dmg and zip for Squirrel.Mac).
20
22
*/
21
-
readonlytarget?: Array<string>|null
23
+
readonlytarget?: Array<MacOsTargetName>|null
22
24
23
25
/*
24
26
The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://github.com/electron-userland/electron-builder/wiki/Code-Signing).
0 commit comments