app-builder-lib 27.0.0-alpha.12 → 27.0.0-alpha.14
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/asar/asarUtil.js +1 -1
- package/dist/asar/asarUtil.js.map +1 -1
- package/dist/codeSign/certInfo.d.ts +4 -1
- package/dist/codeSign/certInfo.d.ts.map +1 -1
- package/dist/codeSign/certInfo.js +5 -3
- package/dist/codeSign/certInfo.js.map +1 -1
- package/dist/codeSign/forceCodeSigning.d.ts +22 -0
- package/dist/codeSign/forceCodeSigning.d.ts.map +1 -0
- package/dist/codeSign/forceCodeSigning.js +18 -0
- package/dist/codeSign/forceCodeSigning.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +13 -1
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +29 -2
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/mac/macSignatureVerifier.d.ts +23 -0
- package/dist/codeSign/mac/macSignatureVerifier.d.ts.map +1 -0
- package/dist/codeSign/mac/macSignatureVerifier.js +96 -0
- package/dist/codeSign/mac/macSignatureVerifier.js.map +1 -0
- package/dist/codeSign/win/authenticodeSignature.d.ts +14 -2
- package/dist/codeSign/win/authenticodeSignature.d.ts.map +1 -1
- package/dist/codeSign/win/authenticodeSignature.js +78 -30
- package/dist/codeSign/win/authenticodeSignature.js.map +1 -1
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -1
- package/dist/codeSign/win/pkcs11SignManager.js +4 -3
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -1
- package/dist/codeSign/win/publisherName.d.ts +31 -0
- package/dist/codeSign/win/publisherName.d.ts.map +1 -0
- package/dist/codeSign/win/publisherName.js +78 -0
- package/dist/codeSign/win/publisherName.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +16 -9
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -1
- package/dist/codeSign/win/signtoolBaseSignManager.js +46 -35
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.d.ts.map +1 -1
- package/dist/codeSign/win/verifyUpdatePublisher.js +7 -4
- package/dist/codeSign/win/verifyUpdatePublisher.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +24 -6
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/configuration.d.ts +93 -4
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js.map +1 -1
- package/dist/electron/mac/asarIntegrityDigest.js +2 -2
- package/dist/electron/mac/asarIntegrityDigest.js.map +1 -1
- package/dist/electron/mac/electronMacUtils.d.ts +3 -2
- package/dist/electron/mac/electronMacUtils.d.ts.map +1 -1
- package/dist/electron/mac/electronMacUtils.js +3 -2
- package/dist/electron/mac/electronMacUtils.js.map +1 -1
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +4 -2
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +7 -2
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +6 -2
- package/dist/indexInternal.js.map +1 -1
- package/dist/linuxPackager.js +1 -1
- package/dist/linuxPackager.js.map +1 -1
- package/dist/macPackager.d.ts +26 -0
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +168 -12
- package/dist/macPackager.js.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.d.ts +19 -13
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SquirrelWindowsOptions.d.ts +3 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
- package/dist/options/SquirrelWindowsOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +7 -2
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +61 -15
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js +20 -0
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +7 -0
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +21 -5
- package/dist/packager.js.map +1 -1
- package/dist/platformPackager.d.ts +14 -5
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +44 -13
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +3 -0
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +50 -16
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/manifestUploadCheck.d.ts +10 -0
- package/dist/publish/manifestUploadCheck.d.ts.map +1 -0
- package/dist/publish/manifestUploadCheck.js +75 -0
- package/dist/publish/manifestUploadCheck.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +58 -22
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/publish/updateManifestVerifier.d.ts +22 -0
- package/dist/publish/updateManifestVerifier.d.ts.map +1 -0
- package/dist/publish/updateManifestVerifier.js +65 -0
- package/dist/publish/updateManifestVerifier.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -1
- package/dist/targets/ArchiveTarget.js +6 -2
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +3 -3
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/blockmap/blockmap.d.ts +30 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
- package/dist/targets/blockmap/blockmap.js +99 -31
- package/dist/targets/blockmap/blockmap.js.map +1 -1
- package/dist/targets/blockmap/blockmapV3.d.ts +36 -0
- package/dist/targets/blockmap/blockmapV3.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmapV3.js +41 -0
- package/dist/targets/blockmap/blockmapV3.js.map +1 -0
- package/dist/targets/blockmap/verbatimRange.d.ts +6 -0
- package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -1
- package/dist/targets/blockmap/verbatimRange.js +11 -0
- package/dist/targets/blockmap/verbatimRange.js.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +92 -4
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +266 -10
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +5 -5
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +25 -8
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +6 -1
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +9 -9
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/flatpakBundle.d.ts.map +1 -1
- package/dist/targets/linux/flatpakBundle.js +25 -20
- package/dist/targets/linux/flatpakBundle.js.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +22 -6
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapPlugs.d.ts +2 -2
- package/dist/targets/linux/snap/snapPlugs.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapPlugs.js +1 -1
- package/dist/targets/linux/snap/snapPlugs.js.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -1
- package/dist/targets/linux/snap/snapcraftBuilder.js +19 -17
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -1
- package/dist/targets/mac/MacTargetHelper.d.ts +15 -3
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +96 -13
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +7 -5
- package/dist/targets/mac/pkg.js.map +1 -1
- package/dist/targets/targetFactory.d.ts +1 -1
- package/dist/targets/targetFactory.d.ts.map +1 -1
- package/dist/targets/targetFactory.js +22 -0
- package/dist/targets/targetFactory.js.map +1 -1
- package/dist/targets/win/MsiTarget.d.ts +7 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -1
- package/dist/targets/win/MsiTarget.js +140 -21
- package/dist/targets/win/MsiTarget.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +22 -8
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/toolsets/appimage.d.ts +3 -0
- package/dist/toolsets/appimage.d.ts.map +1 -1
- package/dist/toolsets/appimage.js +4 -1
- package/dist/toolsets/appimage.js.map +1 -1
- package/dist/toolsets/nsis.js +1 -1
- package/dist/toolsets/nsis.js.map +1 -1
- package/dist/toolsets/wine.d.ts +3 -0
- package/dist/toolsets/wine.d.ts.map +1 -1
- package/dist/toolsets/wine.js +14 -5
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/toolsets/wix.d.ts +44 -0
- package/dist/toolsets/wix.d.ts.map +1 -0
- package/dist/toolsets/wix.js +91 -0
- package/dist/toolsets/wix.js.map +1 -0
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +9 -3
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/buildOutputVerifier.d.ts +40 -0
- package/dist/util/buildOutputVerifier.d.ts.map +1 -0
- package/dist/util/buildOutputVerifier.js +420 -0
- package/dist/util/buildOutputVerifier.js.map +1 -0
- package/dist/util/config/fileOptions.js +2 -2
- package/dist/util/config/fileOptions.js.map +1 -1
- package/dist/util/config/legacyConfigGuard.d.ts.map +1 -1
- package/dist/util/config/legacyConfigGuard.js +2 -2
- package/dist/util/config/legacyConfigGuard.js.map +1 -1
- package/dist/util/config/legacyOptions.d.ts +9 -2
- package/dist/util/config/legacyOptions.d.ts.map +1 -1
- package/dist/util/config/legacyOptions.js +8 -2
- package/dist/util/config/legacyOptions.js.map +1 -1
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +3 -1
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/electronUpdaterCompatibility.d.ts +43 -0
- package/dist/util/electronUpdaterCompatibility.d.ts.map +1 -0
- package/dist/util/electronUpdaterCompatibility.js +53 -0
- package/dist/util/electronUpdaterCompatibility.js.map +1 -0
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +3 -9
- package/dist/util/flags.js.map +1 -1
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
- package/dist/util/mac/macosIconComposer.js +6 -5
- package/dist/util/mac/macosIconComposer.js.map +1 -1
- package/dist/util/macroExpander.js +1 -1
- package/dist/util/macroExpander.js.map +1 -1
- package/dist/util/nativeBinaryVerifier.d.ts.map +1 -1
- package/dist/util/nativeBinaryVerifier.js +3 -1
- package/dist/util/nativeBinaryVerifier.js.map +1 -1
- package/dist/util/packageMetadata.js +116 -52
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/util/removedEnvVars.d.ts +2 -0
- package/dist/util/removedEnvVars.d.ts.map +1 -1
- package/dist/util/removedEnvVars.js +15 -1
- package/dist/util/removedEnvVars.js.map +1 -1
- package/dist/util/streamSpawnToFile.d.ts +3 -1
- package/dist/util/streamSpawnToFile.d.ts.map +1 -1
- package/dist/util/streamSpawnToFile.js +6 -2
- package/dist/util/streamSpawnToFile.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 +10 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -1
- package/dist/vm/ParallelsVm.js +22 -8
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/vm/PwshVm.d.ts +0 -1
- package/dist/vm/PwshVm.d.ts.map +1 -1
- package/dist/vm/PwshVm.js +10 -15
- package/dist/vm/PwshVm.js.map +1 -1
- package/dist/vm/WineVm.d.ts.map +1 -1
- package/dist/vm/WineVm.js +4 -4
- package/dist/vm/WineVm.js.map +1 -1
- package/dist/vm/vm.d.ts +9 -3
- package/dist/vm/vm.d.ts.map +1 -1
- package/dist/vm/vm.js +40 -32
- package/dist/vm/vm.js.map +1 -1
- package/dist/winPackager.d.ts +16 -1
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +77 -19
- package/dist/winPackager.js.map +1 -1
- package/package.json +9 -9
- package/scheme.json +542 -29
- package/templates/msi/template.xml +5 -5
- package/templates/msiWrapped/template.xml +1 -1
- package/templates/nsis/assistedInstaller.nsh +32 -1
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +14 -9
- package/dist/vm/MonoVm.d.ts +0 -9
- package/dist/vm/MonoVm.d.ts.map +0 -1
- package/dist/vm/MonoVm.js +0 -16
- package/dist/vm/MonoVm.js.map +0 -1
|
@@ -10,6 +10,9 @@ export declare const appimageChecksums: {
|
|
|
10
10
|
readonly "1.1.0": {
|
|
11
11
|
readonly "appimage-tools-runtime-20251108.tar.gz": "098182ab8d3bb93db8a23691671f665ff92316249ace850aec63b9d010ec7fe0";
|
|
12
12
|
};
|
|
13
|
+
readonly "1.2.0": {
|
|
14
|
+
readonly "appimage-tools-runtime-20251108.tar.gz": "ee120b9454caefe88cec87f77f1e7ee32de779433b5596f220aaf6c80d63a597";
|
|
15
|
+
};
|
|
13
16
|
};
|
|
14
17
|
export declare function getAppImageTools(toolset: ToolsetConfig["appimage"], targetArch: Arch, resourcesDir: string): Promise<{
|
|
15
18
|
mksquashfs: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appimage.d.ts","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA6B,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAQnD,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"appimage.d.ts","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA6B,MAAM,cAAc,CAAA;AAE9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAQnD,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;CAapB,CAAA;AAEV,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM;;;;;GAwDhH"}
|
|
@@ -4,7 +4,7 @@ import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
|
4
4
|
import { getCustomToolsetPath } from "./custom.js";
|
|
5
5
|
import { resolveToolsetVersion } from "./version.js";
|
|
6
6
|
// Newest AppImage bundle — selected when the config is unset / null / "latest".
|
|
7
|
-
const APPIMAGE_LATEST = "1.
|
|
7
|
+
const APPIMAGE_LATEST = "1.2.0";
|
|
8
8
|
export const appimageChecksums = {
|
|
9
9
|
"0.0.0": {
|
|
10
10
|
"appimage-12.0.1.7z": "d12ff7eb8f1d1ec4652ca5237a7fbdca33acc0c758045636feca62dc6ecb8ec4",
|
|
@@ -15,6 +15,9 @@ export const appimageChecksums = {
|
|
|
15
15
|
"1.1.0": {
|
|
16
16
|
"appimage-tools-runtime-20251108.tar.gz": "098182ab8d3bb93db8a23691671f665ff92316249ace850aec63b9d010ec7fe0",
|
|
17
17
|
},
|
|
18
|
+
"1.2.0": {
|
|
19
|
+
"appimage-tools-runtime-20251108.tar.gz": "ee120b9454caefe88cec87f77f1e7ee32de779433b5596f220aaf6c80d63a597",
|
|
20
|
+
},
|
|
18
21
|
};
|
|
19
22
|
export async function getAppImageTools(toolset, targetArch, resourcesDir) {
|
|
20
23
|
const runtimeArch = targetArch === Arch.armv7l ? "arm32" : targetArch === Arch.arm64 ? "arm64" : targetArch === Arch.ia32 ? "ia32" : "x64";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appimage.js","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,gFAAgF;AAChF,MAAM,eAAe,GAAG,OAAO,CAAA;AAE/B,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE;QACP,oBAAoB,EAAE,kEAAkE;KACzF;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;CACO,CAAA;AAEV,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,OAAkC,EAAE,UAAgB,EAAE,YAAoB;IAC/G,MAAM,WAAW,GAAG,UAAU,KAAK,IAAI,CAAC,MAA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M,OAAO,GAAG,OAAO,KAAK,OAAO,CAAA;IACnC,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC;QAChD,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,YAAY,OAAO,EAAE;QAChE,eAAe;QACf,SAAS;QACT,aAAa,EAAE,6CAA6C;KAC7D,CAAC,CAAA;IACF,OAAO,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AACvE,CAAC","sourcesContent":["import { Arch, InvalidConfigurationError } from \"builder-util\"\nimport * 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 AppImage bundle — selected when the config is unset / null / \"latest\".\nconst APPIMAGE_LATEST = \"1.
|
|
1
|
+
{"version":3,"file":"appimage.js","sourceRoot":"","sources":["../../src/toolsets/appimage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAC9D,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,gFAAgF;AAChF,MAAM,eAAe,GAAG,OAAO,CAAA;AAE/B,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE;QACP,oBAAoB,EAAE,kEAAkE;KACzF;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;IACD,OAAO,EAAE;QACP,wCAAwC,EAAE,kEAAkE;KAC7G;IACD,OAAO,EAAE;QACP,wCAAwC,EAA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A2B,iBAAiB,CAAC,OAAO,CAAC,CAAA;IACpE,iEAAiE;IACjE,MAAM,eAAe,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;IACjD,oGAAoG;IACpG,MAAM,OAAO,GAAG,OAAO,KAAK,OAAO,CAAA;IACnC,MAAM,YAAY,GAAG,MAAM,sBAAsB,CAAC;QAChD,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,YAAY,OAAO,EAAE;QAChE,eAAe;QACf,SAAS;QACT,aAAa,EAAE,6CAA6C;KAC7D,CAAC,CAAA;IACF,OAAO,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAA;AACvE,CAAC","sourcesContent":["import { Arch, InvalidConfigurationError } from \"builder-util\"\nimport * 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 AppImage bundle — selected when the config is unset / null / \"latest\".\nconst APPIMAGE_LATEST = \"1.2.0\"\n\nexport const appimageChecksums = {\n \"0.0.0\": {\n \"appimage-12.0.1.7z\": \"d12ff7eb8f1d1ec4652ca5237a7fbdca33acc0c758045636feca62dc6ecb8ec4\",\n },\n \"1.0.3\": {\n \"appimage-tools-runtime-20251108.tar.gz\": \"84021a78ee214ae6fd33a2d62a92ba25542dd10bc86bf117a9b2d0bba44e7665\",\n },\n \"1.1.0\": {\n \"appimage-tools-runtime-20251108.tar.gz\": \"098182ab8d3bb93db8a23691671f665ff92316249ace850aec63b9d010ec7fe0\",\n },\n \"1.2.0\": {\n \"appimage-tools-runtime-20251108.tar.gz\": \"ee120b9454caefe88cec87f77f1e7ee32de779433b5596f220aaf6c80d63a597\",\n },\n} as const\n\nexport async function getAppImageTools(toolset: ToolsetConfig[\"appimage\"], targetArch: Arch, resourcesDir: string) {\n const runtimeArch = targetArch === Arch.armv7l ? \"arm32\" : targetArch === Arch.arm64 ? \"arm64\" : targetArch === Arch.ia32 ? \"ia32\" : \"x64\"\n\n // Static-runtime layout: tools at root, runtimes/ subdir, lib/{arch}/ subdir\n const getPaths = (artifactPath: string) => ({\n mksquashfs: path.resolve(artifactPath, \"mksquashfs\"),\n desktopFileValidate: path.resolve(artifactPath, \"desktop-file-validate\"),\n runtime: path.resolve(artifactPath, \"runtimes\", `runtime-${runtimeArch}`),\n runtimeLibraries: path.resolve(artifactPath, \"lib\", runtimeArch),\n })\n\n // FUSE2 layout: tools under a host-platform subdir; runtime files at root with target-arch suffix\n const getFuse2Paths = (artifactPath: string) => {\n // mksquashfs/desktop-file-validate are HOST binaries — use process.arch, not targetArch\n const hostArch = process.arch === \"arm\" ? \"arm32\" : process.arch === \"arm64\" ? \"arm64\" : process.arch === \"ia32\" ? \"ia32\" : \"x64\"\n const toolRoot = process.platform === \"linux\" ? `linux-${hostArch}` : \"darwin\"\n // Runtime files live at root; armv7l target uses \"armv7l\" filename, not the internal \"arm32\" alias\n const runtimeSuffix = targetArch === Arch.armv7l ? \"armv7l\" : runtimeArch\n // FUSE2 tree only ships lib/ia32 and lib/x64; arm targets fall back to x64 here\n const libArch = targetArch === Arch.ia32 ? \"ia32\" : \"x64\"\n return {\n mksquashfs: path.resolve(artifactPath, toolRoot, \"mksquashfs\"),\n desktopFileValidate: path.resolve(artifactPath, toolRoot, \"desktop-file-validate\"),\n runtime: path.resolve(artifactPath, `runtime-${runtimeSuffix}`),\n runtimeLibraries: path.resolve(artifactPath, \"lib\", libArch),\n }\n }\n\n if (typeof toolset === \"object\" && toolset != null) {\n const vendorPath = await getCustomToolsetPath(toolset, resourcesDir)\n return getPaths(vendorPath)\n }\n\n // Unset / null / \"latest\" → newest; an explicit pin selects exactly that release.\n const version = resolveToolsetVersion(toolset, APPIMAGE_LATEST)\n // The `toolsets.appimage` type and scheme.json only admit known versions, but a programmatic config\n // bypasses both. Never forward an unknown version: without a checksum entry the downloader would run\n // with integrity verification disabled.\n if (!Object.prototype.hasOwnProperty.call(appimageChecksums, version)) {\n throw new InvalidConfigurationError(\n `Unknown toolsets.appimage version \"${version}\". Known versions: ${Object.keys(appimageChecksums).join(\", \")} (or \"latest\"). ` +\n `To use a custom bundle, set toolsets.appimage to a ToolsetCustom object (url + checksum) instead.`\n )\n }\n const checksums: Record<string, string> = appimageChecksums[version]\n // Each release ships a single archive: its checksum entry's key.\n const filenameWithExt = Object.keys(checksums)[0]\n // Only the explicit legacy pin selects the FUSE2 runtime, published under the pre-v27 release name.\n const isFuse2 = version === \"0.0.0\"\n const artifactPath = await downloadBuilderToolset({\n releaseName: isFuse2 ? \"appimage-12.0.1\" : `appimage@${version}`,\n filenameWithExt,\n checksums,\n githubOrgRepo: \"electron-userland/electron-builder-binaries\",\n })\n return isFuse2 ? getFuse2Paths(artifactPath) : getPaths(artifactPath)\n}\n"]}
|
package/dist/toolsets/nsis.js
CHANGED
|
@@ -42,7 +42,7 @@ export function assertInstallerDebugLoggingSupported(nsis, targetName) {
|
|
|
42
42
|
throw new InvalidConfigurationError(`\`installerDebugLogging\` (${targetName} target) needs a log-enabled NSIS (makensis and stubs compiled with NSIS_CONFIG_LOG=yes), ` +
|
|
43
43
|
`but \`toolsets.nsis\` is ${nsis == null ? "unset" : `"${nsis}"`}, which selects a bundled NSIS that is not log-enabled.\n` +
|
|
44
44
|
" Supply a log-enabled NSIS bundle as a custom `toolsets.nsis: { url, checksum, version }`, or remove `installerDebugLogging`.\n" +
|
|
45
|
-
" https://www.electron.build/docs/migration/v27-
|
|
45
|
+
" https://www.electron.build/docs/migration/v27-config-changes#customnsisbinary-and-customnsisresources-replaced-by-toolsetsnsis");
|
|
46
46
|
}
|
|
47
47
|
async function getNsisBundlePath(nsis, resourcesDir) {
|
|
48
48
|
if (typeof nsis === "object" && nsis != null) {
|
|
@@ -1 +1 @@
|
|
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CAAC,CAAC,CAAA;AACpE,CAAC","sourcesContent":["import { exists, InvalidConfigurationError } 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\n/**\n * `installerDebugLogging` emits `LogSet`, which only a `makensis` compiled with `NSIS_CONFIG_LOG=yes` accepts (\"LogSet specified,\n * NSIS_CONFIG_LOG not defined\" otherwise). The bundled NSIS toolsets are not log-enabled, so only a custom bundle can support it.\n */\nexport function assertInstallerDebugLoggingSupported(nsis: ToolsetConfig[\"nsis\"] | Nullish, targetName: string): void {\n if (typeof nsis === \"object\" && nsis != null) {\n return\n }\n throw new InvalidConfigurationError(\n `\\`installerDebugLogging\\` (${targetName} target) needs a log-enabled NSIS (makensis and stubs compiled with NSIS_CONFIG_LOG=yes), ` +\n `but \\`toolsets.nsis\\` is ${nsis == null ? \"unset\" : `\"${nsis}\"`}, which selects a bundled NSIS that is not log-enabled.\\n` +\n \" Supply a log-enabled NSIS bundle as a custom `toolsets.nsis: { url, checksum, version }`, or remove `installerDebugLogging`.\\n\" +\n \" https://www.electron.build/docs/migration/v27-config-changes#customnsisbinary-and-customnsisresources-replaced-by-toolsetsnsis\"\n )\n}\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"]}
|
package/dist/toolsets/wine.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { Nullish } from "builder-util-runtime";
|
|
2
2
|
import { ToolsetConfig } from "../configuration.js";
|
|
3
|
+
/**
|
|
4
|
+
* @param wine `toolsets.wine`: a bundle, or `"system"` (the default) for the host Wine
|
|
5
|
+
*/
|
|
3
6
|
export declare function getWineToolset(wine: ToolsetConfig["wine"] | Nullish, resourcesDir: string): Promise<{
|
|
4
7
|
execPath: string;
|
|
5
8
|
env: Record<string, string>;
|
|
@@ -1 +1 @@
|
|
|
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;AAoBnD,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,
|
|
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;AAoBnD;;GAEG;AACH,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,CA+D5J"}
|
package/dist/toolsets/wine.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { exists, InvalidConfigurationError, sanitizeDirPath } from "builder-util";
|
|
1
|
+
import { Executables, exists, InvalidConfigurationError, sanitizeDirPath } 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
5
|
const githubOrgRepo = "electron-userland/electron-builder-binaries";
|
|
6
6
|
// What an unset / null / "latest" config resolves to. Not necessarily a bundle version: the published
|
|
7
|
-
// wine@1.0.1 bundles ship no PE builtins, so the default is the host wine
|
|
7
|
+
// wine@1.0.1 bundles ship no PE builtins, so the default is the host wine (toolsets.executables.wine or its install locations).
|
|
8
8
|
const WINE_LATEST = "system";
|
|
9
9
|
const wineToolsChecksums = {
|
|
10
10
|
"0.0.0": {
|
|
@@ -15,6 +15,9 @@ const wineToolsChecksums = {
|
|
|
15
15
|
"wine-11.0-linux-x86_64.tar.xz": "d8cf95442957b75c07166540142c96d8f7be6a68a572cc656194e7b42e8a0f13",
|
|
16
16
|
},
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* @param wine `toolsets.wine`: a bundle, or `"system"` (the default) for the host Wine
|
|
20
|
+
*/
|
|
18
21
|
export async function getWineToolset(wine, resourcesDir) {
|
|
19
22
|
if (process.platform === "win32") {
|
|
20
23
|
// oxlint-disable-next-line typescript/no-base-to-string -- pre-existing message; a custom toolset object prints as "[object Object]", changing it is out of scope for the lint migration
|
|
@@ -24,6 +27,12 @@ export async function getWineToolset(wine, resourcesDir) {
|
|
|
24
27
|
// Resolve the "latest"/unset alias up front so every branch below sees a concrete toolset, and an
|
|
25
28
|
// explicitly requested version is never silently swapped for whatever WINE_LATEST points at.
|
|
26
29
|
const toolset = wine == null || wine === "latest" ? WINE_LATEST : wine;
|
|
30
|
+
// on Linux a version string selects no bundle (the host Wine is always used), so only a custom bundle conflicts there; and only a
|
|
31
|
+
// toolsets.executables.wine with a location for this operating system conflicts, not one written for the other hosts of a shared config
|
|
32
|
+
const isBundle = typeof toolset === "object" || (toolset !== "system" && process.platform !== "linux");
|
|
33
|
+
if (isBundle && Executables.isConfigured("wine")) {
|
|
34
|
+
throw new InvalidConfigurationError(`toolsets.wine selects a Wine bundle (${typeof toolset === "object" ? "a custom toolset" : `"${toolset}"`}) and toolsets.executables.wine a host Wine: set only one of them`);
|
|
35
|
+
}
|
|
27
36
|
let toolsetPath;
|
|
28
37
|
let execSubPath;
|
|
29
38
|
if (typeof toolset === "object") {
|
|
@@ -32,10 +41,10 @@ export async function getWineToolset(wine, resourcesDir) {
|
|
|
32
41
|
execSubPath = (await exists(path.join(toolsetPath, "bin", "wine"))) ? "bin/wine" : "bin/wine64";
|
|
33
42
|
}
|
|
34
43
|
else if (toolset === "system" || process.platform === "linux") {
|
|
35
|
-
// Host wine on PATH. Linux ships no portable bundle so it always
|
|
36
|
-
// opt in with `toolsets.wine: "system"` — the replacement for the `USE_SYSTEM_WINE` env var
|
|
44
|
+
// Host wine, by absolute path from toolsets.executables.wine or its default install locations — never looked up on PATH. Linux ships no portable bundle so it always
|
|
45
|
+
// lands here; other platforms opt in with `toolsets.wine: "system"` — the replacement for the `USE_SYSTEM_WINE` env var
|
|
37
46
|
// removed in v27.
|
|
38
|
-
return { execPath: "wine", env: defaultEnv };
|
|
47
|
+
return { execPath: Executables.resolve("wine"), env: defaultEnv };
|
|
39
48
|
}
|
|
40
49
|
else if (toolset === "0.0.0") {
|
|
41
50
|
// Explicit opt-in to the legacy wine-4.0.1-mac bundle (pre-v27).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wine.js","sourceRoot":"","sources":["../../src/toolsets/wine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"wine.js","sourceRoot":"","sources":["../../src/toolsets/wine.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9F,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAE5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,aAAa,GAAG,6CAA6C,CAAA;AAEnE,sGAAsG;AACtG,gIAAgI;AAChI,MAAM,WAAW,GAAG,QAAQ,CAAA;A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AAM,CAAC,SAAS,CAAC,EAAE,CAAC;YAC5B,WAAW,GAAG,SAAS,CAAA;YACvB,MAAK;QACP,CAAC;IACH,CAAC;IACD,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACxB,MAAM,IAAI,yBAAyB,CAAC,oBAAoB,WAAW,wDAAwD,CAAC,CAAA;IAC9H,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,CAAA;AAC9C,CAAC","sourcesContent":["import { Executables, exists, InvalidConfigurationError, sanitizeDirPath } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport * as path from \"path\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\n\nconst githubOrgRepo = \"electron-userland/electron-builder-binaries\"\n\n// What an unset / null / \"latest\" config resolves to. Not necessarily a bundle version: the published\n// wine@1.0.1 bundles ship no PE builtins, so the default is the host wine (toolsets.executables.wine or its install locations).\nconst WINE_LATEST = \"system\"\n\nconst wineToolsChecksums: Record<string, Record<string, string>> = {\n \"0.0.0\": {\n \"wine-4.0.1-mac.7z\": \"1baac808a67975b68b9226beea7b64ad0acc3e598a4b45c25bb5d2ae8cac655e\",\n },\n \"1.0.1\": {\n \"wine-11.0-darwin-x86_64.tar.xz\": \"0a4a43867ef225c70ed8d4198aaba24a55cb0e52e5d67b0ac99563e6351a3c61\",\n \"wine-11.0-linux-x86_64.tar.xz\": \"d8cf95442957b75c07166540142c96d8f7be6a68a572cc656194e7b42e8a0f13\",\n },\n}\n\n/**\n * @param wine `toolsets.wine`: a bundle, or `\"system\"` (the default) for the host Wine\n */\nexport async function getWineToolset(wine: ToolsetConfig[\"wine\"] | Nullish, resourcesDir: string): Promise<{ execPath: string; env: Record<string, string> }> {\n if (process.platform === \"win32\") {\n // oxlint-disable-next-line typescript/no-base-to-string -- pre-existing message; a custom toolset object prints as \"[object Object]\", changing it is out of scope for the lint migration\n throw new InvalidConfigurationError(`Wine toolset is not supported on Windows, but got: ${wine}`)\n }\n\n const defaultEnv = { WINEDEBUG: \"-all,err+all\", WINEDLLOVERRIDES: \"winemenubuilder.exe=d\" }\n\n // Resolve the \"latest\"/unset alias up front so every branch below sees a concrete toolset, and an\n // explicitly requested version is never silently swapped for whatever WINE_LATEST points at.\n const toolset = wine == null || wine === \"latest\" ? WINE_LATEST : wine\n // on Linux a version string selects no bundle (the host Wine is always used), so only a custom bundle conflicts there; and only a\n // toolsets.executables.wine with a location for this operating system conflicts, not one written for the other hosts of a shared config\n const isBundle = typeof toolset === \"object\" || (toolset !== \"system\" && process.platform !== \"linux\")\n if (isBundle && Executables.isConfigured(\"wine\")) {\n throw new InvalidConfigurationError(\n `toolsets.wine selects a Wine bundle (${typeof toolset === \"object\" ? \"a custom toolset\" : `\"${toolset}\"`}) and toolsets.executables.wine a host Wine: set only one of them`\n )\n }\n\n let toolsetPath: string\n let execSubPath: string\n\n if (typeof toolset === \"object\") {\n // Custom toolset — honored on every platform (never overridden by the host-wine branch below).\n toolsetPath = await getCustomToolsetPath(toolset, resourcesDir)\n execSubPath = (await exists(path.join(toolsetPath, \"bin\", \"wine\"))) ? \"bin/wine\" : \"bin/wine64\"\n } else if (toolset === \"system\" || process.platform === \"linux\") {\n // Host wine, by absolute path from toolsets.executables.wine or its default install locations — never looked up on PATH. Linux ships no portable bundle so it always\n // lands here; other platforms opt in with `toolsets.wine: \"system\"` — the replacement for the `USE_SYSTEM_WINE` env var\n // removed in v27.\n return { execPath: Executables.resolve(\"wine\"), env: defaultEnv }\n } else if (toolset === \"0.0.0\") {\n // Explicit opt-in to the legacy wine-4.0.1-mac bundle (pre-v27).\n toolsetPath = await downloadBuilderToolset({\n releaseName: \"wine-4.0.1-mac\",\n filenameWithExt: \"wine-4.0.1-mac.7z\",\n checksums: wineToolsChecksums[\"0.0.0\"],\n githubOrgRepo,\n })\n execSubPath = path.join(\"bin\", \"wine64\")\n } else {\n // Explicitly requested bundle version, e.g. \"1.0.1\" → wine@1.0.1 (wine 11; arm64 macOS via Rosetta).\n const file = process.platform === \"darwin\" ? \"wine-11.0-darwin-x86_64.tar.xz\" : \"wine-11.0-linux-x86_64.tar.xz\"\n toolsetPath = await downloadBuilderToolset({\n releaseName: `wine@${toolset}`,\n filenameWithExt: file,\n checksums: wineToolsChecksums[toolset],\n githubOrgRepo,\n })\n execSubPath = (await exists(path.join(toolsetPath, \"bin\", \"wine\"))) ? \"bin/wine\" : \"bin/wine64\"\n }\n\n const { execPath, winePrefix, wineLibPath } = await createWineEnvironment(toolsetPath, execSubPath)\n return {\n execPath,\n env: {\n ...defaultEnv,\n WINEPREFIX: winePrefix,\n DYLD_FALLBACK_LIBRARY_PATH: [wineLibPath, process.env.DYLD_FALLBACK_LIBRARY_PATH].filter(Boolean).join(path.delimiter),\n LD_LIBRARY_PATH: [wineLibPath, process.env.LD_LIBRARY_PATH].filter(Boolean).join(path.delimiter),\n },\n }\n}\n\nasync function createWineEnvironment(toolsetPath: string, execSubPath: string) {\n const sanitizedWinePath = sanitizeDirPath(toolsetPath)\n\n const execPath = path.resolve(sanitizedWinePath, execSubPath)\n const winePrefix = path.resolve(sanitizedWinePath, \"wine-home\")\n\n for (const p of [execPath, winePrefix]) {\n if (!(await exists(p))) {\n throw new InvalidConfigurationError(`Wine toolset at \"${toolsetPath}\" is missing expected path: ${p}`)\n }\n }\n\n // Modern bundles ship a `lib` dir; the legacy wine-4.0.1-mac bundle ships `lib64` instead.\n let wineLibPath: string | null = null\n for (const libDir of [\"lib\", \"lib64\"]) {\n const candidate = path.resolve(sanitizedWinePath, libDir)\n if (await exists(candidate)) {\n wineLibPath = candidate\n break\n }\n }\n if (wineLibPath == null) {\n throw new InvalidConfigurationError(`Wine toolset at \"${toolsetPath}\" is missing expected library directory (lib or lib64)`)\n }\n\n return { execPath, winePrefix, wineLibPath }\n}\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Arch } from "builder-util";
|
|
2
|
+
import { Nullish } from "builder-util-runtime";
|
|
3
|
+
import { ToolsetConfig } from "../configuration.js";
|
|
4
|
+
export declare const wixChecksums: {
|
|
5
|
+
readonly "0.0.0": {
|
|
6
|
+
readonly "wix-4.0.0.5512.2.7z": "fe677fcd837b18c9b912985d91636bbd8a1e800c3b3a6a841b6f96e89624e839";
|
|
7
|
+
};
|
|
8
|
+
readonly "2.0.0": {
|
|
9
|
+
readonly "wix-3.14.1.tar.gz": "8f1a5a017042cb287b11b8056ed8e29f86ebe456b09086c4f510b56659e014d5";
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The `.wxs` dialect a WiX bundle compiles. The legacy bundle is a WiX 4 preview (4.0.0.5512) that still ships `candle` /
|
|
14
|
+
* `light`: it reads the v4 namespace and accepts v4 conveniences (the inline directory syntax `Name="APPLICATIONFOLDER:\sub\"`,
|
|
15
|
+
* `Component/@Directory` inside a `ComponentGroup` that sets one) but has no `arm64`. WiX 3 needs every directory as a nested
|
|
16
|
+
* `Directory` element and every component in its own directory, and supports `-arch arm64`.
|
|
17
|
+
*/
|
|
18
|
+
export type WixSchema = "v3" | "v4-preview";
|
|
19
|
+
/** A WiX bundle on disk and the `.wxs` dialect it compiles. */
|
|
20
|
+
export interface WixToolset {
|
|
21
|
+
readonly path: string;
|
|
22
|
+
readonly schema: WixSchema;
|
|
23
|
+
}
|
|
24
|
+
/** The `xmlns` of a `.wxs` document in `schema`. */
|
|
25
|
+
export declare function getWixNamespace(schema: WixSchema): string;
|
|
26
|
+
/** The WiX 4 namespaces (`http://wixtoolset.org/schemas/v4/...`) that a `.wxs` project declares, each once. */
|
|
27
|
+
export declare function findWix4Namespaces(project: string): Array<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Fails a WiX 3 build whose project declares a WiX 4 namespace, which only an `msiProjectCreated` hook can add (the
|
|
30
|
+
* generated project uses the WiX 3 ones). candle would reject it with an "unhandled extension element" error that
|
|
31
|
+
* doesn't say the bundle is the cause.
|
|
32
|
+
*/
|
|
33
|
+
export declare function assertNoWix4Namespaces(project: string, schema: WixSchema): void;
|
|
34
|
+
/** Resolves a `toolsets.wix` version: unset or `"latest"` is the newest bundle, `"0.0.0"` the legacy one. */
|
|
35
|
+
export declare function resolveWixVersion(wix: Exclude<ToolsetConfig["wix"], object> | Nullish): "0.0.0" | "2.0.0";
|
|
36
|
+
export declare function getWixToolset(wix: ToolsetConfig["wix"] | Nullish, resourcesDir: string): Promise<WixToolset>;
|
|
37
|
+
/**
|
|
38
|
+
* The architecture an MSI is built for: arm64 needs a toolset that supports it, otherwise it falls back to x64 (the
|
|
39
|
+
* x64 package then runs on Windows on Arm under emulation).
|
|
40
|
+
*/
|
|
41
|
+
export declare function getWixArch(arch: Arch, schema: WixSchema): Arch;
|
|
42
|
+
/** The value of `candle -arch` for `wixArch`. */
|
|
43
|
+
export declare function getCandleArch(wixArch: Arch): "x86" | "x64" | "arm64";
|
|
44
|
+
//# sourceMappingURL=wix.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wix.d.ts","sourceRoot":"","sources":["../../src/toolsets/wix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA6B,MAAM,cAAc,CAAA;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AASnD,eAAO,MAAM,YAAY;;;;;;;CAQf,CAAA;AAEV;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,YAAY,CAAA;AAE3C,+DAA+D;AAC/D,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;CAC3B;AAED,oDAAoD;AACpD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,MAAM,CAEzD;AAID,+GAA+G;AAC/G,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAe/E;AAED,6GAA6G;AAC7G,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAEzG;AAED,wBAAsB,aAAa,CAAC,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC,GAAG,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAuBlH;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CAE9D;AAED,iDAAiD;AACjD,wBAAgB,aAAa,CAAC,OAAO,EAAE,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CASpE"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Arch, InvalidConfigurationError } from "builder-util";
|
|
2
|
+
import { BUILD_CHANGES_URL } from "../util/config/legacyOptions.js";
|
|
3
|
+
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
4
|
+
import { getCustomToolsetPath } from "./custom.js";
|
|
5
|
+
import { resolveToolsetVersion } from "./version.js";
|
|
6
|
+
// Newest WiX bundle — selected when the config is unset or "latest".
|
|
7
|
+
const WIX_LATEST = "2.0.0";
|
|
8
|
+
export const wixChecksums = {
|
|
9
|
+
"0.0.0": {
|
|
10
|
+
"wix-4.0.0.5512.2.7z": "fe677fcd837b18c9b912985d91636bbd8a1e800c3b3a6a841b6f96e89624e839",
|
|
11
|
+
},
|
|
12
|
+
"2.0.0": {
|
|
13
|
+
// WiX Toolset v3.14.1 (candle/light)
|
|
14
|
+
"wix-3.14.1.tar.gz": "8f1a5a017042cb287b11b8056ed8e29f86ebe456b09086c4f510b56659e014d5",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
/** The `xmlns` of a `.wxs` document in `schema`. */
|
|
18
|
+
export function getWixNamespace(schema) {
|
|
19
|
+
return schema === "v3" ? "http://schemas.microsoft.com/wix/2006/wi" : "http://wixtoolset.org/schemas/v4/wxs";
|
|
20
|
+
}
|
|
21
|
+
const WIX4_NAMESPACE_PATTERN = /\bxmlns(?::[\w.-]+)?\s*=\s*(["'])(http:\/\/wixtoolset\.org\/schemas\/v4\/[^"']*)\1/g;
|
|
22
|
+
/** The WiX 4 namespaces (`http://wixtoolset.org/schemas/v4/...`) that a `.wxs` project declares, each once. */
|
|
23
|
+
export function findWix4Namespaces(project) {
|
|
24
|
+
return [...new Set(Array.from(project.matchAll(WIX4_NAMESPACE_PATTERN), it => it[2]))];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Fails a WiX 3 build whose project declares a WiX 4 namespace, which only an `msiProjectCreated` hook can add (the
|
|
28
|
+
* generated project uses the WiX 3 ones). candle would reject it with an "unhandled extension element" error that
|
|
29
|
+
* doesn't say the bundle is the cause.
|
|
30
|
+
*/
|
|
31
|
+
export function assertNoWix4Namespaces(project, schema) {
|
|
32
|
+
if (schema !== "v3") {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const namespaces = findWix4Namespaces(project);
|
|
36
|
+
if (namespaces.length === 0) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
throw new InvalidConfigurationError(`The MSI project declares the WiX 4 namespace ${namespaces.map(it => `"${it}"`).join(", ")}, most likely from an msiProjectCreated hook, ` +
|
|
40
|
+
`but the WiX 3 toolset reads WiX 3 namespaces only (electron-builder v27 builds MSIs with WiX 3.14.1 by default, toolsets.wix "latest"). ` +
|
|
41
|
+
`Use the WiX 3 namespace (for example "http://schemas.microsoft.com/wix/UtilExtension" instead of "http://wixtoolset.org/schemas/v4/wxs/util"), ` +
|
|
42
|
+
`or set toolsets.wix to "0.0.0" to keep the legacy WiX 4 preview bundle. ` +
|
|
43
|
+
`See ${BUILD_CHANGES_URL}#toolset-defaults-resolve-to-latest-newest-bundle`);
|
|
44
|
+
}
|
|
45
|
+
/** Resolves a `toolsets.wix` version: unset or `"latest"` is the newest bundle, `"0.0.0"` the legacy one. */
|
|
46
|
+
export function resolveWixVersion(wix) {
|
|
47
|
+
return resolveToolsetVersion(wix, WIX_LATEST);
|
|
48
|
+
}
|
|
49
|
+
export async function getWixToolset(wix, resourcesDir) {
|
|
50
|
+
if (typeof wix === "object" && wix != null) {
|
|
51
|
+
// a custom bundle must mirror the WiX v3 layout (candle.exe, light.exe and the extensions at its root)
|
|
52
|
+
return { path: await getCustomToolsetPath(wix, resourcesDir), schema: "v3" };
|
|
53
|
+
}
|
|
54
|
+
const resolved = resolveWixVersion(wix);
|
|
55
|
+
if (resolved === "0.0.0") {
|
|
56
|
+
const file = "wix-4.0.0.5512.2.7z";
|
|
57
|
+
// noinspection SpellCheckingInspection
|
|
58
|
+
const toolsetPath = await downloadBuilderToolset({
|
|
59
|
+
releaseName: "wix-4.0.0.5512.2",
|
|
60
|
+
filenameWithExt: file,
|
|
61
|
+
checksums: { [file]: wixChecksums["0.0.0"][file] },
|
|
62
|
+
});
|
|
63
|
+
return { path: toolsetPath, schema: "v4-preview" };
|
|
64
|
+
}
|
|
65
|
+
const file = "wix-3.14.1.tar.gz";
|
|
66
|
+
const toolsetPath = await downloadBuilderToolset({
|
|
67
|
+
releaseName: `wix@${resolved}`,
|
|
68
|
+
filenameWithExt: file,
|
|
69
|
+
checksums: { [file]: wixChecksums[resolved][file] },
|
|
70
|
+
});
|
|
71
|
+
return { path: toolsetPath, schema: "v3" };
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The architecture an MSI is built for: arm64 needs a toolset that supports it, otherwise it falls back to x64 (the
|
|
75
|
+
* x64 package then runs on Windows on Arm under emulation).
|
|
76
|
+
*/
|
|
77
|
+
export function getWixArch(arch, schema) {
|
|
78
|
+
return arch === Arch.arm64 && schema !== "v3" ? Arch.x64 : arch;
|
|
79
|
+
}
|
|
80
|
+
/** The value of `candle -arch` for `wixArch`. */
|
|
81
|
+
export function getCandleArch(wixArch) {
|
|
82
|
+
switch (wixArch) {
|
|
83
|
+
case Arch.ia32:
|
|
84
|
+
return "x86";
|
|
85
|
+
case Arch.arm64:
|
|
86
|
+
return "arm64";
|
|
87
|
+
default:
|
|
88
|
+
return "x64";
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=wix.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wix.js","sourceRoot":"","sources":["../../src/toolsets/wix.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEpD,qEAAqE;AACrE,MAAM,UAAU,GAAG,OAAO,CAAA;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE;QACP,qBAAqB,EAAE,kEAAkE;KAC1F;IACD,OAAO,EAAE;QACP,qCAAqC;QACrC,mBAAmB,EAAE,kEAAkE;KACxF;CACO,CAAA;AAgBV,oDAAoD;AACpD,MAAM,UAAU,eAAe,CAAC,MAAiB;IAC/C,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,0CAA0C,CAAC,CAAC,CAAC,sCAAsC,CAAA;AAC9G,CAAC;AAED,MAAM,sBAAsB,GAAG,qFAAqF,CAAA;AAEpH,+GAA+G;AAC/G,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,C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AAA;QAClC,uCAAuC;QACvC,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC;YAC/C,WAAW,EAAE,kBAAkB;YAC/B,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE;SACnD,CAAC,CAAA;QACF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,CAAA;IACpD,CAAC;IACD,MAAM,IAAI,GAAG,mBAAmB,CAAA;IAChC,MAAM,WAAW,GAAG,MAAM,sBAAsB,CAAC;QAC/C,WAAW,EAAE,OAAO,QAAQ,EAAE;QAC9B,eAAe,EAAE,IAAI;QACrB,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE;KACpD,CAAC,CAAA;IACF,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,IAAU,EAAE,MAAiB;IACtD,OAAO,IAAI,KAAK,IAAI,CAAC,KAAK,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AACjE,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,aAAa,CAAC,OAAa;IACzC,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,IAAI,CAAC,IAAI;YACZ,OAAO,KAAK,CAAA;QACd,KAAK,IAAI,CAAC,KAAK;YACb,OAAO,OAAO,CAAA;QAChB;YACE,OAAO,KAAK,CAAA;IAChB,CAAC;AACH,CAAC","sourcesContent":["import { Arch, InvalidConfigurationError } from \"builder-util\"\nimport { Nullish } from \"builder-util-runtime\"\nimport { ToolsetConfig } from \"../configuration.js\"\nimport { BUILD_CHANGES_URL } from \"../util/config/legacyOptions.js\"\nimport { downloadBuilderToolset } from \"../util/electronGet.js\"\nimport { getCustomToolsetPath } from \"./custom.js\"\nimport { resolveToolsetVersion } from \"./version.js\"\n\n// Newest WiX bundle — selected when the config is unset or \"latest\".\nconst WIX_LATEST = \"2.0.0\"\n\nexport const wixChecksums = {\n \"0.0.0\": {\n \"wix-4.0.0.5512.2.7z\": \"fe677fcd837b18c9b912985d91636bbd8a1e800c3b3a6a841b6f96e89624e839\",\n },\n \"2.0.0\": {\n // WiX Toolset v3.14.1 (candle/light)\n \"wix-3.14.1.tar.gz\": \"8f1a5a017042cb287b11b8056ed8e29f86ebe456b09086c4f510b56659e014d5\",\n },\n} as const\n\n/**\n * The `.wxs` dialect a WiX bundle compiles. The legacy bundle is a WiX 4 preview (4.0.0.5512) that still ships `candle` /\n * `light`: it reads the v4 namespace and accepts v4 conveniences (the inline directory syntax `Name=\"APPLICATIONFOLDER:\\sub\\\"`,\n * `Component/@Directory` inside a `ComponentGroup` that sets one) but has no `arm64`. WiX 3 needs every directory as a nested\n * `Directory` element and every component in its own directory, and supports `-arch arm64`.\n */\nexport type WixSchema = \"v3\" | \"v4-preview\"\n\n/** A WiX bundle on disk and the `.wxs` dialect it compiles. */\nexport interface WixToolset {\n readonly path: string\n readonly schema: WixSchema\n}\n\n/** The `xmlns` of a `.wxs` document in `schema`. */\nexport function getWixNamespace(schema: WixSchema): string {\n return schema === \"v3\" ? \"http://schemas.microsoft.com/wix/2006/wi\" : \"http://wixtoolset.org/schemas/v4/wxs\"\n}\n\nconst WIX4_NAMESPACE_PATTERN = /\\bxmlns(?::[\\w.-]+)?\\s*=\\s*([\"'])(http:\\/\\/wixtoolset\\.org\\/schemas\\/v4\\/[^\"']*)\\1/g\n\n/** The WiX 4 namespaces (`http://wixtoolset.org/schemas/v4/...`) that a `.wxs` project declares, each once. */\nexport function findWix4Namespaces(project: string): Array<string> {\n return [...new Set(Array.from(project.matchAll(WIX4_NAMESPACE_PATTERN), it => it[2]))]\n}\n\n/**\n * Fails a WiX 3 build whose project declares a WiX 4 namespace, which only an `msiProjectCreated` hook can add (the\n * generated project uses the WiX 3 ones). candle would reject it with an \"unhandled extension element\" error that\n * doesn't say the bundle is the cause.\n */\nexport function assertNoWix4Namespaces(project: string, schema: WixSchema): void {\n if (schema !== \"v3\") {\n return\n }\n const namespaces = findWix4Namespaces(project)\n if (namespaces.length === 0) {\n return\n }\n throw new InvalidConfigurationError(\n `The MSI project declares the WiX 4 namespace ${namespaces.map(it => `\"${it}\"`).join(\", \")}, most likely from an msiProjectCreated hook, ` +\n `but the WiX 3 toolset reads WiX 3 namespaces only (electron-builder v27 builds MSIs with WiX 3.14.1 by default, toolsets.wix \"latest\"). ` +\n `Use the WiX 3 namespace (for example \"http://schemas.microsoft.com/wix/UtilExtension\" instead of \"http://wixtoolset.org/schemas/v4/wxs/util\"), ` +\n `or set toolsets.wix to \"0.0.0\" to keep the legacy WiX 4 preview bundle. ` +\n `See ${BUILD_CHANGES_URL}#toolset-defaults-resolve-to-latest-newest-bundle`\n )\n}\n\n/** Resolves a `toolsets.wix` version: unset or `\"latest\"` is the newest bundle, `\"0.0.0\"` the legacy one. */\nexport function resolveWixVersion(wix: Exclude<ToolsetConfig[\"wix\"], object> | Nullish): \"0.0.0\" | \"2.0.0\" {\n return resolveToolsetVersion(wix, WIX_LATEST)\n}\n\nexport async function getWixToolset(wix: ToolsetConfig[\"wix\"] | Nullish, resourcesDir: string): Promise<WixToolset> {\n if (typeof wix === \"object\" && wix != null) {\n // a custom bundle must mirror the WiX v3 layout (candle.exe, light.exe and the extensions at its root)\n return { path: await getCustomToolsetPath(wix, resourcesDir), schema: \"v3\" }\n }\n const resolved = resolveWixVersion(wix)\n if (resolved === \"0.0.0\") {\n const file = \"wix-4.0.0.5512.2.7z\"\n // noinspection SpellCheckingInspection\n const toolsetPath = await downloadBuilderToolset({\n releaseName: \"wix-4.0.0.5512.2\",\n filenameWithExt: file,\n checksums: { [file]: wixChecksums[\"0.0.0\"][file] },\n })\n return { path: toolsetPath, schema: \"v4-preview\" }\n }\n const file = \"wix-3.14.1.tar.gz\"\n const toolsetPath = await downloadBuilderToolset({\n releaseName: `wix@${resolved}`,\n filenameWithExt: file,\n checksums: { [file]: wixChecksums[resolved][file] },\n })\n return { path: toolsetPath, schema: \"v3\" }\n}\n\n/**\n * The architecture an MSI is built for: arm64 needs a toolset that supports it, otherwise it falls back to x64 (the\n * x64 package then runs on Windows on Arm under emulation).\n */\nexport function getWixArch(arch: Arch, schema: WixSchema): Arch {\n return arch === Arch.arm64 && schema !== \"v3\" ? Arch.x64 : arch\n}\n\n/** The value of `candle -arch` for `wixArch`. */\nexport function getCandleArch(wixArch: Arch): \"x86\" | \"x64\" | \"arm64\" {\n switch (wixArch) {\n case Arch.ia32:\n return \"x86\"\n case Arch.arm64:\n return \"arm64\"\n default:\n return \"x64\"\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appFileCopier.d.ts","sourceRoot":"","sources":["../../src/util/appFileCopier.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EAElB,eAAe,EAUhB,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAA;AAO1B,OAAO,EAAE,WAAW,EAA6B,MAAM,mBAAmB,CAAA;AAC1E,OAAO,EAAgC,EAAE,EAAE,MAAM,mCAAmC,CAAA;AACpF,OAAO,EAAyC,aAAa,EAAE,MAAM,2CAA2C,CAAA;AAChH,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAGzD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;
|
|
1
|
+
{"version":3,"file":"appFileCopier.d.ts","sourceRoot":"","sources":["../../src/util/appFileCopier.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EAElB,eAAe,EAUhB,MAAM,cAAc,CAA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W,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC1G;AAED,wBAAsB,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,eAAe,GAAG,IAAI,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAkBjL;AAiED,KAAK,oBAAoB,GAAG;IAAE,WAAW,EAAE,cAAc,EAAE,CAAC;IAAC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;CAAE,CAAA;AAEtG,0EAA0E;AAC1E,KAAK,eAAe,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAA;AA0B7E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,cAAc,EAAE,EAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,EAChD,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,GACvC,OAAO,CAaT;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,8BAA8B,CAAC,OAAO,EAAE;IAC5D,YAAY,EAAE,EAAE,EAAE,CAAA;IAClB,iBAAiB,EAAE,MAAM,EAAE,CAAA;IAC3B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;IAChD,GAAG,EAAE,eAAe,CAAA;CACrB,GAAG,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAgC5C"}
|
|
@@ -13,6 +13,7 @@ import { AppFileWalker } from "./AppFileWalker.js";
|
|
|
13
13
|
import { NodeModuleCopyHelper } from "./NodeModuleCopyHelper.js";
|
|
14
14
|
import { archToNodeCpu } from "./archCompatibility.js";
|
|
15
15
|
import { assertSourceFileInTrustedRoots } from "./trustedSourceRoots.js";
|
|
16
|
+
import { BUILD_CHANGES_URL } from "./config/legacyOptions.js";
|
|
16
17
|
export function getDestinationPath(file, fileSet) {
|
|
17
18
|
if (file === fileSet.src) {
|
|
18
19
|
return fileSet.destination;
|
|
@@ -320,7 +321,8 @@ export function enforceAllowMissingDependencies(allowMissingDependencies, logSum
|
|
|
320
321
|
}
|
|
321
322
|
throw new InvalidConfigurationError(`The following production dependencies could not be resolved during node-module collection:\n` +
|
|
322
323
|
fatal.map(id => ` - ${id}`).join("\n") +
|
|
323
|
-
`\nInstall the missing dependencies, list names in \`allowMissingDependencies\` to allow specific ones to be missing, or set \`allowMissingDependencies\` to true to only warn (electron-builder <= 26 behavior).`
|
|
324
|
+
`\nInstall the missing dependencies, list names in \`allowMissingDependencies\` to allow specific ones to be missing, or set \`allowMissingDependencies\` to true to only warn (electron-builder <= 26 behavior).` +
|
|
325
|
+
`\nSee ${BUILD_CHANGES_URL}#allowmissingdependencies-now-fails-the-build`);
|
|
324
326
|
}
|
|
325
327
|
/** @internal */
|
|
326
328
|
export async function collectNodeModulesWithLogging(platformPackager, arch) {
|
|
@@ -352,7 +354,11 @@ export async function collectNodeModulesWithLogging(platformPackager, arch) {
|
|
|
352
354
|
pmApproaches,
|
|
353
355
|
searchDirectories,
|
|
354
356
|
dependencies: platformPackager.originalMetadata.dependencies,
|
|
355
|
-
run: (pm, dir) => getCollectorByPackageManager(pm, dir, tempDirManager).getNodeModules({
|
|
357
|
+
run: (pm, dir) => getCollectorByPackageManager(pm, dir, tempDirManager).getNodeModules({
|
|
358
|
+
packageName: platformPackager.nodePackageName,
|
|
359
|
+
archFilter,
|
|
360
|
+
ignoredDependencies,
|
|
361
|
+
}),
|
|
356
362
|
});
|
|
357
363
|
if (!deps?.nodeModules?.length) {
|
|
358
364
|
log.warn({ searchDirectories: searchDirectories.map(it => log.filePath(it)) }, "no node modules returned while searching directories");
|
|
@@ -394,7 +400,7 @@ function warnAboutDeprecatedElectronPackages(nodeModules) {
|
|
|
394
400
|
for (const { name } of bundled) {
|
|
395
401
|
log.warn({ dependency: name, solution: `add "${name}" to ignoredProductionDependencies, or move it to devDependencies` }, `${name} is declared in dependencies and is being packaged into your app (${DEPRECATED_ELECTRON_PACKAGES[name]}). ` +
|
|
396
402
|
"electron-builder <= 26 rejected this outright; v27 removed that guard and does not exclude it by default. " +
|
|
397
|
-
"See https://www.electron.build/docs/migration/v27-
|
|
403
|
+
"See https://www.electron.build/docs/migration/v27-build-changes#electron-prebuilt-electron-rebuild-no-longer-error-and-are-not-excluded");
|
|
398
404
|
}
|
|
399
405
|
}
|
|
400
406
|
//# sourceMappingURL=appFileCopier.js.map
|