app-builder-lib 27.0.0-alpha.1 → 27.0.0-alpha.10
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/Framework.d.ts +2 -0
- package/dist/Framework.d.ts.map +1 -1
- package/dist/Framework.js.map +1 -1
- 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/asar/asar.js.map +1 -1
- package/dist/asar/asarFileChecker.d.ts +4 -2
- package/dist/asar/asarFileChecker.d.ts.map +1 -1
- package/dist/asar/asarFileChecker.js +2 -3
- package/dist/asar/asarFileChecker.js.map +1 -1
- package/dist/asar/asarUtil.js +21 -11
- package/dist/asar/asarUtil.js.map +1 -1
- package/dist/codeSign/certInfo.d.ts +14 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -1
- package/dist/codeSign/certInfo.js +49 -0
- package/dist/codeSign/certInfo.js.map +1 -1
- package/dist/codeSign/mac/macCodeSign.d.ts +3 -3
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -1
- package/dist/codeSign/mac/macCodeSign.js +50 -25
- package/dist/codeSign/mac/macCodeSign.js.map +1 -1
- package/dist/codeSign/signResult.d.ts +26 -0
- package/dist/codeSign/signResult.d.ts.map +1 -0
- package/dist/codeSign/signResult.js +12 -0
- package/dist/codeSign/signResult.js.map +1 -0
- package/dist/codeSign/win/hsmSignManager.d.ts +10 -0
- package/dist/codeSign/win/hsmSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/hsmSignManager.js +50 -0
- package/dist/codeSign/win/hsmSignManager.js.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts +14 -0
- package/dist/codeSign/win/pkcs11SignManager.d.ts.map +1 -0
- package/dist/codeSign/win/pkcs11SignManager.js +82 -0
- package/dist/codeSign/win/pkcs11SignManager.js.map +1 -0
- package/dist/codeSign/win/signManager.d.ts +17 -0
- package/dist/codeSign/win/signManager.d.ts.map +1 -0
- package/dist/codeSign/win/signManager.js +19 -0
- package/dist/codeSign/win/signManager.js.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts +95 -0
- package/dist/codeSign/win/signtoolBaseSignManager.d.ts.map +1 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js +507 -0
- package/dist/codeSign/win/signtoolBaseSignManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +2 -1
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -1
- package/dist/codeSign/win/windowsCodeSign.js +22 -8
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +11 -4
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignAzureManager.js +142 -37
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.d.ts +1 -58
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -1
- package/dist/codeSign/win/windowsSignToolManager.js +3 -363
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -1
- package/dist/configuration.d.ts +228 -163
- package/dist/configuration.d.ts.map +1 -1
- package/dist/configuration.js +11 -1
- package/dist/configuration.js.map +1 -1
- package/dist/core.d.ts +14 -0
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +11 -0
- package/dist/core.js.map +1 -1
- package/dist/electron/ElectronFramework.d.ts +3 -3
- package/dist/electron/ElectronFramework.d.ts.map +1 -1
- package/dist/electron/ElectronFramework.js +60 -61
- 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/injectFFMPEG.js +2 -2
- package/dist/electron/injectFFMPEG.js.map +1 -1
- package/dist/electron/mac/electronMac.js +24 -35
- 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/electron/win/electronWin.js +2 -2
- package/dist/electron/win/electronWin.js.map +1 -1
- package/dist/fileMatcher.d.ts +42 -2
- package/dist/fileMatcher.d.ts.map +1 -1
- package/dist/fileMatcher.js +246 -18
- package/dist/fileMatcher.js.map +1 -1
- package/dist/index.d.ts +11 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/indexInternal.d.ts +19 -8
- package/dist/indexInternal.d.ts.map +1 -1
- package/dist/indexInternal.js +18 -7
- package/dist/indexInternal.js.map +1 -1
- package/dist/linuxPackager.d.ts.map +1 -1
- package/dist/linuxPackager.js +19 -1
- package/dist/linuxPackager.js.map +1 -1
- package/dist/macPackager.d.ts +31 -14
- package/dist/macPackager.d.ts.map +1 -1
- package/dist/macPackager.js +236 -147
- package/dist/macPackager.js.map +1 -1
- package/dist/node-module-collector/index.d.ts.map +1 -1
- package/dist/node-module-collector/index.js +47 -16
- package/dist/node-module-collector/index.js.map +1 -1
- package/dist/node-module-collector/moduleManager.d.ts +11 -2
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -1
- package/dist/node-module-collector/moduleManager.js +34 -14
- package/dist/node-module-collector/moduleManager.js.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.d.ts +47 -26
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/nodeModulesCollector.js +157 -142
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/packageManager.js +1 -1
- package/dist/node-module-collector/packageManager.js.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +90 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -1
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +325 -25
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -1
- package/dist/node-module-collector/types.d.ts +4 -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/FuseOptionsV1.d.ts +137 -0
- package/dist/options/FuseOptionsV1.d.ts.map +1 -0
- package/dist/options/FuseOptionsV1.js +2 -0
- package/dist/options/FuseOptionsV1.js.map +1 -0
- 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 +55 -9
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -1
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -1
- package/dist/options/SnapOptions.d.ts +23 -17
- package/dist/options/SnapOptions.d.ts.map +1 -1
- package/dist/options/SnapOptions.js.map +1 -1
- package/dist/options/SquirrelWindowsOptions.d.ts +0 -5
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -1
- package/dist/options/SquirrelWindowsOptions.js.map +1 -1
- package/dist/options/linuxOptions.d.ts +8 -12
- package/dist/options/linuxOptions.d.ts.map +1 -1
- package/dist/options/linuxOptions.js.map +1 -1
- package/dist/options/macOptions.d.ts +113 -131
- package/dist/options/macOptions.d.ts.map +1 -1
- package/dist/options/macOptions.js.map +1 -1
- package/dist/options/pkgOptions.d.ts +1 -1
- package/dist/options/pkgOptions.js.map +1 -1
- package/dist/options/winOptions.d.ts +282 -70
- package/dist/options/winOptions.d.ts.map +1 -1
- package/dist/options/winOptions.js +12 -1
- package/dist/options/winOptions.js.map +1 -1
- package/dist/packager.d.ts +6 -1
- package/dist/packager.d.ts.map +1 -1
- package/dist/packager.js +121 -40
- package/dist/packager.js.map +1 -1
- package/dist/packagerApi.d.ts +10 -1
- package/dist/packagerApi.d.ts.map +1 -1
- package/dist/packagerApi.js.map +1 -1
- package/dist/platformPackager.d.ts +49 -3
- package/dist/platformPackager.d.ts.map +1 -1
- package/dist/platformPackager.js +130 -17
- package/dist/platformPackager.js.map +1 -1
- package/dist/publish/PublishManager.d.ts +36 -2
- package/dist/publish/PublishManager.d.ts.map +1 -1
- package/dist/publish/PublishManager.js +387 -23
- package/dist/publish/PublishManager.js.map +1 -1
- package/dist/publish/updateInfoBuilder.d.ts +1 -1
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -1
- package/dist/publish/updateInfoBuilder.js +110 -32
- package/dist/publish/updateInfoBuilder.js.map +1 -1
- package/dist/targets/ArchiveTarget.d.ts +1 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -1
- package/dist/targets/ArchiveTarget.js +6 -3
- package/dist/targets/ArchiveTarget.js.map +1 -1
- package/dist/targets/archive.d.ts +33 -2
- package/dist/targets/archive.d.ts.map +1 -1
- package/dist/targets/archive.js +109 -29
- package/dist/targets/archive.js.map +1 -1
- package/dist/targets/blockmap/blockmap.d.ts +43 -3
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -1
- package/dist/targets/blockmap/blockmap.js +141 -15
- package/dist/targets/blockmap/blockmap.js.map +1 -1
- package/dist/targets/blockmap/verbatimRange.d.ts +44 -0
- package/dist/targets/blockmap/verbatimRange.d.ts.map +1 -0
- package/dist/targets/blockmap/verbatimRange.js +117 -0
- package/dist/targets/blockmap/verbatimRange.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +28 -2
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -1
- package/dist/targets/differentialUpdateInfoBuilder.js +75 -6
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -1
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -1
- package/dist/targets/linux/FlatpakTarget.js +13 -3
- package/dist/targets/linux/FlatpakTarget.js.map +1 -1
- package/dist/targets/linux/FpmTarget.d.ts +14 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -1
- package/dist/targets/linux/FpmTarget.js +86 -10
- package/dist/targets/linux/FpmTarget.js.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.d.ts +15 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -1
- package/dist/targets/linux/LinuxTargetHelper.js +54 -59
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +2 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -1
- package/dist/targets/linux/appimage/AppImageTarget.js +16 -15
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts +5 -1
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appImageUtil.js +14 -7
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -1
- package/dist/targets/linux/appimage/appLauncher.js +5 -11
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -1
- package/dist/targets/linux/launcherScript.d.ts +32 -0
- package/dist/targets/linux/launcherScript.d.ts.map +1 -0
- package/dist/targets/linux/launcherScript.js +24 -0
- package/dist/targets/linux/launcherScript.js.map +1 -0
- 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 +30 -1
- package/dist/targets/linux/snap/core24.d.ts.map +1 -1
- package/dist/targets/linux/snap/core24.js +146 -70
- 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 +3 -3
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -1
- package/dist/targets/linux/snap/coreLegacy.js +12 -12
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -1
- package/dist/targets/linux/snap/snapCommand.d.ts +13 -0
- package/dist/targets/linux/snap/snapCommand.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapCommand.js +21 -0
- package/dist/targets/linux/snap/snapCommand.js.map +1 -0
- 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 +146 -14
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -1
- package/dist/targets/mac/MacTargetHelper.js +485 -91
- package/dist/targets/mac/MacTargetHelper.js.map +1 -1
- package/dist/targets/mac/pkg.d.ts +16 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -1
- package/dist/targets/mac/pkg.js +31 -5
- package/dist/targets/mac/pkg.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 +1 -2
- package/dist/targets/win/AppxTarget.d.ts.map +1 -1
- package/dist/targets/win/AppxTarget.js +37 -314
- package/dist/targets/win/AppxTarget.js.map +1 -1
- package/dist/targets/win/MsiTarget.d.ts.map +1 -1
- package/dist/targets/win/MsiTarget.js +13 -13
- package/dist/targets/win/MsiTarget.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/Defines.d.ts +3 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -1
- package/dist/targets/win/nsis/Defines.js.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.d.ts +57 -3
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/NsisTarget.js +252 -113
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -1
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -1
- package/dist/targets/win/nsis/WebInstallerTarget.js +23 -12
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.d.ts +56 -48
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisScriptGenerator.js +4 -3
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.d.ts +17 -2
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -1
- package/dist/targets/win/nsis/nsisUtil.js +143 -41
- 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 +32 -0
- package/dist/toolsets/7zip.d.ts.map +1 -1
- package/dist/toolsets/7zip.js +39 -11
- 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 +2 -3
- package/dist/toolsets/custom.d.ts.map +1 -1
- package/dist/toolsets/custom.js +67 -149
- 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 +17 -3
- package/dist/toolsets/icons.js.map +1 -1
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -1
- package/dist/toolsets/linuxToolsMac.js +17 -4
- package/dist/toolsets/linuxToolsMac.js.map +1 -1
- package/dist/toolsets/nsis.d.ts +5 -0
- package/dist/toolsets/nsis.d.ts.map +1 -1
- package/dist/toolsets/nsis.js +20 -4
- 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 +56 -3
- package/dist/toolsets/winCodeSign.d.ts.map +1 -1
- package/dist/toolsets/winCodeSign.js +125 -42
- 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 +31 -15
- package/dist/toolsets/wine.js.map +1 -1
- package/dist/util/NodeModuleCopyHelper.js +14 -6
- package/dist/util/NodeModuleCopyHelper.js.map +1 -1
- package/dist/util/appFileCopier.d.ts +52 -0
- package/dist/util/appFileCopier.d.ts.map +1 -1
- package/dist/util/appFileCopier.js +221 -21
- package/dist/util/appFileCopier.js.map +1 -1
- package/dist/util/archCompatibility.d.ts +42 -0
- package/dist/util/archCompatibility.d.ts.map +1 -0
- package/dist/util/archCompatibility.js +202 -0
- package/dist/util/archCompatibility.js.map +1 -0
- package/dist/util/checksum.d.ts +36 -0
- package/dist/util/checksum.d.ts.map +1 -0
- package/dist/util/checksum.js +48 -0
- package/dist/util/checksum.js.map +1 -0
- 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 +8 -1
- package/dist/util/config/config.js.map +1 -1
- package/dist/util/config/legacyConfigGuard.d.ts +7 -0
- package/dist/util/config/legacyConfigGuard.d.ts.map +1 -0
- package/dist/util/config/legacyConfigGuard.js +187 -0
- package/dist/util/config/legacyConfigGuard.js.map +1 -0
- package/dist/util/config/legacyOptions.d.ts +75 -0
- package/dist/util/config/legacyOptions.d.ts.map +1 -0
- package/dist/util/config/legacyOptions.js +399 -0
- package/dist/util/config/legacyOptions.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/util/config/schemaValidator.js +26 -3
- package/dist/util/config/schemaValidator.js.map +1 -1
- package/dist/util/electronGet.d.ts +30 -32
- package/dist/util/electronGet.d.ts.map +1 -1
- package/dist/util/electronGet.js +359 -129
- package/dist/util/electronGet.js.map +1 -1
- package/dist/util/flags.d.ts +5 -5
- package/dist/util/flags.d.ts.map +1 -1
- package/dist/util/flags.js +124 -16
- 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/installOrRebuild.d.ts +44 -0
- package/dist/util/installOrRebuild.d.ts.map +1 -0
- package/dist/util/installOrRebuild.js +276 -0
- package/dist/util/installOrRebuild.js.map +1 -0
- package/dist/util/langs.d.ts.map +1 -1
- package/dist/util/langs.js +1 -0
- package/dist/util/langs.js.map +1 -1
- package/dist/util/license.d.ts.map +1 -1
- package/dist/util/license.js +4 -1
- package/dist/util/license.js.map +1 -1
- package/dist/util/mac/macosIconComposer.d.ts +2 -1
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -1
- package/dist/util/mac/macosIconComposer.js +40 -58
- package/dist/util/mac/macosIconComposer.js.map +1 -1
- package/dist/util/mac/macosVersion.d.ts +0 -1
- package/dist/util/mac/macosVersion.d.ts.map +1 -1
- package/dist/util/mac/macosVersion.js +0 -3
- package/dist/util/mac/macosVersion.js.map +1 -1
- package/dist/util/mac/plist.d.ts +1 -1
- package/dist/util/mac/plist.d.ts.map +1 -1
- package/dist/util/mac/plist.js +5 -0
- package/dist/util/mac/plist.js.map +1 -1
- package/dist/util/nativeBinaryVerifier.d.ts +40 -0
- package/dist/util/nativeBinaryVerifier.d.ts.map +1 -0
- package/dist/util/nativeBinaryVerifier.js +381 -0
- package/dist/util/nativeBinaryVerifier.js.map +1 -0
- package/dist/util/packageMetadata.js +57 -31
- package/dist/util/packageMetadata.js.map +1 -1
- package/dist/util/repositoryInfo.js +6 -3
- package/dist/util/repositoryInfo.js.map +1 -1
- package/dist/util/resolve.js +1 -1
- package/dist/util/resolve.js.map +1 -1
- package/dist/util/streamSpawnToFile.d.ts +47 -0
- package/dist/util/streamSpawnToFile.d.ts.map +1 -0
- package/dist/util/streamSpawnToFile.js +110 -0
- package/dist/util/streamSpawnToFile.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -1
- package/dist/util/toolsetLock.js +31 -5
- package/dist/util/toolsetLock.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.d.ts.map +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 +29 -3
- package/dist/vm/ParallelsVm.js.map +1 -1
- package/dist/vm/vm.d.ts +2 -0
- package/dist/vm/vm.d.ts.map +1 -1
- package/dist/vm/vm.js +29 -6
- package/dist/vm/vm.js.map +1 -1
- package/dist/winPackager.d.ts +6 -5
- package/dist/winPackager.d.ts.map +1 -1
- package/dist/winPackager.js +45 -39
- package/dist/winPackager.js.map +1 -1
- package/package.json +19 -18
- package/scheme.json +1731 -961
- package/templates/appx/appxmanifest.xml +2 -3
- package/templates/entitlements.mac.adhoc.plist +15 -0
- package/templates/entitlements.mac.plist +9 -6
- package/templates/msix/appxmanifest.xml +45 -0
- package/templates/nsis/assistedMessages.yml +17 -0
- package/templates/nsis/common.nsh +2 -2
- package/templates/nsis/include/allowOnlyOneInstallerInstance.nsh +96 -13
- package/templates/nsis/include/extractAppPackage.nsh +5 -2
- package/templates/nsis/include/installUtil.nsh +2 -2
- package/templates/nsis/include/installer.nsh +88 -50
- package/templates/nsis/include/webPackage.nsh +52 -27
- package/templates/nsis/installSection.nsh +29 -0
- package/templates/nsis/installer.nsi +1 -1
- package/templates/nsis/messages.yml +5 -0
- package/templates/nsis/multiUserUi.nsh +1 -1
- package/dist/codeSign/signManager.d.ts +0 -14
- package/dist/codeSign/signManager.d.ts.map +0 -1
- package/dist/codeSign/signManager.js +0 -2
- package/dist/codeSign/signManager.js.map +0 -1
- package/dist/util/yarn.d.ts +0 -23
- package/dist/util/yarn.d.ts.map +0 -1
- package/dist/util/yarn.js +0 -153
- package/dist/util/yarn.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nsis.js","sourceRoot":"","sources":["../../src/toolsets/nsis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"nsis.js","sourceRoot":"","sources":["../../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AC;YAC/B,IAAI,CAAC,MAAM,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;gBACvD,OAAO,CAAC,CAAA;YACV,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,kDAAkD,UAAU,sBAAsB,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAChI,CAAC,CAAA;IACD,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,yBAAyB,EAAE,EAAE,SAAS,CAAC,CAAA;IACnE,CAAC;IACD,OAAO,iBAAiB,CAAC,MAAM,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,CAAA;AACvE,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,IAAqC,EAAE,YAAoB;IAClG,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, 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-breaking-changes#nsiscustomnsisbinary-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"]}
|
|
@@ -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": {
|
|
@@ -24,17 +24,70 @@ export declare const wincodesignChecksums: {
|
|
|
24
24
|
readonly "win-codesign-windows-x64.zip": "6e5dcc5d7af7c00a7387e2101d1ad986aef80e963a3526da07bd0e65de484c30";
|
|
25
25
|
readonly "windows-kits-bundle-10_0_26100_0.zip": "284f18a2fde66e6ecfbefc3065926c9bfdf641761a9e6cd2bd26e18d1e328bf7";
|
|
26
26
|
};
|
|
27
|
+
readonly "1.1.1": {
|
|
28
|
+
readonly "rcedit-windows-2_0_0.zip": "a4133c265a53a8a6d5063c6d92603dc2dcd47546e50bfd79c93bc56692d6fcb3";
|
|
29
|
+
readonly "win-codesign-darwin-arm64.zip": "8c655fe77edb326fb6b7051a6f74b0f09843f7d3de7887c1d217088cff47ece6";
|
|
30
|
+
readonly "win-codesign-darwin-x86_64.zip": "b5882783c910e10b18792ea8c319fa8d6ce9dbbdd0d6a283a504787b3e9e96c6";
|
|
31
|
+
readonly "win-codesign-linux-amd64.zip": "8e0c05c33b3fb24d41ac41d37b0c70ad9f8c1c82bb667ed60c2a6a8d141b7c62";
|
|
32
|
+
readonly "win-codesign-linux-arm64.zip": "535f318b8aac1c9487e0f8b58df0a4182103e303ccaca1c9d0ef20b1020e03ca";
|
|
33
|
+
readonly "win-codesign-linux-i386.zip": "e432f2819f557f9d1175e26f374eec8a368eb23b519c12c690a969ce369966c5";
|
|
34
|
+
readonly "win-codesign-windows-x64.zip": "47d78ed7e229e891866b0d0e10dde6df9617c32a89fc76a9e280ffabfc80e1fe";
|
|
35
|
+
readonly "windows-kits-bundle-10_0_26100_0.zip": "f7e67213ce690386b2f0a58e3af986dbf223bc1b45ef4a75e77ff85f66b78c94";
|
|
36
|
+
};
|
|
37
|
+
readonly "1.2.1": {
|
|
38
|
+
readonly "rcedit-windows-2_0_0.zip": "1c2b68b9ae41229566c008ce98c4f6cd2b642ace85284e753d1d3509377f9e67";
|
|
39
|
+
readonly "win-codesign-darwin-arm64.zip": "ac7c1d9279490fc88e9e744ed965ad7e1d377e0219142dab0ab49cfba3ede764";
|
|
40
|
+
readonly "win-codesign-darwin-x86_64.zip": "7c4188bb301621cde22f918bb2d1a86ef9892ad401a40b7838b80efc9165547d";
|
|
41
|
+
readonly "win-codesign-linux-amd64.zip": "69b94f71f9189ded6b962718df102e0ffe0a81d506351fecd3df3d73c7166e31";
|
|
42
|
+
readonly "win-codesign-linux-arm64.zip": "c959031605a5ab994bfd9b84d37bc5bcaba8f39d54a6d69bd2541b2a91ecf723";
|
|
43
|
+
readonly "win-codesign-linux-i386.zip": "fc937f40655b9839b67ed35cc7b571795b3f7b7b15db10c3026599db43f1c2b1";
|
|
44
|
+
readonly "win-codesign-windows-arm64.zip": "96390eb3130e63ea9d3641ef076c941c6f51463125498cf53b2503e52c38082d";
|
|
45
|
+
readonly "win-codesign-windows-x64.zip": "40b1d88ea074de58ddc7595a2b6d30ca23f81bcce33f110102304337538fcbeb";
|
|
46
|
+
readonly "windows-kits-bundle-10_0_26100_0.zip": "9b198db76ae75b124169aef3369fb96c17b39dbf16f16f1264dbd9fd001d976f";
|
|
47
|
+
};
|
|
48
|
+
readonly "1.3.0": {
|
|
49
|
+
readonly "ats-bundle-1_0_95.zip": "93e1441cd8c60f7b7a57a3e0e20a2109994e33a7f42bd04c998204a1928f9f2f";
|
|
50
|
+
readonly "dotnet-runtime-win-x64-8_0_28.zip": "71b9aa960ebaae196a62ec0bb1a4d224e1b48e18b6dc5eed89a37b28b72965ee";
|
|
51
|
+
readonly "rcedit-windows-2_0_0.zip": "84ea279c5d94977fecffbe0f21b073318575dc631a3dae46fadb14309f2eef11";
|
|
52
|
+
readonly "win-codesign-darwin-arm64.zip": "c5c1e1e106a5feff27d320c57856e362d8f605c09c7c02fc42d9309b72c56372";
|
|
53
|
+
readonly "win-codesign-darwin-x86_64.zip": "4fd5af2c4c655257685fad1769457419e086ec0862ee36f893b3659e1788c8ca";
|
|
54
|
+
readonly "win-codesign-linux-amd64.zip": "58c708762b3088a2c6c98494c4813e2a1d030a314a7958c77a2806d58e5efe95";
|
|
55
|
+
readonly "win-codesign-linux-arm64.zip": "1e9dd1ae149a4e0c988b5529fb983d7a8265cd71e7f3fb5af4cce501005a670c";
|
|
56
|
+
readonly "win-codesign-linux-i386.zip": "b5c3249fb565bb956a48aaff01bc1bbbd9acaf3c981960f2b754210f9df95cd9";
|
|
57
|
+
readonly "win-codesign-windows-arm64.zip": "c707709440a07e400b4053d9bab77c9f335505c1701035c2aa8285d880360989";
|
|
58
|
+
readonly "win-codesign-windows-x64.zip": "40d621aad7593e6298ce1d24798760dcefb053f358be891d74c95386ac2ac50b";
|
|
59
|
+
readonly "windows-kits-bundle-10_0_26100_0.zip": "2eeb955e580103e1bbecf9666dca87b141c3bb73ad99ead64bb8821755694ecd";
|
|
60
|
+
};
|
|
27
61
|
};
|
|
28
62
|
export declare function getSignToolPath(winCodeSign: ToolsetConfig["winCodeSign"] | Nullish, isWin: boolean, resourcesDir: string): Promise<ToolInfo>;
|
|
29
|
-
|
|
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 }: {
|
|
30
73
|
winCodeSign: ToolsetConfig["winCodeSign"] | Nullish;
|
|
31
|
-
arch: Arch;
|
|
32
74
|
resourcesDir?: string;
|
|
33
75
|
}): Promise<{
|
|
34
76
|
kit: string;
|
|
35
77
|
appxAssets: string;
|
|
36
78
|
}>;
|
|
37
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;
|
|
89
|
+
export declare function getAtsBundleDir(winCodeSign: string): Promise<string>;
|
|
90
|
+
export declare function getDotnetRuntimeDir(winCodeSign: string): Promise<string>;
|
|
38
91
|
export declare function getRceditBundle(winCodeSign: ToolsetConfig["winCodeSign"] | Nullish, resourcesDir?: string): Promise<{
|
|
39
92
|
x86: string;
|
|
40
93
|
x64: string;
|
|
@@ -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,10 +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
|
-
import { isUseSystemOsslSigncode, isUseSystemSigncode } from "../util/flags.js";
|
|
7
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";
|
|
8
10
|
function getLegacyWinCodeSignBin() {
|
|
9
11
|
return downloadBuilderToolset({
|
|
10
12
|
releaseName: "winCodeSign-2.6.0",
|
|
@@ -36,6 +38,40 @@ export const wincodesignChecksums = {
|
|
|
36
38
|
"win-codesign-windows-x64.zip": "6e5dcc5d7af7c00a7387e2101d1ad986aef80e963a3526da07bd0e65de484c30",
|
|
37
39
|
"windows-kits-bundle-10_0_26100_0.zip": "284f18a2fde66e6ecfbefc3065926c9bfdf641761a9e6cd2bd26e18d1e328bf7",
|
|
38
40
|
},
|
|
41
|
+
"1.1.1": {
|
|
42
|
+
"rcedit-windows-2_0_0.zip": "a4133c265a53a8a6d5063c6d92603dc2dcd47546e50bfd79c93bc56692d6fcb3",
|
|
43
|
+
"win-codesign-darwin-arm64.zip": "8c655fe77edb326fb6b7051a6f74b0f09843f7d3de7887c1d217088cff47ece6",
|
|
44
|
+
"win-codesign-darwin-x86_64.zip": "b5882783c910e10b18792ea8c319fa8d6ce9dbbdd0d6a283a504787b3e9e96c6",
|
|
45
|
+
"win-codesign-linux-amd64.zip": "8e0c05c33b3fb24d41ac41d37b0c70ad9f8c1c82bb667ed60c2a6a8d141b7c62",
|
|
46
|
+
"win-codesign-linux-arm64.zip": "535f318b8aac1c9487e0f8b58df0a4182103e303ccaca1c9d0ef20b1020e03ca",
|
|
47
|
+
"win-codesign-linux-i386.zip": "e432f2819f557f9d1175e26f374eec8a368eb23b519c12c690a969ce369966c5",
|
|
48
|
+
"win-codesign-windows-x64.zip": "47d78ed7e229e891866b0d0e10dde6df9617c32a89fc76a9e280ffabfc80e1fe",
|
|
49
|
+
"windows-kits-bundle-10_0_26100_0.zip": "f7e67213ce690386b2f0a58e3af986dbf223bc1b45ef4a75e77ff85f66b78c94",
|
|
50
|
+
},
|
|
51
|
+
"1.2.1": {
|
|
52
|
+
"rcedit-windows-2_0_0.zip": "1c2b68b9ae41229566c008ce98c4f6cd2b642ace85284e753d1d3509377f9e67",
|
|
53
|
+
"win-codesign-darwin-arm64.zip": "ac7c1d9279490fc88e9e744ed965ad7e1d377e0219142dab0ab49cfba3ede764",
|
|
54
|
+
"win-codesign-darwin-x86_64.zip": "7c4188bb301621cde22f918bb2d1a86ef9892ad401a40b7838b80efc9165547d",
|
|
55
|
+
"win-codesign-linux-amd64.zip": "69b94f71f9189ded6b962718df102e0ffe0a81d506351fecd3df3d73c7166e31",
|
|
56
|
+
"win-codesign-linux-arm64.zip": "c959031605a5ab994bfd9b84d37bc5bcaba8f39d54a6d69bd2541b2a91ecf723",
|
|
57
|
+
"win-codesign-linux-i386.zip": "fc937f40655b9839b67ed35cc7b571795b3f7b7b15db10c3026599db43f1c2b1",
|
|
58
|
+
"win-codesign-windows-arm64.zip": "96390eb3130e63ea9d3641ef076c941c6f51463125498cf53b2503e52c38082d",
|
|
59
|
+
"win-codesign-windows-x64.zip": "40b1d88ea074de58ddc7595a2b6d30ca23f81bcce33f110102304337538fcbeb",
|
|
60
|
+
"windows-kits-bundle-10_0_26100_0.zip": "9b198db76ae75b124169aef3369fb96c17b39dbf16f16f1264dbd9fd001d976f",
|
|
61
|
+
},
|
|
62
|
+
"1.3.0": {
|
|
63
|
+
"ats-bundle-1_0_95.zip": "93e1441cd8c60f7b7a57a3e0e20a2109994e33a7f42bd04c998204a1928f9f2f", // new
|
|
64
|
+
"dotnet-runtime-win-x64-8_0_28.zip": "71b9aa960ebaae196a62ec0bb1a4d224e1b48e18b6dc5eed89a37b28b72965ee", // new
|
|
65
|
+
"rcedit-windows-2_0_0.zip": "84ea279c5d94977fecffbe0f21b073318575dc631a3dae46fadb14309f2eef11",
|
|
66
|
+
"win-codesign-darwin-arm64.zip": "c5c1e1e106a5feff27d320c57856e362d8f605c09c7c02fc42d9309b72c56372",
|
|
67
|
+
"win-codesign-darwin-x86_64.zip": "4fd5af2c4c655257685fad1769457419e086ec0862ee36f893b3659e1788c8ca",
|
|
68
|
+
"win-codesign-linux-amd64.zip": "58c708762b3088a2c6c98494c4813e2a1d030a314a7958c77a2806d58e5efe95",
|
|
69
|
+
"win-codesign-linux-arm64.zip": "1e9dd1ae149a4e0c988b5529fb983d7a8265cd71e7f3fb5af4cce501005a670c",
|
|
70
|
+
"win-codesign-linux-i386.zip": "b5c3249fb565bb956a48aaff01bc1bbbd9acaf3c981960f2b754210f9df95cd9",
|
|
71
|
+
"win-codesign-windows-arm64.zip": "c707709440a07e400b4053d9bab77c9f335505c1701035c2aa8285d880360989",
|
|
72
|
+
"win-codesign-windows-x64.zip": "40d621aad7593e6298ce1d24798760dcefb053f358be891d74c95386ac2ac50b",
|
|
73
|
+
"windows-kits-bundle-10_0_26100_0.zip": "2eeb955e580103e1bbecf9666dca87b141c3bb73ad99ead64bb8821755694ecd",
|
|
74
|
+
},
|
|
39
75
|
};
|
|
40
76
|
function _getWindowsToolsBin(winCodeSign, file) {
|
|
41
77
|
const filenameWithExt = file;
|
|
@@ -46,63 +82,85 @@ function _getWindowsToolsBin(winCodeSign, file) {
|
|
|
46
82
|
});
|
|
47
83
|
}
|
|
48
84
|
export async function getSignToolPath(winCodeSign, isWin, resourcesDir) {
|
|
49
|
-
if (isUseSystemSigncode()) {
|
|
50
|
-
return { path: "osslsigncode" };
|
|
51
|
-
}
|
|
52
85
|
if (isWin) {
|
|
53
|
-
|
|
54
|
-
const signtoolArch = process.arch === "x64" ? Arch.x64 : process.arch === "arm64" ? Arch.arm64 : Arch.ia32;
|
|
55
|
-
return { path: await getWindowsSignToolExe({ winCodeSign, arch: signtoolArch, resourcesDir }) };
|
|
86
|
+
return { path: await getWindowsSignToolExe({ winCodeSign, resourcesDir }) };
|
|
56
87
|
}
|
|
57
88
|
else {
|
|
58
89
|
const vendor = await getOsslSigncodeBundle(winCodeSign, resourcesDir);
|
|
59
90
|
return { path: vendor.path, env: vendor.env };
|
|
60
91
|
}
|
|
61
92
|
}
|
|
62
|
-
|
|
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";
|
|
63
104
|
if (typeof winCodeSign === "object" && winCodeSign != null) {
|
|
64
|
-
const vendorPath = await getCustomToolsetPath(winCodeSign, resourcesDir);
|
|
65
|
-
return { kit: path.
|
|
105
|
+
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
106
|
+
return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath };
|
|
66
107
|
}
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
69
|
-
const vendorPath = await getLegacyWinCodeSignBin();
|
|
70
|
-
return { kit: path.
|
|
108
|
+
const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST);
|
|
109
|
+
if (version === "0.0.0") {
|
|
110
|
+
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
111
|
+
return { kit: path.join(vendorPath, "windows-10", kitArch), appxAssets: vendorPath };
|
|
71
112
|
}
|
|
72
113
|
const file = "windows-kits-bundle-10_0_26100_0.zip";
|
|
73
|
-
const vendorPath = await _getWindowsToolsBin(
|
|
74
|
-
return { kit: path.
|
|
114
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
115
|
+
return { kit: path.join(vendorPath, kitArch), appxAssets: vendorPath };
|
|
75
116
|
}
|
|
76
117
|
export function isOldWin6() {
|
|
77
118
|
const winVersion = os.release();
|
|
78
119
|
return winVersion.startsWith("6.") && !winVersion.startsWith("6.3");
|
|
79
120
|
}
|
|
80
|
-
|
|
81
|
-
|
|
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") {
|
|
82
134
|
// use modern signtool on Windows Server 2012 R2 to be able to sign AppX
|
|
83
|
-
const vendorPath = await getLegacyWinCodeSignBin();
|
|
135
|
+
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
84
136
|
if (isOldWin6()) {
|
|
85
|
-
return path.
|
|
137
|
+
return path.join(vendorPath, "windows-6", "signtool.exe");
|
|
86
138
|
}
|
|
87
139
|
else {
|
|
88
|
-
return path.
|
|
140
|
+
return path.join(vendorPath, "windows-10", process.arch === "ia32" ? "ia32" : "x64", "signtool.exe");
|
|
89
141
|
}
|
|
90
142
|
}
|
|
91
|
-
|
|
92
|
-
|
|
143
|
+
// kit is already sanitized by getWindowsKitsBundle
|
|
144
|
+
const { kit } = await getWindowsKitsBundle({ winCodeSign, resourcesDir });
|
|
145
|
+
return path.join(kit, "signtool.exe");
|
|
93
146
|
}
|
|
94
147
|
async function getOsslSigncodeBundle(winCodeSign, resourcesDir = "") {
|
|
95
|
-
|
|
96
|
-
return { path: "osslsigncode" };
|
|
97
|
-
}
|
|
148
|
+
// A custom toolset is an explicit user override — honored on every platform, before any platform default/fallback.
|
|
98
149
|
if (typeof winCodeSign === "object" && winCodeSign != null) {
|
|
99
|
-
const vendorPath = await getCustomToolsetPath(winCodeSign, resourcesDir);
|
|
100
|
-
return { path: path.
|
|
150
|
+
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
151
|
+
return { path: path.join(vendorPath, "osslsigncode") };
|
|
101
152
|
}
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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") {
|
|
160
|
+
const legacyBase = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
161
|
+
const vendorBase = path.join(legacyBase, process.platform);
|
|
162
|
+
const vendorPath = process.platform === "darwin" ? path.join(vendorBase, "10.12") : vendorBase;
|
|
163
|
+
return { path: path.join(vendorPath, "osslsigncode"), env: process.platform === "darwin" ? computeToolEnv([path.join(vendorPath, "lib")]) : undefined };
|
|
106
164
|
}
|
|
107
165
|
const file = (() => {
|
|
108
166
|
if (process.platform === "linux") {
|
|
@@ -120,23 +178,48 @@ async function getOsslSigncodeBundle(winCodeSign, resourcesDir = "") {
|
|
|
120
178
|
}
|
|
121
179
|
return "win-codesign-darwin-x86_64.zip";
|
|
122
180
|
})();
|
|
123
|
-
const vendorPath = await _getWindowsToolsBin(
|
|
124
|
-
return { path: path.
|
|
181
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
182
|
+
return { path: path.join(vendorPath, "osslsigncode") };
|
|
183
|
+
}
|
|
184
|
+
export async function getAtsBundleDir(winCodeSign) {
|
|
185
|
+
const version = winCodeSign === "latest" ? WIN_CODESIGN_LATEST : winCodeSign;
|
|
186
|
+
const checksum = wincodesignChecksums[version]?.["ats-bundle-1_0_95.zip"];
|
|
187
|
+
if (!checksum) {
|
|
188
|
+
throw new Error(`winCodeSign version "${version}" does not include an ATS bundle (requires >= 1.3.0)`);
|
|
189
|
+
}
|
|
190
|
+
return downloadBuilderToolset({
|
|
191
|
+
releaseName: `win-codesign@${version}`,
|
|
192
|
+
filenameWithExt: "ats-bundle-1_0_95.zip",
|
|
193
|
+
checksums: { "ats-bundle-1_0_95.zip": checksum },
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
export async function getDotnetRuntimeDir(winCodeSign) {
|
|
197
|
+
const version = winCodeSign === "latest" ? WIN_CODESIGN_LATEST : winCodeSign;
|
|
198
|
+
const checksum = wincodesignChecksums[version]?.["dotnet-runtime-win-x64-8_0_28.zip"];
|
|
199
|
+
if (!checksum) {
|
|
200
|
+
throw new Error(`winCodeSign version "${version}" does not include a .NET runtime bundle (requires >= 1.3.0)`);
|
|
201
|
+
}
|
|
202
|
+
return downloadBuilderToolset({
|
|
203
|
+
releaseName: `win-codesign@${version}`,
|
|
204
|
+
filenameWithExt: "dotnet-runtime-win-x64-8_0_28.zip",
|
|
205
|
+
checksums: { "dotnet-runtime-win-x64-8_0_28.zip": checksum },
|
|
206
|
+
});
|
|
125
207
|
}
|
|
126
208
|
export async function getRceditBundle(winCodeSign, resourcesDir = "") {
|
|
127
209
|
const ia32 = "rcedit-ia32.exe";
|
|
128
210
|
const x86 = "rcedit-x86.exe";
|
|
129
211
|
const x64 = "rcedit-x64.exe";
|
|
130
212
|
if (typeof winCodeSign === "object" && winCodeSign != null) {
|
|
131
|
-
const vendorPath = await getCustomToolsetPath(winCodeSign, resourcesDir);
|
|
132
|
-
return { x86: path.
|
|
213
|
+
const vendorPath = sanitizeDirPath(await getCustomToolsetPath(winCodeSign, resourcesDir), resourcesDir || undefined);
|
|
214
|
+
return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) };
|
|
133
215
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
216
|
+
const version = resolveToolsetVersion(winCodeSign, WIN_CODESIGN_LATEST);
|
|
217
|
+
if (version === "0.0.0") {
|
|
218
|
+
const vendorPath = sanitizeDirPath(await getLegacyWinCodeSignBin());
|
|
219
|
+
return { x86: path.join(vendorPath, ia32), x64: path.join(vendorPath, x64) };
|
|
137
220
|
}
|
|
138
221
|
const file = "rcedit-windows-2_0_0.zip";
|
|
139
|
-
const vendorPath = await _getWindowsToolsBin(
|
|
140
|
-
return { x86: path.
|
|
222
|
+
const vendorPath = sanitizeDirPath(await _getWindowsToolsBin(version, file));
|
|
223
|
+
return { x86: path.join(vendorPath, x86), x64: path.join(vendorPath, x64) };
|
|
141
224
|
}
|
|
142
225
|
//# sourceMappingURL=winCodeSign.js.map
|
|
@@ -1 +1 @@
|
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D,EAAE,YAAY,GAAG,EAAE;IAC1G,MAAM,IAAI,GAAG,iBAAiB,CAAA;IAC9B,MAAM,GAAG,GAAG,gBAAgB,CAAA;IAC5B,MAAM,GAAG,GAAG,gBAAgB,CAAA;IAC5B,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QAC3D,MAAM,UAAU,GAAG,MAAM,oBAAoB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;QACxE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;IACnF,CAAC;IACD,IAAI,WAAW,KAAK,OAAO,IAAI,WAAW,IAAI,IAAI,EAAE,CAAC;QACnD,MAAM,UAAU,GAAG,MAAM,uBAAuB,EAAE,CAAA;QAClD,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;IACpF,CAAC;IACD,MAAM,IAAI,GAAG,0BAA0B,CAAA;IACvC,MAAM,UAAU,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;IAC/D,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;AACnF,CAAC","sourcesContent":["import { Arch } 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 { isUseSystemOsslSigncode, isUseSystemSigncode } from \"../util/flags.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} 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 (isUseSystemSigncode()) {\n return { path: \"osslsigncode\" }\n }\n\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 = await getCustomToolsetPath(winCodeSign, resourcesDir)\n return { kit: path.resolve(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 = await getLegacyWinCodeSignBin()\n return { kit: path.resolve(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 = await _getWindowsToolsBin(winCodeSign, file)\n return { kit: path.resolve(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 = await getLegacyWinCodeSignBin()\n if (isOldWin6()) {\n return path.resolve(vendorPath, \"windows-6\", \"signtool.exe\")\n } else {\n return path.resolve(vendorPath, \"windows-10\", process.arch === \"ia32\" ? \"ia32\" : \"x64\", \"signtool.exe\")\n }\n }\n const vendorPath = await getWindowsKitsBundle({ winCodeSign, arch, resourcesDir })\n return path.resolve(vendorPath.kit, \"signtool.exe\")\n}\n\nasync function getOsslSigncodeBundle(winCodeSign: ToolsetConfig[\"winCodeSign\"] | Nullish, resourcesDir = \"\") {\n if (process.platform === \"win32\" || isUseSystemOsslSigncode()) {\n return { path: \"osslsigncode\" }\n }\n\n if (typeof winCodeSign === \"object\" && winCodeSign != null) {\n const vendorPath = await getCustomToolsetPath(winCodeSign, resourcesDir)\n return { path: path.resolve(vendorPath, \"osslsigncode\") }\n }\n\n if (winCodeSign === \"0.0.0\" || winCodeSign == null) {\n const vendorBase = path.resolve(await getLegacyWinCodeSignBin(), process.platform)\n const vendorPath = process.platform === \"darwin\" ? path.resolve(vendorBase, \"10.12\") : vendorBase\n return { path: path.resolve(vendorPath, \"osslsigncode\"), env: process.platform === \"darwin\" ? computeToolEnv([path.resolve(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 = await _getWindowsToolsBin(winCodeSign, file)\n return { path: path.resolve(vendorPath, \"osslsigncode\") }\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 = await getCustomToolsetPath(winCodeSign, resourcesDir)\n return { x86: path.resolve(vendorPath, x86), x64: path.resolve(vendorPath, x64) }\n }\n if (winCodeSign === \"0.0.0\" || winCodeSign == null) {\n const vendorPath = await getLegacyWinCodeSignBin()\n return { x86: path.resolve(vendorPath, ia32), x64: path.resolve(vendorPath, x64) }\n }\n const file = \"rcedit-windows-2_0_0.zip\"\n const vendorPath = await _getWindowsToolsBin(winCodeSign, file)\n return { x86: path.resolve(vendorPath, x86), x64: path.resolve(vendorPath, x64) }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"winCodeSign.js","sourceRoot":"","sources":["../../src/toolsets/winCodeSign.ts"],"names":[],"mapp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AAE,mBAAmB,CAAC,CAAA;IACvE,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,uBAAuB,EAAE,CAAC,CAAA;QACnE,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAA;IAC9E,CAAC;IACD,MAAM,IAAI,GAAG,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;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,CAuD5J"}
|
package/dist/toolsets/wine.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { exists, InvalidConfigurationError, sanitizeDirPath } from "builder-util";
|
|
2
2
|
import * as path from "path";
|
|
3
3
|
import { downloadBuilderToolset } from "../util/electronGet.js";
|
|
4
|
-
import { isUseSystemWine } from "../util/flags.js";
|
|
5
4
|
import { getCustomToolsetPath } from "./custom.js";
|
|
5
|
+
const githubOrgRepo = "electron-userland/electron-builder-binaries";
|
|
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 on PATH.
|
|
8
|
+
const WINE_LATEST = "system";
|
|
6
9
|
const wineToolsChecksums = {
|
|
7
10
|
"0.0.0": {
|
|
8
11
|
"wine-4.0.1-mac.7z": "1baac808a67975b68b9226beea7b64ad0acc3e598a4b45c25bb5d2ae8cac655e",
|
|
@@ -14,34 +17,47 @@ const wineToolsChecksums = {
|
|
|
14
17
|
};
|
|
15
18
|
export async function getWineToolset(wine, resourcesDir) {
|
|
16
19
|
if (process.platform === "win32") {
|
|
20
|
+
// 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
|
|
17
21
|
throw new InvalidConfigurationError(`Wine toolset is not supported on Windows, but got: ${wine}`);
|
|
18
22
|
}
|
|
19
23
|
const defaultEnv = { WINEDEBUG: "-all,err+all", WINEDLLOVERRIDES: "winemenubuilder.exe=d" };
|
|
20
|
-
//
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
const useSystemWine = isUseSystemWine();
|
|
24
|
-
const isDefault = wine == null || wine === "0.0.0";
|
|
25
|
-
if (useSystemWine || (isDefault && process.platform === "linux")) {
|
|
26
|
-
return { execPath: "wine", env: defaultEnv };
|
|
27
|
-
}
|
|
24
|
+
// Resolve the "latest"/unset alias up front so every branch below sees a concrete toolset, and an
|
|
25
|
+
// explicitly requested version is never silently swapped for whatever WINE_LATEST points at.
|
|
26
|
+
const toolset = wine == null || wine === "latest" ? WINE_LATEST : wine;
|
|
28
27
|
let toolsetPath;
|
|
29
28
|
let execSubPath;
|
|
30
|
-
if (typeof
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
if (typeof toolset === "object") {
|
|
30
|
+
// Custom toolset — honored on every platform (never overridden by the host-wine branch below).
|
|
31
|
+
toolsetPath = await getCustomToolsetPath(toolset, resourcesDir);
|
|
33
32
|
execSubPath = (await exists(path.join(toolsetPath, "bin", "wine"))) ? "bin/wine" : "bin/wine64";
|
|
34
33
|
}
|
|
35
|
-
else {
|
|
36
|
-
//
|
|
34
|
+
else if (toolset === "system" || process.platform === "linux") {
|
|
35
|
+
// Host wine on PATH. Linux ships no portable bundle so it always lands here; other platforms
|
|
36
|
+
// opt in with `toolsets.wine: "system"` — the replacement for the `USE_SYSTEM_WINE` env var
|
|
37
|
+
// removed in v27.
|
|
38
|
+
return { execPath: "wine", env: defaultEnv };
|
|
39
|
+
}
|
|
40
|
+
else if (toolset === "0.0.0") {
|
|
41
|
+
// Explicit opt-in to the legacy wine-4.0.1-mac bundle (pre-v27).
|
|
37
42
|
toolsetPath = await downloadBuilderToolset({
|
|
38
43
|
releaseName: "wine-4.0.1-mac",
|
|
39
44
|
filenameWithExt: "wine-4.0.1-mac.7z",
|
|
40
45
|
checksums: wineToolsChecksums["0.0.0"],
|
|
41
|
-
githubOrgRepo
|
|
46
|
+
githubOrgRepo,
|
|
42
47
|
});
|
|
43
48
|
execSubPath = path.join("bin", "wine64");
|
|
44
49
|
}
|
|
50
|
+
else {
|
|
51
|
+
// Explicitly requested bundle version, e.g. "1.0.1" → wine@1.0.1 (wine 11; arm64 macOS via Rosetta).
|
|
52
|
+
const file = process.platform === "darwin" ? "wine-11.0-darwin-x86_64.tar.xz" : "wine-11.0-linux-x86_64.tar.xz";
|
|
53
|
+
toolsetPath = await downloadBuilderToolset({
|
|
54
|
+
releaseName: `wine@${toolset}`,
|
|
55
|
+
filenameWithExt: file,
|
|
56
|
+
checksums: wineToolsChecksums[toolset],
|
|
57
|
+
githubOrgRepo,
|
|
58
|
+
});
|
|
59
|
+
execSubPath = (await exists(path.join(toolsetPath, "bin", "wine"))) ? "bin/wine" : "bin/wine64";
|
|
60
|
+
}
|
|
45
61
|
const { execPath, winePrefix, wineLibPath } = await createWineEnvironment(toolsetPath, execSubPath);
|
|
46
62
|
return {
|
|
47
63
|
execPath,
|