app-builder-lib 26.9.1 → 26.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/ProtonFramework.d.ts +1 -1
- package/out/ProtonFramework.js +2 -2
- package/out/ProtonFramework.js.map +1 -1
- package/out/binDownload.d.ts +2 -18
- package/out/binDownload.js +33 -185
- package/out/binDownload.js.map +1 -1
- package/out/codeSign/windowsSignToolManager.js +1 -1
- package/out/codeSign/windowsSignToolManager.js.map +1 -1
- package/out/configuration.d.ts +100 -68
- package/out/configuration.js.map +1 -1
- package/out/core.d.ts +2 -2
- package/out/core.js.map +1 -1
- package/out/electron/ElectronFramework.d.ts +2 -19
- package/out/electron/ElectronFramework.js +47 -40
- package/out/electron/ElectronFramework.js.map +1 -1
- package/out/electron/injectFFMPEG.d.ts +10 -1
- package/out/electron/injectFFMPEG.js +48 -34
- package/out/electron/injectFFMPEG.js.map +1 -1
- package/out/frameworks/LibUiFramework.d.ts +3 -2
- package/out/frameworks/LibUiFramework.js +5 -2
- package/out/frameworks/LibUiFramework.js.map +1 -1
- package/out/index.d.ts +3 -2
- package/out/index.js +1 -1
- package/out/index.js.map +1 -1
- package/out/macPackager.js +24 -3
- package/out/macPackager.js.map +1 -1
- package/out/node-module-collector/moduleManager.d.ts +7 -1
- package/out/node-module-collector/moduleManager.js +9 -2
- package/out/node-module-collector/moduleManager.js.map +1 -1
- package/out/node-module-collector/nodeModulesCollector.js +5 -3
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +26 -2
- package/out/node-module-collector/pnpmNodeModulesCollector.js +98 -18
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/options/AppXOptions.d.ts +1 -1
- package/out/options/AppXOptions.js.map +1 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +31 -11
- package/out/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/out/options/SnapOptions.d.ts +1 -1
- package/out/options/SnapOptions.js.map +1 -1
- package/out/options/linuxOptions.d.ts +38 -12
- package/out/options/linuxOptions.js.map +1 -1
- package/out/options/macOptions.d.ts +10 -7
- package/out/options/macOptions.js.map +1 -1
- package/out/options/metadata.d.ts +1 -2
- package/out/options/metadata.js.map +1 -1
- package/out/options/pkgOptions.d.ts +1 -1
- package/out/options/pkgOptions.js.map +1 -1
- package/out/options/winOptions.d.ts +15 -5
- package/out/options/winOptions.js.map +1 -1
- package/out/packager.js +12 -12
- package/out/packager.js.map +1 -1
- package/out/platformPackager.js +2 -5
- package/out/platformPackager.js.map +1 -1
- package/out/targets/FpmTarget.js +3 -2
- package/out/targets/FpmTarget.js.map +1 -1
- package/out/targets/LinuxTargetHelper.d.ts +4 -4
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/MsiTarget.js +1 -1
- package/out/targets/MsiTarget.js.map +1 -1
- package/out/targets/appimage/AppImageTarget.d.ts +1 -0
- package/out/targets/appimage/AppImageTarget.js +30 -10
- package/out/targets/appimage/AppImageTarget.js.map +1 -1
- package/out/targets/appimage/appImageUtil.d.ts +30 -2
- package/out/targets/appimage/appImageUtil.js +26 -24
- package/out/targets/appimage/appImageUtil.js.map +1 -1
- package/out/targets/appimage/appLauncher.d.ts +1 -1
- package/out/targets/appimage/appLauncher.js +7 -3
- package/out/targets/appimage/appLauncher.js.map +1 -1
- package/out/targets/archive.js +20 -6
- package/out/targets/archive.js.map +1 -1
- package/out/targets/nsis/NsisTarget.js +11 -11
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/nsisOptions.d.ts +20 -16
- package/out/targets/nsis/nsisOptions.js.map +1 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +1 -0
- package/out/targets/nsis/nsisScriptGenerator.js +14 -1
- package/out/targets/nsis/nsisScriptGenerator.js.map +1 -1
- package/out/targets/nsis/nsisUtil.js +4 -3
- package/out/targets/nsis/nsisUtil.js.map +1 -1
- package/out/toolsets/linux.js +8 -8
- package/out/toolsets/linux.js.map +1 -1
- package/out/toolsets/windows.d.ts +16 -16
- package/out/toolsets/windows.js +29 -21
- package/out/toolsets/windows.js.map +1 -1
- package/out/util/NodeModuleCopyHelper.js +1 -1
- package/out/util/NodeModuleCopyHelper.js.map +1 -1
- package/out/util/appBuilder.js +1 -1
- package/out/util/appBuilder.js.map +1 -1
- package/out/util/cacheState.d.ts +28 -0
- package/out/util/cacheState.js +143 -0
- package/out/util/cacheState.js.map +1 -0
- package/out/util/electronGet.d.ts +56 -0
- package/out/util/electronGet.js +388 -0
- package/out/util/electronGet.js.map +1 -0
- package/out/util/macroExpander.js +3 -0
- package/out/util/macroExpander.js.map +1 -1
- package/out/util/resEdit.d.ts +10 -0
- package/out/util/resEdit.js +48 -0
- package/out/util/resEdit.js.map +1 -0
- package/out/util/resolve.d.ts +1 -1
- package/out/util/resolve.js +16 -1
- package/out/util/resolve.js.map +1 -1
- package/out/version.d.ts +1 -1
- package/out/version.js +1 -1
- package/out/version.js.map +1 -1
- package/out/vm/ParallelsVm.d.ts +16 -0
- package/out/vm/ParallelsVm.js +0 -1
- package/out/vm/ParallelsVm.js.map +1 -1
- package/out/winPackager.js +44 -42
- package/out/winPackager.js.map +1 -1
- package/package.json +11 -9
- package/scheme.json +672 -135
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core\"\nimport { FileAssociation } from \"./FileAssociation\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](configuration.md#directories) for `files`,\n * - the project directory for `extraResources` and `extraFiles`.\n * If you don't use two-package.json structure and don't set custom app directory, app directory equals to project directory.\n */\n from?: string\n /**\n * The destination path relative to and defaults to:\n *\n * - the asar archive root for `files`,\n * - the app's content directory for `extraFiles`,\n * - the app's resource directory for `extraResources`.\n */\n to?: string\n /**\n * The [glob patterns](./file-patterns.md). Defaults to \"**\\/*\"\n */\n filter?: Array<string> | string\n}\n\nexport interface AsarOptions {\n /**\n * Whether to automatically unpack executables files.\n * @default true\n */\n smartUnpack?: boolean\n\n ordering?: string | null\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](./file-patterns.md) relative to the [app directory](configuration.md#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](mac.md)).\n\nYou may also specify custom source and destination directories by using `FileSet` objects instead of simple glob patterns.\n\n```json\n[\n {\n \"from\": \"path/to/source\",\n \"to\": \"path/to/destination\",\n \"filter\": [\"**\\/*\", \"!foo/*.js\"]\n }\n]\n```\n\nYou can use [file macros](./file-patterns.md#file-macros) in the `from` and `to` fields as well. `from` and `to` can be files and you can use this to [rename](https://github.com/electron-userland/electron-builder/issues/1119) a file while packaging.\n */\n files?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * A [glob patterns](./file-patterns.md) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * 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\n * [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.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](./configuration.md#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).\n */\n readonly artifactName?: string | null\n\n /**\n * The executable name. Defaults to `productName`\n * Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068\n */\n readonly executableName?: string | null\n\n /**\n * 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.\n * @default normal\n */\n readonly compression?: CompressionLevel | null\n\n /**\n * Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to `false`.\n *\n * @default false\n */\n disableDefaultIgnoredFiles?: boolean | null\n\n /**\n * Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).\n *\n * Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#asarUnpack) - please file an issue if this doesn't work.\n * @default true\n */\n readonly asar?: AsarOptions | boolean | null\n\n /**\n * A [glob patterns](./file-patterns.md) relative to the [app directory](#directories), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive.\n */\n readonly asarUnpack?: Array<string> | string | null\n\n /* - @private */\n readonly icon?: string | null\n\n /**\n * The file associations.\n */\n readonly fileAssociations?: Array<FileAssociation> | FileAssociation\n /**\n * The URL protocol schemes.\n */\n readonly protocols?: Array<Protocol> | Protocol\n\n /**\n * The electron locales to keep. By default, all Electron locales used as-is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /**\n * Whether to fail if app will be not code signed.\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](./auto-update.md#compatibility) semver range.\n */\n readonly electronUpdaterCompatibility?: string | null\n\n /**\n * Publisher configuration. See [Auto Update](./publish.md) for more information.\n */\n publish?: Publish\n\n /**\n * 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`.\n * This does *not* apply to github publishing, which will [never auto-detect the update channel](https://github.com/electron-userland/electron-builder/issues/8589).\n * @default true\n */\n readonly detectUpdateChannel?: boolean\n\n /**\n * Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).\n * @default false\n */\n readonly generateUpdatesFilesForAllChannels?: boolean\n\n /**\n * The release info. Intended for command line usage:\n *\n * ```\n * -c.releaseInfo.releaseNotes=\"new features\"\n * ```\n */\n readonly releaseInfo?: ReleaseInfo\n\n readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\n /* - @private */\n cscLink?: string | null\n\n /* - @private */\n cscKeyPassword?: string | null\n\n readonly defaultArch?: string\n}\n\nexport interface ReleaseInfo {\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes.\n */\n releaseNotes?: string | null\n\n /**\n * 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](./contents.md#extraresources).\n */\n releaseNotesFile?: string | null\n\n /**\n * The release date.\n */\n releaseDate?: string\n\n /**\n * Vendor specific information.\n */\n vendor?: { [key: string]: any } | null\n}\n\n/**\n * URL Protocol Schemes. Protocols to associate the app with. macOS only.\n *\n * Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).\n */\nexport interface Protocol {\n /**\n * The name. e.g. `IRC server URL`.\n */\n readonly name: string\n\n /**\n * The schemes. e.g. `[\"irc\", \"ircs\"]`.\n */\n readonly schemes: Array<string>\n\n /**\n * *macOS-only* The app’s role with respect to the type.\n * @default Editor\n */\n readonly role?: \"Editor\" | \"Viewer\" | \"Shell\" | \"None\"\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PlatformSpecificBuildOptions.js","sourceRoot":"","sources":["../../src/options/PlatformSpecificBuildOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { CompressionLevel, Publish, TargetConfiguration, TargetSpecificOptions } from \"../core\"\nimport { FileAssociation } from \"./FileAssociation\"\n\nexport interface FileSet {\n /**\n * The source path relative to and defaults to:\n *\n * - the [app directory](https://www.electron.build/configuration#directories) for `files`,\n * - the project directory for `extraResources` and `extraFiles`.\n * If you don't use two-package.json structure and don't set custom app directory, app directory equals to project directory.\n */\n from?: string\n /**\n * The destination path relative to and defaults to:\n *\n * - the asar archive root for `files`,\n * - the app's content directory for `extraFiles`,\n * - the app's resource directory for `extraResources`.\n */\n to?: string\n /**\n * The [glob patterns](https://www.electron.build/file-patterns). Defaults to \"**\\/*\"\n */\n filter?: Array<string> | string\n}\n\nexport interface AsarOptions {\n /**\n * Whether to automatically unpack executables files.\n * @default true\n */\n smartUnpack?: boolean\n\n /**\n * Path to a file containing the order in which files should be packed into the asar archive.\n * Each line of the file is a relative path from the app directory. Files listed first are\n * packed first, which can improve app startup time by front-loading frequently accessed modules.\n * See the [asar documentation](https://github.com/electron/asar) for details.\n */\n ordering?: string | null\n}\n\nexport interface FilesBuildOptions {\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](https://www.electron.build/configuration#directories), which specifies which files to include when copying files to create the package.\n\nDefaults to:\n```json\n[\n \"**\\/*\",\n \"!**\\/node_modules/*\\/{CHANGELOG.md,README.md,README,readme.md,readme}\",\n \"!**\\/node_modules/*\\/{test,__tests__,tests,powered-test,example,examples}\",\n \"!**\\/node_modules/*.d.ts\",\n \"!**\\/node_modules/.bin\",\n \"!**\\/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}\",\n \"!.editorconfig\",\n \"!**\\/._*\",\n \"!**\\/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}\",\n \"!**\\/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}\",\n \"!**\\/{appveyor.yml,.travis.yml,circle.yml}\",\n \"!**\\/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}\"\n]\n```\n\nDevelopment dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.\n\nDefault pattern \\`**\\/*\\` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and \\`**\\/node_modules/**\\/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns.\n\nMay be specified in the platform options (e.g. in the [mac](https://www.electron.build/mac)).\n\nYou may also specify custom source and destination directories by using `FileSet` objects instead of simple glob patterns.\n\n```json\n[\n {\n \"from\": \"path/to/source\",\n \"to\": \"path/to/destination\",\n \"filter\": [\"**\\/*\", \"!foo/*.js\"]\n }\n]\n```\n\nYou can use [file macros](https://www.electron.build/file-patterns#file-macros) in the `from` and `to` fields as well. `from` and `to` can be files and you can use this to [rename](https://github.com/electron-userland/electron-builder/issues/1119) a file while packaging.\n */\n files?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows).\n *\n * File patterns (and support for `from` and `to` fields) the same as for [files](#files).\n *\n */\n extraResources?: Array<FileSet | string> | FileSet | string | null\n\n /**\n * The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows).\n */\n extraFiles?: Array<FileSet | string> | FileSet | string | null\n}\n\nexport interface PlatformSpecificBuildOptions extends TargetSpecificOptions, FilesBuildOptions {\n /**\n * 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\n * [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.\n * @default com.electron.${name}\n */\n readonly appId?: string | null\n\n /**\n * The [artifact file name template](https://www.electron.build/configuration#artifact-file-name-template). Defaults to `${productName}-${version}.${ext}` (some target can have other defaults, see corresponding options).\n */\n readonly artifactName?: string | null\n\n /**\n * The executable name. Defaults to `productName`\n * Note: Except for Linux, where this would constitute a breaking change in previous behavior and lead to both invalid executable names and Desktop files. Ref comments in: https://github.com/electron-userland/electron-builder/pull/9068\n */\n readonly executableName?: string | null\n\n /**\n * 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.\n * @default normal\n */\n readonly compression?: CompressionLevel | null\n\n /**\n * Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to `false`.\n *\n * @default false\n */\n disableDefaultIgnoredFiles?: boolean | null\n\n /**\n * Whether to package the application's source code into an archive, using [Electron's archive format](http://electron.atom.io/docs/tutorial/application-packaging/).\n *\n * Node modules, that must be unpacked, will be detected automatically, you don't need to explicitly set [asarUnpack](#asarUnpack) - please file an issue if this doesn't work.\n * @default true\n */\n readonly asar?: AsarOptions | boolean | null\n\n /**\n * A [glob patterns](https://www.electron.build/file-patterns) relative to the [app directory](#directories), which specifies which files to unpack when creating the [asar](http://electron.atom.io/docs/tutorial/application-packaging/) archive.\n */\n readonly asarUnpack?: Array<string> | string | null\n\n /** @private */\n readonly icon?: string | null\n\n /**\n * The file associations.\n */\n readonly fileAssociations?: Array<FileAssociation> | FileAssociation\n /**\n * The URL protocol schemes.\n */\n readonly protocols?: Array<Protocol> | Protocol\n\n /**\n * The electron locales to keep. By default, all Electron locales used as-is.\n */\n readonly electronLanguages?: Array<string> | string\n\n /**\n * Whether to fail if app will be not code signed.\n * @default false\n */\n readonly forceCodeSigning?: boolean\n\n /**\n * The [electron-updater compatibility](https://www.electron.build/auto-update#compatibility) semver range.\n */\n readonly electronUpdaterCompatibility?: string | null\n\n /**\n * Publisher configuration. See [Auto Update](https://www.electron.build/publish) for more information.\n */\n publish?: Publish\n\n /**\n * 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`.\n * This does *not* apply to github publishing, which will [never auto-detect the update channel](https://github.com/electron-userland/electron-builder/issues/8589).\n * @default true\n */\n readonly detectUpdateChannel?: boolean\n\n /**\n * Please see [Building and Releasing using Channels](https://github.com/electron-userland/electron-builder/issues/1182#issuecomment-324947139).\n * @default false\n */\n readonly generateUpdatesFilesForAllChannels?: boolean\n\n /**\n * The release info. Intended for command line usage:\n *\n * ```\n * -c.releaseInfo.releaseNotes=\"new features\"\n * ```\n */\n readonly releaseInfo?: ReleaseInfo\n\n /**\n * The build target(s) for this platform. Can be a target name string, a {@link TargetConfiguration}\n * object, or an array of either. Available targets depend on the platform — see platform-specific\n * options (e.g. {@link MacConfiguration.target}, {@link WindowsConfiguration.target},\n * {@link LinuxConfiguration.target}).\n */\n readonly target?: Array<string | TargetConfiguration> | string | TargetConfiguration | null\n\n /** @private */\n cscLink?: string | null\n\n /** @private */\n cscKeyPassword?: string | null\n\n /**\n * The default architecture to build for when no `--arch` flag is specified.\n * Defaults to the current machine's architecture.\n */\n readonly defaultArch?: string\n}\n\nexport interface ReleaseInfo {\n /**\n * The release name.\n */\n releaseName?: string | null\n\n /**\n * The release notes.\n */\n releaseNotes?: string | null\n\n /**\n * 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](https://www.electron.build/contents#extraresources).\n */\n releaseNotesFile?: string | null\n\n /**\n * The release date.\n */\n releaseDate?: string\n\n /**\n * Vendor specific information.\n */\n vendor?: { [key: string]: any } | null\n}\n\n/**\n * URL Protocol Schemes. Protocols to associate the app with. macOS only.\n *\n * Please note — on macOS [you need to register an `open-url` event handler](http://electron.atom.io/docs/api/app/#event-open-url-macos).\n */\nexport interface Protocol {\n /**\n * The name. e.g. `IRC server URL`.\n */\n readonly name: string\n\n /**\n * The schemes. e.g. `[\"irc\", \"ircs\"]`.\n */\n readonly schemes: Array<string>\n\n /**\n * *macOS-only* The app’s role with respect to the type.\n * @default Editor\n */\n readonly role?: \"Editor\" | \"Viewer\" | \"Shell\" | \"None\"\n}\n"]}
|
|
@@ -17,7 +17,7 @@ export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
|
|
17
17
|
[key: string]: string;
|
|
18
18
|
} | null;
|
|
19
19
|
/**
|
|
20
|
-
* The 78 character long summary. Defaults to [productName](
|
|
20
|
+
* The 78 character long summary. Defaults to [productName](https://www.electron.build/configuration#productname).
|
|
21
21
|
*/
|
|
22
22
|
readonly summary?: string | null;
|
|
23
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\nimport { CommonLinuxOptions } from \"./linuxOptions\"\n\nexport interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core20`\n */\n readonly base?: string | null\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The custom environment. Defaults to `{\"TMPDIR: \"$XDG_RUNTIME_DIR\"}`. If you set custom, it will be merged with default.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * The 78 character long summary. Defaults to [productName](
|
|
1
|
+
{"version":3,"file":"SnapOptions.js","sourceRoot":"","sources":["../../src/options/SnapOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\nimport { CommonLinuxOptions } from \"./linuxOptions\"\n\nexport interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core20`\n */\n readonly base?: string | null\n\n /**\n * The type of [confinement](https://snapcraft.io/docs/reference/confinement) supported by the snap.\n * @default strict\n */\n readonly confinement?: \"devmode\" | \"strict\" | \"classic\" | null\n\n /**\n * The custom environment. Defaults to `{\"TMPDIR: \"$XDG_RUNTIME_DIR\"}`. If you set custom, it will be merged with default.\n */\n readonly environment?: { [key: string]: string } | null\n\n /**\n * The 78 character long summary. Defaults to [productName](https://www.electron.build/configuration#productname).\n */\n readonly summary?: string | null\n\n /**\n * 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).\n * @default stable\n */\n readonly grade?: \"devel\" | \"stable\" | null\n\n /**\n * The list of features that must be supported by the core in order for this snap to install.\n */\n readonly assumes?: Array<string> | string | null\n\n /**\n * The list of debian packages needs to be installed for building this snap.\n */\n readonly buildPackages?: Array<string> | null\n\n /**\n * The list of Ubuntu packages to use that are needed to support the `app` part creation. Like `depends` for `deb`.\n * Defaults to `[\"libnspr4\", \"libnss3\", \"libxss1\", \"libappindicator3-1\", \"libsecret-1-0\"]`.\n *\n * 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.\n */\n readonly stagePackages?: Array<string> | null\n\n /**\n * The [hooks](https://docs.snapcraft.io/build-snaps/hooks) directory, relative to `build` (build resources directory).\n * @default build/snap-hooks\n */\n readonly hooks?: string | null\n\n /**\n * The list of [plugs](https://snapcraft.io/docs/reference/interfaces).\n * Defaults to `[\"desktop\", \"desktop-legacy\", \"home\", \"x11\", \"wayland\", \"unity7\", \"browser-support\", \"network\", \"gsettings\", \"audio-playback\", \"pulseaudio\", \"opengl\"]`.\n *\n * 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.\n *\n * Additional attributes can be specified using object instead of just name of plug:\n * ```\n *[\n * {\n * \"browser-sandbox\": {\n * \"interface\": \"browser-support\",\n * \"allow-sandbox\": true\n * },\n * },\n * \"another-simple-plug-name\"\n *]\n * ```\n */\n readonly plugs?: Array<string | PlugDescriptor> | PlugDescriptor | null\n\n /**\n * The list of [slots](https://snapcraft.io/docs/reference/interfaces).\n *\n * Additional attributes can be specified using object instead of just name of slot:\n * ```\n *[\n * {\n * \"mpris\": {\n * \"name\": \"chromium\"\n * },\n * }\n *]\n *\n * In case you want your application to be a compliant MPris player, you will need to definie\n * The mpris slot with \"chromium\" name.\n * This electron has it [hardcoded](https://source.chromium.org/chromium/chromium/src/+/master:components/system_media_controls/linux/system_media_controls_linux.cc;l=51;bpv=0;bpt=1),\n * and we need to pass this name so snap [will allow it](https://forum.snapcraft.io/t/unable-to-use-mpris-interface/15360/7) in strict confinement.\n *\n */\n readonly slots?: Array<string | SlotDescriptor> | PlugDescriptor | null\n\n /**\n * Specifies any [parts](https://snapcraft.io/docs/reference/parts) that should be built before this part.\n * Defaults to `[\"desktop-gtk2\"\"]`.\n *\n * 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.\n */\n readonly after?: Array<string> | null\n\n /**\n * Whether to use template snap. Defaults to `true` if `stagePackages` not specified.\n */\n readonly useTemplateApp?: boolean\n\n /**\n * Whether or not the snap should automatically start on login.\n * @default false\n */\n readonly autoStart?: boolean\n\n /**\n * 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.\n */\n readonly layout?: { [key: string]: { [key: string]: string } } | null\n\n /**\n * 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.\n *\n * 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).\n */\n readonly appPartStage?: Array<string> | null\n\n /**\n * An optional title for the snap, may contain uppercase letters and spaces. Defaults to `productName`. See [snap format documentation](https://snapcraft.io/docs/snap-format).\n */\n readonly title?: string | null\n\n /**\n * Sets the compression type for the snap. Can be xz, lzo, or null.\n */\n readonly compression?: \"xz\" | \"lzo\" | null\n\n /**\n * Allow running the program with native wayland support with --ozone-platform=wayland.\n * Disabled by default because of this issue in older Electron/Snap versions: https://github.com/electron-userland/electron-builder/issues/4007\n */\n readonly allowNativeWayland?: boolean | null\n}\n\nexport interface PlugDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n\nexport interface SlotDescriptor {\n [key: string]: { [key: string]: any } | null\n}\n"]}
|
|
@@ -30,30 +30,25 @@ export interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecific
|
|
|
30
30
|
/**
|
|
31
31
|
* Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
|
32
32
|
*
|
|
33
|
-
* electron-builder [docker image](
|
|
33
|
+
* electron-builder [docker image](https://www.electron.build/multi-platform-build#docker) can be used to build Linux targets on any platform.
|
|
34
34
|
*
|
|
35
35
|
* 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.
|
|
36
36
|
* @default AppImage
|
|
37
37
|
*/
|
|
38
38
|
readonly target?: TargetConfigType;
|
|
39
39
|
/**
|
|
40
|
-
* The maintainer. Defaults to [author](
|
|
40
|
+
* The maintainer. Defaults to [author](https://www.electron.build/configuration#author).
|
|
41
41
|
*/
|
|
42
42
|
readonly maintainer?: string | null;
|
|
43
43
|
/**
|
|
44
|
-
* The vendor. Defaults to [author](
|
|
44
|
+
* The vendor. Defaults to [author](https://www.electron.build/configuration#author).
|
|
45
45
|
*/
|
|
46
46
|
readonly vendor?: string | null;
|
|
47
47
|
/**
|
|
48
|
-
* The path to icon set directory or one png file, relative to the [build resources](
|
|
48
|
+
* The path to icon set directory or one png file, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.
|
|
49
49
|
* By default will be generated automatically based on the macOS icns file.
|
|
50
50
|
*/
|
|
51
51
|
readonly icon?: string;
|
|
52
|
-
/**
|
|
53
|
-
* backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place
|
|
54
|
-
* @private
|
|
55
|
-
*/
|
|
56
|
-
readonly packageCategory?: string | null;
|
|
57
52
|
}
|
|
58
53
|
export interface CommonLinuxOptions {
|
|
59
54
|
/**
|
|
@@ -61,7 +56,7 @@ export interface CommonLinuxOptions {
|
|
|
61
56
|
*/
|
|
62
57
|
readonly synopsis?: string | null;
|
|
63
58
|
/**
|
|
64
|
-
* As [description](
|
|
59
|
+
* As [description](https://www.electron.build/configuration#description) from application package.json, but allows you to specify different for Linux.
|
|
65
60
|
*/
|
|
66
61
|
readonly description?: string | null;
|
|
67
62
|
/**
|
|
@@ -89,10 +84,12 @@ export interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSp
|
|
|
89
84
|
*/
|
|
90
85
|
readonly depends?: Array<string> | null;
|
|
91
86
|
/**
|
|
92
|
-
* The compression type.
|
|
87
|
+
* The compression type passed to fpm. For `deb`, `rpm`, and `pacman` targets prefer the
|
|
88
|
+
* typed per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`) which narrow
|
|
89
|
+
* this to only the values that fpm actually accepts for that format.
|
|
93
90
|
* @default xz
|
|
94
91
|
*/
|
|
95
|
-
readonly compression?: "gz" | "bzip2" | "xz" | "
|
|
92
|
+
readonly compression?: "gz" | "bzip2" | "xz" | "xzmt" | "gzip" | "zst" | "zstd" | null;
|
|
96
93
|
readonly icon?: string;
|
|
97
94
|
/**
|
|
98
95
|
* The package category.
|
|
@@ -144,12 +141,41 @@ export interface DebOptions extends LinuxTargetSpecificOptions {
|
|
|
144
141
|
* The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.
|
|
145
142
|
*/
|
|
146
143
|
readonly priority?: string | null;
|
|
144
|
+
/** @default xz */
|
|
145
|
+
readonly compression?: "gz" | "bzip2" | "xz" | "zst" | null;
|
|
146
|
+
}
|
|
147
|
+
export interface RpmOptions extends LinuxTargetSpecificOptions {
|
|
148
|
+
/**
|
|
149
|
+
* Passed to fpm via `--rpm-compression`. `"xzmt"` uses multi-threaded xz (fpm's RPM default).
|
|
150
|
+
* `"xz"` is automatically promoted to `"xzmt"`. `"gzip"` and `"bzip2"` pass through as-is.
|
|
151
|
+
* @default xzmt
|
|
152
|
+
*/
|
|
153
|
+
readonly compression?: "xz" | "xzmt" | "gzip" | "bzip2" | null;
|
|
154
|
+
}
|
|
155
|
+
export interface PacmanOptions extends LinuxTargetSpecificOptions {
|
|
156
|
+
/** @default xz */
|
|
157
|
+
readonly compression?: "gz" | "bzip2" | "xz" | "zstd" | null;
|
|
147
158
|
}
|
|
148
159
|
export interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
|
149
160
|
/**
|
|
150
161
|
* The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.
|
|
151
162
|
*/
|
|
152
163
|
readonly license?: string | null;
|
|
164
|
+
/**
|
|
165
|
+
* The compression algorithm passed to the AppImage build tool.
|
|
166
|
+
*
|
|
167
|
+
* **FUSE2 toolset (`"0.0.0"` or unset):** `"xz"` is forwarded as `--compression xz`.
|
|
168
|
+
* `"gzip"`, `"zstd"`, `null`, and unset all fall through to the root-level `compression` option:
|
|
169
|
+
* - `"maximum"` → `--compression xz` (overrides any per-target gzip/zstd value)
|
|
170
|
+
* - anything else → flag omitted (mksquashfs defaults to gzip)
|
|
171
|
+
*
|
|
172
|
+
* **Static-runtime toolsets (`>= 1.0.0`):** `"gzip"` and `"zstd"` are forwarded
|
|
173
|
+
* directly. `"xz"` is mapped to `"zstd"` (nearest supported equivalent). `null`
|
|
174
|
+
* or unset falls through to the root-level `compression` option:
|
|
175
|
+
* - `"store"` → `"gzip"`
|
|
176
|
+
* - `"normal"` / `"maximum"` / unset → `"zstd"`
|
|
177
|
+
*/
|
|
178
|
+
readonly compression?: "gzip" | "xz" | "zstd" | null;
|
|
153
179
|
}
|
|
154
180
|
export interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {
|
|
155
181
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from \"../index\"\n\n/**\n * Example Spec: https://specifications.freedesktop.org/desktop-entry-spec/latest/example.html\n */\nexport interface LinuxDesktopFile {\n /**\n * `[Desktop Entry]` metadata entries (name to value). Overwrites default values calculated by electron-builder\n */\n entry?: {\n [k: string]: string\n } | null\n /**\n * `[Desktop Actions <ActionName>]` metadata entries (name to value).\n *\n * Config Example:\n * ```js\n * desktopActions: {\n * NewWindow: {\n * Name: 'New Window',\n * Exec: 'app --new-window',\n * }\n * }\n * ```\n */\n desktopActions?: {\n [ActionName: string]: any\n } | null\n}\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](./multi-platform-build.md#docker) can be used to build Linux targets on any platform.\n *\n * 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.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](./configuration.md#author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](./configuration.md#author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](./contents.md#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * backward compatibility + to allow specify fpm-only category for all possible fpm targets in one place\n * @private\n */\n readonly packageCategory?: string | null\n}\n\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](./configuration.md#description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * 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.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files)\n */\n readonly desktop?: LinuxDesktopFile | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n * `rpm` defaults to `[\"gtk3\", \"libnotify\", \"nss\", \"libXScrnSaver\", \"(libXtst or libXtst6)\", \"xdg-utils\", \"at-spi2-core\", \"(libuuid or libuuid1)\"]`\n * `pacman` defaults to `[\"c-ares\", \"ffmpeg\", \"gtk3\", \"http-parser\", \"libevent\", \"libvpx\", \"libxslt\", \"libxss\", \"minizip\", \"nss\", \"re2\", \"snappy\", \"libnotify\", \"libappindicator-gtk3\"]`\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"lzo\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n /**\n * File path to script to be passed to FPM for `--after-install` arg.\n */\n readonly afterInstall?: string | null\n /**\n * File path to script to be passed to FPM for `--after-remove` arg.\n */\n readonly afterRemove?: string | null\n /**\n * File path to custom AppArmor profile (Ubuntu 24+)\n */\n readonly appArmorProfile?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n * @default [\"libgtk-3-0\", \"libnotify4\", \"libnss3\", \"libxss1\", \"libxtst6\", \"xdg-utils\", \"libatspi2.0-0\", \"libuuid1\", \"libsecret-1-0\"]\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps).\n * @default [\"libappindicator3-1\"]\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
|
|
1
|
+
{"version":3,"file":"linuxOptions.js","sourceRoot":"","sources":["../../src/options/linuxOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfigType, TargetSpecificOptions } from \"../index\"\n\n/**\n * Example Spec: https://specifications.freedesktop.org/desktop-entry-spec/latest/example.html\n */\nexport interface LinuxDesktopFile {\n /**\n * `[Desktop Entry]` metadata entries (name to value). Overwrites default values calculated by electron-builder\n */\n entry?: {\n [k: string]: string\n } | null\n /**\n * `[Desktop Actions <ActionName>]` metadata entries (name to value).\n *\n * Config Example:\n * ```js\n * desktopActions: {\n * NewWindow: {\n * Name: 'New Window',\n * Exec: 'app --new-window',\n * }\n * }\n * ```\n */\n desktopActions?: {\n [ActionName: string]: any\n } | null\n}\n\nexport interface LinuxConfiguration extends CommonLinuxOptions, PlatformSpecificBuildOptions {\n /**\n * Target package type: list of `AppImage`, `flatpak`, `snap`, `deb`, `rpm`, `freebsd`, `pacman`, `p5p`, `apk`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n *\n * electron-builder [docker image](https://www.electron.build/multi-platform-build#docker) can be used to build Linux targets on any platform.\n *\n * 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.\n * @default AppImage\n */\n readonly target?: TargetConfigType\n\n /**\n * The maintainer. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly maintainer?: string | null\n\n /**\n * The vendor. Defaults to [author](https://www.electron.build/configuration#author).\n */\n readonly vendor?: string | null\n\n /**\n * The path to icon set directory or one png file, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon.\n * By default will be generated automatically based on the macOS icns file.\n */\n readonly icon?: string\n\n /**\n * @private\n * @internal Allows specifying an FPM-only package category for all FPM targets in one place.\n * For user-facing category configuration use the target-specific options (e.g. {@link DebOptions}).\n */\n readonly packageCategory?: string | null\n}\n\nexport interface CommonLinuxOptions {\n /**\n * The [short description](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Description).\n */\n readonly synopsis?: string | null\n\n /**\n * As [description](https://www.electron.build/configuration#description) from application package.json, but allows you to specify different for Linux.\n */\n readonly description?: string | null\n\n /**\n * The [application category](https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry).\n */\n readonly category?: string | null\n\n /**\n * 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.\n */\n readonly mimeTypes?: Array<string> | null\n\n /**\n * The [Desktop file](https://developer.gnome.org/documentation/guidelines/maintainer/integrating.html#desktop-files)\n */\n readonly desktop?: LinuxDesktopFile | null\n\n /**\n * The executable parameters. Pass to executableName\n */\n readonly executableArgs?: Array<string> | null\n}\n\n// fpm-only specific options\nexport interface LinuxTargetSpecificOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * Package dependencies.\n * `rpm` defaults to `[\"gtk3\", \"libnotify\", \"nss\", \"libXScrnSaver\", \"(libXtst or libXtst6)\", \"xdg-utils\", \"at-spi2-core\", \"(libuuid or libuuid1)\"]`\n * `pacman` defaults to `[\"c-ares\", \"ffmpeg\", \"gtk3\", \"http-parser\", \"libevent\", \"libvpx\", \"libxslt\", \"libxss\", \"minizip\", \"nss\", \"re2\", \"snappy\", \"libnotify\", \"libappindicator-gtk3\"]`\n */\n readonly depends?: Array<string> | null\n\n /**\n * The compression type passed to fpm. For `deb`, `rpm`, and `pacman` targets prefer the\n * typed per-format interfaces (`DebOptions`, `RpmOptions`, `PacmanOptions`) which narrow\n * this to only the values that fpm actually accepts for that format.\n * @default xz\n */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"xzmt\" | \"gzip\" | \"zst\" | \"zstd\" | null\n\n readonly icon?: string\n\n /**\n * The package category.\n */\n readonly packageCategory?: string | null\n\n /**\n * The name of the package.\n */\n readonly packageName?: string | null\n\n readonly vendor?: string | null\n readonly maintainer?: string | null\n\n /**\n * File path to script to be passed to FPM for `--after-install` arg.\n */\n readonly afterInstall?: string | null\n /**\n * File path to script to be passed to FPM for `--after-remove` arg.\n */\n readonly afterRemove?: string | null\n /**\n * File path to custom AppArmor profile (Ubuntu 24+)\n */\n readonly appArmorProfile?: string | null\n\n /**\n * *Advanced only* The [fpm](https://fpm.readthedocs.io/en/latest/cli-reference.html) options.\n *\n * Example: `[\"--before-install=build/deb-preinstall.sh\", \"--after-upgrade=build/deb-postinstall.sh\"]`\n */\n readonly fpm?: Array<string> | null\n}\nexport interface DebOptions extends LinuxTargetSpecificOptions {\n /**\n * Package dependencies.\n * If need to support Debian, `libappindicator1` should be removed, it is [deprecated in Debian](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=895037).\n * If need to support KDE, `gconf2` and `gconf-service` should be removed as it's no longer used [by GNOME](https://packages.debian.org/bullseye/gconf2).\n * @default [\"libgtk-3-0\", \"libnotify4\", \"libnss3\", \"libxss1\", \"libxtst6\", \"xdg-utils\", \"libatspi2.0-0\", \"libuuid1\", \"libsecret-1-0\"]\n */\n readonly depends?: Array<string> | null\n\n /**\n * The [recommended package dependencies](https://www.debian.org/doc/debian-policy/ch-relationships.html#s-binarydeps).\n * @default [\"libappindicator3-1\"]\n */\n readonly recommends?: Array<string> | null\n\n /**\n * The [package category](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Section).\n */\n readonly packageCategory?: string | null\n\n /**\n * The [Priority](https://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Priority) attribute.\n */\n readonly priority?: string | null\n\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zst\" | null\n}\n\nexport interface RpmOptions extends LinuxTargetSpecificOptions {\n /**\n * Passed to fpm via `--rpm-compression`. `\"xzmt\"` uses multi-threaded xz (fpm's RPM default).\n * `\"xz\"` is automatically promoted to `\"xzmt\"`. `\"gzip\"` and `\"bzip2\"` pass through as-is.\n * @default xzmt\n */\n readonly compression?: \"xz\" | \"xzmt\" | \"gzip\" | \"bzip2\" | null\n}\n\nexport interface PacmanOptions extends LinuxTargetSpecificOptions {\n /** @default xz */\n readonly compression?: \"gz\" | \"bzip2\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface AppImageOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n /**\n * The compression algorithm passed to the AppImage build tool.\n *\n * **FUSE2 toolset (`\"0.0.0\"` or unset):** `\"xz\"` is forwarded as `--compression xz`.\n * `\"gzip\"`, `\"zstd\"`, `null`, and unset all fall through to the root-level `compression` option:\n * - `\"maximum\"` → `--compression xz` (overrides any per-target gzip/zstd value)\n * - anything else → flag omitted (mksquashfs defaults to gzip)\n *\n * **Static-runtime toolsets (`>= 1.0.0`):** `\"gzip\"` and `\"zstd\"` are forwarded\n * directly. `\"xz\"` is mapped to `\"zstd\"` (nearest supported equivalent). `null`\n * or unset falls through to the root-level `compression` option:\n * - `\"store\"` → `\"gzip\"`\n * - `\"normal\"` / `\"maximum\"` / unset → `\"zstd\"`\n */\n readonly compression?: \"gzip\" | \"xz\" | \"zstd\" | null\n}\n\nexport interface FlatpakOptions extends CommonLinuxOptions, TargetSpecificOptions {\n /**\n * The path to EULA license file. Defaults to `license.txt` or `eula.txt` (or uppercase variants). Only plain text is supported.\n */\n readonly license?: string | null\n\n /**\n * The name of the runtime that the application uses. Defaults to `org.freedesktop.Platform`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtime?: string\n\n /**\n * The version of the runtime that the application uses. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly runtimeVersion?: string\n\n /**\n * The name of the development runtime that the application builds with. Defaults to `org.freedesktop.Sdk`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly sdk?: string\n\n /**\n * Start with the files from the specified application. This can be used to create applications that extend another application.\n * Defaults to [org.electronjs.Electron2.BaseApp](https://github.com/flathub/org.electronjs.Electron2.BaseApp).\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly base?: string\n\n /**\n * Use this specific version of the application specified in base. Defaults to `20.08`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly baseVersion?: string\n\n /**\n * The branch to use when exporting the application. Defaults to `master`.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly branch?: string\n\n /**\n * An array of arguments passed to the flatpak build-finish command. Defaults to:\n * ```json\n * [\n * // Wayland/X11 Rendering\n * \"--socket=wayland\",\n * \"--socket=x11\",\n * \"--share=ipc\",\n * // Open GL\n * \"--device=dri\",\n * // Audio output\n * \"--socket=pulseaudio\",\n * // Read/write home directory access\n * \"--filesystem=home\",\n * // Allow communication with network\n * \"--share=network\",\n * // System notifications with libnotify\n * \"--talk-name=org.freedesktop.Notifications\",\n * ]\n * ```\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly finishArgs?: string[]\n\n /**\n * An array of objects specifying the modules to be built in order.\n *\n * See [flatpak manifest documentation](https://docs.flatpak.org/en/latest/flatpak-builder-command-reference.html#flatpak-manifest).\n */\n readonly modules?: (string | any)[]\n\n /**\n * Files to copy directly into the app. Should be a list of [source, dest] tuples. Source should be a relative/absolute path to a file/directory to copy into the flatpak, and dest should be the path inside the app install prefix (e.g. /share/applications/).\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly files?: [string, string][]\n\n /**\n * Symlinks to create in the app files. Should be a list of [target, location] symlink tuples. Target can be either a relative or absolute path inside the app install prefix, and location should be a absolute path inside the prefix to create the symlink at.\n *\n * See [@malept/flatpak-bundler documentation](https://github.com/malept/flatpak-bundler#build-options).\n */\n readonly symlinks?: [string, string][]\n\n /**\n * Whether to enable the Wayland specific flags (`--enable-features=UseOzonePlatform --ozone-platform=wayland`) in the wrapper script. These flags are only available starting with Electron version 12. Defaults to `false`.\n */\n readonly useWaylandFlags?: boolean\n}\n"]}
|
|
@@ -11,12 +11,14 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
11
11
|
*/
|
|
12
12
|
readonly category?: string | null;
|
|
13
13
|
/**
|
|
14
|
-
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
|
14
|
+
* The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
|
15
|
+
* Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.
|
|
16
|
+
* @default default (dmg and zip for Squirrel.Mac)
|
|
15
17
|
*/
|
|
16
18
|
readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null;
|
|
17
19
|
/**
|
|
18
|
-
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](
|
|
19
|
-
* MAS installer identity is specified in the [mas](
|
|
20
|
+
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://www.electron.build/code-signing) instead of specifying this option.
|
|
21
|
+
* MAS installer identity is specified in the [mas](https://www.electron.build/mas).
|
|
20
22
|
*
|
|
21
23
|
* Set to `-` to use an ad-hoc identity for signing. Set to `null` to skip signing entirely.
|
|
22
24
|
*/
|
|
@@ -30,7 +32,7 @@ export interface MacConfiguration extends PlatformSpecificBuildOptions {
|
|
|
30
32
|
readonly icon?: string | null;
|
|
31
33
|
/**
|
|
32
34
|
* 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).
|
|
33
|
-
* MAS entitlements is specified in the [mas](
|
|
35
|
+
* MAS entitlements is specified in the [mas](https://www.electron.build/mas).
|
|
34
36
|
* See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.
|
|
35
37
|
* Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.
|
|
36
38
|
* See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.
|
|
@@ -208,15 +210,16 @@ export interface DmgOptions extends TargetSpecificOptions {
|
|
|
208
210
|
*/
|
|
209
211
|
background?: string | null;
|
|
210
212
|
/**
|
|
211
|
-
* The background color (accepts css colors).
|
|
213
|
+
* The background color (accepts css colors). Used when no background image is set.
|
|
214
|
+
* @default #ffffff
|
|
212
215
|
*/
|
|
213
216
|
backgroundColor?: string | null;
|
|
214
217
|
/**
|
|
215
|
-
* The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](
|
|
218
|
+
* The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.
|
|
216
219
|
*/
|
|
217
220
|
badgeIcon?: string | null;
|
|
218
221
|
/**
|
|
219
|
-
* The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](
|
|
222
|
+
* The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.
|
|
220
223
|
* Defaults to the application icon (`build/icon.icns`).
|
|
221
224
|
*/
|
|
222
225
|
icon?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\nimport { CustomMacSign } from \"../macPackager\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * 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).\n */\n readonly category?: string | null\n\n /**\n * 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). Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](./code-signing.md) instead of specifying this option.\n * MAS installer identity is specified in the [mas](./mas.md).\n *\n * Set to `-` to use an ad-hoc identity for signing. Set to `null` to skip signing entirely.\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * 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).\n * MAS entitlements is specified in the [mas](./mas.md).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * 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.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * 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.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` verify the contents or not.\n * @default true\n */\n readonly strictVerify?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string | null\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string | null\n\n /**\n * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * 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.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Defaults to `#ffffff` (white) if no background image.\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](./contents.md#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](./contents.md#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * 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.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * 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.\n * 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.\n */\n window?: DmgWindow\n\n /**\n * 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).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
|
1
|
+
{"version":3,"file":"macOptions.js","sourceRoot":"","sources":["../../src/options/macOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { PlatformSpecificBuildOptions, TargetConfiguration, TargetSpecificOptions } from \"../index\"\nimport { CustomMacSign } from \"../macPackager\"\n\nexport type MacOsTargetName = \"default\" | \"dmg\" | \"mas\" | \"mas-dev\" | \"pkg\" | \"7z\" | \"zip\" | \"tar.xz\" | \"tar.lz\" | \"tar.gz\" | \"tar.bz2\" | \"dir\"\n\nexport interface MacConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The application category type, as shown in the Finder via *View -> Arrange by Application Category* when viewing the Applications directory.\n *\n * For example, `\"category\": \"public.app-category.developer-tools\"` will set the application category to *Developer Tools*.\n *\n * 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).\n */\n readonly category?: string | null\n\n /**\n * The target package type: list of `default`, `dmg`, `mas`, `mas-dev`, `pkg`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * Note: Squirrel.Mac auto update mechanism requires both `dmg` and `zip` to be enabled, even when only `dmg` is used. Disabling `zip` will break auto update in `dmg` packages.\n * @default default (dmg and zip for Squirrel.Mac)\n */\n readonly target?: Array<MacOsTargetName | TargetConfiguration> | MacOsTargetName | TargetConfiguration | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://www.electron.build/code-signing) instead of specifying this option.\n * MAS installer identity is specified in the [mas](https://www.electron.build/mas).\n *\n * Set to `-` to use an ad-hoc identity for signing. Set to `null` to skip signing entirely.\n */\n readonly identity?: string | null\n\n /**\n * The path to application icon.\n * Accepts `.icns` (legacy) or `.icon` (Icon Composer asset).\n * If a `.icon` asset is provided, it will be preferred and compiled to an asset catalog.\n * @default build/icon.icns\n */\n readonly icon?: string | null\n\n /**\n * 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).\n * MAS entitlements is specified in the [mas](https://www.electron.build/mas).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n *\n * This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Path to login helper entitlement file.\n * 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.\n * Defaults to the value provided for `entitlements`. This option only applies when signing with `entitlements` provided.\n */\n readonly entitlementsLoginHelper?: string | null\n\n /**\n * The path to the provisioning profile to use when signing, absolute or relative to the app root.\n */\n readonly provisioningProfile?: string | null\n\n /**\n * The `CFBundleVersion`. Do not use it unless [you need to](https://github.com/electron-userland/electron-builder/issues/565#issuecomment-230678643).\n */\n readonly bundleVersion?: string | null\n\n /**\n * The `CFBundleShortVersionString`. Do not use it unless you need to.\n */\n readonly bundleShortVersion?: string | null\n\n /**\n * 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.\n * @default false\n */\n readonly darkModeSupport?: boolean\n\n /**\n * The bundle identifier to use in the application helper's plist.\n * @default ${appBundleIdentifier}.helper\n */\n readonly helperBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Renderer helper's plist.\n * @default ${appBundleIdentifier}.helper.Renderer\n */\n readonly helperRendererBundleId?: string | null\n\n /**\n * The bundle identifier to use in the Plugin helper's plist.\n * @default ${appBundleIdentifier}.helper.Plugin\n */\n readonly helperPluginBundleId?: string | null\n\n /**\n * The bundle identifier to use in the GPU helper's plist.\n * @default ${appBundleIdentifier}.helper.GPU\n */\n readonly helperGPUBundleId?: string | null\n\n /**\n * The bundle identifier to use in the EH helper's plist.\n * @default ${appBundleIdentifier}.helper.EH\n */\n readonly helperEHBundleId?: string | null\n\n /**\n * The bundle identifier to use in the NP helper's plist.\n * @default ${appBundleIdentifier}.helper.NP\n */\n readonly helperNPBundleId?: string | null\n\n /**\n * Whether to sign app for development or for distribution.\n * @default distribution\n */\n readonly type?: \"distribution\" | \"development\" | null\n\n /**\n * The extra entries for `Info.plist`.\n */\n readonly extendInfo?: any\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n\n /**\n * The minimum version of macOS required for the app to run. Corresponds to `LSMinimumSystemVersion`.\n */\n readonly minimumSystemVersion?: string | null\n\n /**\n * Path of [requirements file](https://developer.apple.com/library/mac/documentation/Security/Conceptual/CodeSigningGuide/RequirementLang/RequirementLang.html) used in signing. Not applicable for MAS.\n */\n readonly requirements?: string | null\n\n /** @private */\n readonly cscInstallerLink?: string | null\n /** @private */\n readonly cscInstallerKeyPassword?: string | null\n\n /**\n * Extra files to put in archive. Not applicable for `tar.*`.\n */\n readonly extraDistFiles?: Array<string> | string | null\n\n /**\n * Whether your app has to be signed with hardened runtime.\n * @default true\n */\n readonly hardenedRuntime?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` validate the signing or not.\n * @default false\n */\n readonly gatekeeperAssess?: boolean\n\n /**\n * Whether to let `@electron/osx-sign` verify the contents or not.\n * @default true\n */\n readonly strictVerify?: boolean\n\n /**\n * Whether to enable entitlements automation from `@electron/osx-sign`.\n * @default true\n */\n readonly preAutoEntitlements?: boolean\n\n /**\n * Regex or an array of regex's that signal skipping signing a file.\n */\n readonly signIgnore?: Array<string> | string | null\n\n /**\n * The custom function (or path to file or module id) to sign an app bundle.\n */\n readonly sign?: CustomMacSign | string | null\n\n /**\n * Specify the URL of the timestamp authority server\n */\n readonly timestamp?: string | null\n\n /**\n * Whether to merge ASAR files for different architectures or not.\n *\n * This option has no effect unless building for \"universal\" arch.\n * @default true\n */\n readonly mergeASARs?: boolean\n\n /**\n * Minimatch pattern of paths that are allowed to be present in one of the\n * ASAR files, but not in the other.\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly singleArchFiles?: string | null\n\n /**\n * Minimatch pattern of paths that are allowed to be x64 binaries in both\n * ASAR files\n *\n * This option has no effect unless building for \"universal\" arch and applies\n * only if `mergeASARs` is `true`.\n */\n readonly x64ArchFiles?: string | null\n\n /**\n * Array of strings specifying additional arguments to pass to the `codesign` command used to sign a specific file.\n *\n * Some subresources that you may include in your Electron app may need to be signed with --deep, this is not typically safe to apply to the entire Electron app and therefore should be applied to just your file.\n * Usage Example: `['--deep']`\n */\n readonly additionalArguments?: Array<string> | null\n\n /**\n * Whether to disable electron-builder's [@electron/notarize](https://github.com/electron/notarize) integration.\n *\n * Note: In order to activate the notarization step You MUST specify one of the following via environment variables:\n *\n * 1. `APPLE_API_KEY`, `APPLE_API_KEY_ID` and `APPLE_API_ISSUER`.\n * 2. `APPLE_ID`, `APPLE_APP_SPECIFIC_PASSWORD`, and `APPLE_TEAM_ID`\n * 3. `APPLE_KEYCHAIN` and `APPLE_KEYCHAIN_PROFILE`\n *\n * For security reasons it is recommended to use the first option (see https://github.com/electron-userland/electron-builder/issues/7859)\n */\n readonly notarize?: boolean\n}\n\nexport interface DmgOptions extends TargetSpecificOptions {\n /**\n * 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.\n * If background is not specified, use `window.size`. Default locations expected background size to be 540x380.\n * @see [DMG with Retina background support](http://stackoverflow.com/a/11204769/1910191).\n */\n background?: string | null\n\n /**\n * The background color (accepts css colors). Used when no background image is set.\n * @default #ffffff\n */\n backgroundColor?: string | null\n\n /**\n * The path to DMG icon (badge icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n */\n badgeIcon?: string | null\n\n /**\n * The path to DMG icon (volume icon), which will be shown when mounted, relative to the [build resources](https://www.electron.build/contents#extraresources) or to the project directory.\n * Defaults to the application icon (`build/icon.icns`).\n */\n icon?: string | null\n\n /**\n * The size of all the icons inside the DMG.\n * @default 80\n */\n readonly iconSize?: number | null\n\n /**\n * The size of all the icon texts inside the DMG.\n * @default 12\n */\n readonly iconTextSize?: number | null\n\n /**\n * The title of the produced DMG, which will be shown when mounted (volume name).\n *\n * Macro `${productName}`, `${version}` and `${name}` are supported.\n * @default ${productName} ${version}\n */\n readonly title?: string | null\n\n /**\n * 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.\n */\n contents?: Array<DmgContent>\n\n /**\n * The disk image format. `ULFO` (lzfse-compressed image (OS X 10.11+ only)).\n * @default UDZO\n */\n format?: \"UDRW\" | \"UDRO\" | \"UDCO\" | \"UDZO\" | \"UDBZ\" | \"ULFO\"\n\n /**\n * The initial size of the DMG filesystem. Accepts the same syntax as the `-size` argument to `hdiutil`, e.g. `\"150m\"`, `\"4g\"`.\n * If not specified, the size is calculated automatically.\n * Set this explicitly for large apps or apps with sparse files to avoid \"No space left on device\" errors.\n */\n readonly size?: string | null\n\n /**\n * Whether to shrink the DMG filesystem to the minimum size after copying files.\n * Set to `false` to preserve the explicit `size` you specified.\n * @default true\n */\n readonly shrink?: boolean\n\n /**\n * The DMG window position and size. With y co-ordinates running from bottom to top.\n *\n * 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.\n * 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.\n */\n window?: DmgWindow\n\n /**\n * 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).\n * @default false\n */\n readonly internetEnabled?: boolean\n\n /**\n * Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.\n * @default false\n */\n readonly sign?: boolean\n\n /**\n * @private\n * @default true\n */\n writeUpdateInfo?: boolean\n}\n\nexport interface DmgWindow {\n /**\n * The X position relative to left of the screen.\n * @default 400\n */\n x?: number\n\n /**\n * The Y position relative to bottom of the screen.\n * @default 100\n */\n y?: number\n\n /**\n * The width. Defaults to background image width or 540.\n */\n width?: number\n\n /**\n * The height. Defaults to background image height or 380.\n */\n height?: number\n}\n\nexport interface DmgContent {\n /**\n * The device-independent pixel offset from the left of the window to the **center** of the icon.\n */\n x: number\n /**\n * The device-independent pixel offset from the top of the window to the **center** of the icon.\n */\n y: number\n type?: \"link\" | \"file\" | \"dir\"\n\n /**\n * The name of the file within the DMG. Defaults to basename of `path`.\n */\n name?: string\n\n /**\n * The path of the file within the DMG.\n */\n path?: string\n}\n\nexport interface MasConfiguration extends MacConfiguration {\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n * Be aware that your app may crash if the right entitlements are not set like `com.apple.security.cs.allow-jit` for example on arm64 builds with Electron 20+.\n * See [Signing and Notarizing macOS Builds from the Electron documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing#signing--notarizing-macos-builds) for more information.\n */\n readonly entitlements?: string | null\n\n /**\n * 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).\n * See [this folder in osx-sign's repository](https://github.com/electron/osx-sign/tree/main/entitlements) for examples.\n */\n readonly entitlementsInherit?: string | null\n\n /**\n * Paths of any extra binaries that need to be signed.\n */\n readonly binaries?: Array<string> | null\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/options/metadata.ts"],"names":[],"mappings":"","sourcesContent":["import { Configuration } from \"../configuration\"\n\nexport interface Metadata {\n /**\n * The application name.\n
|
|
1
|
+
{"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../src/options/metadata.ts"],"names":[],"mappings":"","sourcesContent":["import { Configuration } from \"../configuration\"\n\nexport interface Metadata {\n /**\n * The application name. Required.\n */\n readonly name?: string\n\n /**\n * The application description.\n */\n readonly description?: string\n\n /**\n * The url to the project [homepage](https://docs.npmjs.com/files/package.json#homepage) (NuGet Package `projectUrl` (optional) or Linux Package URL (required)).\n *\n * If not specified and your project repository is public on GitHub, it will be `https://github.com/${user}/${project}` by default.\n */\n readonly homepage?: string | null\n\n /**\n * *linux-only.* The [license](https://docs.npmjs.com/files/package.json#license) name.\n */\n readonly license?: string | null\n\n readonly author?: AuthorMetadata | null\n\n /**\n * The [repository](https://docs.npmjs.com/files/package.json#repository).\n */\n readonly repository?: string | RepositoryInfo | null\n\n /**\n * The electron-builder configuration.\n */\n readonly build?: Configuration\n\n /** @private */\n readonly dependencies?: Record<string, string>\n /** @private */\n readonly version?: string\n /** @private */\n readonly type?: string\n /** @private */\n readonly shortVersion?: string | null\n /** @private */\n readonly shortVersionWindows?: string | null\n /** @private */\n readonly productName?: string | null\n /** @private */\n readonly main?: string | null\n}\n\nexport interface AuthorMetadata {\n readonly name: string\n readonly email?: string\n}\n\nexport interface RepositoryInfo {\n readonly url: string\n}\n"]}
|
|
@@ -48,7 +48,7 @@ export interface PkgOptions extends TargetSpecificOptions {
|
|
|
48
48
|
*/
|
|
49
49
|
readonly allowRootDirectory?: boolean | null;
|
|
50
50
|
/**
|
|
51
|
-
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](
|
|
51
|
+
* The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://www.electron.build/code-signing) instead of specifying this option.
|
|
52
52
|
*/
|
|
53
53
|
readonly identity?: string | null;
|
|
54
54
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pkgOptions.js","sourceRoot":"","sources":["../../src/options/pkgOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\n\n// noinspection SpellCheckingInspection\nexport type BackgroundAlignment = \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\"\n// noinspection SpellCheckingInspection\nexport type BackgroundScaling = \"tofit\" | \"none\" | \"proportional\"\n\n/**\n * macOS product archive options.\n */\nexport interface PkgOptions extends TargetSpecificOptions {\n /**\n * The scripts directory, relative to `build` (build resources directory).\n * 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.\n * Scripts are required to be executable (`chmod +x file`).\n * @default build/pkg-scripts\n * @see [Scripting in installer packages](http://macinstallers.blogspot.de/2012/07/scripting-in-installer-packages.html).\n */\n readonly scripts?: string | null\n\n /**\n * should be not documented, only to experiment\n * @private\n */\n readonly productbuild?: Array<string> | null\n\n /**\n * 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.\n * 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.\n * @default /Applications\n */\n readonly installLocation?: string | null\n\n /**\n * 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.\n *\n * 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).\n * @default true\n */\n readonly allowAnywhere?: boolean | null\n\n /**\n * Whether can be installed into the current user’s home directory.\n * A home directory installation is done as the current user (not as root), and it cannot write outside of the home directory.\n * If the product cannot be installed in the user’s home directory and be not completely functional from user’s home directory.\n *\n * 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).\n * @default true\n */\n readonly allowCurrentUserHome?: boolean | null\n\n /**\n * Whether can be installed into the root directory. Should usually be `true` unless the product can be installed only to the user’s home directory.\n *\n * 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).\n * @default true\n */\n readonly allowRootDirectory?: boolean | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](
|
|
1
|
+
{"version":3,"file":"pkgOptions.js","sourceRoot":"","sources":["../../src/options/pkgOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { TargetSpecificOptions } from \"../core\"\n\n// noinspection SpellCheckingInspection\nexport type BackgroundAlignment = \"center\" | \"left\" | \"right\" | \"top\" | \"bottom\" | \"topleft\" | \"topright\" | \"bottomleft\" | \"bottomright\"\n// noinspection SpellCheckingInspection\nexport type BackgroundScaling = \"tofit\" | \"none\" | \"proportional\"\n\n/**\n * macOS product archive options.\n */\nexport interface PkgOptions extends TargetSpecificOptions {\n /**\n * The scripts directory, relative to `build` (build resources directory).\n * 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.\n * Scripts are required to be executable (`chmod +x file`).\n * @default build/pkg-scripts\n * @see [Scripting in installer packages](http://macinstallers.blogspot.de/2012/07/scripting-in-installer-packages.html).\n */\n readonly scripts?: string | null\n\n /**\n * should be not documented, only to experiment\n * @private\n */\n readonly productbuild?: Array<string> | null\n\n /**\n * 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.\n * 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.\n * @default /Applications\n */\n readonly installLocation?: string | null\n\n /**\n * 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.\n *\n * 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).\n * @default true\n */\n readonly allowAnywhere?: boolean | null\n\n /**\n * Whether can be installed into the current user’s home directory.\n * A home directory installation is done as the current user (not as root), and it cannot write outside of the home directory.\n * If the product cannot be installed in the user’s home directory and be not completely functional from user’s home directory.\n *\n * 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).\n * @default true\n */\n readonly allowCurrentUserHome?: boolean | null\n\n /**\n * Whether can be installed into the root directory. Should usually be `true` unless the product can be installed only to the user’s home directory.\n *\n * 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).\n * @default true\n */\n readonly allowRootDirectory?: boolean | null\n\n /**\n * The name of certificate to use when signing. Consider using environment variables [CSC_LINK or CSC_NAME](https://www.electron.build/code-signing) instead of specifying this option.\n */\n readonly identity?: string | null\n\n /**\n * 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).\n */\n readonly license?: string | null\n\n /**\n * Options for the background image for the installer.\n */\n readonly background?: PkgBackgroundOptions | null\n\n /**\n * The path to the welcome file. This may be used to customize the text on the Introduction page of the installer.\n */\n readonly welcome?: string | null\n\n /**\n * Identifies applications that must be closed before the package is installed.\n *\n * Corresponds 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).\n */\n readonly mustClose?: Array<string> | null\n\n /**\n * The path to the conclusion file. This may be used to customize the text on the final \"Summary\" page of the installer.\n */\n readonly conclusion?: string | null\n\n /**\n * Install bundle over previous version if moved by user?\n * @default true\n */\n readonly isRelocatable?: boolean | null\n\n /**\n * Don't install bundle if newer version on disk?\n * @default true\n */\n readonly isVersionChecked?: boolean | null\n\n /**\n * Require identical bundle identifiers at install path?\n * @default true\n */\n readonly hasStrictIdentifier?: boolean | null\n\n /**\n * Specifies how an existing version of the bundle on disk should be handled when the version in\n * the package is installed.\n *\n * If you specify upgrade, the bundle in the package atomi-cally replaces any version on disk;\n * this has the effect of deleting old paths that no longer exist in the new version of\n * the bundle.\n *\n * If you specify update, the bundle in the package overwrites the version on disk, and any files\n * not contained in the package will be left intact; this is appropriate when you are delivering\n * an update-only package.\n *\n * Another effect of update is that the package bundle will not be installed at all if there is\n * not already a version on disk; this allows a package to deliver an update for an app that\n * the user might have deleted.\n *\n * @default upgrade\n */\n readonly overwriteAction?: \"upgrade\" | \"update\" | null\n\n /**\n * The extra component packages directory (relative to build resources directory) for MacOS product archive\n * Autoscans directory for any `.pkg` files and adds to `productbuild` command as `--package-path` and `--package` accordingly\n */\n readonly extraPkgsDir?: string | null\n}\n\n/**\n * Options for the background image in a PKG installer\n */\nexport interface PkgBackgroundOptions {\n /**\n * Path to the image to use as an installer background.\n */\n file?: string\n\n /**\n * Alignment of the background image.\n * Options are: center, left, right, top, bottom, topleft, topright, bottomleft, bottomright\n * @default center\n */\n alignment?: BackgroundAlignment | null\n\n /**\n * Scaling of the background image.\n * Options are: tofit, none, proportional\n * @default tofit\n */\n scaling?: BackgroundScaling | null\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { CustomWindowsSign } from "../codeSign/windowsSignToolManager";
|
|
|
3
3
|
import { PlatformSpecificBuildOptions, TargetConfigType } from "../index";
|
|
4
4
|
export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
5
5
|
/**
|
|
6
|
-
* The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]
|
|
6
|
+
* The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]https://www.electron.build/nsis#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.
|
|
7
7
|
* AppX package can be built only on Windows 10.
|
|
8
8
|
*
|
|
9
9
|
* To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.
|
|
@@ -44,13 +44,23 @@ export interface WindowsConfiguration extends PlatformSpecificBuildOptions {
|
|
|
44
44
|
*/
|
|
45
45
|
readonly requestedExecutionLevel?: RequestedExecutionLevel | null;
|
|
46
46
|
/**
|
|
47
|
-
* Whether to sign and add metadata to executable.
|
|
47
|
+
* Whether to sign and add metadata to executable via [`resedit`](https://www.npmjs.com/package/resedit).
|
|
48
48
|
* Metadata includes information about the app name/description/version, publisher, copyright, etc.
|
|
49
49
|
* This property also is responsible for adding the app icon and setting execution level.
|
|
50
|
-
*
|
|
50
|
+
* Set to `false` only if you need to fully disable resedit-based resource editing.
|
|
51
|
+
* To skip only code signing while keeping resource editing, use `signExecutable: false` instead.
|
|
51
52
|
* @default true
|
|
52
53
|
*/
|
|
53
54
|
readonly signAndEditExecutable?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to sign Windows executables and any additional files matched by `signExts`.
|
|
57
|
+
* Set to `false` to skip Windows code signing while still editing executable resources
|
|
58
|
+
* (icon, metadata, etc. via [`resedit`](https://www.npmjs.com/package/resedit)).
|
|
59
|
+
* This option is not limited to the main executable edit/sign flow and can also affect
|
|
60
|
+
* signing of Windows installers or other artifacts that use the standard signing path.
|
|
61
|
+
* @default true
|
|
62
|
+
*/
|
|
63
|
+
readonly signExecutable?: boolean;
|
|
54
64
|
/**
|
|
55
65
|
* Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.
|
|
56
66
|
* Supports negative patterns, e.g. example that excludes `.appx` files: `["somefilename", ".dll", "!.appx"]`.
|
|
@@ -72,12 +82,12 @@ export interface WindowsSigntoolConfiguration {
|
|
|
72
82
|
readonly signingHashAlgorithms?: Array<"sha1" | "sha256"> | null;
|
|
73
83
|
/**
|
|
74
84
|
* 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.
|
|
75
|
-
* Please see [Code Signing](
|
|
85
|
+
* Please see [Code Signing](https://www.electron.build/code-signing).
|
|
76
86
|
*/
|
|
77
87
|
readonly certificateFile?: string | null;
|
|
78
88
|
/**
|
|
79
89
|
* 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.
|
|
80
|
-
* Please see [Code Signing](
|
|
90
|
+
* Please see [Code Signing](https://www.electron.build/code-signing).
|
|
81
91
|
*/
|
|
82
92
|
readonly certificatePassword?: string | null;
|
|
83
93
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullish } from \"builder-util-runtime\"\nimport { CustomWindowsSign } from \"../codeSign/windowsSignToolManager\"\nimport { PlatformSpecificBuildOptions, TargetConfigType } from \"../index\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]
|
|
1
|
+
{"version":3,"file":"winOptions.js","sourceRoot":"","sources":["../../src/options/winOptions.ts"],"names":[],"mappings":"","sourcesContent":["import { Nullish } from \"builder-util-runtime\"\nimport { CustomWindowsSign } from \"../codeSign/windowsSignToolManager\"\nimport { PlatformSpecificBuildOptions, TargetConfigType } from \"../index\"\n\nexport interface WindowsConfiguration extends PlatformSpecificBuildOptions {\n /**\n * The target package type: list of `nsis`, `nsis-web` (Web installer), `portable` ([portable]https://www.electron.build/nsis#portable) app without installation), `appx`, `msi`, `msi-wrapped`, `squirrel`, `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir`.\n * AppX package can be built only on Windows 10.\n *\n * To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency.\n *\n * @default nsis\n */\n readonly target?: TargetConfigType\n\n /**\n * The path to application icon.\n * @default build/icon.ico\n */\n readonly icon?: string | null\n\n /**\n * The trademarks and registered trademarks.\n */\n readonly legalTrademarks?: string | null\n\n /**\n * Options for usage with signtool.exe\n * Cannot be used in conjunction with `azureSignOptions`, signing will default to Azure Trusted Signing\n */\n readonly signtoolOptions?: WindowsSigntoolConfiguration | null\n\n /**\n * Options for usage of Azure Trusted Signing service\n * Cannot be used in conjunction with `signtoolOptions`, signing will default to Azure Trusted Signing\n */\n readonly azureSignOptions?: WindowsAzureSigningConfiguration | null\n\n /**\n * Whether to verify the signature of an available update before installation.\n * The [publisher name](#publisherName) will be used for the signature verification.\n *\n * @default true\n */\n readonly verifyUpdateCodeSignature?: boolean\n\n /**\n * The [security level](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) at which the application requests to be executed.\n * Cannot be specified per target, allowed only in the `win`.\n * @default asInvoker\n */\n readonly requestedExecutionLevel?: RequestedExecutionLevel | null\n\n /**\n * Whether to sign and add metadata to executable via [`resedit`](https://www.npmjs.com/package/resedit).\n * Metadata includes information about the app name/description/version, publisher, copyright, etc.\n * This property also is responsible for adding the app icon and setting execution level.\n * Set to `false` only if you need to fully disable resedit-based resource editing.\n * To skip only code signing while keeping resource editing, use `signExecutable: false` instead.\n * @default true\n */\n readonly signAndEditExecutable?: boolean\n\n /**\n * Whether to sign Windows executables and any additional files matched by `signExts`.\n * Set to `false` to skip Windows code signing while still editing executable resources\n * (icon, metadata, etc. via [`resedit`](https://www.npmjs.com/package/resedit)).\n * This option is not limited to the main executable edit/sign flow and can also affect\n * signing of Windows installers or other artifacts that use the standard signing path.\n * @default true\n */\n readonly signExecutable?: boolean\n\n /**\n * Explicit file name/extensions (`str.endsWith`) to also sign. Advanced option.\n * Supports negative patterns, e.g. example that excludes `.appx` files: `[\"somefilename\", \".dll\", \"!.appx\"]`.\n * @see https://github.com/electron-userland/electron-builder/issues/7329\n * @default null\n */\n readonly signExts?: string[] | null\n}\n\nexport type RequestedExecutionLevel = \"asInvoker\" | \"highestAvailable\" | \"requireAdministrator\"\n\nexport interface WindowsSigntoolConfiguration {\n /**\n * The custom function (or path to file or module id) to sign Windows executables\n */\n readonly sign?: CustomWindowsSign | string | null\n\n /**\n * Array of signing algorithms used. For AppX `sha256` is always used.\n * @default ['sha1', 'sha256']\n */\n readonly signingHashAlgorithms?: Array<\"sha1\" | \"sha256\"> | null\n\n /**\n * 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.\n * Please see [Code Signing](https://www.electron.build/code-signing).\n */\n readonly certificateFile?: string | null\n\n /**\n * 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.\n * Please see [Code Signing](https://www.electron.build/code-signing).\n */\n readonly certificatePassword?: string | null\n\n /**\n * The name of the subject of the signing certificate, which is often labeled with the field name `issued to`. 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).\n */\n readonly certificateSubjectName?: string | null\n\n /**\n * 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).\n */\n readonly certificateSha1?: string | null\n\n /**\n * The path to an additional certificate file you want to add to the signature block.\n */\n readonly additionalCertificateFile?: string | null\n\n /**\n * The URL of the RFC 3161 time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly rfc3161TimeStampServer?: string | null\n\n /**\n * The URL of the time stamp server.\n * @default http://timestamp.digicert.com\n */\n readonly timeStampServer?: string | null\n\n /**\n * [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.\n * Defaults to common name from your code signing certificate.\n */\n readonly publisherName?: string | Array<string> | null\n}\n\n// https://learn.microsoft.com/en-us/azure/trusted-signing/how-to-signing-integrations\nexport interface WindowsAzureSigningConfiguration {\n /**\n * [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.\n */\n readonly publisherName: string\n /**\n * The Trusted Signing Account endpoint. The URI value must have a URI that aligns to the\n * region your Trusted Signing Account and Certificate Profile you are specifying were created\n * in during the setup of these resources.\n *\n * Translates to field: Endpoint\n *\n * Requires one of environment variable configurations for authenticating to Microsoft Entra ID per [Microsoft's documentation](https://learn.microsoft.com/en-us/dotnet/api/azure.identity.environmentcredential?view=azure-dotnet#definition)\n */\n readonly endpoint: string\n /**\n * The Certificate Profile name. Translates to field: CertificateProfileName\n */\n readonly certificateProfileName: string\n /**\n * The Code Signing Signing Account name. Translates to field: CodeSigningAccountName\n */\n readonly codeSigningAccountName: string\n /**\n * The File Digest for signing each file. Translates to field: FileDigest\n * @default SHA256\n */\n readonly fileDigest?: string\n /**\n * The Timestamp rfc3161 server. Translates to field: TimestampRfc3161\n * @default http://timestamp.acs.microsoft.com\n */\n readonly timestampRfc3161?: string\n /**\n * The Timestamp Digest. Translates to field: TimestampDigest\n * @default SHA256\n */\n readonly timestampDigest?: string\n /**\n * Allow other CLI parameters (verbatim case-sensitive) to `Invoke-TrustedSigning`\n * Note: Key-Value pairs with `undefined`/`null` value are filtered out of the command.\n */\n [k: string]: string | Nullish\n}\n"]}
|