app-builder-lib 26.13.0 → 26.14.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/helpers/dynamic-import.js +24 -7
- package/out/asar/asarFileChecker.js.map +1 -1
- package/out/codeSign/windowsSignToolManager.d.ts +2 -0
- package/out/codeSign/windowsSignToolManager.js +7 -0
- package/out/codeSign/windowsSignToolManager.js.map +1 -1
- package/out/index.d.ts +2 -1
- package/out/index.js +3 -1
- package/out/index.js.map +1 -1
- package/out/node-module-collector/moduleManager.d.ts +9 -1
- package/out/node-module-collector/moduleManager.js +86 -55
- package/out/node-module-collector/moduleManager.js.map +1 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +6 -0
- package/out/node-module-collector/nodeModulesCollector.js +41 -22
- package/out/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.js +7 -5
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/out/options/macOptions.d.ts +29 -0
- package/out/options/macOptions.js.map +1 -1
- package/out/platformPackager.d.ts +1 -5
- package/out/platformPackager.js +9 -31
- package/out/platformPackager.js.map +1 -1
- package/out/targets/LinuxTargetHelper.d.ts +1 -1
- package/out/targets/LinuxTargetHelper.js.map +1 -1
- package/out/targets/appimage/appImageUtil.d.ts +2 -2
- package/out/targets/appimage/appImageUtil.js.map +1 -1
- package/out/targets/blockmap/blockmap.d.ts +16 -0
- package/out/targets/blockmap/blockmap.js +149 -0
- package/out/targets/blockmap/blockmap.js.map +1 -0
- package/out/targets/differentialUpdateInfoBuilder.js +3 -3
- package/out/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/out/targets/nsis/NsisTarget.js +28 -8
- package/out/targets/nsis/NsisTarget.js.map +1 -1
- package/out/targets/nsis/nsisValidation.d.ts +18 -0
- package/out/targets/nsis/nsisValidation.js +53 -0
- package/out/targets/nsis/nsisValidation.js.map +1 -0
- package/out/toolsets/icons.d.ts +8 -0
- package/out/toolsets/icons.js +37 -0
- package/out/toolsets/icons.js.map +1 -0
- package/out/util/config/config.js +6 -7
- package/out/util/config/config.js.map +1 -1
- package/out/util/config/schemaValidator.d.ts +7 -0
- package/out/util/config/schemaValidator.js +154 -0
- package/out/util/config/schemaValidator.js.map +1 -0
- package/out/util/iconConverter.d.ts +25 -0
- package/out/util/iconConverter.js +260 -0
- package/out/util/iconConverter.js.map +1 -0
- package/out/util/resEdit.js +16 -15
- package/out/util/resEdit.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/winPackager.d.ts +1 -0
- package/out/winPackager.js +12 -9
- package/out/winPackager.js.map +1 -1
- package/package.json +9 -8
- package/scheme.json +14 -0
- package/templates/linux/after-remove.tpl +14 -2
|
@@ -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`.\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 filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * This will be changed to APFS in the next major release, so it is recommended to set it explicitly to HFS+ if you want to keep using HFS+ (e.g. for better compatibility with older macOS versions).\n * @default HFS+\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\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 filesystem for the DMG volume (e.g. `\"APFS\"` or `\"HFS+\"`)\n * This will be changed to APFS in the next major release, so it is recommended to set it explicitly to HFS+ if you want to keep using HFS+ (e.g. for better compatibility with older macOS versions).\n * @default HFS+\n */\n readonly filesystem?: \"HFS+\" | \"APFS\" | null\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 * License agreement to display when the DMG is mounted.\n *\n * Accepts a single file path (`.rtf`, `.txt`, or `.html`) used as the English/default license,\n * or a language-code → file-path map for multi-language builds.\n *\n * When set, this takes precedence over the file-naming convention\n * (`license_en.txt`, etc. in the build resources directory).\n * Paths are resolved relative to the build resources directory or project root.\n *\n * @example Single language\n * ```yaml\n * dmg:\n * license: \"build/license.rtf\"\n * ```\n *\n * @example Multi-language\n * ```yaml\n * dmg:\n * license:\n * en_US: \"build/license.rtf\"\n * de_DE: \"build/license_de.txt\"\n * ja_JP: \"build/license_ja.txt\"\n * ```\n *\n * If not set, electron-builder scans the build resources directory for\n * `license_LANG.{rtf,txt,html}` files automatically.\n */\n license?: string | Record<string, string> | null\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"]}
|
|
@@ -4,6 +4,7 @@ import { Nullish } from "builder-util-runtime";
|
|
|
4
4
|
import { AppInfo } from "./appInfo";
|
|
5
5
|
import { GetFileMatchersOptions } from "./fileMatcher";
|
|
6
6
|
import { AfterPackContext, CompressionLevel, Configuration, ElectronPlatformName, FileAssociation, Packager, PackagerOptions, Platform, PlatformSpecificBuildOptions, Target, TargetSpecificOptions } from "./index";
|
|
7
|
+
import { IconFormat, IconInfo } from "./util/iconConverter";
|
|
7
8
|
import { AssetCatalogResult } from "./util/macosIconComposer";
|
|
8
9
|
export type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {
|
|
9
10
|
outDir: string;
|
|
@@ -94,11 +95,6 @@ export declare abstract class PlatformPackager<DC extends PlatformSpecificBuildO
|
|
|
94
95
|
getDefaultFrameworkIcon(): string | null;
|
|
95
96
|
resolveIcon(sources: Array<string>, fallbackSources: Array<string>, outputFormat: IconFormat): Promise<Array<IconInfo>>;
|
|
96
97
|
}
|
|
97
|
-
export interface IconInfo {
|
|
98
|
-
file: string;
|
|
99
|
-
size: number;
|
|
100
|
-
}
|
|
101
|
-
export type IconFormat = "icns" | "ico" | "set";
|
|
102
98
|
export declare function isSafeGithubName(name: string): boolean;
|
|
103
99
|
export declare function computeSafeArtifactNameIfNeeded(suggestedName: string | null, safeNameProducer: () => string): string | null;
|
|
104
100
|
export declare function normalizeExt(ext: string): string;
|
package/out/platformPackager.js
CHANGED
|
@@ -21,8 +21,8 @@ const fileMatcher_1 = require("./fileMatcher");
|
|
|
21
21
|
const fileTransformer_1 = require("./fileTransformer");
|
|
22
22
|
const Framework_1 = require("./Framework");
|
|
23
23
|
const index_1 = require("./index");
|
|
24
|
-
const appBuilder_1 = require("./util/appBuilder");
|
|
25
24
|
const appFileCopier_1 = require("./util/appFileCopier");
|
|
25
|
+
const iconConverter_1 = require("./util/iconConverter");
|
|
26
26
|
const macroExpander_1 = require("./util/macroExpander");
|
|
27
27
|
const macosIconComposer_1 = require("./util/macosIconComposer");
|
|
28
28
|
class PlatformPackager {
|
|
@@ -669,40 +669,18 @@ class PlatformPackager {
|
|
|
669
669
|
// convert if need, validate size (it is a reason why tool is called even if file has target extension (already specified as foo.icns for example))
|
|
670
670
|
async resolveIcon(sources, fallbackSources, outputFormat) {
|
|
671
671
|
const output = this.expandMacro(this.config.directories.output);
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
this.projectDir,
|
|
680
|
-
"--out",
|
|
681
|
-
path.resolve(this.projectDir, output, `.icon-${outputFormat}`),
|
|
682
|
-
];
|
|
683
|
-
for (const source of sources) {
|
|
684
|
-
if (source.endsWith(".icon")) {
|
|
685
|
-
// Ignore .icon files: they will cause the format conversion to fail
|
|
686
|
-
continue;
|
|
687
|
-
}
|
|
688
|
-
args.push("--input", source);
|
|
689
|
-
}
|
|
690
|
-
for (const source of fallbackSources) {
|
|
691
|
-
if (source.endsWith(".icon")) {
|
|
692
|
-
// Ignore .icon files: they will cause the format conversion to fail
|
|
693
|
-
continue;
|
|
694
|
-
}
|
|
695
|
-
args.push("--fallback-input", source);
|
|
696
|
-
}
|
|
697
|
-
const result = await (0, appBuilder_1.executeAppBuilderAsJson)(args);
|
|
698
|
-
const errorMessage = result.error;
|
|
699
|
-
if (errorMessage != null) {
|
|
700
|
-
throw new builder_util_1.InvalidConfigurationError(errorMessage, result.errorCode);
|
|
672
|
+
const outDir = (0, builder_util_1.sanitizeDirPath)(path.resolve(this.projectDir, output, `.icon-${outputFormat}`));
|
|
673
|
+
const roots = [this.buildResourcesDir, this.projectDir];
|
|
674
|
+
const filteredSources = sources.filter(s => !s.endsWith(".icon"));
|
|
675
|
+
const filteredFallbacks = fallbackSources.filter(s => !s.endsWith(".icon"));
|
|
676
|
+
const result = await (0, iconConverter_1.convertIcon)({ sources: filteredSources, fallbackSources: filteredFallbacks, roots, format: outputFormat, outDir });
|
|
677
|
+
if (result.error != null) {
|
|
678
|
+
throw new builder_util_1.InvalidConfigurationError(result.error, result.errorCode);
|
|
701
679
|
}
|
|
702
680
|
if (result.isFallback) {
|
|
703
681
|
builder_util_1.log.warn({ reason: "application icon is not set" }, `default ${capitalizeFirstLetter(this.info.framework.name)} icon is used`);
|
|
704
682
|
}
|
|
705
|
-
return result.icons
|
|
683
|
+
return result.icons;
|
|
706
684
|
}
|
|
707
685
|
}
|
|
708
686
|
exports.PlatformPackager = PlatformPackager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformPackager.js","sourceRoot":"","sources":["../src/platformPackager.ts"],"names":[],"mappings":";;;AA+4BA,4CAEC;AAED,0EAeC;AAGD,oCAEC;AAED,sCAEC;AA16BD,wDAAoD;AACpD,+CAeqB;AACrB,+DAA0D;AAC1D,0CAAqC;AACrC,uCAA+B;AAE/B,6BAA4B;AAC5B,kCAAiC;AACjC,yBAAwB;AACxB,uCAAmC;AACnC,4DAA2D;AAC3D,8CAA8C;AAC9C,gDAA6D;AAE7D,+CAA8I;AAC9I,uDAA4E;AAC5E,2CAAwD;AACxD,mCAcgB;AAChB,kDAA2D;AAC3D,wDAA+I;AAC/I,wDAAmE;AACnE,gEAA0F;AAgB1F,MAAsB,gBAAgB;IACpC,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAA;IAC1B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACpC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAA;IAC7B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAA;IACzB,CAAC;IAID,IAAI,YAAY;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAA;IACjC,CAAC;IAMD,YACW,IAAc,EACd,QAAkB;QADlB,SAAI,GAAJ,IAAI,CAAU;QACd,aAAQ,GAAR,QAAQ,CAAU;QANZ,kBAAa,GAAG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ChD,IAAI,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC;YACpC,OAAO,aAAa,CAAA;QACtB,CAAC;IACH,CAAC;IAED,OAAO,gBAAgB,EAAE,CAAA;AAC3B,CAAC;AAED,qBAAqB;AACrB,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;AACrD,CAAC;AAED,SAAgB,aAAa,CAAI,EAAe,EAAE,EAAe;IAC/D,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAC7B,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACrD,CAAC","sourcesContent":["import type { FuseConfig, FuseV1Config } from \"@electron/fuses\"\nimport { dynamicImport } from \"./util/dynamicImport\"\nimport {\n Arch,\n asArray,\n AsyncTaskManager,\n DebugLogger,\n defaultArchFromString,\n FileTransformer,\n getArchSuffix,\n getArtifactArchName,\n InvalidConfigurationError,\n isEmptyOrSpaces,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n statOrNull,\n} from \"builder-util\"\nimport { deepAssign, Nullish } from \"builder-util-runtime\"\nimport { readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport { Minimatch } from \"minimatch\"\nimport * as path from \"path\"\nimport * as fs from \"fs/promises\"\nimport * as os from \"os\"\nimport { AppInfo } from \"./appInfo\"\nimport { checkFileInArchive } from \"./asar/asarFileChecker\"\nimport { AsarPackager } from \"./asar/asarUtil\"\nimport { AsarIntegrity, computeData } from \"./asar/integrity\"\nimport { FuseOptionsV1 } from \"./configuration\"\nimport { copyFiles, FileMatcher, getFileMatchers, GetFileMatchersOptions, getMainFileMatchers, getNodeModuleFileMatcher } from \"./fileMatcher\"\nimport { createTransformer, isElectronCompileUsed } from \"./fileTransformer\"\nimport { Framework, isElectronBased } from \"./Framework\"\nimport {\n AfterPackContext,\n AsarOptions,\n CompressionLevel,\n Configuration,\n ElectronPlatformName,\n FileAssociation,\n LinuxPackager,\n Packager,\n PackagerOptions,\n Platform,\n PlatformSpecificBuildOptions,\n Target,\n TargetSpecificOptions,\n} from \"./index\"\nimport { executeAppBuilderAsJson } from \"./util/appBuilder\"\nimport { computeFileSets, computeNodeModuleFileSets, copyAppFiles, ELECTRON_COMPILE_SHIM_FILENAME, transformFiles } from \"./util/appFileCopier\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander\"\nimport { AssetCatalogResult, generateAssetCatalogForIcon } from \"./util/macosIconComposer\"\n\nexport type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {\n outDir: string\n appOutDir: string\n platformName: ElectronPlatformName\n arch: Arch\n platformSpecificBuildOptions: DC\n targets: Array<Target>\n options?: {\n sign?: boolean\n disableAsarIntegrity?: boolean\n disableFuses?: boolean\n }\n}\n\nexport abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions> {\n get packagerOptions(): PackagerOptions {\n return this.info.options\n }\n\n get buildResourcesDir(): string {\n return this.info.buildResourcesDir\n }\n\n get projectDir(): string {\n return this.info.projectDir\n }\n\n get config(): Configuration {\n return this.info.config\n }\n\n readonly platformSpecificBuildOptions: DC\n\n get resourceList(): Promise<Array<string>> {\n return this._resourceList.value\n }\n\n private readonly _resourceList = new Lazy<Array<string>>(() => orIfFileNotExist(readdir(this.info.buildResourcesDir), []))\n\n readonly appInfo: AppInfo\n\n protected constructor(\n readonly info: Packager,\n readonly platform: Platform\n ) {\n this.platformSpecificBuildOptions = PlatformPackager.normalizePlatformSpecificBuildOptions((this.config as any)[platform.buildConfigurationKey])\n this.appInfo = this.prepareAppInfo(info.appInfo)\n }\n\n get compression(): CompressionLevel {\n const compression = this.platformSpecificBuildOptions.compression\n // explicitly set to null - request to use default value instead of parent (in the config)\n if (compression === null) {\n return \"normal\"\n }\n return compression || this.config.compression || \"normal\"\n }\n\n get debugLogger(): DebugLogger {\n return this.info.debugLogger\n }\n\n abstract get defaultTarget(): Array<string>\n\n // eslint-disable-next-line\n protected prepareAppInfo(appInfo: AppInfo) {\n return new AppInfo(this.info, null, this.platformSpecificBuildOptions)\n }\n\n private static normalizePlatformSpecificBuildOptions(options: any | Nullish): any {\n return options == null ? Object.create(null) : options\n }\n\n abstract createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void\n\n getCscPassword(): string {\n const password = this.doGetCscPassword()\n if (isEmptyOrSpaces(password)) {\n log.info({ reason: \"CSC_KEY_PASSWORD is not defined\" }, \"empty password will be used for code signing\")\n return \"\"\n } else {\n return password.trim()\n }\n }\n\n getCscLink(extraEnvName?: string | null): string | Nullish {\n // allow to specify as empty string\n const envValue = chooseNotNull(extraEnvName == null ? null : process.env[extraEnvName], process.env.CSC_LINK)\n return chooseNotNull(chooseNotNull(this.info.config.cscLink, this.platformSpecificBuildOptions.cscLink), envValue)\n }\n\n doGetCscPassword(): string | Nullish {\n // allow to specify as empty string\n return chooseNotNull(chooseNotNull(this.info.config.cscKeyPassword, this.platformSpecificBuildOptions.cscKeyPassword), process.env.CSC_KEY_PASSWORD)\n }\n\n protected computeAppOutDir(outDir: string, arch: Arch): string {\n // codeql[js/shell-command-constructed-from-input] - prepackaged and outDir are validated via sanitizeDirPath in the Packager constructor\n return path.resolve(\n this.packagerOptions.prepackaged ||\n path.join(\n outDir,\n `${this.platform.buildConfigurationKey}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}${this.platform === Platform.MAC ? \"\" : \"-unpacked\"}`\n )\n )\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any> {\n const appOutDir = this.computeAppOutDir(outDir, arch)\n await this.doPack({\n outDir,\n appOutDir,\n platformName: this.platform.nodeName as ElectronPlatformName,\n arch,\n platformSpecificBuildOptions: this.platformSpecificBuildOptions,\n targets,\n })\n this.packageInDistributableFormat(appOutDir, arch, targets, taskManager)\n }\n\n protected packageInDistributableFormat(appOutDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): void {\n if (targets.find(it => !it.isAsyncSupported) == null) {\n PlatformPackager.buildAsyncTargets(targets, taskManager, appOutDir, arch)\n return\n }\n\n taskManager.add(async () => {\n // BluebirdPromise.map doesn't invoke target.build immediately, but for RemoteTarget it is very critical to call build() before finishBuild()\n const subTaskManager = new AsyncTaskManager(this.info.cancellationToken)\n PlatformPackager.buildAsyncTargets(targets, subTaskManager, appOutDir, arch)\n await subTaskManager.awaitTasks()\n\n for (const target of targets) {\n if (!target.isAsyncSupported && !this.info.cancellationToken.cancelled) {\n await target.build(appOutDir, arch)\n }\n }\n })\n }\n\n private static buildAsyncTargets(targets: Array<Target>, taskManager: AsyncTaskManager, appOutDir: string, arch: Arch) {\n for (const target of targets) {\n if (target.isAsyncSupported) {\n taskManager.addTask(target.build(appOutDir, arch))\n }\n }\n }\n\n private getExtraFileMatchers(isResources: boolean, appOutDir: string, options: GetFileMatchersOptions): Array<FileMatcher> | null {\n const outDir = this.platform === Platform.MAC ? path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\") : appOutDir\n const base = isResources ? this.getResourcesDir(appOutDir) : outDir\n return getFileMatchers(this.config, isResources ? \"extraResources\" : \"extraFiles\", base, options)\n }\n\n createGetFileMatchersOptions(outDir: string, arch: Arch, customBuildOptions: PlatformSpecificBuildOptions): GetFileMatchersOptions {\n return {\n macroExpander: it => this.expandMacro(it, arch == null ? null : Arch[arch], { \"/*\": \"{,/**/*}\" }),\n customBuildOptions,\n globalOutDir: outDir,\n defaultSrc: this.projectDir,\n }\n }\n\n protected async doPack(packOptions: DoPackOptions<DC>) {\n if (this.packagerOptions.prepackaged != null) {\n return\n }\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n // Due to node-gyp rewriting GYP_MSVS_VERSION when reused across the same session, we must reset the env var: https://github.com/electron-userland/electron-builder/issues/7256\n delete process.env.GYP_MSVS_VERSION\n\n const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets, options } = packOptions\n\n await this.info.emitBeforePack({\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n })\n\n await this.info.installAppDependencies(this.platform, arch)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n\n await framework.prepareApplicationStageDirectory({\n packager: this,\n appOutDir,\n platformName,\n arch: Arch[arch],\n version: framework.version,\n })\n\n await this.info.emitAfterExtract({\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n })\n\n const excludePatterns: Array<Minimatch> = []\n\n const computeParsedPatterns = (patterns: Array<FileMatcher> | null) => {\n if (patterns != null) {\n for (const pattern of patterns) {\n pattern.computeParsedPatterns(excludePatterns, this.info.projectDir)\n }\n }\n }\n\n const getFileMatchersOptions = this.createGetFileMatchersOptions(outDir, arch, platformSpecificBuildOptions)\n const macroExpander = getFileMatchersOptions.macroExpander\n const extraResourceMatchers = this.getExtraFileMatchers(true, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraResourceMatchers)\n const extraFileMatchers = this.getExtraFileMatchers(false, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraFileMatchers)\n\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n\n const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions)\n const resourcesPath =\n this.platform === Platform.MAC\n ? path.join(appOutDir, framework.distMacOsAppName, \"Contents\", \"Resources\")\n : isElectronBased(framework)\n ? path.join(appOutDir, \"resources\")\n : appOutDir\n const taskManager = new AsyncTaskManager(this.info.cancellationToken)\n this.copyAppFiles(taskManager, asarOptions, resourcesPath, path.join(resourcesPath, \"app\"), packContext, platformSpecificBuildOptions, excludePatterns, macroExpander)\n await taskManager.awaitTasks()\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n if (framework.beforeCopyExtraFiles != null) {\n const resourcesRelativePath = this.platform === Platform.MAC ? \"Resources\" : isElectronBased(framework) ? \"resources\" : \"\"\n\n let asarIntegrity: AsarIntegrity | null = null\n if (!(asarOptions == null || options?.disableAsarIntegrity || this.config.disableAsarIntegrity)) {\n asarIntegrity = await computeData({ resourcesPath, resourcesRelativePath, resourcesDestinationPath: this.getResourcesDir(appOutDir), extraResourceMatchers })\n }\n\n await framework.beforeCopyExtraFiles({\n packager: this,\n appOutDir,\n asarIntegrity,\n platformName,\n })\n }\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n await copyFiles(extraResourceMatchers, transformerForExtraFiles)\n await copyFiles(extraFileMatchers, transformerForExtraFiles)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.info.emitAfterPack(packContext)\n\n if (framework.afterPack != null) {\n await framework.afterPack(packContext)\n }\n\n const isAsar = asarOptions != null\n await this.sanityCheckPackage(appOutDir, isAsar, framework, !!this.config.disableSanityCheckAsar)\n\n if (!options?.disableFuses) {\n await this.doAddElectronFuses(packContext)\n }\n if (options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n // the fuses MUST be flipped right before signing\n protected async doAddElectronFuses(packContext: AfterPackContext) {\n if (this.config.electronFuses == null) {\n return\n }\n const fuseConfig = await this.generateFuseConfig(this.config.electronFuses)\n await this.addElectronFuses(packContext, fuseConfig)\n }\n\n private async generateFuseConfig(fuses: FuseOptionsV1): Promise<FuseV1Config> {\n const { FuseVersion, FuseV1Options } = await dynamicImport<typeof import(\"@electron/fuses\")>(\"@electron/fuses\")\n const config: FuseV1Config = {\n version: FuseVersion.V1,\n resetAdHocDarwinSignature: fuses.resetAdHocDarwinSignature,\n }\n // this is annoying, but we must filter out undefined entries because some older electron versions will receive `the fuse wire in this version of Electron is not long enough` even if entry is set undefined\n if (fuses.runAsNode != null) {\n config[FuseV1Options.RunAsNode] = fuses.runAsNode\n }\n if (fuses.enableCookieEncryption != null) {\n config[FuseV1Options.EnableCookieEncryption] = fuses.enableCookieEncryption\n }\n if (fuses.enableNodeOptionsEnvironmentVariable != null) {\n config[FuseV1Options.EnableNodeOptionsEnvironmentVariable] = fuses.enableNodeOptionsEnvironmentVariable\n }\n if (fuses.enableNodeCliInspectArguments != null) {\n config[FuseV1Options.EnableNodeCliInspectArguments] = fuses.enableNodeCliInspectArguments\n }\n if (fuses.enableEmbeddedAsarIntegrityValidation != null) {\n config[FuseV1Options.EnableEmbeddedAsarIntegrityValidation] = fuses.enableEmbeddedAsarIntegrityValidation\n }\n if (fuses.onlyLoadAppFromAsar != null) {\n config[FuseV1Options.OnlyLoadAppFromAsar] = fuses.onlyLoadAppFromAsar\n }\n if (fuses.loadBrowserProcessSpecificV8Snapshot != null) {\n config[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot] = fuses.loadBrowserProcessSpecificV8Snapshot\n }\n if (fuses.grantFileProtocolExtraPrivileges != null) {\n config[FuseV1Options.GrantFileProtocolExtraPrivileges] = fuses.grantFileProtocolExtraPrivileges\n }\n return config\n }\n\n /**\n * Use `AfterPackContext` here to keep available for public API\n * @param {AfterPackContext} context\n * @param {FuseConfig} fuses\n *\n * Can be used in `afterPack` hook for custom fuse logic like below. It's an alternative approach if one wants to override electron-builder's @electron/fuses version\n * ```\n * await context.packager.addElectronFuses(context, { ... })\n * ```\n */\n public async addElectronFuses(context: AfterPackContext, fuses: FuseConfig) {\n const { appOutDir, electronPlatformName } = context\n\n const ext = {\n darwin: \".app\",\n mas: \".app\",\n win32: \".exe\",\n linux: \"\",\n }[electronPlatformName]\n\n const executableName = this instanceof LinuxPackager ? this.executableName : this.appInfo.productFilename\n const electronBinaryPath = path.join(appOutDir, `${executableName}${ext}`)\n\n log.info({ electronPath: log.filePath(electronBinaryPath) }, \"executing @electron/fuses\")\n const { flipFuses } = await dynamicImport<typeof import(\"@electron/fuses\")>(\"@electron/fuses\")\n return flipFuses(electronBinaryPath, fuses)\n }\n\n protected async doSignAfterPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>) {\n const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions)\n const isAsar = asarOptions != null\n const packContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n const didSign = await this.signApp(packContext, isAsar)\n if (didSign) {\n await this.info.emitAfterSign(packContext)\n } else if (this.info.filterPackagerEventListeners(\"afterSign\", \"user\").length) {\n log.warn(null, `skipping \"afterSign\" hook as no signing occurred, perhaps you intended \"afterPack\"?`)\n }\n }\n\n // eslint-disable-next-line\n protected createTransformerForExtraFiles(packContext: AfterPackContext): FileTransformer | null {\n return null\n }\n\n private copyAppFiles(\n taskManager: AsyncTaskManager,\n asarOptions: AsarOptions | null,\n resourcePath: string,\n defaultDestination: string,\n packContext: AfterPackContext,\n platformSpecificBuildOptions: DC,\n excludePatterns: Array<Minimatch>,\n macroExpander: (it: string) => string\n ) {\n const appDir = this.info.appDir\n const config = this.config\n const isElectronCompile = asarOptions != null && isElectronCompileUsed(this.info)\n\n const mainMatchers = getMainFileMatchers(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this, packContext.outDir, isElectronCompile)\n if (excludePatterns.length > 0) {\n for (const matcher of mainMatchers) {\n matcher.excludePatterns = excludePatterns\n }\n }\n\n const framework = this.info.framework\n const transformer = createTransformer(\n appDir,\n config,\n isElectronCompile\n ? {\n originalMain: this.info.metadata.main,\n main: ELECTRON_COMPILE_SHIM_FILENAME,\n ...config.extraMetadata,\n }\n : config.extraMetadata,\n framework.createTransformer == null ? null : framework.createTransformer()\n )\n\n const _computeFileSets = (matchers: Array<FileMatcher>) => {\n return computeFileSets(matchers, this.info.isPrepackedAppAsar ? null : transformer, this, isElectronCompile).then(async result => {\n if (!this.info.isPrepackedAppAsar && !this.info.areNodeModulesHandledExternally) {\n const moduleFileMatcher = getNodeModuleFileMatcher(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this.info)\n result = result.concat(await computeNodeModuleFileSets(this, moduleFileMatcher))\n }\n return result.filter(it => it.files.length > 0)\n })\n }\n\n if (this.info.isPrepackedAppAsar) {\n taskManager.add(async () => {\n const fileSets = await _computeFileSets([new FileMatcher(appDir, resourcePath, macroExpander)])\n fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, transformer)))\n await taskManager.awaitTasks()\n })\n } else if (asarOptions == null) {\n // for ASAR all asar unpacked files will be extra transformed (e.g. sign of EXE and DLL) later,\n // for prepackaged asar extra transformation not supported yet,\n // so, extra transform if asar is disabled\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n const combinedTransformer: FileTransformer = file => {\n if (transformerForExtraFiles != null) {\n const result = transformerForExtraFiles(file)\n if (result != null) {\n return result\n }\n }\n return transformer(file)\n }\n taskManager.add(async () => {\n const fileSets = await _computeFileSets(mainMatchers)\n fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, combinedTransformer)))\n await taskManager.awaitTasks()\n })\n } else {\n const unpackPattern = getFileMatchers(config, \"asarUnpack\", defaultDestination, {\n macroExpander,\n customBuildOptions: platformSpecificBuildOptions,\n globalOutDir: packContext.outDir,\n defaultSrc: appDir,\n })\n const fileMatcher = unpackPattern == null ? null : unpackPattern[0]\n taskManager.addTask(\n _computeFileSets(mainMatchers).then(async fileSets => {\n for (const fileSet of fileSets) {\n await transformFiles(transformer, fileSet)\n }\n\n await new AsarPackager(this, {\n defaultDestination,\n resourcePath,\n options: asarOptions,\n unpackPattern: fileMatcher?.createFilter(),\n }).pack(fileSets)\n })\n )\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean> {\n return Promise.resolve(false)\n }\n\n getIconPath(): Promise<string | null> {\n return Promise.resolve(null)\n }\n\n private async computeAsarOptions(customBuildOptions: DC): Promise<AsarOptions | null> {\n if (!isElectronBased(this.info.framework)) {\n return null\n }\n\n function errorMessage(name: string) {\n return `${name} is deprecated is deprecated and not supported — please use asarUnpack`\n }\n\n const buildMetadata = this.config as any\n if (buildMetadata[\"asar-unpack\"] != null) {\n throw new Error(errorMessage(\"asar-unpack\"))\n }\n if (buildMetadata[\"asar-unpack-dir\"] != null) {\n throw new Error(errorMessage(\"asar-unpack-dir\"))\n }\n\n const platformSpecific = customBuildOptions.asar\n const result = platformSpecific == null ? this.config.asar : platformSpecific\n if (result === false) {\n const appAsarStat = await statOrNull(path.join(this.info.appDir, \"app.asar\"))\n //noinspection ES6MissingAwait\n if (appAsarStat == null || !appAsarStat.isFile()) {\n log.warn(\n {\n solution: \"enable asar and use asarUnpack to unpack files that must be externally available\",\n },\n \"asar usage is disabled — this is strongly not recommended\"\n )\n }\n return null\n }\n\n if (result == null || result === true) {\n return {}\n }\n\n for (const name of [\"unpackDir\", \"unpack\"]) {\n if ((result as any)[name] != null) {\n throw new Error(errorMessage(`asar.${name}`))\n }\n }\n return deepAssign({}, result)\n }\n\n public getElectronSrcDir(dist: string): string {\n return path.resolve(this.projectDir, dist)\n }\n\n public getElectronDestinationDir(appOutDir: string): string {\n return appOutDir\n }\n\n getResourcesDir(appOutDir: string): string {\n if (this.platform === Platform.MAC) {\n return this.getMacOsResourcesDir(appOutDir)\n }\n if (isElectronBased(this.info.framework)) {\n return path.join(appOutDir, \"resources\")\n }\n return appOutDir\n }\n\n public getMacOsElectronFrameworkResourcesDir(appOutDir: string): string {\n const electronFrameworkName = path.basename(this.info.framework.distMacOsAppName, \".app\") + \" \" + \"Framework.framework\"\n return path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\", \"Frameworks\", electronFrameworkName, \"Versions\", \"A\", \"Resources\")\n }\n public getMacOsResourcesDir(appOutDir: string): string {\n return path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\", \"Resources\")\n }\n\n private async checkFileInPackage(resourcesDir: string, file: string, messagePrefix: string, isAsar: boolean, disableSanityCheckAsar: boolean) {\n if (isAsar && disableSanityCheckAsar) {\n return\n }\n const relativeFile = path.relative(this.info.appDir, path.resolve(this.info.appDir, file))\n if (isAsar) {\n await checkFileInArchive(path.join(resourcesDir, \"app.asar\"), relativeFile, messagePrefix)\n return\n }\n\n const pathParsed = path.parse(file)\n // Even when packaging to asar is disabled, it does not imply that the main file can not be inside an .asar archive.\n // This may occur when the packaging is done manually before processing with electron-builder.\n if (pathParsed.dir.includes(\".asar\")) {\n // The path needs to be split to the part with an asar archive which acts like a directory and the part with\n // the path to main file itself. (e.g. path/arch.asar/dir/index.js -> path/arch.asar, dir/index.js)\n // noinspection TypeScriptValidateJSTypes\n const pathSplit: Array<string> = pathParsed.dir.split(path.sep)\n let partWithAsarIndex = 0\n pathSplit.some((pathPart: string, index: number) => {\n partWithAsarIndex = index\n return pathPart.endsWith(\".asar\")\n })\n const asarPath = path.join(...pathSplit.slice(0, partWithAsarIndex + 1))\n let mainPath = pathSplit.length > partWithAsarIndex + 1 ? path.join.apply(pathSplit.slice(partWithAsarIndex + 1)) : \"\"\n mainPath += path.join(mainPath, pathParsed.base)\n await checkFileInArchive(path.join(resourcesDir, \"app\", asarPath), mainPath, messagePrefix)\n } else {\n const fullPath = path.join(resourcesDir, \"app\", relativeFile)\n const outStat = await statOrNull(fullPath)\n if (outStat == null) {\n throw new Error(`${messagePrefix} \"${fullPath}\" does not exist. Seems like a wrong configuration.`)\n } else {\n //noinspection ES6MissingAwait\n if (!outStat.isFile()) {\n throw new Error(`${messagePrefix} \"${fullPath}\" is not a file. Seems like a wrong configuration.`)\n }\n }\n }\n }\n\n private async sanityCheckPackage(appOutDir: string, isAsar: boolean, framework: Framework, disableSanityCheckAsar: boolean): Promise<any> {\n const outStat = await statOrNull(appOutDir)\n if (outStat == null) {\n throw new Error(`Output directory \"${appOutDir}\" does not exist. Seems like a wrong configuration.`)\n } else {\n //noinspection ES6MissingAwait\n if (!outStat.isDirectory()) {\n throw new Error(`Output directory \"${appOutDir}\" is not a directory. Seems like a wrong configuration.`)\n }\n }\n\n const resourcesDir = this.getResourcesDir(appOutDir)\n const mainFile = (framework.getMainFile == null ? null : framework.getMainFile(this.platform)) || this.info.metadata.main || \"index.js\"\n await this.checkFileInPackage(resourcesDir, mainFile, \"Application entry file\", isAsar, disableSanityCheckAsar)\n await this.checkFileInPackage(resourcesDir, \"package.json\", \"Application\", isAsar, disableSanityCheckAsar)\n }\n\n // tslint:disable-next-line:no-invalid-template-strings\n computeSafeArtifactName(\n suggestedName: string | null,\n ext: string,\n arch?: Arch | null,\n skipDefaultArch = true,\n defaultArch?: string,\n safePattern = \"${name}-${version}-${arch}.${ext}\"\n ): string | null {\n return computeSafeArtifactNameIfNeeded(suggestedName, () =>\n this.computeArtifactName(safePattern, ext, skipDefaultArch && arch === defaultArchFromString(defaultArch) ? null : arch)\n )\n }\n\n expandArtifactNamePattern(\n targetSpecificOptions: TargetSpecificOptions | Nullish,\n ext: string,\n arch?: Arch | null,\n defaultPattern?: string,\n skipDefaultArch = true,\n defaultArch?: string\n ): string {\n const { pattern, isUserForced } = this.artifactPatternConfig(targetSpecificOptions, defaultPattern)\n return this.computeArtifactName(pattern, ext, !isUserForced && skipDefaultArch && arch === defaultArchFromString(defaultArch) ? null : arch)\n }\n\n artifactPatternConfig(targetSpecificOptions: TargetSpecificOptions | Nullish, defaultPattern: string | undefined) {\n const userSpecifiedPattern = targetSpecificOptions?.artifactName || this.platformSpecificBuildOptions.artifactName || this.config.artifactName\n return {\n isUserForced: !!userSpecifiedPattern,\n pattern: userSpecifiedPattern || defaultPattern || \"${productName}-${version}-${arch}.${ext}\",\n }\n }\n\n expandArtifactBeautyNamePattern(targetSpecificOptions: TargetSpecificOptions | Nullish, ext: string, arch?: Arch | null): string {\n // tslint:disable-next-line:no-invalid-template-strings\n return this.expandArtifactNamePattern(targetSpecificOptions, ext, arch, \"${productName} ${version} ${arch}.${ext}\", true)\n }\n\n private computeArtifactName(pattern: any, ext: string, arch: Arch | Nullish): string {\n const archName = arch == null ? null : getArtifactArchName(arch, ext)\n return this.expandMacro(pattern, archName, {\n ext,\n })\n }\n\n expandMacro(pattern: string, arch?: string | null, extra: any = {}, isProductNameSanitized = true): string {\n return doExpandMacro(pattern, arch, this.appInfo, { os: this.platform.buildConfigurationKey, ...extra }, isProductNameSanitized)\n }\n\n generateName2(ext: string | null, classifier: string | Nullish, deployment: boolean): string {\n const dotExt = ext == null ? \"\" : `.${ext}`\n const separator = ext === \"deb\" ? \"_\" : \"-\"\n return `${deployment ? this.appInfo.name : this.appInfo.productFilename}${separator}${this.appInfo.version}${classifier == null ? \"\" : `${separator}${classifier}`}${dotExt}`\n }\n\n getTempFile(suffix: string): Promise<string> {\n return this.info.tempDirManager.getTempFile({ suffix })\n }\n\n get fileAssociations(): Array<FileAssociation> {\n return asArray(this.config.fileAssociations).concat(asArray(this.platformSpecificBuildOptions.fileAssociations))\n }\n\n async getResource(custom: string | Nullish, ...names: Array<string>): Promise<string | null> {\n const resourcesDir = this.info.buildResourcesDir\n if (custom === undefined) {\n const resourceList = await this.resourceList\n for (const name of names) {\n if (resourceList.includes(name)) {\n // sanitizeDirPath with resourcesDir base enforces containment — CodeQL recognises the startsWith check inside as a path-traversal sanitizer\n return sanitizeDirPath(path.join(resourcesDir, path.basename(name)), resourcesDir)\n }\n }\n } else if (custom != null && !isEmptyOrSpaces(custom)) {\n const resourceList = await this.resourceList\n if (resourceList.includes(custom)) {\n return sanitizeDirPath(path.join(resourcesDir, path.basename(custom)), resourcesDir)\n }\n\n // codeql[js/shell-command-constructed-from-input] - intentional: custom may be an absolute path outside the build resources dir; existence is verified below via statOrNull\n let p = path.resolve(resourcesDir, custom)\n if ((await statOrNull(p)) == null) {\n p = path.resolve(this.projectDir, custom)\n if ((await statOrNull(p)) == null) {\n throw new InvalidConfigurationError(\n `cannot find specified resource \"${custom}\", nor relative to \"${resourcesDir}\", neither relative to project dir (\"${this.projectDir}\")`\n )\n }\n }\n return p\n }\n return null\n }\n\n get forceCodeSigning(): boolean {\n const forceCodeSigningPlatform = this.platformSpecificBuildOptions.forceCodeSigning\n return (forceCodeSigningPlatform == null ? this.config.forceCodeSigning : forceCodeSigningPlatform) || false\n }\n\n private assetCatalogResults = new Map<string, Promise<AssetCatalogResult>>()\n protected generateAssetCatalogData(iconPath: string): Promise<AssetCatalogResult> {\n // Cache results\n const cachedPromise = this.assetCatalogResults.get(iconPath)\n if (cachedPromise) {\n return cachedPromise\n }\n\n const promise = generateAssetCatalogForIcon(iconPath)\n this.assetCatalogResults.set(iconPath, promise)\n return promise\n }\n\n private cachedIcnsFromIconFile = new Map<string, Promise<string>>()\n async generateIcnsFromIcon(iconPath: string): Promise<string> {\n const cachedPromise = this.cachedIcnsFromIconFile.get(iconPath)\n if (cachedPromise) {\n return cachedPromise\n }\n\n const runner = async () => {\n const { icnsFile } = await this.generateAssetCatalogData(iconPath)\n\n // Generate icns file\n const tempDir = await fs.mkdtemp(path.resolve(os.tmpdir(), \"icon-compile-\"))\n const tempIcnsPath = path.resolve(tempDir, \"Icon.icns\")\n await fs.writeFile(tempIcnsPath, icnsFile)\n\n return tempIcnsPath\n }\n const promise = runner()\n this.cachedIcnsFromIconFile.set(iconPath, promise)\n return promise\n }\n\n protected async getOrConvertIcon(format: IconFormat): Promise<string | null> {\n if (format === \"icns\") {\n const configuredIcon = this.platformSpecificBuildOptions.icon\n // If it is a .icon file, generate the icns file and return the path to the icns file\n if (configuredIcon?.endsWith(\".icon\")) {\n const iconPath = await this.getResource(configuredIcon)\n if (iconPath) {\n return this.generateIcnsFromIcon(iconPath)\n }\n }\n }\n\n const result = await this.resolveIcon(asArray(this.platformSpecificBuildOptions.icon || this.config.icon), [], format)\n if (result.length === 0) {\n const framework = this.info.framework\n if (framework.getDefaultIcon != null) {\n return framework.getDefaultIcon(this.platform)\n }\n\n log.warn({ reason: \"application icon is not set\" }, `default ${capitalizeFirstLetter(framework.name)} icon is used`)\n return this.getDefaultFrameworkIcon()\n } else {\n return result[0].file\n }\n }\n\n getDefaultFrameworkIcon(): string | null {\n const framework = this.info.framework\n return framework.getDefaultIcon == null ? null : framework.getDefaultIcon(this.platform)\n }\n\n // convert if need, validate size (it is a reason why tool is called even if file has target extension (already specified as foo.icns for example))\n async resolveIcon(sources: Array<string>, fallbackSources: Array<string>, outputFormat: IconFormat): Promise<Array<IconInfo>> {\n const output = this.expandMacro(this.config.directories!.output!)\n const args = [\n \"icon\",\n \"--format\",\n outputFormat,\n \"--root\",\n this.buildResourcesDir,\n \"--root\",\n this.projectDir,\n \"--out\",\n path.resolve(this.projectDir, output, `.icon-${outputFormat}`),\n ]\n for (const source of sources) {\n if (source.endsWith(\".icon\")) {\n // Ignore .icon files: they will cause the format conversion to fail\n continue\n }\n args.push(\"--input\", source)\n }\n for (const source of fallbackSources) {\n if (source.endsWith(\".icon\")) {\n // Ignore .icon files: they will cause the format conversion to fail\n continue\n }\n args.push(\"--fallback-input\", source)\n }\n\n const result: IconConvertResult = await executeAppBuilderAsJson(args)\n const errorMessage = result.error\n if (errorMessage != null) {\n throw new InvalidConfigurationError(errorMessage, result.errorCode)\n }\n\n if (result.isFallback) {\n log.warn({ reason: \"application icon is not set\" }, `default ${capitalizeFirstLetter(this.info.framework.name)} icon is used`)\n }\n\n return result.icons || []\n }\n}\n\nexport interface IconInfo {\n file: string\n size: number\n}\n\ninterface IconConvertResult {\n icons?: Array<IconInfo>\n\n error?: string\n errorCode?: string\n isFallback?: boolean\n}\n\nexport type IconFormat = \"icns\" | \"ico\" | \"set\"\n\nexport function isSafeGithubName(name: string) {\n return /^[0-9A-Za-z._-]+$/.test(name)\n}\n\nexport function computeSafeArtifactNameIfNeeded(suggestedName: string | null, safeNameProducer: () => string): string | null {\n // GitHub only allows the listed characters in file names.\n if (suggestedName != null) {\n if (isSafeGithubName(suggestedName)) {\n return null\n }\n\n // prefer to use suggested name - so, if space is the only problem, just replace only space to dash\n suggestedName = suggestedName.replace(/ /g, \"-\")\n if (isSafeGithubName(suggestedName)) {\n return suggestedName\n }\n }\n\n return safeNameProducer()\n}\n\n// remove leading dot\nexport function normalizeExt(ext: string) {\n return ext.startsWith(\".\") ? ext.substring(1) : ext\n}\n\nexport function chooseNotNull<T>(v1: T | Nullish, v2: T | Nullish): T | Nullish {\n return v1 == null ? v2 : v1\n}\n\nfunction capitalizeFirstLetter(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1)\n}\n"]}
|
|
1
|
+
{"version":3,"file":"platformPackager.js","sourceRoot":"","sources":["../src/platformPackager.ts"],"names":[],"mappings":";;;AA42BA,4CAEC;AAED,0EAeC;AAGD,oCAEC;AAED,sCAEC;AAv4BD,wDAAoD;AACpD,+CAeqB;AACrB,+DAA0D;AAC1D,0CAAqC;AACrC,uCAA+B;AAE/B,6BAA4B;AAC5B,kCAAiC;AACjC,yBAAwB;AACxB,uCAAmC;AACnC,4DAA2D;AAC3D,8CAA8C;AAC9C,gDAA6D;AAE7D,+CAA8I;AAC9I,uDAA4E;AAC5E,2CAAwD;AACxD,mCAcgB;AAChB,wDAA+I;AAC/I,wDAAwE;AACxE,wDAAmE;AACnE,gEAA0F;AAgB1F,MAAsB,gBAAgB;IACpC,IAAI,eAAe;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAA;IAC1B,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAA;IACpC,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAA;IAC7B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CA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AAa,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QAChD,IAAI,gBAAgB,CAAC,aAAa,CAAC,EAAE,CAAC;YACpC,OAAO,aAAa,CAAA;QACtB,CAAC;IACH,CAAC;IAED,OAAO,gBAAgB,EAAE,CAAA;AAC3B,CAAC;AAED,qBAAqB;AACrB,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAA;AACrD,CAAC;AAED,SAAgB,aAAa,CAAI,EAAe,EAAE,EAAe;IAC/D,OAAO,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;AAC7B,CAAC;AAED,SAAS,qBAAqB,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACrD,CAAC","sourcesContent":["import type { FuseConfig, FuseV1Config } from \"@electron/fuses\"\nimport { dynamicImport } from \"./util/dynamicImport\"\nimport {\n Arch,\n asArray,\n AsyncTaskManager,\n DebugLogger,\n defaultArchFromString,\n FileTransformer,\n getArchSuffix,\n getArtifactArchName,\n InvalidConfigurationError,\n isEmptyOrSpaces,\n log,\n orIfFileNotExist,\n sanitizeDirPath,\n statOrNull,\n} from \"builder-util\"\nimport { deepAssign, Nullish } from \"builder-util-runtime\"\nimport { readdir } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport { Minimatch } from \"minimatch\"\nimport * as path from \"path\"\nimport * as fs from \"fs/promises\"\nimport * as os from \"os\"\nimport { AppInfo } from \"./appInfo\"\nimport { checkFileInArchive } from \"./asar/asarFileChecker\"\nimport { AsarPackager } from \"./asar/asarUtil\"\nimport { AsarIntegrity, computeData } from \"./asar/integrity\"\nimport { FuseOptionsV1 } from \"./configuration\"\nimport { copyFiles, FileMatcher, getFileMatchers, GetFileMatchersOptions, getMainFileMatchers, getNodeModuleFileMatcher } from \"./fileMatcher\"\nimport { createTransformer, isElectronCompileUsed } from \"./fileTransformer\"\nimport { Framework, isElectronBased } from \"./Framework\"\nimport {\n AfterPackContext,\n AsarOptions,\n CompressionLevel,\n Configuration,\n ElectronPlatformName,\n FileAssociation,\n LinuxPackager,\n Packager,\n PackagerOptions,\n Platform,\n PlatformSpecificBuildOptions,\n Target,\n TargetSpecificOptions,\n} from \"./index\"\nimport { computeFileSets, computeNodeModuleFileSets, copyAppFiles, ELECTRON_COMPILE_SHIM_FILENAME, transformFiles } from \"./util/appFileCopier\"\nimport { convertIcon, IconFormat, IconInfo } from \"./util/iconConverter\"\nimport { expandMacro as doExpandMacro } from \"./util/macroExpander\"\nimport { AssetCatalogResult, generateAssetCatalogForIcon } from \"./util/macosIconComposer\"\n\nexport type DoPackOptions<DC extends PlatformSpecificBuildOptions> = {\n outDir: string\n appOutDir: string\n platformName: ElectronPlatformName\n arch: Arch\n platformSpecificBuildOptions: DC\n targets: Array<Target>\n options?: {\n sign?: boolean\n disableAsarIntegrity?: boolean\n disableFuses?: boolean\n }\n}\n\nexport abstract class PlatformPackager<DC extends PlatformSpecificBuildOptions> {\n get packagerOptions(): PackagerOptions {\n return this.info.options\n }\n\n get buildResourcesDir(): string {\n return this.info.buildResourcesDir\n }\n\n get projectDir(): string {\n return this.info.projectDir\n }\n\n get config(): Configuration {\n return this.info.config\n }\n\n readonly platformSpecificBuildOptions: DC\n\n get resourceList(): Promise<Array<string>> {\n return this._resourceList.value\n }\n\n private readonly _resourceList = new Lazy<Array<string>>(() => orIfFileNotExist(readdir(this.info.buildResourcesDir), []))\n\n readonly appInfo: AppInfo\n\n protected constructor(\n readonly info: Packager,\n readonly platform: Platform\n ) {\n this.platformSpecificBuildOptions = PlatformPackager.normalizePlatformSpecificBuildOptions((this.config as any)[platform.buildConfigurationKey])\n this.appInfo = this.prepareAppInfo(info.appInfo)\n }\n\n get compression(): CompressionLevel {\n const compression = this.platformSpecificBuildOptions.compression\n // explicitly set to null - request to use default value instead of parent (in the config)\n if (compression === null) {\n return \"normal\"\n }\n return compression || this.config.compression || \"normal\"\n }\n\n get debugLogger(): DebugLogger {\n return this.info.debugLogger\n }\n\n abstract get defaultTarget(): Array<string>\n\n // eslint-disable-next-line\n protected prepareAppInfo(appInfo: AppInfo) {\n return new AppInfo(this.info, null, this.platformSpecificBuildOptions)\n }\n\n private static normalizePlatformSpecificBuildOptions(options: any | Nullish): any {\n return options == null ? Object.create(null) : options\n }\n\n abstract createTargets(targets: Array<string>, mapper: (name: string, factory: (outDir: string) => Target) => void): void\n\n getCscPassword(): string {\n const password = this.doGetCscPassword()\n if (isEmptyOrSpaces(password)) {\n log.info({ reason: \"CSC_KEY_PASSWORD is not defined\" }, \"empty password will be used for code signing\")\n return \"\"\n } else {\n return password.trim()\n }\n }\n\n getCscLink(extraEnvName?: string | null): string | Nullish {\n // allow to specify as empty string\n const envValue = chooseNotNull(extraEnvName == null ? null : process.env[extraEnvName], process.env.CSC_LINK)\n return chooseNotNull(chooseNotNull(this.info.config.cscLink, this.platformSpecificBuildOptions.cscLink), envValue)\n }\n\n doGetCscPassword(): string | Nullish {\n // allow to specify as empty string\n return chooseNotNull(chooseNotNull(this.info.config.cscKeyPassword, this.platformSpecificBuildOptions.cscKeyPassword), process.env.CSC_KEY_PASSWORD)\n }\n\n protected computeAppOutDir(outDir: string, arch: Arch): string {\n // codeql[js/shell-command-constructed-from-input] - prepackaged and outDir are validated via sanitizeDirPath in the Packager constructor\n return path.resolve(\n this.packagerOptions.prepackaged ||\n path.join(\n outDir,\n `${this.platform.buildConfigurationKey}${getArchSuffix(arch, this.platformSpecificBuildOptions.defaultArch)}${this.platform === Platform.MAC ? \"\" : \"-unpacked\"}`\n )\n )\n }\n\n async pack(outDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): Promise<any> {\n const appOutDir = this.computeAppOutDir(outDir, arch)\n await this.doPack({\n outDir,\n appOutDir,\n platformName: this.platform.nodeName as ElectronPlatformName,\n arch,\n platformSpecificBuildOptions: this.platformSpecificBuildOptions,\n targets,\n })\n this.packageInDistributableFormat(appOutDir, arch, targets, taskManager)\n }\n\n protected packageInDistributableFormat(appOutDir: string, arch: Arch, targets: Array<Target>, taskManager: AsyncTaskManager): void {\n if (targets.find(it => !it.isAsyncSupported) == null) {\n PlatformPackager.buildAsyncTargets(targets, taskManager, appOutDir, arch)\n return\n }\n\n taskManager.add(async () => {\n // BluebirdPromise.map doesn't invoke target.build immediately, but for RemoteTarget it is very critical to call build() before finishBuild()\n const subTaskManager = new AsyncTaskManager(this.info.cancellationToken)\n PlatformPackager.buildAsyncTargets(targets, subTaskManager, appOutDir, arch)\n await subTaskManager.awaitTasks()\n\n for (const target of targets) {\n if (!target.isAsyncSupported && !this.info.cancellationToken.cancelled) {\n await target.build(appOutDir, arch)\n }\n }\n })\n }\n\n private static buildAsyncTargets(targets: Array<Target>, taskManager: AsyncTaskManager, appOutDir: string, arch: Arch) {\n for (const target of targets) {\n if (target.isAsyncSupported) {\n taskManager.addTask(target.build(appOutDir, arch))\n }\n }\n }\n\n private getExtraFileMatchers(isResources: boolean, appOutDir: string, options: GetFileMatchersOptions): Array<FileMatcher> | null {\n const outDir = this.platform === Platform.MAC ? path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\") : appOutDir\n const base = isResources ? this.getResourcesDir(appOutDir) : outDir\n return getFileMatchers(this.config, isResources ? \"extraResources\" : \"extraFiles\", base, options)\n }\n\n createGetFileMatchersOptions(outDir: string, arch: Arch, customBuildOptions: PlatformSpecificBuildOptions): GetFileMatchersOptions {\n return {\n macroExpander: it => this.expandMacro(it, arch == null ? null : Arch[arch], { \"/*\": \"{,/**/*}\" }),\n customBuildOptions,\n globalOutDir: outDir,\n defaultSrc: this.projectDir,\n }\n }\n\n protected async doPack(packOptions: DoPackOptions<DC>) {\n if (this.packagerOptions.prepackaged != null) {\n return\n }\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n // Due to node-gyp rewriting GYP_MSVS_VERSION when reused across the same session, we must reset the env var: https://github.com/electron-userland/electron-builder/issues/7256\n delete process.env.GYP_MSVS_VERSION\n\n const { outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets, options } = packOptions\n\n await this.info.emitBeforePack({\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n })\n\n await this.info.installAppDependencies(this.platform, arch)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const framework = this.info.framework\n log.info(\n {\n platform: platformName,\n arch: Arch[arch],\n [`${framework.name}`]: framework.version,\n appOutDir: log.filePath(appOutDir),\n },\n `packaging`\n )\n\n await framework.prepareApplicationStageDirectory({\n packager: this,\n appOutDir,\n platformName,\n arch: Arch[arch],\n version: framework.version,\n })\n\n await this.info.emitAfterExtract({\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n })\n\n const excludePatterns: Array<Minimatch> = []\n\n const computeParsedPatterns = (patterns: Array<FileMatcher> | null) => {\n if (patterns != null) {\n for (const pattern of patterns) {\n pattern.computeParsedPatterns(excludePatterns, this.info.projectDir)\n }\n }\n }\n\n const getFileMatchersOptions = this.createGetFileMatchersOptions(outDir, arch, platformSpecificBuildOptions)\n const macroExpander = getFileMatchersOptions.macroExpander\n const extraResourceMatchers = this.getExtraFileMatchers(true, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraResourceMatchers)\n const extraFileMatchers = this.getExtraFileMatchers(false, appOutDir, getFileMatchersOptions)\n computeParsedPatterns(extraFileMatchers)\n\n const packContext: AfterPackContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n\n const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions)\n const resourcesPath =\n this.platform === Platform.MAC\n ? path.join(appOutDir, framework.distMacOsAppName, \"Contents\", \"Resources\")\n : isElectronBased(framework)\n ? path.join(appOutDir, \"resources\")\n : appOutDir\n const taskManager = new AsyncTaskManager(this.info.cancellationToken)\n this.copyAppFiles(taskManager, asarOptions, resourcesPath, path.join(resourcesPath, \"app\"), packContext, platformSpecificBuildOptions, excludePatterns, macroExpander)\n await taskManager.awaitTasks()\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n if (framework.beforeCopyExtraFiles != null) {\n const resourcesRelativePath = this.platform === Platform.MAC ? \"Resources\" : isElectronBased(framework) ? \"resources\" : \"\"\n\n let asarIntegrity: AsarIntegrity | null = null\n if (!(asarOptions == null || options?.disableAsarIntegrity || this.config.disableAsarIntegrity)) {\n asarIntegrity = await computeData({ resourcesPath, resourcesRelativePath, resourcesDestinationPath: this.getResourcesDir(appOutDir), extraResourceMatchers })\n }\n\n await framework.beforeCopyExtraFiles({\n packager: this,\n appOutDir,\n asarIntegrity,\n platformName,\n })\n }\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n await copyFiles(extraResourceMatchers, transformerForExtraFiles)\n await copyFiles(extraFileMatchers, transformerForExtraFiles)\n\n if (this.info.cancellationToken.cancelled) {\n return\n }\n\n await this.info.emitAfterPack(packContext)\n\n if (framework.afterPack != null) {\n await framework.afterPack(packContext)\n }\n\n const isAsar = asarOptions != null\n await this.sanityCheckPackage(appOutDir, isAsar, framework, !!this.config.disableSanityCheckAsar)\n\n if (!options?.disableFuses) {\n await this.doAddElectronFuses(packContext)\n }\n if (options?.sign ?? true) {\n await this.doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets)\n }\n }\n\n // the fuses MUST be flipped right before signing\n protected async doAddElectronFuses(packContext: AfterPackContext) {\n if (this.config.electronFuses == null) {\n return\n }\n const fuseConfig = await this.generateFuseConfig(this.config.electronFuses)\n await this.addElectronFuses(packContext, fuseConfig)\n }\n\n private async generateFuseConfig(fuses: FuseOptionsV1): Promise<FuseV1Config> {\n const { FuseVersion, FuseV1Options } = await dynamicImport<typeof import(\"@electron/fuses\")>(\"@electron/fuses\")\n const config: FuseV1Config = {\n version: FuseVersion.V1,\n resetAdHocDarwinSignature: fuses.resetAdHocDarwinSignature,\n }\n // this is annoying, but we must filter out undefined entries because some older electron versions will receive `the fuse wire in this version of Electron is not long enough` even if entry is set undefined\n if (fuses.runAsNode != null) {\n config[FuseV1Options.RunAsNode] = fuses.runAsNode\n }\n if (fuses.enableCookieEncryption != null) {\n config[FuseV1Options.EnableCookieEncryption] = fuses.enableCookieEncryption\n }\n if (fuses.enableNodeOptionsEnvironmentVariable != null) {\n config[FuseV1Options.EnableNodeOptionsEnvironmentVariable] = fuses.enableNodeOptionsEnvironmentVariable\n }\n if (fuses.enableNodeCliInspectArguments != null) {\n config[FuseV1Options.EnableNodeCliInspectArguments] = fuses.enableNodeCliInspectArguments\n }\n if (fuses.enableEmbeddedAsarIntegrityValidation != null) {\n config[FuseV1Options.EnableEmbeddedAsarIntegrityValidation] = fuses.enableEmbeddedAsarIntegrityValidation\n }\n if (fuses.onlyLoadAppFromAsar != null) {\n config[FuseV1Options.OnlyLoadAppFromAsar] = fuses.onlyLoadAppFromAsar\n }\n if (fuses.loadBrowserProcessSpecificV8Snapshot != null) {\n config[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot] = fuses.loadBrowserProcessSpecificV8Snapshot\n }\n if (fuses.grantFileProtocolExtraPrivileges != null) {\n config[FuseV1Options.GrantFileProtocolExtraPrivileges] = fuses.grantFileProtocolExtraPrivileges\n }\n return config\n }\n\n /**\n * Use `AfterPackContext` here to keep available for public API\n * @param {AfterPackContext} context\n * @param {FuseConfig} fuses\n *\n * Can be used in `afterPack` hook for custom fuse logic like below. It's an alternative approach if one wants to override electron-builder's @electron/fuses version\n * ```\n * await context.packager.addElectronFuses(context, { ... })\n * ```\n */\n public async addElectronFuses(context: AfterPackContext, fuses: FuseConfig) {\n const { appOutDir, electronPlatformName } = context\n\n const ext = {\n darwin: \".app\",\n mas: \".app\",\n win32: \".exe\",\n linux: \"\",\n }[electronPlatformName]\n\n const executableName = this instanceof LinuxPackager ? this.executableName : this.appInfo.productFilename\n const electronBinaryPath = path.join(appOutDir, `${executableName}${ext}`)\n\n log.info({ electronPath: log.filePath(electronBinaryPath) }, \"executing @electron/fuses\")\n const { flipFuses } = await dynamicImport<typeof import(\"@electron/fuses\")>(\"@electron/fuses\")\n return flipFuses(electronBinaryPath, fuses)\n }\n\n protected async doSignAfterPack(outDir: string, appOutDir: string, platformName: ElectronPlatformName, arch: Arch, platformSpecificBuildOptions: DC, targets: Array<Target>) {\n const asarOptions = await this.computeAsarOptions(platformSpecificBuildOptions)\n const isAsar = asarOptions != null\n const packContext = {\n appOutDir,\n outDir,\n arch,\n targets,\n packager: this,\n electronPlatformName: platformName,\n }\n const didSign = await this.signApp(packContext, isAsar)\n if (didSign) {\n await this.info.emitAfterSign(packContext)\n } else if (this.info.filterPackagerEventListeners(\"afterSign\", \"user\").length) {\n log.warn(null, `skipping \"afterSign\" hook as no signing occurred, perhaps you intended \"afterPack\"?`)\n }\n }\n\n // eslint-disable-next-line\n protected createTransformerForExtraFiles(packContext: AfterPackContext): FileTransformer | null {\n return null\n }\n\n private copyAppFiles(\n taskManager: AsyncTaskManager,\n asarOptions: AsarOptions | null,\n resourcePath: string,\n defaultDestination: string,\n packContext: AfterPackContext,\n platformSpecificBuildOptions: DC,\n excludePatterns: Array<Minimatch>,\n macroExpander: (it: string) => string\n ) {\n const appDir = this.info.appDir\n const config = this.config\n const isElectronCompile = asarOptions != null && isElectronCompileUsed(this.info)\n\n const mainMatchers = getMainFileMatchers(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this, packContext.outDir, isElectronCompile)\n if (excludePatterns.length > 0) {\n for (const matcher of mainMatchers) {\n matcher.excludePatterns = excludePatterns\n }\n }\n\n const framework = this.info.framework\n const transformer = createTransformer(\n appDir,\n config,\n isElectronCompile\n ? {\n originalMain: this.info.metadata.main,\n main: ELECTRON_COMPILE_SHIM_FILENAME,\n ...config.extraMetadata,\n }\n : config.extraMetadata,\n framework.createTransformer == null ? null : framework.createTransformer()\n )\n\n const _computeFileSets = (matchers: Array<FileMatcher>) => {\n return computeFileSets(matchers, this.info.isPrepackedAppAsar ? null : transformer, this, isElectronCompile).then(async result => {\n if (!this.info.isPrepackedAppAsar && !this.info.areNodeModulesHandledExternally) {\n const moduleFileMatcher = getNodeModuleFileMatcher(appDir, defaultDestination, macroExpander, platformSpecificBuildOptions, this.info)\n result = result.concat(await computeNodeModuleFileSets(this, moduleFileMatcher))\n }\n return result.filter(it => it.files.length > 0)\n })\n }\n\n if (this.info.isPrepackedAppAsar) {\n taskManager.add(async () => {\n const fileSets = await _computeFileSets([new FileMatcher(appDir, resourcePath, macroExpander)])\n fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, transformer)))\n await taskManager.awaitTasks()\n })\n } else if (asarOptions == null) {\n // for ASAR all asar unpacked files will be extra transformed (e.g. sign of EXE and DLL) later,\n // for prepackaged asar extra transformation not supported yet,\n // so, extra transform if asar is disabled\n const transformerForExtraFiles = this.createTransformerForExtraFiles(packContext)\n const combinedTransformer: FileTransformer = file => {\n if (transformerForExtraFiles != null) {\n const result = transformerForExtraFiles(file)\n if (result != null) {\n return result\n }\n }\n return transformer(file)\n }\n taskManager.add(async () => {\n const fileSets = await _computeFileSets(mainMatchers)\n fileSets.forEach(it => taskManager.addTask(copyAppFiles(it, this.info, combinedTransformer)))\n await taskManager.awaitTasks()\n })\n } else {\n const unpackPattern = getFileMatchers(config, \"asarUnpack\", defaultDestination, {\n macroExpander,\n customBuildOptions: platformSpecificBuildOptions,\n globalOutDir: packContext.outDir,\n defaultSrc: appDir,\n })\n const fileMatcher = unpackPattern == null ? null : unpackPattern[0]\n taskManager.addTask(\n _computeFileSets(mainMatchers).then(async fileSets => {\n for (const fileSet of fileSets) {\n await transformFiles(transformer, fileSet)\n }\n\n await new AsarPackager(this, {\n defaultDestination,\n resourcePath,\n options: asarOptions,\n unpackPattern: fileMatcher?.createFilter(),\n }).pack(fileSets)\n })\n )\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected signApp(packContext: AfterPackContext, isAsar: boolean): Promise<boolean> {\n return Promise.resolve(false)\n }\n\n getIconPath(): Promise<string | null> {\n return Promise.resolve(null)\n }\n\n private async computeAsarOptions(customBuildOptions: DC): Promise<AsarOptions | null> {\n if (!isElectronBased(this.info.framework)) {\n return null\n }\n\n function errorMessage(name: string) {\n return `${name} is deprecated is deprecated and not supported — please use asarUnpack`\n }\n\n const buildMetadata = this.config as any\n if (buildMetadata[\"asar-unpack\"] != null) {\n throw new Error(errorMessage(\"asar-unpack\"))\n }\n if (buildMetadata[\"asar-unpack-dir\"] != null) {\n throw new Error(errorMessage(\"asar-unpack-dir\"))\n }\n\n const platformSpecific = customBuildOptions.asar\n const result = platformSpecific == null ? this.config.asar : platformSpecific\n if (result === false) {\n const appAsarStat = await statOrNull(path.join(this.info.appDir, \"app.asar\"))\n //noinspection ES6MissingAwait\n if (appAsarStat == null || !appAsarStat.isFile()) {\n log.warn(\n {\n solution: \"enable asar and use asarUnpack to unpack files that must be externally available\",\n },\n \"asar usage is disabled — this is strongly not recommended\"\n )\n }\n return null\n }\n\n if (result == null || result === true) {\n return {}\n }\n\n for (const name of [\"unpackDir\", \"unpack\"]) {\n if ((result as any)[name] != null) {\n throw new Error(errorMessage(`asar.${name}`))\n }\n }\n return deepAssign({}, result)\n }\n\n public getElectronSrcDir(dist: string): string {\n return path.resolve(this.projectDir, dist)\n }\n\n public getElectronDestinationDir(appOutDir: string): string {\n return appOutDir\n }\n\n getResourcesDir(appOutDir: string): string {\n if (this.platform === Platform.MAC) {\n return this.getMacOsResourcesDir(appOutDir)\n }\n if (isElectronBased(this.info.framework)) {\n return path.join(appOutDir, \"resources\")\n }\n return appOutDir\n }\n\n public getMacOsElectronFrameworkResourcesDir(appOutDir: string): string {\n const electronFrameworkName = path.basename(this.info.framework.distMacOsAppName, \".app\") + \" \" + \"Framework.framework\"\n return path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\", \"Frameworks\", electronFrameworkName, \"Versions\", \"A\", \"Resources\")\n }\n public getMacOsResourcesDir(appOutDir: string): string {\n return path.join(appOutDir, `${this.appInfo.productFilename}.app`, \"Contents\", \"Resources\")\n }\n\n private async checkFileInPackage(resourcesDir: string, file: string, messagePrefix: string, isAsar: boolean, disableSanityCheckAsar: boolean) {\n if (isAsar && disableSanityCheckAsar) {\n return\n }\n const relativeFile = path.relative(this.info.appDir, path.resolve(this.info.appDir, file))\n if (isAsar) {\n await checkFileInArchive(path.join(resourcesDir, \"app.asar\"), relativeFile, messagePrefix)\n return\n }\n\n const pathParsed = path.parse(file)\n // Even when packaging to asar is disabled, it does not imply that the main file can not be inside an .asar archive.\n // This may occur when the packaging is done manually before processing with electron-builder.\n if (pathParsed.dir.includes(\".asar\")) {\n // The path needs to be split to the part with an asar archive which acts like a directory and the part with\n // the path to main file itself. (e.g. path/arch.asar/dir/index.js -> path/arch.asar, dir/index.js)\n // noinspection TypeScriptValidateJSTypes\n const pathSplit: Array<string> = pathParsed.dir.split(path.sep)\n let partWithAsarIndex = 0\n pathSplit.some((pathPart: string, index: number) => {\n partWithAsarIndex = index\n return pathPart.endsWith(\".asar\")\n })\n const asarPath = path.join(...pathSplit.slice(0, partWithAsarIndex + 1))\n let mainPath = pathSplit.length > partWithAsarIndex + 1 ? path.join.apply(pathSplit.slice(partWithAsarIndex + 1)) : \"\"\n mainPath += path.join(mainPath, pathParsed.base)\n await checkFileInArchive(path.join(resourcesDir, \"app\", asarPath), mainPath, messagePrefix)\n } else {\n const fullPath = path.join(resourcesDir, \"app\", relativeFile)\n const outStat = await statOrNull(fullPath)\n if (outStat == null) {\n throw new Error(`${messagePrefix} \"${fullPath}\" does not exist. Seems like a wrong configuration.`)\n } else {\n //noinspection ES6MissingAwait\n if (!outStat.isFile()) {\n throw new Error(`${messagePrefix} \"${fullPath}\" is not a file. Seems like a wrong configuration.`)\n }\n }\n }\n }\n\n private async sanityCheckPackage(appOutDir: string, isAsar: boolean, framework: Framework, disableSanityCheckAsar: boolean): Promise<any> {\n const outStat = await statOrNull(appOutDir)\n if (outStat == null) {\n throw new Error(`Output directory \"${appOutDir}\" does not exist. Seems like a wrong configuration.`)\n } else {\n //noinspection ES6MissingAwait\n if (!outStat.isDirectory()) {\n throw new Error(`Output directory \"${appOutDir}\" is not a directory. Seems like a wrong configuration.`)\n }\n }\n\n const resourcesDir = this.getResourcesDir(appOutDir)\n const mainFile = (framework.getMainFile == null ? null : framework.getMainFile(this.platform)) || this.info.metadata.main || \"index.js\"\n await this.checkFileInPackage(resourcesDir, mainFile, \"Application entry file\", isAsar, disableSanityCheckAsar)\n await this.checkFileInPackage(resourcesDir, \"package.json\", \"Application\", isAsar, disableSanityCheckAsar)\n }\n\n // tslint:disable-next-line:no-invalid-template-strings\n computeSafeArtifactName(\n suggestedName: string | null,\n ext: string,\n arch?: Arch | null,\n skipDefaultArch = true,\n defaultArch?: string,\n safePattern = \"${name}-${version}-${arch}.${ext}\"\n ): string | null {\n return computeSafeArtifactNameIfNeeded(suggestedName, () =>\n this.computeArtifactName(safePattern, ext, skipDefaultArch && arch === defaultArchFromString(defaultArch) ? null : arch)\n )\n }\n\n expandArtifactNamePattern(\n targetSpecificOptions: TargetSpecificOptions | Nullish,\n ext: string,\n arch?: Arch | null,\n defaultPattern?: string,\n skipDefaultArch = true,\n defaultArch?: string\n ): string {\n const { pattern, isUserForced } = this.artifactPatternConfig(targetSpecificOptions, defaultPattern)\n return this.computeArtifactName(pattern, ext, !isUserForced && skipDefaultArch && arch === defaultArchFromString(defaultArch) ? null : arch)\n }\n\n artifactPatternConfig(targetSpecificOptions: TargetSpecificOptions | Nullish, defaultPattern: string | undefined) {\n const userSpecifiedPattern = targetSpecificOptions?.artifactName || this.platformSpecificBuildOptions.artifactName || this.config.artifactName\n return {\n isUserForced: !!userSpecifiedPattern,\n pattern: userSpecifiedPattern || defaultPattern || \"${productName}-${version}-${arch}.${ext}\",\n }\n }\n\n expandArtifactBeautyNamePattern(targetSpecificOptions: TargetSpecificOptions | Nullish, ext: string, arch?: Arch | null): string {\n // tslint:disable-next-line:no-invalid-template-strings\n return this.expandArtifactNamePattern(targetSpecificOptions, ext, arch, \"${productName} ${version} ${arch}.${ext}\", true)\n }\n\n private computeArtifactName(pattern: any, ext: string, arch: Arch | Nullish): string {\n const archName = arch == null ? null : getArtifactArchName(arch, ext)\n return this.expandMacro(pattern, archName, {\n ext,\n })\n }\n\n expandMacro(pattern: string, arch?: string | null, extra: any = {}, isProductNameSanitized = true): string {\n return doExpandMacro(pattern, arch, this.appInfo, { os: this.platform.buildConfigurationKey, ...extra }, isProductNameSanitized)\n }\n\n generateName2(ext: string | null, classifier: string | Nullish, deployment: boolean): string {\n const dotExt = ext == null ? \"\" : `.${ext}`\n const separator = ext === \"deb\" ? \"_\" : \"-\"\n return `${deployment ? this.appInfo.name : this.appInfo.productFilename}${separator}${this.appInfo.version}${classifier == null ? \"\" : `${separator}${classifier}`}${dotExt}`\n }\n\n getTempFile(suffix: string): Promise<string> {\n return this.info.tempDirManager.getTempFile({ suffix })\n }\n\n get fileAssociations(): Array<FileAssociation> {\n return asArray(this.config.fileAssociations).concat(asArray(this.platformSpecificBuildOptions.fileAssociations))\n }\n\n async getResource(custom: string | Nullish, ...names: Array<string>): Promise<string | null> {\n const resourcesDir = this.info.buildResourcesDir\n if (custom === undefined) {\n const resourceList = await this.resourceList\n for (const name of names) {\n if (resourceList.includes(name)) {\n // sanitizeDirPath with resourcesDir base enforces containment — CodeQL recognises the startsWith check inside as a path-traversal sanitizer\n return sanitizeDirPath(path.join(resourcesDir, path.basename(name)), resourcesDir)\n }\n }\n } else if (custom != null && !isEmptyOrSpaces(custom)) {\n const resourceList = await this.resourceList\n if (resourceList.includes(custom)) {\n return sanitizeDirPath(path.join(resourcesDir, path.basename(custom)), resourcesDir)\n }\n\n // codeql[js/shell-command-constructed-from-input] - intentional: custom may be an absolute path outside the build resources dir; existence is verified below via statOrNull\n let p = path.resolve(resourcesDir, custom)\n if ((await statOrNull(p)) == null) {\n p = path.resolve(this.projectDir, custom)\n if ((await statOrNull(p)) == null) {\n throw new InvalidConfigurationError(\n `cannot find specified resource \"${custom}\", nor relative to \"${resourcesDir}\", neither relative to project dir (\"${this.projectDir}\")`\n )\n }\n }\n return p\n }\n return null\n }\n\n get forceCodeSigning(): boolean {\n const forceCodeSigningPlatform = this.platformSpecificBuildOptions.forceCodeSigning\n return (forceCodeSigningPlatform == null ? this.config.forceCodeSigning : forceCodeSigningPlatform) || false\n }\n\n private assetCatalogResults = new Map<string, Promise<AssetCatalogResult>>()\n protected generateAssetCatalogData(iconPath: string): Promise<AssetCatalogResult> {\n // Cache results\n const cachedPromise = this.assetCatalogResults.get(iconPath)\n if (cachedPromise) {\n return cachedPromise\n }\n\n const promise = generateAssetCatalogForIcon(iconPath)\n this.assetCatalogResults.set(iconPath, promise)\n return promise\n }\n\n private cachedIcnsFromIconFile = new Map<string, Promise<string>>()\n async generateIcnsFromIcon(iconPath: string): Promise<string> {\n const cachedPromise = this.cachedIcnsFromIconFile.get(iconPath)\n if (cachedPromise) {\n return cachedPromise\n }\n\n const runner = async () => {\n const { icnsFile } = await this.generateAssetCatalogData(iconPath)\n\n // Generate icns file\n const tempDir = await fs.mkdtemp(path.resolve(os.tmpdir(), \"icon-compile-\"))\n const tempIcnsPath = path.resolve(tempDir, \"Icon.icns\")\n await fs.writeFile(tempIcnsPath, icnsFile)\n\n return tempIcnsPath\n }\n const promise = runner()\n this.cachedIcnsFromIconFile.set(iconPath, promise)\n return promise\n }\n\n protected async getOrConvertIcon(format: IconFormat): Promise<string | null> {\n if (format === \"icns\") {\n const configuredIcon = this.platformSpecificBuildOptions.icon\n // If it is a .icon file, generate the icns file and return the path to the icns file\n if (configuredIcon?.endsWith(\".icon\")) {\n const iconPath = await this.getResource(configuredIcon)\n if (iconPath) {\n return this.generateIcnsFromIcon(iconPath)\n }\n }\n }\n\n const result = await this.resolveIcon(asArray(this.platformSpecificBuildOptions.icon || this.config.icon), [], format)\n if (result.length === 0) {\n const framework = this.info.framework\n if (framework.getDefaultIcon != null) {\n return framework.getDefaultIcon(this.platform)\n }\n\n log.warn({ reason: \"application icon is not set\" }, `default ${capitalizeFirstLetter(framework.name)} icon is used`)\n return this.getDefaultFrameworkIcon()\n } else {\n return result[0].file\n }\n }\n\n getDefaultFrameworkIcon(): string | null {\n const framework = this.info.framework\n return framework.getDefaultIcon == null ? null : framework.getDefaultIcon(this.platform)\n }\n\n // convert if need, validate size (it is a reason why tool is called even if file has target extension (already specified as foo.icns for example))\n async resolveIcon(sources: Array<string>, fallbackSources: Array<string>, outputFormat: IconFormat): Promise<Array<IconInfo>> {\n const output = this.expandMacro(this.config.directories!.output!)\n const outDir = sanitizeDirPath(path.resolve(this.projectDir, output, `.icon-${outputFormat}`))\n const roots = [this.buildResourcesDir, this.projectDir]\n\n const filteredSources = sources.filter(s => !s.endsWith(\".icon\"))\n const filteredFallbacks = fallbackSources.filter(s => !s.endsWith(\".icon\"))\n\n const result = await convertIcon({ sources: filteredSources, fallbackSources: filteredFallbacks, roots, format: outputFormat, outDir })\n\n if (result.error != null) {\n throw new InvalidConfigurationError(result.error, result.errorCode)\n }\n\n if (result.isFallback) {\n log.warn({ reason: \"application icon is not set\" }, `default ${capitalizeFirstLetter(this.info.framework.name)} icon is used`)\n }\n\n return result.icons\n }\n}\n\nexport function isSafeGithubName(name: string) {\n return /^[0-9A-Za-z._-]+$/.test(name)\n}\n\nexport function computeSafeArtifactNameIfNeeded(suggestedName: string | null, safeNameProducer: () => string): string | null {\n // GitHub only allows the listed characters in file names.\n if (suggestedName != null) {\n if (isSafeGithubName(suggestedName)) {\n return null\n }\n\n // prefer to use suggested name - so, if space is the only problem, just replace only space to dash\n suggestedName = suggestedName.replace(/ /g, \"-\")\n if (isSafeGithubName(suggestedName)) {\n return suggestedName\n }\n }\n\n return safeNameProducer()\n}\n\n// remove leading dot\nexport function normalizeExt(ext: string) {\n return ext.startsWith(\".\") ? ext.substring(1) : ext\n}\n\nexport function chooseNotNull<T>(v1: T | Nullish, v2: T | Nullish): T | Nullish {\n return v1 == null ? v2 : v1\n}\n\nfunction capitalizeFirstLetter(text: string) {\n return text.charAt(0).toUpperCase() + text.slice(1)\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LinuxPackager } from "../linuxPackager";
|
|
2
2
|
import { CommonLinuxOptions } from "../options/linuxOptions";
|
|
3
|
-
import { IconInfo } from "../platformPackager";
|
|
4
3
|
import { SnapCore } from "./snap/SnapTarget";
|
|
4
|
+
import { IconInfo } from "../util/iconConverter";
|
|
5
5
|
export declare const installPrefix = "/opt";
|
|
6
6
|
export declare class LinuxTargetHelper {
|
|
7
7
|
private packager;
|