app-builder-lib 27.0.0-alpha.4 → 27.0.0-alpha.6
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/dist/appInfo.d.ts +1 -1
- package/dist/appInfo.d.ts.map +1 -1
- package/dist/appInfo.js +3 -3
- package/dist/appInfo.js.map +1 -1
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +3 -6
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +6 -4
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +31 -21
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/configuration.d.ts +84 -44
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +11 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +2 -1
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +32 -28
- package/dist/electron/ElectronFramework.js.map +1 -1
- package/dist/electron/electronArchSupport.d.ts +12 -0
- package/dist/electron/electronArchSupport.d.ts.map +1 -0
- package/dist/electron/electronArchSupport.js +58 -0
- package/dist/electron/electronArchSupport.js.map +1 -0
- package/dist/electron/electronVersion.d.ts.map +1 -1
- package/dist/electron/electronVersion.js +1 -11
- package/dist/electron/electronVersion.js.map +1 -1
- package/dist/electron/mac/electronMac.js +12 -21
- package/dist/electron/mac/electronMac.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +24 -0
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -0
- package/dist/electron/mac/electronMacUtils.js +42 -0
- package/dist/electron/mac/electronMacUtils.js.map +1 -0
- package/dist/fileMatcher.d.ts +27 -2
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +204 -16
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +8 -5
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +8 -4
- package/dist/indexInternal.js.map +1 -1
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +15 -3
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +3 -1
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +9 -1
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +17 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +67 -1
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +5 -5
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/types.d.ts +2 -0
- package/dist/node-module-collector/types.d.ts.map +1 -1
- package/dist/node-module-collector/types.js.map +1 -1
- package/dist/options/MsixOptions.d.ts +126 -0
- package/dist/options/MsixOptions.d.ts.map +1 -0
- package/dist/options/MsixOptions.js +2 -0
- package/dist/options/MsixOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +0 -6
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +15 -13
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +4 -4
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +166 -36
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +2 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +26 -21
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +2 -0
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +6 -0
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +1 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +20 -6
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +20 -22
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/archive.d.ts +11 -0
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +40 -22
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +3 -3
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +5 -6
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/snap/SnapTarget.d.ts +1 -1
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -1
- package/dist/targets/linux/snap/SnapTarget.js +23 -1
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -1
- package/dist/targets/linux/snap/core24.d.ts +1 -1
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +3 -2
- package/dist/targets/linux/snap/core24.js.map +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts +1 -1
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreCustom.js +2 -2
- package/dist/targets/linux/snap/coreCustom.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +2 -1
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapcraft.d.ts +190 -0
- package/dist/targets/linux/snap/snapcraft.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraft.js +11 -0
- package/dist/targets/linux/snap/snapcraft.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +7 -1
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.js +57 -20
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +6 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +22 -1
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/targetFactory.d.ts +7 -0
- package/dist/targets/targetFactory.d.ts.map +1 -1
- package/dist/targets/targetFactory.js +28 -0
- package/dist/targets/targetFactory.js.map +1 -1
- package/dist/targets/win/AppxTarget.d.ts +0 -2
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +37 -317
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/MsixTarget.d.ts +22 -0
- package/dist/targets/win/MsixTarget.d.ts.map +1 -0
- package/dist/targets/win/MsixTarget.js +214 -0
- package/dist/targets/win/MsixTarget.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +3 -2
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +28 -46
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +2 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts +5 -2
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +46 -22
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -1
- package/dist/targets/win/nsis/progId.d.ts +21 -0
- package/dist/targets/win/nsis/progId.d.ts.map +1 -0
- package/dist/targets/win/nsis/progId.js +60 -0
- package/dist/targets/win/nsis/progId.js.map +1 -0
- package/dist/targets/win/winAppUtil.d.ts +115 -0
- package/dist/targets/win/winAppUtil.d.ts.map +1 -0
- package/dist/targets/win/winAppUtil.js +407 -0
- package/dist/targets/win/winAppUtil.js.map +1 -0
- package/dist/toolsets/7zip.d.ts.map +1 -1
- package/dist/toolsets/7zip.js +3 -1
- package/dist/toolsets/7zip.js.map +1 -1
- package/dist/toolsets/appimage.d.ts +3 -3
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +9 -6
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/custom.d.ts +1 -3
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +4 -133
- package/dist/toolsets/custom.js.map +1 -1
- package/dist/toolsets/fpm.d.ts.map +1 -1
- package/dist/toolsets/fpm.js +11 -5
- package/dist/toolsets/fpm.js.map +1 -1
- package/dist/toolsets/icons.d.ts.map +1 -1
- package/dist/toolsets/icons.js +4 -1
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
- package/dist/toolsets/linuxToolsMac.js +4 -1
- package/dist/toolsets/linuxToolsMac.js.map +1 -1
- package/dist/toolsets/nsis.d.ts.map +1 -1
- package/dist/toolsets/nsis.js +6 -3
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/version.d.ts +12 -0
- package/dist/toolsets/version.d.ts.map +1 -0
- package/dist/toolsets/version.js +13 -0
- package/dist/toolsets/version.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +20 -3
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +56 -27
- package/dist/toolsets/winCodeSign.js.map +1 -1
- package/dist/toolsets/wine.d.ts +2 -1
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +15 -13
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/NodeModuleCopyHelper.js +3 -3
- package/dist/util/NodeModuleCopyHelper.js.map +1 -1
- package/dist/util/appFileCopier.d.ts +39 -0
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +88 -22
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/config/config.d.ts +1 -0
- package/dist/util/config/config.d.ts.map +1 -1
- package/dist/util/config/config.js +4 -1
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/load.d.ts +2 -2
- package/dist/util/config/load.d.ts.map +1 -1
- package/dist/util/config/load.js +3 -12
- package/dist/util/config/load.js.map +1 -1
- package/dist/util/config/schemaValidator.js +1 -1
- package/dist/util/config/schemaValidator.js.map +1 -1
- package/dist/util/electronGet.d.ts +6 -3
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +40 -20
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +0 -2
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +0 -6
- package/dist/util/flags.js.map +1 -1
- package/dist/util/hash.d.ts +1 -1
- package/dist/util/hash.d.ts.map +1 -1
- package/dist/util/hash.js +1 -15
- package/dist/util/hash.js.map +1 -1
- package/dist/util/packageMetadata.js +0 -10
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +18 -5
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +3 -0
- package/dist/winPackager.js.map +1 -1
- package/package.json +8 -8
- package/scheme.json +556 -133
- package/templates/appx/appxmanifest.xml +1 -1
- package/templates/msix/appxmanifest.xml +45 -0
- package/templates/nsis/installSection.nsh +14 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/toolsets/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/toolsets/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,wFAAwF;AACxF,MAAM,YAAY,GAAG,OAAO,CAAA;AAE5B,MAAM,mBAAmB,GAAG;IAC1B,OAAO,EAAE;QACP,qBAAqB,EAAE,kEAAkE;KAC1F;IACD,OAAO,EAAE;QACP,qBAAqB,EAAE,kEAAkE;KAC1F;IACD,OAAO,EAAE;QACP,qBAAqB,EAAE,kEAAkE;KAC1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AE,CAAC,CAAA;IAC7F,CAAC;IACD,sLAAsL;IACtL,MAAM,aAAa,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC,CAAA;AACxJ,CAAC","sourcesContent":["import { exec, exists, InvalidConfigurationError, sanitizeDirPath } from \"builder-util\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { withIconsLock } from \"../util/toolsetLock.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\n\n// Newest icons-conversion bundle — selected when the config is unset / null / \"latest\".\nconst ICONS_LATEST = \"1.2.1\"\n\nconst iconsToolsChecksums = {\n \"1.1.0\": {\n \"icons-bundle.tar.gz\": \"2241c9501aa5ddd19317956449f50a1bc311df2c34058aae9bf8bfe62081eaec\",\n },\n \"1.2.0\": {\n \"icons-bundle.tar.gz\": \"788add2400487fe00d5ceac4a8347bd71fc43c8c988fde879f929992ea0c03ea\",\n },\n \"1.2.1\": {\n \"icons-bundle.tar.gz\": \"193241afc7c81ab165fa0af15ef0af88f796eb69e8e5bb4249a49310d8be242a\",\n },\n} as const\n\nexport async function getIconsToolsetPath(icons: ToolsetConfig[\"icons\"], resourcesDir: string): Promise<string> {\n if (typeof icons === \"object\" && icons != null) {\n return getCustomToolsetPath(icons, resourcesDir)\n }\n const version = resolveToolsetVersion(icons, ICONS_LATEST)\n return downloadBuilderToolset({\n releaseName: `icons@${version}`,\n filenameWithExt: \"icons-bundle.tar.gz\",\n checksums: iconsToolsChecksums[version],\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n}\n\ntype IconConversionOptions = {\n inputFile: string\n outputFormat: \"icns\" | \"ico\" | \"set\"\n outDir: string\n iconsToolset: ToolsetConfig[\"icons\"]\n resourcesDir: string\n}\n\nconst VALID_OUTPUT_FORMATS = [\"icns\", \"ico\", \"set\"] as const\n\nexport async function runIconsTool({ inputFile, outputFormat, outDir, iconsToolset, resourcesDir }: IconConversionOptions): Promise<void> {\n if (!(VALID_OUTPUT_FORMATS as readonly string[]).includes(outputFormat)) {\n throw new InvalidConfigurationError(`Invalid icon output format: ${outputFormat}`)\n }\n const safeInput = sanitizeDirPath(inputFile)\n const safeOutDir = sanitizeDirPath(outDir)\n\n const toolsetPath = await getIconsToolsetPath(iconsToolset, resourcesDir)\n const scriptPath = sanitizeDirPath(path.resolve(toolsetPath, \"icon-tool.js\"), toolsetPath)\n if (!(await exists(scriptPath))) {\n throw new InvalidConfigurationError(`Icons tool not found at expected path: ${scriptPath}`)\n }\n // Serialize icon-tool spawns across processes: each reserves a large WebAssembly.Memory, andrunning many in parallel (e.g. across vitest workers) exhausts memory. See withIconsLock.\n await withIconsLock(() => exec(process.execPath, [scriptPath, `--input`, safeInput, `--format`, outputFormat, `--out`, safeOutDir], { shell: false }))\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linuxToolsMac.d.ts","sourceRoot":"","sources":["../../src/toolsets/linuxToolsMac.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"linuxToolsMac.d.ts","sourceRoot":"","sources":["../../src/toolsets/linuxToolsMac.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAcnD,wBAAsB,iBAAiB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAYxH;AAED,wBAAsB,uBAAuB,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,eAAe,CAAC,EAAE,YAAY,CAAC,EAAE,MAAM;;;;GAQ5G"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
2
|
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
3
3
|
import { getCustomToolsetPath } from "./custom.js";
|
|
4
|
+
import { resolveToolsetVersion } from "./version.js";
|
|
5
|
+
// Newest linux-tools-mac bundle — selected when the config is unset / null / "latest".
|
|
6
|
+
const LINUX_TOOLS_MAC_LATEST = "1.0.0";
|
|
4
7
|
// no legacy toolset as macos arm64 BSD gtar/ar/lzip are not compatible with linux targets, so we always use newer toolset on macos for linux archives
|
|
5
8
|
const linuxToolsMacChecksums = {
|
|
6
9
|
"linux-tools-mac-darwin-arm64.tar.gz": "204e76f08364352edb28a6a4be87e8f9bd9340213865d9a0d1c664aa46fcf053",
|
|
@@ -13,7 +16,7 @@ export async function getLinuxToolsPath(toolset, resourcesDir) {
|
|
|
13
16
|
const arch = process.arch === "arm64" ? "arm64" : "x86_64";
|
|
14
17
|
const filename = `linux-tools-mac-darwin-${arch}.tar.gz`;
|
|
15
18
|
return downloadBuilderToolset({
|
|
16
|
-
releaseName: `linux-tools-mac@${toolset
|
|
19
|
+
releaseName: `linux-tools-mac@${resolveToolsetVersion(toolset, LINUX_TOOLS_MAC_LATEST)}`,
|
|
17
20
|
filenameWithExt: filename,
|
|
18
21
|
checksums: linuxToolsMacChecksums,
|
|
19
22
|
githubOrgRepo: "electron-userland/electron-builder-binaries",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linuxToolsMac.js","sourceRoot":"","sources":["../../src/toolsets/linuxToolsMac.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"linuxToolsMac.js","sourceRoot":"","sources":["../../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AK,EAAE,GAAG,CAAC,CAAA;IAClE,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,IAAI,CAAC;QACb,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;QACjB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC;KAClB,CAAA;AACH,CAAC","sourcesContent":["import * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\n\n// Newest linux-tools-mac bundle — selected when the config is unset / null / \"latest\".\nconst LINUX_TOOLS_MAC_LATEST = \"1.0.0\"\n\n// no legacy toolset as macos arm64 BSD gtar/ar/lzip are not compatible with linux targets, so we always use newer toolset on macos for linux archives\nconst linuxToolsMacChecksums = {\n \"linux-tools-mac-darwin-arm64.tar.gz\": \"204e76f08364352edb28a6a4be87e8f9bd9340213865d9a0d1c664aa46fcf053\",\n \"linux-tools-mac-darwin-x86_64.tar.gz\": \"7ee26dfbd0d2a4c2c83b55a9416a30cc84876eef01c6497ca49bb016a190c726\",\n} as const\n\nexport async function getLinuxToolsPath(toolset?: ToolsetConfig[\"linuxToolsMac\"], resourcesDir?: string): Promise<string> {\n if (typeof toolset === \"object\" && toolset != null) {\n return getCustomToolsetPath(toolset, resourcesDir ?? \"\")\n }\n const arch = process.arch === \"arm64\" ? \"arm64\" : \"x86_64\"\n const filename: keyof typeof linuxToolsMacChecksums = `linux-tools-mac-darwin-${arch}.tar.gz`\n return downloadBuilderToolset({\n releaseName: `linux-tools-mac@${resolveToolsetVersion(toolset, LINUX_TOOLS_MAC_LATEST)}`,\n filenameWithExt: filename,\n checksums: linuxToolsMacChecksums,\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n}\n\nexport async function getLinuxToolsMacToolset(toolset?: ToolsetConfig[\"linuxToolsMac\"], resourcesDir?: string) {\n const linuxToolsPath = await getLinuxToolsPath(toolset, resourcesDir)\n const bin = (pkg: string) => path.join(linuxToolsPath, \"bin\", pkg)\n return {\n ar: bin(\"ar\"),\n lzip: bin(\"lzip\"),\n gtar: bin(\"gtar\"),\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nsis.d.ts","sourceRoot":"","sources":["../../src/toolsets/nsis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"nsis.d.ts","sourceRoot":"","sources":["../../src/toolsets/nsis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AA2BjD,eAAO,MAAM,aAAa;;;;;CAQhB,CAAA;AAkBV,wBAAsB,eAAe,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CA4BpH;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAcrH;AAED,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CASrH"}
|
package/dist/toolsets/nsis.js
CHANGED
|
@@ -2,8 +2,11 @@ import { exists } from "builder-util";
|
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
4
4
|
import { getCustomToolsetPath } from "./custom.js";
|
|
5
|
+
import { resolveToolsetVersion } from "./version.js";
|
|
5
6
|
import _fsExtra from "fs-extra";
|
|
6
7
|
const { stat } = _fsExtra;
|
|
8
|
+
// Newest NSIS bundle — selected when the config is unset / null / "latest".
|
|
9
|
+
const NSIS_LATEST = "1.2.1";
|
|
7
10
|
function getLegacyNsisBin() {
|
|
8
11
|
// Warning: Don't use v3.0.4.2 - https://github.com/electron-userland/electron-builder/issues/6334
|
|
9
12
|
return downloadBuilderToolset({
|
|
@@ -32,7 +35,7 @@ async function getNsisBundlePath(nsis, resourcesDir) {
|
|
|
32
35
|
if (typeof nsis === "object" && nsis != null) {
|
|
33
36
|
return getCustomToolsetPath(nsis, resourcesDir);
|
|
34
37
|
}
|
|
35
|
-
const resolved = nsis
|
|
38
|
+
const resolved = resolveToolsetVersion(nsis, NSIS_LATEST);
|
|
36
39
|
if (resolved === "0.0.0") {
|
|
37
40
|
return getLegacyNsisBin();
|
|
38
41
|
}
|
|
@@ -60,7 +63,7 @@ export async function getMakeNsisPath(nsis, resourcesDir) {
|
|
|
60
63
|
return { path: path.resolve(bundlePath, process.platform === "win32" ? "makensis.cmd" : "makensis") };
|
|
61
64
|
};
|
|
62
65
|
const bundlePath = await getNsisBundlePath(nsis, resourcesDir);
|
|
63
|
-
if (
|
|
66
|
+
if (nsis === "0.0.0") {
|
|
64
67
|
return legacyBundle(bundlePath);
|
|
65
68
|
}
|
|
66
69
|
if (typeof nsis === "object") {
|
|
@@ -82,7 +85,7 @@ export async function getNsisPluginsPath(nsis, resourcesDir) {
|
|
|
82
85
|
}
|
|
83
86
|
throw new Error(`Plugins directory not found in NSIS bundle at: ${bundlePath}. Expected one of: ${potentialPaths.join(", ")}`);
|
|
84
87
|
};
|
|
85
|
-
if (
|
|
88
|
+
if (nsis === "0.0.0") {
|
|
86
89
|
return path.resolve(await getLegacyNsisResourcesBin(), "plugins");
|
|
87
90
|
}
|
|
88
91
|
return resolvePluginsDir(await getNsisBundlePath(nsis, resourcesDir));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nsis.js","sourceRoot":"","sources":["../../src/toolsets/nsis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAG5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,QAAQ,MAAM,UAAU,CAAA;AAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAA;AAEzB,SAAS,gBAAgB;IACvB,kGAAkG;IAClG,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,cAAc;QAC3B,eAAe,EAAE,iBAAiB;QAClC,SAAS,EAAE,EAAE,iBAAiB,EAAE,kEAAkE,EAAE;KACrG,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,yBAAyB;IAChC,OAAO,sBAAsB,CAAC;QAC5B,WAAW,EAAE,sBAAsB;QACnC,eAAe,EAAE,yBAAyB;QAC1C,SAAS,EAAE,EAAE,yBAAyB,EAAE,kEAAkE,EAAE;KAC7G,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE;IACP,iEAAiE;KAClE;IACD,OAAO,EAAE;QACP,iBAAiB;QACjB,yBAAyB,EAAE,kEAAkE;KAC9F;CACO,CAAA;AAEV,KAAK,UAAU,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"nsis.js","sourceRoot":"","sources":["../../src/toolsets/nsis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAG5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,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G,MAAM,cAAc,GAAG,KAAK,EAAE,GAAW,EAAE,EAAE;QAC3C,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,aAAa,CAAC,CAAA;QAC1C,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC;YAClD,OAAO,CAAC,CAAA;QACV,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,4CAA4C,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAA;IACzF,CAAC,CAAA;IACD,OAAO,cAAc,CAAC,MAAM,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAA;AACpE,CAAC","sourcesContent":["import { exists } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { ToolInfo } from \"../util/bundledTool.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\nimport _fsExtra from \"fs-extra\"\nconst { stat } = _fsExtra\n\n// Newest NSIS bundle — selected when the config is unset / null / \"latest\".\nconst NSIS_LATEST = \"1.2.1\"\n\nfunction getLegacyNsisBin(): Promise<string> {\n // Warning: Don't use v3.0.4.2 - https://github.com/electron-userland/electron-builder/issues/6334\n return downloadBuilderToolset({\n releaseName: \"nsis-3.0.4.1\",\n filenameWithExt: \"nsis-3.0.4.1.7z\",\n checksums: { \"nsis-3.0.4.1.7z\": \"9877df902530f96357d13a7a31ae2b9df67f48b11ffc9a1700a7c961574ec5fa\" },\n })\n}\n\nfunction getLegacyNsisResourcesBin(): Promise<string> {\n return downloadBuilderToolset({\n releaseName: \"nsis-resources-3.4.1\",\n filenameWithExt: \"nsis-resources-3.4.1.7z\",\n checksums: { \"nsis-resources-3.4.1.7z\": \"593a9a92ef958321293ac6a2ee61e64bf1bd543142a5bd6b3d310709cc924103\" },\n })\n}\n\nexport const nsisChecksums = {\n \"0.0.0\": {\n // legacy — uses getLegacyNsisBin() / getLegacyNsisResourcesBin()\n },\n \"1.2.1\": {\n // unified bundle\n \"nsis-bundle-3.12.tar.gz\": \"56997fdefe25e7928a1a68b4583d08b240b66cf660234053b20131a74cc082f4\",\n },\n} as const\n\nasync function getNsisBundlePath(nsis: ToolsetConfig[\"nsis\"] | Nullish, resourcesDir: string): Promise<string> {\n if (typeof nsis === \"object\" && nsis != null) {\n return getCustomToolsetPath(nsis, resourcesDir)\n }\n const resolved = resolveToolsetVersion(nsis, NSIS_LATEST)\n if (resolved === \"0.0.0\") {\n return getLegacyNsisBin()\n }\n const file = \"nsis-bundle-3.12.tar.gz\"\n return downloadBuilderToolset({\n releaseName: `nsis@${resolved}`,\n filenameWithExt: file,\n checksums: { [file]: nsisChecksums[resolved][file] },\n })\n}\n\nexport async function getMakeNsisPath(nsis: ToolsetConfig[\"nsis\"] | Nullish, resourcesDir: string): Promise<ToolInfo> {\n const legacyBundle = (bundlePath: string) => {\n // legacy bundle: platform-specific subdirectories, NSISDIR must be set explicitly\n const env = { NSISDIR: bundlePath }\n if (process.platform === \"darwin\") {\n return { path: path.resolve(bundlePath, \"mac\", \"makensis\"), env }\n } else if (process.platform === \"win32\") {\n return { path: path.resolve(bundlePath, \"Bin\", \"makensis.exe\"), env }\n }\n return { path: path.resolve(bundlePath, \"linux\", \"makensis\"), env }\n }\n const entrypointBundle = (bundlePath: string) => {\n // the entrypoint script auto-sets NSISDIR\n return { path: path.resolve(bundlePath, process.platform === \"win32\" ? \"makensis.cmd\" : \"makensis\") }\n }\n\n const bundlePath = await getNsisBundlePath(nsis, resourcesDir)\n if (nsis === \"0.0.0\") {\n return legacyBundle(bundlePath)\n }\n if (typeof nsis === \"object\") {\n const entrypoint = entrypointBundle(bundlePath)\n if (await exists(entrypoint.path)) {\n return entrypoint\n }\n return legacyBundle(bundlePath)\n }\n return entrypointBundle(bundlePath)\n}\n\nexport async function getNsisPluginsPath(nsis: ToolsetConfig[\"nsis\"] | Nullish, resourcesDir: string): Promise<string> {\n const resolvePluginsDir = async (bundlePath: string) => {\n const potentialPaths = [path.resolve(bundlePath, \"plugins\"), path.resolve(bundlePath, \"windows\", \"Plugins\")]\n for (const p of potentialPaths) {\n if ((await exists(p)) && (await stat(p)).isDirectory()) {\n return p\n }\n }\n throw new Error(`Plugins directory not found in NSIS bundle at: ${bundlePath}. Expected one of: ${potentialPaths.join(\", \")}`)\n }\n if (nsis === \"0.0.0\") {\n return path.resolve(await getLegacyNsisResourcesBin(), \"plugins\")\n }\n return resolvePluginsDir(await getNsisBundlePath(nsis, resourcesDir))\n}\n\nexport async function getNsisElevatePath(nsis: ToolsetConfig[\"nsis\"] | Nullish, resourcesDir: string): Promise<string> {\n const resolveElevate = async (dir: string) => {\n const p = path.resolve(dir, \"elevate.exe\")\n if ((await exists(p)) && (await stat(p)).isFile()) {\n return p\n }\n throw new Error(`elevate.exe not found in NSIS bundle at: ${dir}. Expected path: ${p}`)\n }\n return resolveElevate(await getNsisBundlePath(nsis, resourcesDir))\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Nullish } from "builder-util-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve the unset/null/`"latest"` sentinel to the newest concrete version for a toolset.
|
|
4
|
+
*
|
|
5
|
+
* `"latest"` is the documented "null"-state for every {@link ToolsetConfig} property: an unset
|
|
6
|
+
* property, `null`, `undefined`, and the literal `"latest"` all select the newest bundle.
|
|
7
|
+
*
|
|
8
|
+
* Callers must handle the {@link ToolsetCustom} (object) form before calling this — only the
|
|
9
|
+
* string/null/"latest" union is normalized here.
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveToolsetVersion<T extends string>(value: T | "latest" | Nullish, latest: T): T;
|
|
12
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/toolsets/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,QAAQ,GAAG,OAAO,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAEnG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolve the unset/null/`"latest"` sentinel to the newest concrete version for a toolset.
|
|
3
|
+
*
|
|
4
|
+
* `"latest"` is the documented "null"-state for every {@link ToolsetConfig} property: an unset
|
|
5
|
+
* property, `null`, `undefined`, and the literal `"latest"` all select the newest bundle.
|
|
6
|
+
*
|
|
7
|
+
* Callers must handle the {@link ToolsetCustom} (object) form before calling this — only the
|
|
8
|
+
* string/null/"latest" union is normalized here.
|
|
9
|
+
*/
|
|
10
|
+
export function resolveToolsetVersion(value, latest) {
|
|
11
|
+
return value == null || value === "latest" ? latest : value;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/toolsets/version.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,MAAM,UAAU,qBAAqB,CAAmB,KAA6B,EAAE,MAAS;IAC9F,OAAO,KAAK,IAAI,IAAI,IAAI,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAA;AAC7D,CAAC","sourcesContent":["import { Nullish } from \"builder-util-runtime\"\n\n/**\n * Resolve the unset/null/`\"latest\"` sentinel to the newest concrete version for a toolset.\n *\n * `\"latest\"` is the documented \"null\"-state for every {@link ToolsetConfig} property: an unset\n * property, `null`, `undefined`, and the literal `\"latest\"` all select the newest bundle.\n *\n * Callers must handle the {@link ToolsetCustom} (object) form before calling this — only the\n * string/null/\"latest\" union is normalized here.\n */\nexport function resolveToolsetVersion<T extends string>(value: T | \"latest\" | Nullish, latest: T): T {\n return value == null || value === \"latest\" ? latest : value\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Arch } from "builder-util";
|
|
2
1
|
import { Nullish } from "builder-util-runtime";
|
|
3
2
|
import { ToolsetConfig } from "../configuration.js";
|
|
4
3
|
import { ToolInfo } from "../util/bundledTool.js";
|
|
4
|
+
export declare const WIN_CODESIGN_LATEST = "1.3.0";
|
|
5
5
|
export declare const wincodesignChecksums: {
|
|
6
6
|
readonly "0.0.0": {};
|
|
7
7
|
readonly "1.0.0": {
|
|
@@ -60,15 +60,32 @@ export declare const wincodesignChecksums: {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
export declare function getSignToolPath(winCodeSign: ToolsetConfig["winCodeSign"] | Nullish, isWin: boolean, resourcesDir: string): Promise<ToolInfo>;
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* Resolve the Windows Kits bundle paths.
|
|
65
|
+
*
|
|
66
|
+
* The `kit` subdirectory holds HOST executables (`signtool.exe` / `makeappx.exe` / `makepri.exe`), so
|
|
67
|
+
* it is always the x64 kit (x86 on 32-bit hosts) — never arm64. x64 binaries run on x64 hosts natively
|
|
68
|
+
* and on arm64 Windows via emulation, whereas an arm64 binary cannot run on an x64 host and fails with
|
|
69
|
+
* `spawn UNKNOWN`. The artifact's target arch is irrelevant here.
|
|
70
|
+
* `appxAssets` is arch-independent (the bundle root).
|
|
71
|
+
*/
|
|
72
|
+
export declare function getWindowsKitsBundle({ winCodeSign, resourcesDir }: {
|
|
64
73
|
winCodeSign: ToolsetConfig["winCodeSign"] | Nullish;
|
|
65
|
-
arch: Arch;
|
|
66
74
|
resourcesDir?: string;
|
|
67
75
|
}): Promise<{
|
|
68
76
|
kit: string;
|
|
69
77
|
appxAssets: string;
|
|
70
78
|
}>;
|
|
71
79
|
export declare function isOldWin6(): boolean;
|
|
80
|
+
/**
|
|
81
|
+
* True only for the explicit legacy winCodeSign pin (`"0.0.0"` → winCodeSign-2.6.0). That bundle lacks
|
|
82
|
+
* the modern Windows Kits SDK (no MSIX-capable `makeappx`/`makepri`), so it cannot build MSIX — only the
|
|
83
|
+
* MSIX target gates on this. AppX still builds fine with the legacy bundle (it has its own legacy-bundle
|
|
84
|
+
* `signtool` handling in `getWindowsSignToolExe`). Unset / `null` / `"latest"` and any modern version pin
|
|
85
|
+
* resolve to a modern bundle; a custom `{ url, … }` toolset is the caller's responsibility and is not
|
|
86
|
+
* treated as legacy.
|
|
87
|
+
*/
|
|
88
|
+
export declare function isLegacyWinCodeSign(winCodeSign: ToolsetConfig["winCodeSign"] | Nullish): boolean;
|
|
72
89
|
export declare function getAtsBundleDir(winCodeSign: string): Promise<string>;
|
|
73
90
|
export declare function getDotnetRuntimeDir(winCodeSign: string): Promise<string>;
|
|
74
91
|
export declare function getRceditBundle(winCodeSign: ToolsetConfig["winCodeSign"] | Nullish, resourcesDir?: string): Promise<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winCodeSign.d.ts","sourceRoot":"","sources":["../../src/toolsets/winCodeSign.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"winCodeSign.d.ts","sourceRoot":"","sources":["../../src/toolsets/winCodeSign.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAkB,MAAM,wBAAwB,CAAA;AAMjE,eAAO,MAAM,mBAAmB,UAAU,CAAA;AAU1C,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DvB,CAAA;AAaV,wBAAsB,eAAe,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAOlJ;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CAAC,EAAE,WAAW,EAAE,YAAY,EAAE,EAAE;IAAE,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE;;;GAevJ;AAED,wBAAgB,SAAS,YAGxB;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,OAAO,GAAG,OAAO,CAEhG;AA2DD,wBAAsB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW1E;AAED,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAW9E;AAED,wBAAsB,eAAe,CAAC,WAAW,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,OAAO,EAAE,YAAY,SAAK;;;GAgB3G"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InvalidConfigurationError, sanitizeDirPath } from "builder-util";
|
|
2
2
|
import * as os from "os";
|
|
3
3
|
import * as path from "path";
|
|
4
4
|
import { computeToolEnv } from "../util/bundledTool.js";
|
|
5
5
|
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
6
6
|
import { getCustomToolsetPath } from "./custom.js";
|
|
7
|
+
import { resolveToolsetVersion } from "./version.js";
|
|
8
|
+
// Newest win-codesign bundle — selected when the config is unset / null / "latest".
|
|
9
|
+
export const WIN_CODESIGN_LATEST = "1.3.0";
|
|
7
10
|
function getLegacyWinCodeSignBin() {
|
|
8
11
|
return downloadBuilderToolset({
|
|
9
12
|
releaseName: "winCodeSign-2.6.0",
|
|
@@ -80,35 +83,54 @@ function _getWindowsToolsBin(winCodeSign, file) {
|
|
|
80
83
|
}
|
|
81
84
|
export async function getSignToolPath(winCodeSign, isWin, resourcesDir) {
|
|
82
85
|
if (isWin) {
|
|
83
|
-
|
|
84
|
-
const signtoolArch = process.arch === "x64" ? Arch.x64 : process.arch === "arm64" ? Arch.arm64 : Arch.ia32;
|
|
85
|
-
return { path: await getWindowsSignToolExe({ winCodeSign, arch: signtoolArch, resourcesDir }) };
|
|
86
|
+
return { path: await getWindowsSignToolExe({ winCodeSign, resourcesDir }) };
|
|
86
87
|
}
|
|
87
88
|
else {
|
|
88
89
|
const vendor = await getOsslSigncodeBundle(winCodeSign, resourcesDir);
|
|
89
90
|
return { path: vendor.path, env: vendor.env };
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
|
|
93
|
+
/**
|
|
94
|
+
* Resolve the Windows Kits bundle paths.
|
|
95
|
+
*
|
|
96
|
+
* The `kit` subdirectory holds HOST executables (`signtool.exe` / `makeappx.exe` / `makepri.exe`), so
|
|
97
|
+
* it is always the x64 kit (x86 on 32-bit hosts) — never arm64. x64 binaries run on x64 hosts natively
|
|
98
|
+
* and on arm64 Windows via emulation, whereas an arm64 binary cannot run on an x64 host and fails with
|
|
99
|
+
* `spawn UNKNOWN`. The artifact's target arch is irrelevant here.
|
|
100
|
+
* `appxAssets` is arch-independent (the bundle root).
|
|
101
|
+
*/
|
|
102
|
+
export async function getWindowsKitsBundle({ winCodeSign, resourcesDir }) {
|
|
103
|
+
const kitArch = process.arch === "ia32" ? "x86" : "x64";
|
|
93
104
|
if (typeof winCodeSign === "object" && winCodeSign != null) {
|
|
94
105
|
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
95
|
-
return { kit: path.join(vendorPath,
|
|
106
|
+
return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath };
|
|
96
107
|
}
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
108
|
+
const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST);
|
|
109
|
+
if (version === "0.0.0") {
|
|
99
110
|
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
100
|
-
return { kit: path.join(vendorPath, "windows-10",
|
|
111
|
+
return { kit: path.join(vendorPath, "windows-10", kitArch), appxAssets: vendorPath };
|
|
101
112
|
}
|
|
102
113
|
const file = "windows-kits-bundle-10_0_26100_0.zip";
|
|
103
|
-
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(
|
|
104
|
-
return { kit: path.join(vendorPath,
|
|
114
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
115
|
+
return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath };
|
|
105
116
|
}
|
|
106
117
|
export function isOldWin6() {
|
|
107
118
|
const winVersion = os.release();
|
|
108
119
|
return winVersion.startsWith("6.") && !winVersion.startsWith("6.3");
|
|
109
120
|
}
|
|
110
|
-
|
|
111
|
-
|
|
121
|
+
/**
|
|
122
|
+
* True only for the explicit legacy winCodeSign pin (`"0.0.0"` → winCodeSign-2.6.0). That bundle lacks
|
|
123
|
+
* the modern Windows Kits SDK (no MSIX-capable `makeappx`/`makepri`), so it cannot build MSIX — only the
|
|
124
|
+
* MSIX target gates on this. AppX still builds fine with the legacy bundle (it has its own legacy-bundle
|
|
125
|
+
* `signtool` handling in `getWindowsSignToolExe`). Unset / `null` / `"latest"` and any modern version pin
|
|
126
|
+
* resolve to a modern bundle; a custom `{ url, … }` toolset is the caller's responsibility and is not
|
|
127
|
+
* treated as legacy.
|
|
128
|
+
*/
|
|
129
|
+
export function isLegacyWinCodeSign(winCodeSign) {
|
|
130
|
+
return typeof winCodeSign !== "object" && resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST) === "0.0.0";
|
|
131
|
+
}
|
|
132
|
+
async function getWindowsSignToolExe({ winCodeSign, resourcesDir = "" }) {
|
|
133
|
+
if (typeof winCodeSign !== "object" && resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST) === "0.0.0") {
|
|
112
134
|
// use modern signtool on Windows Server 2012 R2 to be able to sign AppX
|
|
113
135
|
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
114
136
|
if (isOldWin6()) {
|
|
@@ -119,18 +141,22 @@ async function getWindowsSignToolExe({ winCodeSign, arch, resourcesDir = "" }) {
|
|
|
119
141
|
}
|
|
120
142
|
}
|
|
121
143
|
// kit is already sanitized by getWindowsKitsBundle
|
|
122
|
-
const { kit } = await getWindowsKitsBundle({ winCodeSign,
|
|
144
|
+
const { kit } = await getWindowsKitsBundle({ winCodeSign, resourcesDir });
|
|
123
145
|
return path.join(kit, "signtool.exe");
|
|
124
146
|
}
|
|
125
147
|
async function getOsslSigncodeBundle(winCodeSign, resourcesDir = "") {
|
|
126
|
-
|
|
127
|
-
return { path: "osslsigncode" };
|
|
128
|
-
}
|
|
148
|
+
// A custom toolset is an explicit user override — honored on every platform, before any platform default/fallback.
|
|
129
149
|
if (typeof winCodeSign === "object" && winCodeSign != null) {
|
|
130
150
|
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
131
151
|
return { path: path.join(vendorPath, "osslsigncode") };
|
|
132
152
|
}
|
|
133
|
-
if (
|
|
153
|
+
if (process.platform === "win32") {
|
|
154
|
+
// Unreachable in normal flow: osslsigncode is only requested when the host is not Windows (Windows signs via
|
|
155
|
+
// signtool). Kept as defense-in-depth — fail loudly instead of resolving a bare `osslsigncode` from $PATH.
|
|
156
|
+
throw new InvalidConfigurationError(`osslsigncode is not used on Windows (signing uses signtool). To override, configure a custom toolset: toolsets: { winCodeSign: { url: "file:///absolute/path/to/dir" } }`);
|
|
157
|
+
}
|
|
158
|
+
const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST);
|
|
159
|
+
if (version === "0.0.0") {
|
|
134
160
|
const legacyBase = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
135
161
|
const vendorBase = path.join(legacyBase, process.platform);
|
|
136
162
|
const vendorPath = process.platform === "darwin" ? path.join(vendorBase, "10.12") : vendorBase;
|
|
@@ -152,27 +178,29 @@ async function getOsslSigncodeBundle(winCodeSign, resourcesDir = "") {
|
|
|
152
178
|
}
|
|
153
179
|
return "win-codesign-darwin-x86_64.zip";
|
|
154
180
|
})();
|
|
155
|
-
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(
|
|
181
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
156
182
|
return { path: path.join(vendorPath, "osslsigncode") };
|
|
157
183
|
}
|
|
158
184
|
export async function getAtsBundleDir(winCodeSign) {
|
|
159
|
-
const
|
|
185
|
+
const version = winCodeSign === "latest" ? WIN_CODESIGN_LATEST : winCodeSign;
|
|
186
|
+
const checksum = wincodesignChecksums[version]?.["ats-bundle-1_0_95.zip"];
|
|
160
187
|
if (!checksum) {
|
|
161
|
-
throw new Error(`winCodeSign version "${
|
|
188
|
+
throw new Error(`winCodeSign version "${version}" does not include an ATS bundle (requires >= 1.3.0)`);
|
|
162
189
|
}
|
|
163
190
|
return downloadBuilderToolset({
|
|
164
|
-
releaseName: `win-codesign@${
|
|
191
|
+
releaseName: `win-codesign@${version}`,
|
|
165
192
|
filenameWithExt: "ats-bundle-1_0_95.zip",
|
|
166
193
|
checksums: { "ats-bundle-1_0_95.zip": checksum },
|
|
167
194
|
});
|
|
168
195
|
}
|
|
169
196
|
export async function getDotnetRuntimeDir(winCodeSign) {
|
|
170
|
-
const
|
|
197
|
+
const version = winCodeSign === "latest" ? WIN_CODESIGN_LATEST : winCodeSign;
|
|
198
|
+
const checksum = wincodesignChecksums[version]?.["dotnet-runtime-win-x64-8_0_28.zip"];
|
|
171
199
|
if (!checksum) {
|
|
172
|
-
throw new Error(`winCodeSign version "${
|
|
200
|
+
throw new Error(`winCodeSign version "${version}" does not include a .NET runtime bundle (requires >= 1.3.0)`);
|
|
173
201
|
}
|
|
174
202
|
return downloadBuilderToolset({
|
|
175
|
-
releaseName: `win-codesign@${
|
|
203
|
+
releaseName: `win-codesign@${version}`,
|
|
176
204
|
filenameWithExt: "dotnet-runtime-win-x64-8_0_28.zip",
|
|
177
205
|
checksums: { "dotnet-runtime-win-x64-8_0_28.zip": checksum },
|
|
178
206
|
});
|
|
@@ -185,12 +213,13 @@ export async function getRceditBundle(winCodeSign, resourcesDir = "") {
|
|
|
185
213
|
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
186
214
|
return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) };
|
|
187
215
|
}
|
|
188
|
-
|
|
216
|
+
const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST);
|
|
217
|
+
if (version === "0.0.0") {
|
|
189
218
|
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
190
219
|
return { x86: path.join(vendorPath, ia32), x64: path.join(vendorPath, x64) };
|
|
191
220
|
}
|
|
192
221
|
const file = "rcedit-windows-2_0_0.zip";
|
|
193
|
-
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(
|
|
222
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
194
223
|
return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) };
|
|
195
224
|
}
|
|
196
225
|
//# sourceMappingURL=winCodeSign.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"winCodeSign.js","sourceRoot":"","sources":["../../src/toolsets/winCodeSign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEpD,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAY,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAA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,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;AAC7E,CAAC","sourcesContent":["import { Arch, sanitizeDirPath } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport * as os from \"os\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { ToolInfo, computeToolEnv } from \"../util/bundledTool.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\n\nfunction getLegacyWinCodeSignBin(): Promise<string> {\n return downloadBuilderToolset({\n releaseName: \"winCodeSign-2.6.0\",\n filenameWithExt: \"winCodeSign-2.6.0.7z\",\n checksums: { [\"winCodeSign-2.6.0.7z\"]: \"cdaec7154dda7cc31f88d886e2489379a0625a737d610b5ae7f62a12f16743a4\" },\n })\n}\n\nexport const wincodesignChecksums = {\n \"0.0.0\": {\n // legacy — downloads winCodeSign-2.6.0 via getLegacyWinCodeSignBin()\n },\n \"1.0.0\": {\n \"rcedit-windows-2_0_0.zip\": \"589709935902545a8335190b08644cf61b46a9042e34c0c3ef0660a5aeddeaae\",\n \"win-codesign-darwin-arm64.zip\": \"7eb41c3e6e48a75ced6b3384de22185da4bb458960fa410970eedd4e838c5c14\",\n \"win-codesign-darwin-x86_64.zip\": \"3986c97429f002df63490193d7f787281836f055934e3cdd9e69c70a8acb695e\",\n \"win-codesign-linux-amd64.zip\": \"d362a1a981053841554867e3e9dff51fe420fd577b44653df89bd7d3c916b156\",\n \"win-codesign-linux-arm64.zip\": \"fb848d498281f081c937be48dd6ddaf49b0201f32210dfc816ad061c47ecd37b\",\n \"win-codesign-linux-i386.zip\": \"11f8d9ffbf5b01e3bf6321c6d93b9b5e43d0c2d2a9fde1bca07698f2eb967cdf\",\n \"win-codesign-windows-x64.zip\": \"1bd27f9fa553cb14bec8df530cb3caffcfb095f9dd187dab6eaf5e9b7d6e7bff\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"1a12c81024c3499c212fdc5fac34a918e6d199271a39dfc524f6d8da484329bd\",\n },\n \"1.1.0\": {\n \"rcedit-windows-2_0_0.zip\": \"c66591ebe0919c60231f0bf79ff223e6504bfa69bc13edc1fa8bfc6177b73402\",\n \"win-codesign-darwin-arm64.zip\": \"3f263b0e53cdc5410f6165471b2e808aee3148dc792efa23a7c303e7a01e67b7\",\n \"win-codesign-darwin-x86_64.zip\": \"143fbdfcbc53bc273fa181356be8416829778452621484d39eadbe1ce49979ba\",\n \"win-codesign-linux-amd64.zip\": \"65477fe8e40709b0f998928afb8336f82413b123310bf5adaa8efb7ed6ed0eeb\",\n \"win-codesign-linux-arm64.zip\": \"575b01a966f2b775bbea119de263957378e2bd28cbd064d35f9e981827e37b59\",\n \"win-codesign-linux-i386.zip\": \"aa3ce90e9aaa3449a228a3fa30633cdeb6b2791913786677a85c59db1d985598\",\n \"win-codesign-windows-x64.zip\": \"6e5dcc5d7af7c00a7387e2101d1ad986aef80e963a3526da07bd0e65de484c30\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"284f18a2fde66e6ecfbefc3065926c9bfdf641761a9e6cd2bd26e18d1e328bf7\",\n },\n \"1.1.1\": {\n \"rcedit-windows-2_0_0.zip\": \"a4133c265a53a8a6d5063c6d92603dc2dcd47546e50bfd79c93bc56692d6fcb3\",\n \"win-codesign-darwin-arm64.zip\": \"8c655fe77edb326fb6b7051a6f74b0f09843f7d3de7887c1d217088cff47ece6\",\n \"win-codesign-darwin-x86_64.zip\": \"b5882783c910e10b18792ea8c319fa8d6ce9dbbdd0d6a283a504787b3e9e96c6\",\n \"win-codesign-linux-amd64.zip\": \"8e0c05c33b3fb24d41ac41d37b0c70ad9f8c1c82bb667ed60c2a6a8d141b7c62\",\n \"win-codesign-linux-arm64.zip\": \"535f318b8aac1c9487e0f8b58df0a4182103e303ccaca1c9d0ef20b1020e03ca\",\n \"win-codesign-linux-i386.zip\": \"e432f2819f557f9d1175e26f374eec8a368eb23b519c12c690a969ce369966c5\",\n \"win-codesign-windows-x64.zip\": \"47d78ed7e229e891866b0d0e10dde6df9617c32a89fc76a9e280ffabfc80e1fe\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"f7e67213ce690386b2f0a58e3af986dbf223bc1b45ef4a75e77ff85f66b78c94\",\n },\n \"1.2.1\": {\n \"rcedit-windows-2_0_0.zip\": \"1c2b68b9ae41229566c008ce98c4f6cd2b642ace85284e753d1d3509377f9e67\",\n \"win-codesign-darwin-arm64.zip\": \"ac7c1d9279490fc88e9e744ed965ad7e1d377e0219142dab0ab49cfba3ede764\",\n \"win-codesign-darwin-x86_64.zip\": \"7c4188bb301621cde22f918bb2d1a86ef9892ad401a40b7838b80efc9165547d\",\n \"win-codesign-linux-amd64.zip\": \"69b94f71f9189ded6b962718df102e0ffe0a81d506351fecd3df3d73c7166e31\",\n \"win-codesign-linux-arm64.zip\": \"c959031605a5ab994bfd9b84d37bc5bcaba8f39d54a6d69bd2541b2a91ecf723\",\n \"win-codesign-linux-i386.zip\": \"fc937f40655b9839b67ed35cc7b571795b3f7b7b15db10c3026599db43f1c2b1\",\n \"win-codesign-windows-arm64.zip\": \"96390eb3130e63ea9d3641ef076c941c6f51463125498cf53b2503e52c38082d\",\n \"win-codesign-windows-x64.zip\": \"40b1d88ea074de58ddc7595a2b6d30ca23f81bcce33f110102304337538fcbeb\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"9b198db76ae75b124169aef3369fb96c17b39dbf16f16f1264dbd9fd001d976f\",\n },\n \"1.3.0\": {\n \"ats-bundle-1_0_95.zip\": \"93e1441cd8c60f7b7a57a3e0e20a2109994e33a7f42bd04c998204a1928f9f2f\", // new\n \"dotnet-runtime-win-x64-8_0_28.zip\": \"71b9aa960ebaae196a62ec0bb1a4d224e1b48e18b6dc5eed89a37b28b72965ee\", // new\n \"rcedit-windows-2_0_0.zip\": \"84ea279c5d94977fecffbe0f21b073318575dc631a3dae46fadb14309f2eef11\",\n \"win-codesign-darwin-arm64.zip\": \"c5c1e1e106a5feff27d320c57856e362d8f605c09c7c02fc42d9309b72c56372\",\n \"win-codesign-darwin-x86_64.zip\": \"4fd5af2c4c655257685fad1769457419e086ec0862ee36f893b3659e1788c8ca\",\n \"win-codesign-linux-amd64.zip\": \"58c708762b3088a2c6c98494c4813e2a1d030a314a7958c77a2806d58e5efe95\",\n \"win-codesign-linux-arm64.zip\": \"1e9dd1ae149a4e0c988b5529fb983d7a8265cd71e7f3fb5af4cce501005a670c\",\n \"win-codesign-linux-i386.zip\": \"b5c3249fb565bb956a48aaff01bc1bbbd9acaf3c981960f2b754210f9df95cd9\",\n \"win-codesign-windows-arm64.zip\": \"c707709440a07e400b4053d9bab77c9f335505c1701035c2aa8285d880360989\",\n \"win-codesign-windows-x64.zip\": \"40d621aad7593e6298ce1d24798760dcefb053f358be891d74c95386ac2ac50b\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"2eeb955e580103e1bbecf9666dca87b141c3bb73ad99ead64bb8821755694ecd\",\n },\n} as const\n\ntype CodeSignVersionKey = keyof typeof wincodesignChecksums\n\nfunction _getWindowsToolsBin<V extends CodeSignVersionKey>(winCodeSign: V, file: keyof (typeof wincodesignChecksums)[V]): Promise<string> {\n const filenameWithExt = file as string\n return downloadBuilderToolset({\n releaseName: `win-codesign@${winCodeSign}`,\n filenameWithExt,\n checksums: { [filenameWithExt]: wincodesignChecksums[winCodeSign][file] as string },\n })\n}\n\nexport async function getSignToolPath(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, isWin: boolean, resourcesDir: string): Promise<ToolInfo> {\n if (isWin) {\n // windows kits are always the target arch; signtool can be used by either arch.\n const signtoolArch: Arch = process.arch === \"x64\" ? Arch.x64 : process.arch === \"arm64\" ? Arch.arm64 : Arch.ia32\n return { path: await getWindowsSignToolExe({ winCodeSign, arch: signtoolArch, resourcesDir }) }\n } else {\n const vendor = await getOsslSigncodeBundle(winCodeSign, resourcesDir)\n return { path: vendor.path, env: vendor.env }\n }\n}\n\nexport async function getWindowsKitsBundle({ winCodeSign, arch, resourcesDir = \"\" }: { winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish; arch: Arch; resourcesDir?: string }) {\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { kit: path.join(vendorPath, arch === Arch.ia32 ? \"x86\" : Arch[arch]), appxAssets: vendorPath }\n }\n\n const useLegacy = winCodeSign == null || winCodeSign === \"0.0.0\"\n if (useLegacy) {\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n return { kit: path.join(vendorPath, \"windows-10\", arch === Arch.arm64 ? \"x64\" : Arch[arch]), appxAssets: vendorPath }\n }\n const file = \"windows-kits-bundle-10_0_26100_0.zip\"\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(winCodeSign, file))\n return { kit: path.join(vendorPath, arch === Arch.ia32 ? \"x86\" : Arch[arch]), appxAssets: vendorPath }\n}\n\nexport function isOldWin6() {\n const winVersion = os.release()\n return winVersion.startsWith(\"6.\") && !winVersion.startsWith(\"6.3\")\n}\n\nasync function getWindowsSignToolExe({ winCodeSign, arch, resourcesDir = \"\" }: { winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish; arch: Arch; resourcesDir?: string }) {\n if (winCodeSign === \"0.0.0\" || winCodeSign == null) {\n // use modern signtool on Windows Server 2012 R2 to be able to sign AppX\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n if (isOldWin6()) {\n return path.join(vendorPath, \"windows-6\", \"signtool.exe\")\n } else {\n return path.join(vendorPath, \"windows-10\", process.arch === \"ia32\" ? \"ia32\" : \"x64\", \"signtool.exe\")\n }\n }\n // kit is already sanitized by getWindowsKitsBundle\n const { kit } = await getWindowsKitsBundle({ winCodeSign, arch, resourcesDir })\n return path.join(kit, \"signtool.exe\")\n}\n\nasync function getOsslSigncodeBundle(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, resourcesDir = \"\") {\n if (process.platform === \"win32\") {\n return { path: \"osslsigncode\" }\n }\n\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { path: path.join(vendorPath, \"osslsigncode\") }\n }\n\n if (winCodeSign === \"0.0.0\" || winCodeSign == null) {\n const legacyBase = sanitizeDirPath(await getLegacyWinCodeSignBin())\n const vendorBase = path.join(legacyBase, process.platform)\n const vendorPath = process.platform === \"darwin\" ? path.join(vendorBase, \"10.12\") : vendorBase\n return { path: path.join(vendorPath, \"osslsigncode\"), env: process.platform === \"darwin\" ? computeToolEnv([path.join(vendorPath, \"lib\")]) : undefined }\n }\n\n const file = (() => {\n if (process.platform === \"linux\") {\n if (process.arch == \"x64\") {\n return \"win-codesign-linux-amd64.zip\"\n } else if (process.arch === \"arm64\") {\n return \"win-codesign-linux-arm64.zip\"\n }\n return \"win-codesign-linux-i386.zip\"\n }\n // darwin arm64\n if (process.arch === \"arm64\") {\n return \"win-codesign-darwin-arm64.zip\"\n }\n return \"win-codesign-darwin-x86_64.zip\"\n })()\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(winCodeSign, file))\n return { path: path.join(vendorPath, \"osslsigncode\") }\n}\n\nexport async function getAtsBundleDir(winCodeSign: string): Promise<string> {\n const checksum = (wincodesignChecksums as Record<string, Record<string, string>>)[winCodeSign]?.[\"ats-bundle-1_0_95.zip\"]\n if (!checksum) {\n throw new Error(`winCodeSign version \"${winCodeSign}\" does not include an ATS bundle (requires >= 1.3.0)`)\n }\n return downloadBuilderToolset({\n releaseName: `win-codesign@${winCodeSign}`,\n filenameWithExt: \"ats-bundle-1_0_95.zip\",\n checksums: { \"ats-bundle-1_0_95.zip\": checksum },\n })\n}\n\nexport async function getDotnetRuntimeDir(winCodeSign: string): Promise<string> {\n const checksum = (wincodesignChecksums as Record<string, Record<string, string>>)[winCodeSign]?.[\"dotnet-runtime-win-x64-8_0_28.zip\"]\n if (!checksum) {\n throw new Error(`winCodeSign version \"${winCodeSign}\" does not include a .NET runtime bundle (requires >= 1.3.0)`)\n }\n return downloadBuilderToolset({\n releaseName: `win-codesign@${winCodeSign}`,\n filenameWithExt: \"dotnet-runtime-win-x64-8_0_28.zip\",\n checksums: { \"dotnet-runtime-win-x64-8_0_28.zip\": checksum },\n })\n}\n\nexport async function getRceditBundle(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, resourcesDir = \"\") {\n const ia32 = \"rcedit-ia32.exe\"\n const x86 = \"rcedit-x86.exe\"\n const x64 = \"rcedit-x64.exe\"\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) }\n }\n if (winCodeSign === \"0.0.0\" || winCodeSign == null) {\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n return { x86: path.join(vendorPath, ia32), x64: path.join(vendorPath, x64) }\n }\n const file = \"rcedit-windows-2_0_0.zip\"\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(winCodeSign, file))\n return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"winCodeSign.js","sourceRoot":"","sources":["../../src/toolsets/winCodeSign.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEzE,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAY,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qB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0BAA0B,CAAA;IACvC,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAA;IAC5E,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;AAC7E,CAAC","sourcesContent":["import { InvalidConfigurationError, sanitizeDirPath } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport * as os from \"os\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { ToolInfo, computeToolEnv } from \"../util/bundledTool.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\n\n// Newest win-codesign bundle — selected when the config is unset / null / \"latest\".\nexport const WIN_CODESIGN_LATEST = \"1.3.0\"\n\nfunction getLegacyWinCodeSignBin(): Promise<string> {\n return downloadBuilderToolset({\n releaseName: \"winCodeSign-2.6.0\",\n filenameWithExt: \"winCodeSign-2.6.0.7z\",\n checksums: { [\"winCodeSign-2.6.0.7z\"]: \"cdaec7154dda7cc31f88d886e2489379a0625a737d610b5ae7f62a12f16743a4\" },\n })\n}\n\nexport const wincodesignChecksums = {\n \"0.0.0\": {\n // legacy — downloads winCodeSign-2.6.0 via getLegacyWinCodeSignBin()\n },\n \"1.0.0\": {\n \"rcedit-windows-2_0_0.zip\": \"589709935902545a8335190b08644cf61b46a9042e34c0c3ef0660a5aeddeaae\",\n \"win-codesign-darwin-arm64.zip\": \"7eb41c3e6e48a75ced6b3384de22185da4bb458960fa410970eedd4e838c5c14\",\n \"win-codesign-darwin-x86_64.zip\": \"3986c97429f002df63490193d7f787281836f055934e3cdd9e69c70a8acb695e\",\n \"win-codesign-linux-amd64.zip\": \"d362a1a981053841554867e3e9dff51fe420fd577b44653df89bd7d3c916b156\",\n \"win-codesign-linux-arm64.zip\": \"fb848d498281f081c937be48dd6ddaf49b0201f32210dfc816ad061c47ecd37b\",\n \"win-codesign-linux-i386.zip\": \"11f8d9ffbf5b01e3bf6321c6d93b9b5e43d0c2d2a9fde1bca07698f2eb967cdf\",\n \"win-codesign-windows-x64.zip\": \"1bd27f9fa553cb14bec8df530cb3caffcfb095f9dd187dab6eaf5e9b7d6e7bff\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"1a12c81024c3499c212fdc5fac34a918e6d199271a39dfc524f6d8da484329bd\",\n },\n \"1.1.0\": {\n \"rcedit-windows-2_0_0.zip\": \"c66591ebe0919c60231f0bf79ff223e6504bfa69bc13edc1fa8bfc6177b73402\",\n \"win-codesign-darwin-arm64.zip\": \"3f263b0e53cdc5410f6165471b2e808aee3148dc792efa23a7c303e7a01e67b7\",\n \"win-codesign-darwin-x86_64.zip\": \"143fbdfcbc53bc273fa181356be8416829778452621484d39eadbe1ce49979ba\",\n \"win-codesign-linux-amd64.zip\": \"65477fe8e40709b0f998928afb8336f82413b123310bf5adaa8efb7ed6ed0eeb\",\n \"win-codesign-linux-arm64.zip\": \"575b01a966f2b775bbea119de263957378e2bd28cbd064d35f9e981827e37b59\",\n \"win-codesign-linux-i386.zip\": \"aa3ce90e9aaa3449a228a3fa30633cdeb6b2791913786677a85c59db1d985598\",\n \"win-codesign-windows-x64.zip\": \"6e5dcc5d7af7c00a7387e2101d1ad986aef80e963a3526da07bd0e65de484c30\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"284f18a2fde66e6ecfbefc3065926c9bfdf641761a9e6cd2bd26e18d1e328bf7\",\n },\n \"1.1.1\": {\n \"rcedit-windows-2_0_0.zip\": \"a4133c265a53a8a6d5063c6d92603dc2dcd47546e50bfd79c93bc56692d6fcb3\",\n \"win-codesign-darwin-arm64.zip\": \"8c655fe77edb326fb6b7051a6f74b0f09843f7d3de7887c1d217088cff47ece6\",\n \"win-codesign-darwin-x86_64.zip\": \"b5882783c910e10b18792ea8c319fa8d6ce9dbbdd0d6a283a504787b3e9e96c6\",\n \"win-codesign-linux-amd64.zip\": \"8e0c05c33b3fb24d41ac41d37b0c70ad9f8c1c82bb667ed60c2a6a8d141b7c62\",\n \"win-codesign-linux-arm64.zip\": \"535f318b8aac1c9487e0f8b58df0a4182103e303ccaca1c9d0ef20b1020e03ca\",\n \"win-codesign-linux-i386.zip\": \"e432f2819f557f9d1175e26f374eec8a368eb23b519c12c690a969ce369966c5\",\n \"win-codesign-windows-x64.zip\": \"47d78ed7e229e891866b0d0e10dde6df9617c32a89fc76a9e280ffabfc80e1fe\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"f7e67213ce690386b2f0a58e3af986dbf223bc1b45ef4a75e77ff85f66b78c94\",\n },\n \"1.2.1\": {\n \"rcedit-windows-2_0_0.zip\": \"1c2b68b9ae41229566c008ce98c4f6cd2b642ace85284e753d1d3509377f9e67\",\n \"win-codesign-darwin-arm64.zip\": \"ac7c1d9279490fc88e9e744ed965ad7e1d377e0219142dab0ab49cfba3ede764\",\n \"win-codesign-darwin-x86_64.zip\": \"7c4188bb301621cde22f918bb2d1a86ef9892ad401a40b7838b80efc9165547d\",\n \"win-codesign-linux-amd64.zip\": \"69b94f71f9189ded6b962718df102e0ffe0a81d506351fecd3df3d73c7166e31\",\n \"win-codesign-linux-arm64.zip\": \"c959031605a5ab994bfd9b84d37bc5bcaba8f39d54a6d69bd2541b2a91ecf723\",\n \"win-codesign-linux-i386.zip\": \"fc937f40655b9839b67ed35cc7b571795b3f7b7b15db10c3026599db43f1c2b1\",\n \"win-codesign-windows-arm64.zip\": \"96390eb3130e63ea9d3641ef076c941c6f51463125498cf53b2503e52c38082d\",\n \"win-codesign-windows-x64.zip\": \"40b1d88ea074de58ddc7595a2b6d30ca23f81bcce33f110102304337538fcbeb\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"9b198db76ae75b124169aef3369fb96c17b39dbf16f16f1264dbd9fd001d976f\",\n },\n \"1.3.0\": {\n \"ats-bundle-1_0_95.zip\": \"93e1441cd8c60f7b7a57a3e0e20a2109994e33a7f42bd04c998204a1928f9f2f\", // new\n \"dotnet-runtime-win-x64-8_0_28.zip\": \"71b9aa960ebaae196a62ec0bb1a4d224e1b48e18b6dc5eed89a37b28b72965ee\", // new\n \"rcedit-windows-2_0_0.zip\": \"84ea279c5d94977fecffbe0f21b073318575dc631a3dae46fadb14309f2eef11\",\n \"win-codesign-darwin-arm64.zip\": \"c5c1e1e106a5feff27d320c57856e362d8f605c09c7c02fc42d9309b72c56372\",\n \"win-codesign-darwin-x86_64.zip\": \"4fd5af2c4c655257685fad1769457419e086ec0862ee36f893b3659e1788c8ca\",\n \"win-codesign-linux-amd64.zip\": \"58c708762b3088a2c6c98494c4813e2a1d030a314a7958c77a2806d58e5efe95\",\n \"win-codesign-linux-arm64.zip\": \"1e9dd1ae149a4e0c988b5529fb983d7a8265cd71e7f3fb5af4cce501005a670c\",\n \"win-codesign-linux-i386.zip\": \"b5c3249fb565bb956a48aaff01bc1bbbd9acaf3c981960f2b754210f9df95cd9\",\n \"win-codesign-windows-arm64.zip\": \"c707709440a07e400b4053d9bab77c9f335505c1701035c2aa8285d880360989\",\n \"win-codesign-windows-x64.zip\": \"40d621aad7593e6298ce1d24798760dcefb053f358be891d74c95386ac2ac50b\",\n \"windows-kits-bundle-10_0_26100_0.zip\": \"2eeb955e580103e1bbecf9666dca87b141c3bb73ad99ead64bb8821755694ecd\",\n },\n} as const\n\ntype CodeSignVersionKey = keyof typeof wincodesignChecksums\n\nfunction _getWindowsToolsBin<V extends CodeSignVersionKey>(winCodeSign: V, file: keyof (typeof wincodesignChecksums)[V]): Promise<string> {\n const filenameWithExt = file as string\n return downloadBuilderToolset({\n releaseName: `win-codesign@${winCodeSign}`,\n filenameWithExt,\n checksums: { [filenameWithExt]: wincodesignChecksums[winCodeSign][file] as string },\n })\n}\n\nexport async function getSignToolPath(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, isWin: boolean, resourcesDir: string): Promise<ToolInfo> {\n if (isWin) {\n return { path: await getWindowsSignToolExe({ winCodeSign, resourcesDir }) }\n } else {\n const vendor = await getOsslSigncodeBundle(winCodeSign, resourcesDir)\n return { path: vendor.path, env: vendor.env }\n }\n}\n\n/**\n * Resolve the Windows Kits bundle paths.\n *\n * The `kit` subdirectory holds HOST executables (`signtool.exe` / `makeappx.exe` / `makepri.exe`), so\n * it is always the x64 kit (x86 on 32-bit hosts) — never arm64. x64 binaries run on x64 hosts natively\n * and on arm64 Windows via emulation, whereas an arm64 binary cannot run on an x64 host and fails with\n * `spawn UNKNOWN`. The artifact's target arch is irrelevant here.\n * `appxAssets` is arch-independent (the bundle root).\n */\nexport async function getWindowsKitsBundle({ winCodeSign, resourcesDir }: { winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish; resourcesDir?: string }) {\n const kitArch = process.arch === \"ia32\" ? \"x86\" : \"x64\"\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath }\n }\n\n const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST)\n if (version === \"0.0.0\") {\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n return { kit: path.join(vendorPath, \"windows-10\", kitArch), appxAssets: vendorPath }\n }\n const file = \"windows-kits-bundle-10_0_26100_0.zip\"\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file))\n return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath }\n}\n\nexport function isOldWin6() {\n const winVersion = os.release()\n return winVersion.startsWith(\"6.\") && !winVersion.startsWith(\"6.3\")\n}\n\n/**\n * True only for the explicit legacy winCodeSign pin (`\"0.0.0\"` → winCodeSign-2.6.0). That bundle lacks\n * the modern Windows Kits SDK (no MSIX-capable `makeappx`/`makepri`), so it cannot build MSIX — only the\n * MSIX target gates on this. AppX still builds fine with the legacy bundle (it has its own legacy-bundle\n * `signtool` handling in `getWindowsSignToolExe`). Unset / `null` / `\"latest\"` and any modern version pin\n * resolve to a modern bundle; a custom `{ url, … }` toolset is the caller's responsibility and is not\n * treated as legacy.\n */\nexport function isLegacyWinCodeSign(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish): boolean {\n return typeof winCodeSign !== \"object\" && resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST) === \"0.0.0\"\n}\n\nasync function getWindowsSignToolExe({ winCodeSign, resourcesDir = \"\" }: { winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish; resourcesDir?: string }) {\n if (typeof winCodeSign !== \"object\" && resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST) === \"0.0.0\") {\n // use modern signtool on Windows Server 2012 R2 to be able to sign AppX\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n if (isOldWin6()) {\n return path.join(vendorPath, \"windows-6\", \"signtool.exe\")\n } else {\n return path.join(vendorPath, \"windows-10\", process.arch === \"ia32\" ? \"ia32\" : \"x64\", \"signtool.exe\")\n }\n }\n // kit is already sanitized by getWindowsKitsBundle\n const { kit } = await getWindowsKitsBundle({ winCodeSign, resourcesDir })\n return path.join(kit, \"signtool.exe\")\n}\n\nasync function getOsslSigncodeBundle(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, resourcesDir = \"\") {\n // A custom toolset is an explicit user override — honored on every platform, before any platform default/fallback.\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { path: path.join(vendorPath, \"osslsigncode\") }\n }\n\n if (process.platform === \"win32\") {\n // Unreachable in normal flow: osslsigncode is only requested when the host is not Windows (Windows signs via\n // signtool). Kept as defense-in-depth — fail loudly instead of resolving a bare `osslsigncode` from $PATH.\n throw new InvalidConfigurationError(\n `osslsigncode is not used on Windows (signing uses signtool). To override, configure a custom toolset: toolsets: { winCodeSign: { url: \"file:///absolute/path/to/dir\" } }`\n )\n }\n\n const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST)\n if (version === \"0.0.0\") {\n const legacyBase = sanitizeDirPath(await getLegacyWinCodeSignBin())\n const vendorBase = path.join(legacyBase, process.platform)\n const vendorPath = process.platform === \"darwin\" ? path.join(vendorBase, \"10.12\") : vendorBase\n return { path: path.join(vendorPath, \"osslsigncode\"), env: process.platform === \"darwin\" ? computeToolEnv([path.join(vendorPath, \"lib\")]) : undefined }\n }\n\n const file = (() => {\n if (process.platform === \"linux\") {\n if (process.arch == \"x64\") {\n return \"win-codesign-linux-amd64.zip\"\n } else if (process.arch === \"arm64\") {\n return \"win-codesign-linux-arm64.zip\"\n }\n return \"win-codesign-linux-i386.zip\"\n }\n // darwin arm64\n if (process.arch === \"arm64\") {\n return \"win-codesign-darwin-arm64.zip\"\n }\n return \"win-codesign-darwin-x86_64.zip\"\n })()\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file))\n return { path: path.join(vendorPath, \"osslsigncode\") }\n}\n\nexport async function getAtsBundleDir(winCodeSign: string): Promise<string> {\n const version = winCodeSign === \"latest\" ? WIN_CODESIGN_LATEST : winCodeSign\n const checksum = (wincodesignChecksums as Record<string, Record<string, string>>)[version]?.[\"ats-bundle-1_0_95.zip\"]\n if (!checksum) {\n throw new Error(`winCodeSign version \"${version}\" does not include an ATS bundle (requires >= 1.3.0)`)\n }\n return downloadBuilderToolset({\n releaseName: `win-codesign@${version}`,\n filenameWithExt: \"ats-bundle-1_0_95.zip\",\n checksums: { \"ats-bundle-1_0_95.zip\": checksum },\n })\n}\n\nexport async function getDotnetRuntimeDir(winCodeSign: string): Promise<string> {\n const version = winCodeSign === \"latest\" ? WIN_CODESIGN_LATEST : winCodeSign\n const checksum = (wincodesignChecksums as Record<string, Record<string, string>>)[version]?.[\"dotnet-runtime-win-x64-8_0_28.zip\"]\n if (!checksum) {\n throw new Error(`winCodeSign version \"${version}\" does not include a .NET runtime bundle (requires >= 1.3.0)`)\n }\n return downloadBuilderToolset({\n releaseName: `win-codesign@${version}`,\n filenameWithExt: \"dotnet-runtime-win-x64-8_0_28.zip\",\n checksums: { \"dotnet-runtime-win-x64-8_0_28.zip\": checksum },\n })\n}\n\nexport async function getRceditBundle(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, resourcesDir = \"\") {\n const ia32 = \"rcedit-ia32.exe\"\n const x86 = \"rcedit-x86.exe\"\n const x64 = \"rcedit-x64.exe\"\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined)\n return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) }\n }\n const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST)\n if (version === \"0.0.0\") {\n const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin())\n return { x86: path.join(vendorPath, ia32), x64: path.join(vendorPath, x64) }\n }\n const file = \"rcedit-windows-2_0_0.zip\"\n const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file))\n return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) }\n}\n"]}
|
package/dist/toolsets/wine.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { Nullish } from "builder-util-runtime";
|
|
1
2
|
import { ToolsetConfig } from "../configuration.js";
|
|
2
|
-
export declare function getWineToolset(wine: ToolsetConfig["wine"], resourcesDir: string): Promise<{
|
|
3
|
+
export declare function getWineToolset(wine: ToolsetConfig["wine"] | Nullish, resourcesDir: string): Promise<{
|
|
3
4
|
execPath: string;
|
|
4
5
|
env: Record<string, string>;
|
|
5
6
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wine.d.ts","sourceRoot":"","sources":["../../src/toolsets/wine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wine.d.ts","sourceRoot":"","sources":["../../src/toolsets/wine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAmBnD,wBAAsB,cAAc,CAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CAiD5J"}
|
package/dist/toolsets/wine.js
CHANGED
|
@@ -3,6 +3,8 @@ import * as path from "path";
|
|
|
3
3
|
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
4
4
|
import { getCustomToolsetPath } from "./custom.js";
|
|
5
5
|
const githubOrgRepo = "electron-userland/electron-builder-binaries";
|
|
6
|
+
// Newest wine bundle — selected when the config is unset / null / "latest".
|
|
7
|
+
const WINE_LATEST = "1.0.1";
|
|
6
8
|
const wineToolsChecksums = {
|
|
7
9
|
"0.0.0": {
|
|
8
10
|
"wine-4.0.1-mac.7z": "1baac808a67975b68b9226beea7b64ad0acc3e598a4b45c25bb5d2ae8cac655e",
|
|
@@ -28,27 +30,27 @@ export async function getWineToolset(wine, resourcesDir) {
|
|
|
28
30
|
// Linux ships no portable bundle for string/null configs → fall back to the host wine binary.
|
|
29
31
|
return { execPath: "wine", env: defaultEnv };
|
|
30
32
|
}
|
|
31
|
-
else if (wine === "
|
|
32
|
-
// Explicit opt-in to the
|
|
33
|
-
// Not the default yet — request it explicitly via `toolsets.wine = "1.0.1"`.
|
|
34
|
-
const file = process.platform === "darwin" ? "wine-11.0-darwin-x86_64.tar.xz" : "wine-11.0-linux-x86_64.tar.xz";
|
|
33
|
+
else if (wine === "0.0.0") {
|
|
34
|
+
// Explicit opt-in to the legacy wine-4.0.1-mac bundle (pre-v27).
|
|
35
35
|
toolsetPath = await downloadBuilderToolset({
|
|
36
|
-
releaseName: "wine
|
|
37
|
-
filenameWithExt:
|
|
38
|
-
checksums: wineToolsChecksums["
|
|
36
|
+
releaseName: "wine-4.0.1-mac",
|
|
37
|
+
filenameWithExt: "wine-4.0.1-mac.7z",
|
|
38
|
+
checksums: wineToolsChecksums["0.0.0"],
|
|
39
39
|
githubOrgRepo,
|
|
40
40
|
});
|
|
41
|
-
execSubPath =
|
|
41
|
+
execSubPath = path.join("bin", "wine64");
|
|
42
42
|
}
|
|
43
43
|
else {
|
|
44
|
-
// Default (null / undefined) and "
|
|
44
|
+
// Default (null / undefined / "latest") and explicit "1.0.1" → bundled wine@1.0.1
|
|
45
|
+
// (wine 11; arm64 macOS via Rosetta).
|
|
46
|
+
const file = process.platform === "darwin" ? "wine-11.0-darwin-x86_64.tar.xz" : "wine-11.0-linux-x86_64.tar.xz";
|
|
45
47
|
toolsetPath = await downloadBuilderToolset({
|
|
46
|
-
releaseName:
|
|
47
|
-
filenameWithExt:
|
|
48
|
-
checksums: wineToolsChecksums[
|
|
48
|
+
releaseName: `wine@${WINE_LATEST}`,
|
|
49
|
+
filenameWithExt: file,
|
|
50
|
+
checksums: wineToolsChecksums[WINE_LATEST],
|
|
49
51
|
githubOrgRepo,
|
|
50
52
|
});
|
|
51
|
-
execSubPath = path.join("bin", "wine64"
|
|
53
|
+
execSubPath = (await exists(path.join(toolsetPath, "bin", "wine"))) ? "bin/wine" : "bin/wine64";
|
|
52
54
|
}
|
|
53
55
|
const { execPath, winePrefix, wineLibPath } = await createWineEnvironment(toolsetPath, execSubPath);
|
|
54
56
|
return {
|