app-builder-lib 26.15.2 → 27.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Framework.d.ts +40 -0
- package/dist/Framework.d.ts.map +1 -0
- package/dist/Framework.js +4 -0
- package/dist/Framework.js.map +1 -0
- package/dist/appInfo.d.ts +32 -0
- package/dist/appInfo.d.ts.map +1 -0
- package/dist/appInfo.js +145 -0
- package/dist/appInfo.js.map +1 -0
- package/dist/asar/asar.d.ts +39 -0
- package/dist/asar/asar.d.ts.map +1 -0
- package/dist/asar/asar.js +155 -0
- package/dist/asar/asar.js.map +1 -0
- package/dist/asar/asarFileChecker.d.ts +3 -0
- package/dist/asar/asarFileChecker.d.ts.map +1 -0
- package/dist/asar/asarFileChecker.js +22 -0
- package/dist/asar/asarFileChecker.js.map +1 -0
- package/dist/asar/asarUtil.d.ts +2 -0
- package/dist/asar/asarUtil.d.ts.map +1 -0
- package/dist/asar/asarUtil.js +278 -0
- package/dist/asar/asarUtil.js.map +1 -0
- package/dist/asar/integrity.d.ts +16 -0
- package/dist/asar/integrity.d.ts.map +1 -0
- package/dist/asar/integrity.js +59 -0
- package/dist/asar/integrity.js.map +1 -0
- package/dist/asar/unpackDetector.d.ts +2 -0
- package/dist/asar/unpackDetector.d.ts.map +1 -0
- package/dist/asar/unpackDetector.js +39 -0
- package/dist/asar/unpackDetector.js.map +1 -0
- package/dist/codeSign/certInfo.d.ts +55 -0
- package/dist/codeSign/certInfo.d.ts.map +1 -0
- package/dist/codeSign/certInfo.js +459 -0
- package/dist/codeSign/certInfo.js.map +1 -0
- package/dist/codeSign/codesign.d.ts +4 -0
- package/dist/codeSign/codesign.d.ts.map +1 -0
- package/dist/codeSign/codesign.js +32 -0
- package/dist/codeSign/codesign.js.map +1 -0
- package/dist/codeSign/mac/macCodeSign.d.ts +29 -0
- package/dist/codeSign/mac/macCodeSign.d.ts.map +1 -0
- package/dist/codeSign/mac/macCodeSign.js +273 -0
- package/dist/codeSign/mac/macCodeSign.js.map +1 -0
- package/dist/codeSign/signManager.d.ts +14 -0
- package/dist/codeSign/signManager.d.ts.map +1 -0
- package/dist/codeSign/signManager.js +2 -0
- package/dist/codeSign/signManager.js.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts +8 -0
- package/dist/codeSign/win/windowsCodeSign.d.ts.map +1 -0
- package/dist/codeSign/win/windowsCodeSign.js +34 -0
- package/dist/codeSign/win/windowsCodeSign.js.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts +18 -0
- package/dist/codeSign/win/windowsSignAzureManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignAzureManager.js +68 -0
- package/dist/codeSign/win/windowsSignAzureManager.js.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts +59 -0
- package/dist/codeSign/win/windowsSignToolManager.d.ts.map +1 -0
- package/dist/codeSign/win/windowsSignToolManager.js +364 -0
- package/dist/codeSign/win/windowsSignToolManager.js.map +1 -0
- package/dist/configuration.d.ts +1010 -0
- package/dist/configuration.d.ts.map +1 -0
- package/dist/configuration.js +2 -0
- package/dist/configuration.js.map +1 -0
- package/dist/core.d.ts +61 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +61 -0
- package/dist/core.js.map +1 -0
- package/dist/electron/ElectronFramework.d.ts +17 -0
- package/dist/electron/ElectronFramework.d.ts.map +1 -0
- package/dist/electron/ElectronFramework.js +236 -0
- package/dist/electron/ElectronFramework.js.map +1 -0
- package/dist/electron/electronVersion.d.ts +7 -0
- package/dist/electron/electronVersion.d.ts.map +1 -0
- package/dist/electron/electronVersion.js +119 -0
- package/dist/electron/electronVersion.js.map +1 -0
- package/dist/electron/injectFFMPEG.d.ts +12 -0
- package/dist/electron/injectFFMPEG.d.ts.map +1 -0
- package/dist/electron/injectFFMPEG.js +53 -0
- package/dist/electron/injectFFMPEG.js.map +1 -0
- package/dist/electron/mac/electronMac.d.ts +2 -0
- package/dist/electron/mac/electronMac.d.ts.map +1 -0
- package/dist/electron/mac/electronMac.js +254 -0
- package/dist/electron/mac/electronMac.js.map +1 -0
- package/dist/electron/search-module.d.ts +24 -0
- package/dist/electron/search-module.d.ts.map +1 -0
- package/dist/electron/search-module.js +68 -0
- package/dist/electron/search-module.js.map +1 -0
- package/dist/electron/win/electronWin.d.ts +2 -0
- package/dist/electron/win/electronWin.d.ts.map +1 -0
- package/dist/electron/win/electronWin.js +36 -0
- package/dist/electron/win/electronWin.js.map +1 -0
- package/dist/errorMessages.d.ts +2 -0
- package/dist/errorMessages.d.ts.map +1 -0
- package/dist/errorMessages.js +8 -0
- package/dist/errorMessages.js.map +1 -0
- package/dist/fileMatcher.d.ts +31 -0
- package/dist/fileMatcher.d.ts.map +1 -0
- package/dist/fileMatcher.js +277 -0
- package/dist/fileMatcher.js.map +1 -0
- package/dist/fileTransformer.d.ts +2 -0
- package/dist/fileTransformer.d.ts.map +1 -0
- package/dist/fileTransformer.js +82 -0
- package/dist/fileTransformer.js.map +1 -0
- package/dist/forge-maker.d.ts +6 -0
- package/dist/forge-maker.d.ts.map +1 -0
- package/dist/forge-maker.js +20 -0
- package/dist/forge-maker.js.map +1 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -0
- package/dist/index.js.map +1 -0
- package/dist/indexInternal.d.ts +46 -0
- package/dist/indexInternal.d.ts.map +1 -0
- package/dist/indexInternal.js +39 -0
- package/dist/indexInternal.js.map +1 -0
- package/dist/linuxPackager.d.ts +13 -0
- package/dist/linuxPackager.d.ts.map +1 -0
- package/dist/linuxPackager.js +75 -0
- package/dist/linuxPackager.js.map +1 -0
- package/dist/macPackager.d.ts +50 -0
- package/dist/macPackager.d.ts.map +1 -0
- package/dist/macPackager.js +442 -0
- package/dist/macPackager.js.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/bunNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js +14 -0
- package/dist/node-module-collector/bunNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/hoist.d.ts +124 -0
- package/dist/node-module-collector/hoist.d.ts.map +1 -0
- package/dist/node-module-collector/hoist.js +880 -0
- package/dist/node-module-collector/hoist.js.map +1 -0
- package/dist/node-module-collector/index.d.ts +21 -0
- package/dist/node-module-collector/index.d.ts.map +1 -0
- package/dist/node-module-collector/index.js +124 -0
- package/dist/node-module-collector/index.js.map +1 -0
- package/dist/node-module-collector/moduleManager.d.ts +94 -0
- package/dist/node-module-collector/moduleManager.d.ts.map +1 -0
- package/dist/node-module-collector/moduleManager.js +314 -0
- package/dist/node-module-collector/moduleManager.js.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts +138 -0
- package/dist/node-module-collector/nodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/nodeModulesCollector.js +421 -0
- package/dist/node-module-collector/nodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts +15 -0
- package/dist/node-module-collector/npmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js +75 -0
- package/dist/node-module-collector/npmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/packageManager.d.ts +18 -0
- package/dist/node-module-collector/packageManager.d.ts.map +1 -0
- package/dist/node-module-collector/packageManager.js +137 -0
- package/dist/node-module-collector/packageManager.js.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts +45 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js +184 -0
- package/dist/node-module-collector/pnpmNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts +19 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js +118 -0
- package/dist/node-module-collector/traversalNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/types.d.ts +53 -0
- package/dist/node-module-collector/types.d.ts.map +1 -0
- package/dist/node-module-collector/types.js +2 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts +16 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js +87 -0
- package/dist/node-module-collector/yarnBerryNodeModulesCollector.js.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts +11 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.d.ts.map +1 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js +18 -0
- package/dist/node-module-collector/yarnNodeModulesCollector.js.map +1 -0
- package/dist/options/AppXOptions.d.ts +106 -0
- package/dist/options/AppXOptions.d.ts.map +1 -0
- package/dist/options/AppXOptions.js +2 -0
- package/dist/options/AppXOptions.js.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts +48 -0
- package/dist/options/CommonWindowsInstallerConfiguration.d.ts.map +1 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js +47 -0
- package/dist/options/CommonWindowsInstallerConfiguration.js.map +1 -0
- package/dist/options/FileAssociation.d.ts +46 -0
- package/dist/options/FileAssociation.d.ts.map +1 -0
- package/dist/options/FileAssociation.js +2 -0
- package/dist/options/MsiOptions.d.ts +27 -0
- package/dist/options/MsiOptions.d.ts.map +1 -0
- package/dist/options/MsiOptions.js +2 -0
- package/dist/options/MsiOptions.js.map +1 -0
- package/dist/options/MsiWrappedOptions.d.ts +27 -0
- package/dist/options/MsiWrappedOptions.d.ts.map +1 -0
- package/dist/options/MsiWrappedOptions.js +2 -0
- package/dist/options/MsiWrappedOptions.js.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts +261 -0
- package/dist/options/PlatformSpecificBuildOptions.d.ts.map +1 -0
- package/dist/options/PlatformSpecificBuildOptions.js +2 -0
- package/dist/options/PlatformSpecificBuildOptions.js.map +1 -0
- package/dist/options/SnapOptions.d.ts +480 -0
- package/dist/options/SnapOptions.d.ts.map +1 -0
- package/dist/options/SnapOptions.js +2 -0
- package/dist/options/SnapOptions.js.map +1 -0
- package/dist/options/SquirrelWindowsOptions.d.ts +47 -0
- package/dist/options/SquirrelWindowsOptions.d.ts.map +1 -0
- package/dist/options/SquirrelWindowsOptions.js +2 -0
- package/dist/options/SquirrelWindowsOptions.js.map +1 -0
- package/dist/options/linuxOptions.d.ts +289 -0
- package/dist/options/linuxOptions.d.ts.map +1 -0
- package/dist/options/linuxOptions.js +2 -0
- package/dist/options/linuxOptions.js.map +1 -0
- package/dist/options/macOptions.d.ts +390 -0
- package/dist/options/macOptions.d.ts.map +1 -0
- package/dist/options/macOptions.js +2 -0
- package/dist/options/macOptions.js.map +1 -0
- package/dist/options/metadata.d.ts +54 -0
- package/dist/options/metadata.d.ts.map +1 -0
- package/dist/options/metadata.js +2 -0
- package/dist/options/metadata.js.map +1 -0
- package/dist/options/pkgOptions.d.ts +137 -0
- package/dist/options/pkgOptions.d.ts.map +1 -0
- package/dist/options/pkgOptions.js +2 -0
- package/dist/options/pkgOptions.js.map +1 -0
- package/dist/options/winOptions.d.ts +166 -0
- package/dist/options/winOptions.d.ts.map +1 -0
- package/dist/options/winOptions.js +2 -0
- package/dist/options/winOptions.js.map +1 -0
- package/dist/packager.d.ts +100 -0
- package/dist/packager.d.ts.map +1 -0
- package/dist/packager.js +491 -0
- package/dist/packager.js.map +1 -0
- package/dist/packagerApi.d.ts +32 -0
- package/dist/packagerApi.d.ts.map +1 -0
- package/dist/packagerApi.js +2 -0
- package/dist/packagerApi.js.map +1 -0
- package/dist/platformPackager.d.ts +132 -0
- package/dist/platformPackager.d.ts.map +1 -0
- package/dist/platformPackager.js +761 -0
- package/dist/platformPackager.js.map +1 -0
- package/dist/presets/rectCra.d.ts +2 -0
- package/dist/presets/rectCra.d.ts.map +1 -0
- package/dist/presets/rectCra.js +19 -0
- package/dist/presets/rectCra.js.map +1 -0
- package/dist/publish/PublishManager.d.ts +33 -0
- package/dist/publish/PublishManager.d.ts.map +1 -0
- package/dist/publish/PublishManager.js +470 -0
- package/dist/publish/PublishManager.js.map +1 -0
- package/dist/publish/updateInfoBuilder.d.ts +15 -0
- package/dist/publish/updateInfoBuilder.d.ts.map +1 -0
- package/dist/publish/updateInfoBuilder.js +221 -0
- package/dist/publish/updateInfoBuilder.js.map +1 -0
- package/dist/targets/ArchiveTarget.d.ts +12 -0
- package/dist/targets/ArchiveTarget.d.ts.map +1 -0
- package/dist/targets/ArchiveTarget.js +93 -0
- package/dist/targets/ArchiveTarget.js.map +1 -0
- package/dist/targets/archive.d.ts +27 -0
- package/dist/targets/archive.d.ts.map +1 -0
- package/dist/targets/archive.js +174 -0
- package/dist/targets/archive.js.map +1 -0
- package/dist/targets/blockmap/blockmap.d.ts +17 -0
- package/dist/targets/blockmap/blockmap.d.ts.map +1 -0
- package/dist/targets/blockmap/blockmap.js +150 -0
- package/dist/targets/blockmap/blockmap.js.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts +16 -0
- package/dist/targets/differentialUpdateInfoBuilder.d.ts.map +1 -0
- package/dist/targets/differentialUpdateInfoBuilder.js +73 -0
- package/dist/targets/differentialUpdateInfoBuilder.js.map +1 -0
- package/dist/targets/linux/FlatpakTarget.d.ts +21 -0
- package/dist/targets/linux/FlatpakTarget.d.ts.map +1 -0
- package/dist/targets/linux/FlatpakTarget.js +156 -0
- package/dist/targets/linux/FlatpakTarget.js.map +1 -0
- package/dist/targets/linux/FpmTarget.d.ts +23 -0
- package/dist/targets/linux/FpmTarget.d.ts.map +1 -0
- package/dist/targets/linux/FpmTarget.js +365 -0
- package/dist/targets/linux/FpmTarget.js.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts +24 -0
- package/dist/targets/linux/LinuxTargetHelper.d.ts.map +1 -0
- package/dist/targets/linux/LinuxTargetHelper.js +332 -0
- package/dist/targets/linux/LinuxTargetHelper.js.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts +16 -0
- package/dist/targets/linux/appimage/AppImageTarget.d.ts.map +1 -0
- package/dist/targets/linux/appimage/AppImageTarget.js +141 -0
- package/dist/targets/linux/appimage/AppImageTarget.js.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts +57 -0
- package/dist/targets/linux/appimage/appImageUtil.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appImageUtil.js +317 -0
- package/dist/targets/linux/appimage/appImageUtil.js.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts +4 -0
- package/dist/targets/linux/appimage/appLauncher.d.ts.map +1 -0
- package/dist/targets/linux/appimage/appLauncher.js +91 -0
- package/dist/targets/linux/appimage/appLauncher.js.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts +37 -0
- package/dist/targets/linux/snap/SnapTarget.d.ts.map +1 -0
- package/dist/targets/linux/snap/SnapTarget.js +96 -0
- package/dist/targets/linux/snap/SnapTarget.js.map +1 -0
- package/dist/targets/linux/snap/core24.d.ts +53 -0
- package/dist/targets/linux/snap/core24.d.ts.map +1 -0
- package/dist/targets/linux/snap/core24.js +444 -0
- package/dist/targets/linux/snap/core24.js.map +1 -0
- package/dist/targets/linux/snap/coreCustom.d.ts +29 -0
- package/dist/targets/linux/snap/coreCustom.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreCustom.js +60 -0
- package/dist/targets/linux/snap/coreCustom.js.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts +46 -0
- package/dist/targets/linux/snap/coreLegacy.d.ts.map +1 -0
- package/dist/targets/linux/snap/coreLegacy.js +402 -0
- package/dist/targets/linux/snap/coreLegacy.js.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts +40 -0
- package/dist/targets/linux/snap/snapcraftBuilder.d.ts.map +1 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js +414 -0
- package/dist/targets/linux/snap/snapcraftBuilder.js.map +1 -0
- package/dist/targets/mac/MacTargetHelper.d.ts +30 -0
- package/dist/targets/mac/MacTargetHelper.d.ts.map +1 -0
- package/dist/targets/mac/MacTargetHelper.js +267 -0
- package/dist/targets/mac/MacTargetHelper.js.map +1 -0
- package/dist/targets/mac/pkg.d.ts +31 -0
- package/dist/targets/mac/pkg.d.ts.map +1 -0
- package/dist/targets/mac/pkg.js +271 -0
- package/dist/targets/mac/pkg.js.map +1 -0
- package/dist/targets/targetFactory.d.ts +13 -0
- package/dist/targets/targetFactory.d.ts.map +1 -0
- package/dist/targets/targetFactory.js +94 -0
- package/dist/targets/targetFactory.js.map +1 -0
- package/dist/targets/targetUtil.d.ts +16 -0
- package/dist/targets/targetUtil.d.ts.map +1 -0
- package/dist/targets/targetUtil.js +40 -0
- package/dist/targets/targetUtil.js.map +1 -0
- package/dist/targets/win/AppxCapabilities.d.ts +9 -0
- package/dist/targets/win/AppxCapabilities.d.ts.map +1 -0
- package/dist/targets/win/AppxCapabilities.js +254 -0
- package/dist/targets/win/AppxCapabilities.js.map +1 -0
- package/dist/targets/win/AppxTarget.d.ts +18 -0
- package/dist/targets/win/AppxTarget.d.ts.map +1 -0
- package/dist/targets/win/AppxTarget.js +398 -0
- package/dist/targets/win/AppxTarget.js.map +1 -0
- package/dist/targets/win/MsiTarget.d.ts +29 -0
- package/dist/targets/win/MsiTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiTarget.js +268 -0
- package/dist/targets/win/MsiTarget.js.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts +20 -0
- package/dist/targets/win/MsiWrappedTarget.d.ts.map +1 -0
- package/dist/targets/win/MsiWrappedTarget.js +77 -0
- package/dist/targets/win/MsiWrappedTarget.js.map +1 -0
- package/dist/targets/win/nsis/Commands.d.ts +10 -0
- package/dist/targets/win/nsis/Commands.d.ts.map +1 -0
- package/dist/targets/win/nsis/Commands.js +2 -0
- package/dist/targets/win/nsis/Commands.js.map +1 -0
- package/dist/targets/win/nsis/Defines.d.ts +81 -0
- package/dist/targets/win/nsis/Defines.d.ts.map +1 -0
- package/dist/targets/win/nsis/Defines.js +2 -0
- package/dist/targets/win/nsis/Defines.js.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts +43 -0
- package/dist/targets/win/nsis/NsisTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/NsisTarget.js +726 -0
- package/dist/targets/win/nsis/NsisTarget.js.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts +14 -0
- package/dist/targets/win/nsis/WebInstallerTarget.d.ts.map +1 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js +43 -0
- package/dist/targets/win/nsis/WebInstallerTarget.js.map +1 -0
- package/dist/targets/win/nsis/nsisLang.d.ts +11 -0
- package/dist/targets/win/nsis/nsisLang.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLang.js +94 -0
- package/dist/targets/win/nsis/nsisLang.js.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts +5 -0
- package/dist/targets/win/nsis/nsisLicense.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisLicense.js +73 -0
- package/dist/targets/win/nsis/nsisLicense.js.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts +275 -0
- package/dist/targets/win/nsis/nsisOptions.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisOptions.js +2 -0
- package/dist/targets/win/nsis/nsisOptions.js.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts +13 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js +59 -0
- package/dist/targets/win/nsis/nsisScriptGenerator.js.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts +26 -0
- package/dist/targets/win/nsis/nsisUtil.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisUtil.js +218 -0
- package/dist/targets/win/nsis/nsisUtil.js.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts +19 -0
- package/dist/targets/win/nsis/nsisValidation.d.ts.map +1 -0
- package/dist/targets/win/nsis/nsisValidation.js +49 -0
- package/dist/targets/win/nsis/nsisValidation.js.map +1 -0
- package/dist/toolsets/7zip.d.ts +9 -0
- package/dist/toolsets/7zip.d.ts.map +1 -0
- package/dist/toolsets/7zip.js +80 -0
- package/dist/toolsets/7zip.js.map +1 -0
- package/dist/toolsets/appimage.d.ts +20 -0
- package/dist/toolsets/appimage.d.ts.map +1 -0
- package/dist/toolsets/appimage.js +67 -0
- package/dist/toolsets/appimage.js.map +1 -0
- package/dist/toolsets/custom.d.ts +5 -0
- package/dist/toolsets/custom.d.ts.map +1 -0
- package/dist/toolsets/custom.js +200 -0
- package/dist/toolsets/custom.js.map +1 -0
- package/dist/toolsets/fpm.d.ts +3 -0
- package/dist/toolsets/fpm.d.ts.map +1 -0
- package/dist/toolsets/fpm.js +49 -0
- package/dist/toolsets/fpm.js.map +1 -0
- package/dist/toolsets/icons.d.ts +12 -0
- package/dist/toolsets/icons.d.ts.map +1 -0
- package/dist/toolsets/icons.js +36 -0
- package/dist/toolsets/icons.js.map +1 -0
- package/dist/toolsets/linuxToolsMac.d.ts +8 -0
- package/dist/toolsets/linuxToolsMac.d.ts.map +1 -0
- package/dist/toolsets/linuxToolsMac.js +31 -0
- package/dist/toolsets/linuxToolsMac.js.map +1 -0
- package/dist/toolsets/nsis.d.ts +13 -0
- package/dist/toolsets/nsis.d.ts.map +1 -0
- package/dist/toolsets/nsis.js +100 -0
- package/dist/toolsets/nsis.js.map +1 -0
- package/dist/toolsets/winCodeSign.d.ts +42 -0
- package/dist/toolsets/winCodeSign.d.ts.map +1 -0
- package/dist/toolsets/winCodeSign.js +142 -0
- package/dist/toolsets/winCodeSign.js.map +1 -0
- package/dist/toolsets/wine.d.ts +6 -0
- package/dist/toolsets/wine.d.ts.map +1 -0
- package/dist/toolsets/wine.js +79 -0
- package/dist/toolsets/wine.js.map +1 -0
- package/dist/util/AppFileWalker.d.ts +14 -0
- package/dist/util/AppFileWalker.d.ts.map +1 -0
- package/dist/util/AppFileWalker.js +69 -0
- package/dist/util/AppFileWalker.js.map +1 -0
- package/dist/util/NodeModuleCopyHelper.d.ts +2 -0
- package/dist/util/NodeModuleCopyHelper.d.ts.map +1 -0
- package/dist/util/NodeModuleCopyHelper.js +160 -0
- package/dist/util/NodeModuleCopyHelper.js.map +1 -0
- package/dist/util/appFileCopier.d.ts +17 -0
- package/dist/util/appFileCopier.d.ts.map +1 -0
- package/dist/util/appFileCopier.js +190 -0
- package/dist/util/appFileCopier.js.map +1 -0
- package/dist/util/asyncEventEmitter.d.ts +34 -0
- package/dist/util/asyncEventEmitter.d.ts.map +1 -0
- package/dist/util/asyncEventEmitter.js +56 -0
- package/dist/util/asyncEventEmitter.js.map +1 -0
- package/dist/util/bundledTool.d.ts +8 -0
- package/dist/util/bundledTool.d.ts.map +1 -0
- package/dist/util/bundledTool.js +16 -0
- package/dist/util/bundledTool.js.map +1 -0
- package/dist/util/cacheManager.d.ts +19 -0
- package/dist/util/cacheManager.d.ts.map +1 -0
- package/dist/util/cacheManager.js +65 -0
- package/dist/util/cacheManager.js.map +1 -0
- package/dist/util/cacheState.d.ts +29 -0
- package/dist/util/cacheState.d.ts.map +1 -0
- package/dist/util/cacheState.js +134 -0
- package/dist/util/cacheState.js.map +1 -0
- package/dist/util/config/config.d.ts +13 -0
- package/dist/util/config/config.d.ts.map +1 -0
- package/dist/util/config/config.js +236 -0
- package/dist/util/config/config.js.map +1 -0
- package/dist/util/config/load.d.ts +20 -0
- package/dist/util/config/load.d.ts.map +1 -0
- package/dist/util/config/load.js +122 -0
- package/dist/util/config/load.js.map +1 -0
- package/dist/util/config/schemaValidator.d.ts +8 -0
- package/dist/util/config/schemaValidator.d.ts.map +1 -0
- package/dist/util/config/schemaValidator.js +161 -0
- package/dist/util/config/schemaValidator.js.map +1 -0
- package/dist/util/dynamicImport.d.ts +2 -0
- package/dist/util/dynamicImport.d.ts.map +1 -0
- package/dist/util/dynamicImport.js +9 -0
- package/dist/util/dynamicImport.js.map +1 -0
- package/dist/util/electronGet.d.ts +68 -0
- package/dist/util/electronGet.d.ts.map +1 -0
- package/dist/util/electronGet.js +560 -0
- package/dist/util/electronGet.js.map +1 -0
- package/dist/util/filter.d.ts +2 -0
- package/dist/util/filter.d.ts.map +1 -0
- package/dist/util/filter.js +64 -0
- package/dist/util/filter.js.map +1 -0
- package/dist/util/flags.d.ts +16 -0
- package/dist/util/flags.d.ts.map +1 -0
- package/dist/util/flags.js +53 -0
- package/dist/util/flags.js.map +1 -0
- package/dist/util/hash.d.ts +2 -0
- package/dist/util/hash.d.ts.map +1 -0
- package/dist/util/hash.js +16 -0
- package/dist/util/hash.js.map +1 -0
- package/dist/util/iconConverter.d.ts +29 -0
- package/dist/util/iconConverter.d.ts.map +1 -0
- package/dist/util/iconConverter.js +255 -0
- package/dist/util/iconConverter.js.map +1 -0
- package/dist/util/langs.d.ts +190 -0
- package/dist/util/langs.d.ts.map +1 -0
- package/dist/util/langs.js +432 -0
- package/dist/util/langs.js.map +1 -0
- package/dist/util/license.d.ts +17 -0
- package/dist/util/license.d.ts.map +1 -0
- package/dist/util/license.js +42 -0
- package/dist/util/license.js.map +1 -0
- package/dist/util/mac/macosIconComposer.d.ts +11 -0
- package/dist/util/mac/macosIconComposer.d.ts.map +1 -0
- package/dist/util/mac/macosIconComposer.js +99 -0
- package/dist/util/mac/macosIconComposer.js.map +1 -0
- package/dist/util/mac/macosVersion.d.ts +4 -0
- package/dist/util/mac/macosVersion.d.ts.map +1 -0
- package/dist/util/mac/macosVersion.js +31 -0
- package/dist/util/mac/macosVersion.js.map +1 -0
- package/dist/util/mac/plist.d.ts +8 -0
- package/dist/util/mac/plist.d.ts.map +1 -0
- package/dist/util/mac/plist.js +27 -0
- package/dist/util/mac/plist.js.map +1 -0
- package/dist/util/macroExpander.d.ts +4 -0
- package/dist/util/macroExpander.d.ts.map +1 -0
- package/dist/util/macroExpander.js +61 -0
- package/dist/util/macroExpander.js.map +1 -0
- package/dist/util/normalizePackageData.d.ts +2 -0
- package/dist/util/normalizePackageData.d.ts.map +1 -0
- package/dist/util/normalizePackageData.js +323 -0
- package/dist/util/normalizePackageData.js.map +1 -0
- package/dist/util/packageMetadata.d.ts +2 -0
- package/dist/util/packageMetadata.d.ts.map +1 -0
- package/dist/util/packageMetadata.js +118 -0
- package/dist/util/packageMetadata.js.map +1 -0
- package/dist/util/pathManager.d.ts +4 -0
- package/dist/util/pathManager.d.ts.map +1 -0
- package/dist/util/pathManager.js +17 -0
- package/dist/util/pathManager.js.map +1 -0
- package/dist/util/rebuild.d.ts +3 -0
- package/dist/util/rebuild.d.ts.map +1 -0
- package/dist/util/rebuild.js +54 -0
- package/dist/util/rebuild.js.map +1 -0
- package/dist/util/repositoryInfo.d.ts +4 -0
- package/dist/util/repositoryInfo.d.ts.map +1 -0
- package/dist/util/repositoryInfo.js +76 -0
- package/dist/util/repositoryInfo.js.map +1 -0
- package/dist/util/resolve.d.ts +3 -0
- package/dist/util/resolve.d.ts.map +1 -0
- package/dist/util/resolve.js +56 -0
- package/dist/util/resolve.js.map +1 -0
- package/dist/util/timer.d.ts +12 -0
- package/dist/util/timer.d.ts.map +1 -0
- package/dist/util/timer.js +23 -0
- package/dist/util/timer.js.map +1 -0
- package/dist/util/toolsetLock.d.ts +2 -0
- package/dist/util/toolsetLock.d.ts.map +1 -0
- package/dist/util/toolsetLock.js +20 -0
- package/dist/util/toolsetLock.js.map +1 -0
- package/dist/util/win/resEdit.d.ts +11 -0
- package/dist/util/win/resEdit.d.ts.map +1 -0
- package/dist/util/win/resEdit.js +46 -0
- package/dist/util/win/resEdit.js.map +1 -0
- package/dist/util/yarn.d.ts +23 -0
- package/dist/util/yarn.d.ts.map +1 -0
- package/dist/util/yarn.js +153 -0
- package/dist/util/yarn.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/vm/MonoVm.d.ts +9 -0
- package/dist/vm/MonoVm.d.ts.map +1 -0
- package/dist/vm/MonoVm.js +16 -0
- package/dist/vm/MonoVm.js.map +1 -0
- package/dist/vm/ParallelsVm.d.ts +24 -0
- package/dist/vm/ParallelsVm.d.ts.map +1 -0
- package/dist/vm/ParallelsVm.js +107 -0
- package/dist/vm/ParallelsVm.js.map +1 -0
- package/dist/vm/PwshVm.d.ts +7 -0
- package/dist/vm/PwshVm.d.ts.map +1 -0
- package/dist/vm/PwshVm.js +21 -0
- package/dist/vm/PwshVm.js.map +1 -0
- package/dist/vm/WineVm.d.ts +14 -0
- package/dist/vm/WineVm.d.ts.map +1 -0
- package/dist/vm/WineVm.js +35 -0
- package/dist/vm/WineVm.js.map +1 -0
- package/dist/vm/vm.d.ts +15 -0
- package/dist/vm/vm.d.ts.map +1 -0
- package/dist/vm/vm.js +81 -0
- package/dist/vm/vm.js.map +1 -0
- package/dist/winPackager.d.ts +30 -0
- package/dist/winPackager.d.ts.map +1 -0
- package/dist/winPackager.js +270 -0
- package/dist/winPackager.js.map +1 -0
- package/helpers/package.json +6 -0
- package/helpers/remote-rebuild.js +2 -4
- package/package.json +30 -33
- package/scheme.json +379 -721
- package/out/Framework.d.ts +0 -36
- package/out/Framework.js +0 -7
- package/out/Framework.js.map +0 -1
- package/out/ProtonFramework.d.ts +0 -10
- package/out/ProtonFramework.js +0 -94
- package/out/ProtonFramework.js.map +0 -1
- package/out/appInfo.d.ts +0 -31
- package/out/appInfo.js +0 -152
- package/out/appInfo.js.map +0 -1
- package/out/asar/asar.d.ts +0 -38
- package/out/asar/asar.js +0 -163
- package/out/asar/asar.js.map +0 -1
- package/out/asar/asarFileChecker.d.ts +0 -2
- package/out/asar/asarFileChecker.js +0 -25
- package/out/asar/asarFileChecker.js.map +0 -1
- package/out/asar/asarUtil.d.ts +0 -1
- package/out/asar/asarUtil.js +0 -285
- package/out/asar/asarUtil.js.map +0 -1
- package/out/asar/integrity.d.ts +0 -15
- package/out/asar/integrity.js +0 -62
- package/out/asar/integrity.js.map +0 -1
- package/out/asar/unpackDetector.d.ts +0 -1
- package/out/asar/unpackDetector.js +0 -43
- package/out/asar/unpackDetector.js.map +0 -1
- package/out/binDownload.d.ts +0 -5
- package/out/binDownload.js +0 -104
- package/out/binDownload.js.map +0 -1
- package/out/codeSign/certInfo.d.ts +0 -54
- package/out/codeSign/certInfo.js +0 -466
- package/out/codeSign/certInfo.js.map +0 -1
- package/out/codeSign/codesign.d.ts +0 -3
- package/out/codeSign/codesign.js +0 -33
- package/out/codeSign/codesign.js.map +0 -1
- package/out/codeSign/macCodeSign.d.ts +0 -28
- package/out/codeSign/macCodeSign.js +0 -284
- package/out/codeSign/macCodeSign.js.map +0 -1
- package/out/codeSign/signManager.d.ts +0 -13
- package/out/codeSign/signManager.js +0 -3
- package/out/codeSign/signManager.js.map +0 -1
- package/out/codeSign/windowsCodeSign.d.ts +0 -7
- package/out/codeSign/windowsCodeSign.js +0 -38
- package/out/codeSign/windowsCodeSign.js.map +0 -1
- package/out/codeSign/windowsSignAzureManager.d.ts +0 -17
- package/out/codeSign/windowsSignAzureManager.js +0 -73
- package/out/codeSign/windowsSignAzureManager.js.map +0 -1
- package/out/codeSign/windowsSignToolManager.d.ts +0 -58
- package/out/codeSign/windowsSignToolManager.js +0 -376
- package/out/codeSign/windowsSignToolManager.js.map +0 -1
- package/out/configuration.d.ts +0 -532
- package/out/configuration.js +0 -3
- package/out/configuration.js.map +0 -1
- package/out/core.d.ts +0 -60
- package/out/core.js +0 -66
- package/out/core.js.map +0 -1
- package/out/electron/ElectronFramework.d.ts +0 -16
- package/out/electron/ElectronFramework.js +0 -242
- package/out/electron/ElectronFramework.js.map +0 -1
- package/out/electron/electronMac.d.ts +0 -1
- package/out/electron/electronMac.js +0 -262
- package/out/electron/electronMac.js.map +0 -1
- package/out/electron/electronVersion.d.ts +0 -6
- package/out/electron/electronVersion.js +0 -125
- package/out/electron/electronVersion.js.map +0 -1
- package/out/electron/electronWin.d.ts +0 -1
- package/out/electron/electronWin.js +0 -38
- package/out/electron/electronWin.js.map +0 -1
- package/out/electron/injectFFMPEG.d.ts +0 -11
- package/out/electron/injectFFMPEG.js +0 -57
- package/out/electron/injectFFMPEG.js.map +0 -1
- package/out/electron/search-module.d.ts +0 -23
- package/out/electron/search-module.js +0 -73
- package/out/electron/search-module.js.map +0 -1
- package/out/errorMessages.d.ts +0 -1
- package/out/errorMessages.js +0 -11
- package/out/errorMessages.js.map +0 -1
- package/out/fileMatcher.d.ts +0 -29
- package/out/fileMatcher.js +0 -292
- package/out/fileMatcher.js.map +0 -1
- package/out/fileTransformer.d.ts +0 -1
- package/out/fileTransformer.js +0 -107
- package/out/fileTransformer.js.map +0 -1
- package/out/forge-maker.d.ts +0 -5
- package/out/forge-maker.js +0 -23
- package/out/forge-maker.js.map +0 -1
- package/out/frameworks/LibUiFramework.d.ts +0 -47
- package/out/frameworks/LibUiFramework.js +0 -197
- package/out/frameworks/LibUiFramework.js.map +0 -1
- package/out/index.d.ts +0 -39
- package/out/index.js +0 -99
- package/out/index.js.map +0 -1
- package/out/linuxPackager.d.ts +0 -12
- package/out/linuxPackager.js +0 -77
- package/out/linuxPackager.js.map +0 -1
- package/out/mac/MacTargetHelper.d.ts +0 -29
- package/out/mac/MacTargetHelper.js +0 -273
- package/out/mac/MacTargetHelper.js.map +0 -1
- package/out/macPackager.d.ts +0 -49
- package/out/macPackager.js +0 -445
- package/out/macPackager.js.map +0 -1
- package/out/node-module-collector/bunNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/bunNodeModulesCollector.js +0 -18
- package/out/node-module-collector/bunNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/hoist.d.ts +0 -123
- package/out/node-module-collector/hoist.js +0 -884
- package/out/node-module-collector/hoist.js.map +0 -1
- package/out/node-module-collector/index.d.ts +0 -18
- package/out/node-module-collector/index.js +0 -130
- package/out/node-module-collector/index.js.map +0 -1
- package/out/node-module-collector/moduleManager.d.ts +0 -93
- package/out/node-module-collector/moduleManager.js +0 -321
- package/out/node-module-collector/moduleManager.js.map +0 -1
- package/out/node-module-collector/nodeModulesCollector.d.ts +0 -137
- package/out/node-module-collector/nodeModulesCollector.js +0 -428
- package/out/node-module-collector/nodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/npmNodeModulesCollector.d.ts +0 -14
- package/out/node-module-collector/npmNodeModulesCollector.js +0 -80
- package/out/node-module-collector/npmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/packageManager.d.ts +0 -17
- package/out/node-module-collector/packageManager.js +0 -144
- package/out/node-module-collector/packageManager.js.map +0 -1
- package/out/node-module-collector/pnpmNodeModulesCollector.d.ts +0 -44
- package/out/node-module-collector/pnpmNodeModulesCollector.js +0 -191
- package/out/node-module-collector/pnpmNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/traversalNodeModulesCollector.d.ts +0 -18
- package/out/node-module-collector/traversalNodeModulesCollector.js +0 -122
- package/out/node-module-collector/traversalNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/types.d.ts +0 -52
- package/out/node-module-collector/types.js +0 -3
- package/out/node-module-collector/yarnBerryNodeModulesCollector.d.ts +0 -15
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js +0 -93
- package/out/node-module-collector/yarnBerryNodeModulesCollector.js.map +0 -1
- package/out/node-module-collector/yarnNodeModulesCollector.d.ts +0 -10
- package/out/node-module-collector/yarnNodeModulesCollector.js +0 -22
- package/out/node-module-collector/yarnNodeModulesCollector.js.map +0 -1
- package/out/options/AppXOptions.d.ts +0 -105
- package/out/options/AppXOptions.js +0 -3
- package/out/options/AppXOptions.js.map +0 -1
- package/out/options/CommonWindowsInstallerConfiguration.d.ts +0 -47
- package/out/options/CommonWindowsInstallerConfiguration.js +0 -51
- package/out/options/CommonWindowsInstallerConfiguration.js.map +0 -1
- package/out/options/FileAssociation.d.ts +0 -45
- package/out/options/FileAssociation.js +0 -3
- package/out/options/MsiOptions.d.ts +0 -26
- package/out/options/MsiOptions.js +0 -3
- package/out/options/MsiOptions.js.map +0 -1
- package/out/options/MsiWrappedOptions.d.ts +0 -26
- package/out/options/MsiWrappedOptions.js +0 -3
- package/out/options/MsiWrappedOptions.js.map +0 -1
- package/out/options/PlatformSpecificBuildOptions.d.ts +0 -238
- package/out/options/PlatformSpecificBuildOptions.js +0 -3
- package/out/options/PlatformSpecificBuildOptions.js.map +0 -1
- package/out/options/SnapOptions.d.ts +0 -500
- package/out/options/SnapOptions.js +0 -3
- package/out/options/SnapOptions.js.map +0 -1
- package/out/options/SquirrelWindowsOptions.d.ts +0 -46
- package/out/options/SquirrelWindowsOptions.js +0 -3
- package/out/options/SquirrelWindowsOptions.js.map +0 -1
- package/out/options/linuxOptions.d.ts +0 -287
- package/out/options/linuxOptions.js +0 -3
- package/out/options/linuxOptions.js.map +0 -1
- package/out/options/macOptions.d.ts +0 -388
- package/out/options/macOptions.js +0 -3
- package/out/options/macOptions.js.map +0 -1
- package/out/options/metadata.d.ts +0 -53
- package/out/options/metadata.js +0 -3
- package/out/options/metadata.js.map +0 -1
- package/out/options/pkgOptions.d.ts +0 -136
- package/out/options/pkgOptions.js +0 -3
- package/out/options/pkgOptions.js.map +0 -1
- package/out/options/winOptions.d.ts +0 -164
- package/out/options/winOptions.js +0 -3
- package/out/options/winOptions.js.map +0 -1
- package/out/packager.d.ts +0 -99
- package/out/packager.js +0 -515
- package/out/packager.js.map +0 -1
- package/out/packagerApi.d.ts +0 -31
- package/out/packagerApi.js +0 -3
- package/out/packagerApi.js.map +0 -1
- package/out/platformPackager.d.ts +0 -101
- package/out/platformPackager.js +0 -714
- package/out/platformPackager.js.map +0 -1
- package/out/presets/rectCra.d.ts +0 -1
- package/out/presets/rectCra.js +0 -22
- package/out/presets/rectCra.js.map +0 -1
- package/out/publish/PublishManager.d.ts +0 -30
- package/out/publish/PublishManager.js +0 -497
- package/out/publish/PublishManager.js.map +0 -1
- package/out/publish/updateInfoBuilder.d.ts +0 -14
- package/out/publish/updateInfoBuilder.js +0 -226
- package/out/publish/updateInfoBuilder.js.map +0 -1
- package/out/targets/AppxCapabilities.d.ts +0 -8
- package/out/targets/AppxCapabilities.js +0 -258
- package/out/targets/AppxCapabilities.js.map +0 -1
- package/out/targets/AppxTarget.d.ts +0 -17
- package/out/targets/AppxTarget.js +0 -403
- package/out/targets/AppxTarget.js.map +0 -1
- package/out/targets/ArchiveTarget.d.ts +0 -11
- package/out/targets/ArchiveTarget.js +0 -88
- package/out/targets/ArchiveTarget.js.map +0 -1
- package/out/targets/FlatpakTarget.d.ts +0 -20
- package/out/targets/FlatpakTarget.js +0 -159
- package/out/targets/FlatpakTarget.js.map +0 -1
- package/out/targets/FpmTarget.d.ts +0 -22
- package/out/targets/FpmTarget.js +0 -372
- package/out/targets/FpmTarget.js.map +0 -1
- package/out/targets/LinuxTargetHelper.d.ts +0 -23
- package/out/targets/LinuxTargetHelper.js +0 -346
- package/out/targets/LinuxTargetHelper.js.map +0 -1
- package/out/targets/MsiTarget.d.ts +0 -28
- package/out/targets/MsiTarget.js +0 -268
- package/out/targets/MsiTarget.js.map +0 -1
- package/out/targets/MsiWrappedTarget.d.ts +0 -19
- package/out/targets/MsiWrappedTarget.js +0 -80
- package/out/targets/MsiWrappedTarget.js.map +0 -1
- package/out/targets/appimage/AppImageTarget.d.ts +0 -15
- package/out/targets/appimage/AppImageTarget.js +0 -147
- package/out/targets/appimage/AppImageTarget.js.map +0 -1
- package/out/targets/appimage/appImageUtil.d.ts +0 -56
- package/out/targets/appimage/appImageUtil.js +0 -323
- package/out/targets/appimage/appImageUtil.js.map +0 -1
- package/out/targets/appimage/appLauncher.d.ts +0 -3
- package/out/targets/appimage/appLauncher.js +0 -95
- package/out/targets/appimage/appLauncher.js.map +0 -1
- package/out/targets/archive.d.ts +0 -26
- package/out/targets/archive.js +0 -178
- package/out/targets/archive.js.map +0 -1
- package/out/targets/blockmap/blockmap.d.ts +0 -16
- package/out/targets/blockmap/blockmap.js +0 -153
- package/out/targets/blockmap/blockmap.js.map +0 -1
- package/out/targets/differentialUpdateInfoBuilder.d.ts +0 -15
- package/out/targets/differentialUpdateInfoBuilder.js +0 -80
- package/out/targets/differentialUpdateInfoBuilder.js.map +0 -1
- package/out/targets/nsis/Commands.d.ts +0 -9
- package/out/targets/nsis/Commands.js +0 -3
- package/out/targets/nsis/Commands.js.map +0 -1
- package/out/targets/nsis/Defines.d.ts +0 -80
- package/out/targets/nsis/Defines.js +0 -3
- package/out/targets/nsis/Defines.js.map +0 -1
- package/out/targets/nsis/NsisTarget.d.ts +0 -37
- package/out/targets/nsis/NsisTarget.js +0 -729
- package/out/targets/nsis/NsisTarget.js.map +0 -1
- package/out/targets/nsis/WebInstallerTarget.d.ts +0 -13
- package/out/targets/nsis/WebInstallerTarget.js +0 -47
- package/out/targets/nsis/WebInstallerTarget.js.map +0 -1
- package/out/targets/nsis/nsisLang.d.ts +0 -10
- package/out/targets/nsis/nsisLang.js +0 -100
- package/out/targets/nsis/nsisLang.js.map +0 -1
- package/out/targets/nsis/nsisLicense.d.ts +0 -4
- package/out/targets/nsis/nsisLicense.js +0 -77
- package/out/targets/nsis/nsisLicense.js.map +0 -1
- package/out/targets/nsis/nsisOptions.d.ts +0 -274
- package/out/targets/nsis/nsisOptions.js +0 -3
- package/out/targets/nsis/nsisOptions.js.map +0 -1
- package/out/targets/nsis/nsisScriptGenerator.d.ts +0 -12
- package/out/targets/nsis/nsisScriptGenerator.js +0 -64
- package/out/targets/nsis/nsisScriptGenerator.js.map +0 -1
- package/out/targets/nsis/nsisUtil.d.ts +0 -25
- package/out/targets/nsis/nsisUtil.js +0 -225
- package/out/targets/nsis/nsisUtil.js.map +0 -1
- package/out/targets/nsis/nsisValidation.d.ts +0 -18
- package/out/targets/nsis/nsisValidation.js +0 -53
- package/out/targets/nsis/nsisValidation.js.map +0 -1
- package/out/targets/pkg.d.ts +0 -30
- package/out/targets/pkg.js +0 -279
- package/out/targets/pkg.js.map +0 -1
- package/out/targets/snap/SnapTarget.d.ts +0 -36
- package/out/targets/snap/SnapTarget.js +0 -105
- package/out/targets/snap/SnapTarget.js.map +0 -1
- package/out/targets/snap/core24.d.ts +0 -52
- package/out/targets/snap/core24.js +0 -449
- package/out/targets/snap/core24.js.map +0 -1
- package/out/targets/snap/coreCustom.d.ts +0 -28
- package/out/targets/snap/coreCustom.js +0 -63
- package/out/targets/snap/coreCustom.js.map +0 -1
- package/out/targets/snap/coreLegacy.d.ts +0 -43
- package/out/targets/snap/coreLegacy.js +0 -416
- package/out/targets/snap/coreLegacy.js.map +0 -1
- package/out/targets/snap/snapcraftBuilder.d.ts +0 -39
- package/out/targets/snap/snapcraftBuilder.js +0 -419
- package/out/targets/snap/snapcraftBuilder.js.map +0 -1
- package/out/targets/targetFactory.d.ts +0 -12
- package/out/targets/targetFactory.js +0 -101
- package/out/targets/targetFactory.js.map +0 -1
- package/out/targets/targetUtil.d.ts +0 -14
- package/out/targets/targetUtil.js +0 -47
- package/out/targets/targetUtil.js.map +0 -1
- package/out/toolsets/7zip.d.ts +0 -2
- package/out/toolsets/7zip.js +0 -72
- package/out/toolsets/7zip.js.map +0 -1
- package/out/toolsets/icons.d.ts +0 -8
- package/out/toolsets/icons.js +0 -37
- package/out/toolsets/icons.js.map +0 -1
- package/out/toolsets/linux.d.ts +0 -26
- package/out/toolsets/linux.js +0 -146
- package/out/toolsets/linux.js.map +0 -1
- package/out/toolsets/windows.d.ts +0 -61
- package/out/toolsets/windows.js +0 -259
- package/out/toolsets/windows.js.map +0 -1
- package/out/toolsets/wine.d.ts +0 -5
- package/out/toolsets/wine.js +0 -100
- package/out/toolsets/wine.js.map +0 -1
- package/out/util/AppFileWalker.d.ts +0 -13
- package/out/util/AppFileWalker.js +0 -74
- package/out/util/AppFileWalker.js.map +0 -1
- package/out/util/NodeModuleCopyHelper.d.ts +0 -1
- package/out/util/NodeModuleCopyHelper.js +0 -165
- package/out/util/NodeModuleCopyHelper.js.map +0 -1
- package/out/util/appFileCopier.d.ts +0 -16
- package/out/util/appFileCopier.js +0 -251
- package/out/util/appFileCopier.js.map +0 -1
- package/out/util/asyncEventEmitter.d.ts +0 -33
- package/out/util/asyncEventEmitter.js +0 -63
- package/out/util/asyncEventEmitter.js.map +0 -1
- package/out/util/bundledTool.d.ts +0 -7
- package/out/util/bundledTool.js +0 -20
- package/out/util/bundledTool.js.map +0 -1
- package/out/util/cacheManager.d.ts +0 -18
- package/out/util/cacheManager.js +0 -70
- package/out/util/cacheManager.js.map +0 -1
- package/out/util/cacheState.d.ts +0 -28
- package/out/util/cacheState.js +0 -143
- package/out/util/cacheState.js.map +0 -1
- package/out/util/config/config.d.ts +0 -12
- package/out/util/config/config.js +0 -256
- package/out/util/config/config.js.map +0 -1
- package/out/util/config/load.d.ts +0 -19
- package/out/util/config/load.js +0 -129
- package/out/util/config/load.js.map +0 -1
- package/out/util/config/schemaValidator.d.ts +0 -7
- package/out/util/config/schemaValidator.js +0 -154
- package/out/util/config/schemaValidator.js.map +0 -1
- package/out/util/dynamicImport.d.ts +0 -1
- package/out/util/dynamicImport.js +0 -12
- package/out/util/dynamicImport.js.map +0 -1
- package/out/util/electronGet.d.ts +0 -61
- package/out/util/electronGet.js +0 -464
- package/out/util/electronGet.js.map +0 -1
- package/out/util/envPath.d.ts +0 -2
- package/out/util/envPath.js +0 -28
- package/out/util/envPath.js.map +0 -1
- package/out/util/filter.d.ts +0 -1
- package/out/util/filter.js +0 -68
- package/out/util/filter.js.map +0 -1
- package/out/util/flags.d.ts +0 -3
- package/out/util/flags.js +0 -16
- package/out/util/flags.js.map +0 -1
- package/out/util/hash.d.ts +0 -1
- package/out/util/hash.js +0 -19
- package/out/util/hash.js.map +0 -1
- package/out/util/iconConverter.d.ts +0 -25
- package/out/util/iconConverter.js +0 -260
- package/out/util/iconConverter.js.map +0 -1
- package/out/util/langs.d.ts +0 -189
- package/out/util/langs.js +0 -436
- package/out/util/langs.js.map +0 -1
- package/out/util/license.d.ts +0 -16
- package/out/util/license.js +0 -47
- package/out/util/license.js.map +0 -1
- package/out/util/macosIconComposer.d.ts +0 -10
- package/out/util/macosIconComposer.js +0 -102
- package/out/util/macosIconComposer.js.map +0 -1
- package/out/util/macosVersion.d.ts +0 -3
- package/out/util/macosVersion.js +0 -36
- package/out/util/macosVersion.js.map +0 -1
- package/out/util/macroExpander.d.ts +0 -3
- package/out/util/macroExpander.js +0 -64
- package/out/util/macroExpander.js.map +0 -1
- package/out/util/normalizePackageData.d.ts +0 -1
- package/out/util/normalizePackageData.js +0 -328
- package/out/util/normalizePackageData.js.map +0 -1
- package/out/util/packageDependencies.d.ts +0 -6
- package/out/util/packageDependencies.js +0 -3
- package/out/util/packageDependencies.js.map +0 -1
- package/out/util/packageMetadata.d.ts +0 -1
- package/out/util/packageMetadata.js +0 -124
- package/out/util/packageMetadata.js.map +0 -1
- package/out/util/pathManager.d.ts +0 -3
- package/out/util/pathManager.js +0 -23
- package/out/util/pathManager.js.map +0 -1
- package/out/util/plist.d.ts +0 -7
- package/out/util/plist.js +0 -31
- package/out/util/plist.js.map +0 -1
- package/out/util/rebuild.d.ts +0 -2
- package/out/util/rebuild.js +0 -60
- package/out/util/rebuild.js.map +0 -1
- package/out/util/repositoryInfo.d.ts +0 -3
- package/out/util/repositoryInfo.js +0 -79
- package/out/util/repositoryInfo.js.map +0 -1
- package/out/util/resEdit.d.ts +0 -10
- package/out/util/resEdit.js +0 -49
- package/out/util/resEdit.js.map +0 -1
- package/out/util/resolve.d.ts +0 -2
- package/out/util/resolve.js +0 -59
- package/out/util/resolve.js.map +0 -1
- package/out/util/timer.d.ts +0 -11
- package/out/util/timer.js +0 -28
- package/out/util/timer.js.map +0 -1
- package/out/util/toolsetLock.d.ts +0 -1
- package/out/util/toolsetLock.js +0 -23
- package/out/util/toolsetLock.js.map +0 -1
- package/out/util/yarn.d.ts +0 -22
- package/out/util/yarn.js +0 -160
- package/out/util/yarn.js.map +0 -1
- package/out/version.d.ts +0 -1
- package/out/version.js +0 -5
- package/out/version.js.map +0 -1
- package/out/vm/MonoVm.d.ts +0 -8
- package/out/vm/MonoVm.js +0 -20
- package/out/vm/MonoVm.js.map +0 -1
- package/out/vm/ParallelsVm.d.ts +0 -23
- package/out/vm/ParallelsVm.js +0 -102
- package/out/vm/ParallelsVm.js.map +0 -1
- package/out/vm/PwshVm.d.ts +0 -6
- package/out/vm/PwshVm.js +0 -25
- package/out/vm/PwshVm.js.map +0 -1
- package/out/vm/WineVm.d.ts +0 -12
- package/out/vm/WineVm.js +0 -38
- package/out/vm/WineVm.js.map +0 -1
- package/out/vm/vm.d.ts +0 -14
- package/out/vm/vm.js +0 -88
- package/out/vm/vm.js.map +0 -1
- package/out/winPackager.d.ts +0 -29
- package/out/winPackager.js +0 -271
- package/out/winPackager.js.map +0 -1
- /package/{out → dist}/node-module-collector/types.js.map +0 -0
- /package/{out → dist}/options/FileAssociation.js.map +0 -0
- /package/helpers/{dynamic-import.js → dynamic-import.cjs} +0 -0
|
@@ -0,0 +1,726 @@
|
|
|
1
|
+
import { Arch, asArray, AsyncTaskManager, spawnAndWriteWithOutput, exists, generateKsuid, getArchSuffix, getPlatformIconFileName, InvalidConfigurationError, log, statOrNull, use, walk, } from "builder-util";
|
|
2
|
+
import { CURRENT_APP_INSTALLER_FILE_NAME, CURRENT_APP_PACKAGE_FILE_NAME, deepAssign, sleep, UUID } from "builder-util-runtime";
|
|
3
|
+
import _debug from "debug";
|
|
4
|
+
import * as fs from "fs";
|
|
5
|
+
import * as path from "path";
|
|
6
|
+
import { Target } from "../../../core.js";
|
|
7
|
+
import { DesktopShortcutCreationPolicy, getEffectiveOptions } from "../../../options/CommonWindowsInstallerConfiguration.js";
|
|
8
|
+
import { chooseNotNull, computeSafeArtifactNameIfNeeded, normalizeExt } from "../../../platformPackager.js";
|
|
9
|
+
import { hashFile } from "../../../util/hash.js";
|
|
10
|
+
import { isMacOsCatalina } from "../../../util/mac/macosVersion.js";
|
|
11
|
+
import { time } from "../../../util/timer.js";
|
|
12
|
+
import { WineVmManager } from "../../../vm/WineVm.js";
|
|
13
|
+
import { archive } from "../../archive.js";
|
|
14
|
+
import { appendBlockmap, configureDifferentialAwareArchiveOptions, createBlockmap, createNsisWebDifferentialUpdateInfo } from "../../differentialUpdateInfoBuilder.js";
|
|
15
|
+
import { getWindowsInstallationAppPackageName, getWindowsInstallationDirName } from "../../targetUtil.js";
|
|
16
|
+
import { addCustomMessageFileInclude, createAddLangsMacro, LangConfigurator } from "./nsisLang.js";
|
|
17
|
+
import { computeLicensePage } from "./nsisLicense.js";
|
|
18
|
+
import { NsisScriptGenerator, nsisEscapeString } from "./nsisScriptGenerator.js";
|
|
19
|
+
import { getMakeNsisPath, getNsisPluginsPath } from "../../../toolsets/nsis.js";
|
|
20
|
+
import { nsisTemplatesDir, UninstallerReader } from "./nsisUtil.js";
|
|
21
|
+
import { checkMakensisOutput, verifyInstallerSize } from "./nsisValidation.js";
|
|
22
|
+
import _fsExtra from "fs-extra";
|
|
23
|
+
const { readFile, stat, unlink } = _fsExtra;
|
|
24
|
+
const debug = _debug("electron-builder:nsis");
|
|
25
|
+
// noinspection SpellCheckingInspection
|
|
26
|
+
const ELECTRON_BUILDER_NS_UUID = UUID.parse("50e065bc-3134-11e6-9bab-38c9862bdaf3");
|
|
27
|
+
const USE_NSIS_BUILT_IN_COMPRESSOR = false;
|
|
28
|
+
export class NsisTarget extends Target {
|
|
29
|
+
constructor(packager, outDir, targetName, packageHelper) {
|
|
30
|
+
super(targetName);
|
|
31
|
+
this.packager = packager;
|
|
32
|
+
this.outDir = outDir;
|
|
33
|
+
this.packageHelper = packageHelper;
|
|
34
|
+
/** @private */
|
|
35
|
+
this.archs = new Map();
|
|
36
|
+
this.isAsyncSupported = false;
|
|
37
|
+
this.packageHelper.refCount++;
|
|
38
|
+
this.options =
|
|
39
|
+
targetName === "portable"
|
|
40
|
+
? Object.create(null)
|
|
41
|
+
: {
|
|
42
|
+
preCompressedFileExtensions: [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"],
|
|
43
|
+
...this.packager.config.nsis,
|
|
44
|
+
};
|
|
45
|
+
if (targetName !== "nsis") {
|
|
46
|
+
deepAssign(this.options, this.packager.config[targetName === "nsis-web" ? "nsisWeb" : targetName]);
|
|
47
|
+
}
|
|
48
|
+
const deps = packager.metadata.dependencies;
|
|
49
|
+
if (deps != null && deps["electron-squirrel-startup"] != null) {
|
|
50
|
+
log.warn('"electron-squirrel-startup" dependency is not required for NSIS');
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
get shouldBuildUniversalInstaller() {
|
|
54
|
+
const buildSeparateInstallers = this.options.buildUniversalInstaller === false;
|
|
55
|
+
return !buildSeparateInstallers;
|
|
56
|
+
}
|
|
57
|
+
build(appOutDir, arch) {
|
|
58
|
+
this.archs.set(arch, appOutDir);
|
|
59
|
+
if (!this.shouldBuildUniversalInstaller) {
|
|
60
|
+
return this.buildInstaller(new Map().set(arch, appOutDir));
|
|
61
|
+
}
|
|
62
|
+
return Promise.resolve();
|
|
63
|
+
}
|
|
64
|
+
get isBuildDifferentialAware() {
|
|
65
|
+
return !this.isPortable && this.options.differentialPackage !== false;
|
|
66
|
+
}
|
|
67
|
+
getPreCompressedFileExtensions() {
|
|
68
|
+
const result = this.isWebInstaller ? null : this.options.preCompressedFileExtensions;
|
|
69
|
+
return result == null ? null : asArray(result).map(it => (it.startsWith(".") ? it : `.${it}`));
|
|
70
|
+
}
|
|
71
|
+
/** @private */
|
|
72
|
+
async buildAppPackage(appOutDir, arch) {
|
|
73
|
+
const options = this.options;
|
|
74
|
+
const packager = this.packager;
|
|
75
|
+
const isBuildDifferentialAware = this.isBuildDifferentialAware;
|
|
76
|
+
const format = !isBuildDifferentialAware && options.useZip ? "zip" : "7z";
|
|
77
|
+
const archiveFile = path.join(this.outDir, `${packager.appInfo.sanitizedName}-${packager.appInfo.version}-${Arch[arch]}.nsis.${format}`);
|
|
78
|
+
const preCompressedFileExtensions = this.getPreCompressedFileExtensions();
|
|
79
|
+
const archiveOptions = {
|
|
80
|
+
withoutDir: true,
|
|
81
|
+
compression: packager.compression,
|
|
82
|
+
excluded: preCompressedFileExtensions == null ? null : preCompressedFileExtensions.map(it => `*${it}`),
|
|
83
|
+
};
|
|
84
|
+
const timer = time(`nsis package, ${Arch[arch]}`);
|
|
85
|
+
await archive(format, archiveFile, appOutDir, isBuildDifferentialAware ? configureDifferentialAwareArchiveOptions(archiveOptions) : archiveOptions);
|
|
86
|
+
timer.end();
|
|
87
|
+
if (isBuildDifferentialAware && this.isWebInstaller) {
|
|
88
|
+
const data = await appendBlockmap(archiveFile);
|
|
89
|
+
return {
|
|
90
|
+
...data,
|
|
91
|
+
path: archiveFile,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return await createPackageFileInfo(archiveFile);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
installerFilenamePattern(primaryArch, defaultArch) {
|
|
99
|
+
const setupText = this.isPortable ? "" : "Setup ";
|
|
100
|
+
const archSuffix = !this.shouldBuildUniversalInstaller && primaryArch != null ? getArchSuffix(primaryArch, defaultArch) : "";
|
|
101
|
+
return "${productName} " + setupText + "${version}" + archSuffix + ".${ext}";
|
|
102
|
+
}
|
|
103
|
+
get isPortable() {
|
|
104
|
+
return this.name === "portable";
|
|
105
|
+
}
|
|
106
|
+
async finishBuild() {
|
|
107
|
+
if (!this.shouldBuildUniversalInstaller) {
|
|
108
|
+
await super.finishBuild();
|
|
109
|
+
return this.packageHelper.finishBuild();
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const { pattern } = this.packager.artifactPatternConfig(this.options, this.installerFilenamePattern());
|
|
113
|
+
const builds = new Set([this.archs]);
|
|
114
|
+
if (pattern.includes("${arch}") && this.archs.size > 1) {
|
|
115
|
+
;
|
|
116
|
+
[...this.archs].forEach(([arch, appOutDir]) => builds.add(new Map().set(arch, appOutDir)));
|
|
117
|
+
}
|
|
118
|
+
const doBuildArchs = builds.values();
|
|
119
|
+
for (const archs of doBuildArchs) {
|
|
120
|
+
await this.buildInstaller(archs);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
finally {
|
|
124
|
+
await super.finishBuild();
|
|
125
|
+
await this.packageHelper.finishBuild();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
async buildInstaller(archs) {
|
|
129
|
+
const primaryArch = archs.size === 1 ? (archs.keys().next().value ?? null) : null;
|
|
130
|
+
const packager = this.packager;
|
|
131
|
+
const appInfo = packager.appInfo;
|
|
132
|
+
const options = this.options;
|
|
133
|
+
const defaultArch = chooseNotNull(this.packager.platformOptions.defaultArch, this.packager.config.defaultArch) ?? undefined;
|
|
134
|
+
const installerFilename = packager.expandArtifactNamePattern(options, "exe", primaryArch, this.installerFilenamePattern(primaryArch, defaultArch), false, defaultArch);
|
|
135
|
+
const oneClick = options.oneClick !== false;
|
|
136
|
+
const installerPath = path.join(this.outDir, installerFilename);
|
|
137
|
+
const logFields = {
|
|
138
|
+
target: this.name,
|
|
139
|
+
file: log.filePath(installerPath),
|
|
140
|
+
archs: Array.from(archs.keys())
|
|
141
|
+
.map(it => Arch[it])
|
|
142
|
+
.join(", "),
|
|
143
|
+
};
|
|
144
|
+
const isPerMachine = options.perMachine === true;
|
|
145
|
+
if (!this.isPortable) {
|
|
146
|
+
logFields.oneClick = oneClick;
|
|
147
|
+
logFields.perMachine = isPerMachine;
|
|
148
|
+
}
|
|
149
|
+
await packager.emitArtifactBuildStarted({
|
|
150
|
+
targetPresentableName: this.name,
|
|
151
|
+
file: installerPath,
|
|
152
|
+
arch: primaryArch,
|
|
153
|
+
}, logFields);
|
|
154
|
+
const guid = options.guid || UUID.v5(appInfo.id, ELECTRON_BUILDER_NS_UUID);
|
|
155
|
+
const uninstallAppKey = guid.replace(/\\/g, " - ");
|
|
156
|
+
const defines = {
|
|
157
|
+
APP_ID: appInfo.id,
|
|
158
|
+
APP_GUID: guid,
|
|
159
|
+
// Windows bug - entry in Software\Microsoft\Windows\CurrentVersion\Uninstall cannot have \ symbols (dir)
|
|
160
|
+
UNINSTALL_APP_KEY: uninstallAppKey,
|
|
161
|
+
PRODUCT_NAME: appInfo.productName,
|
|
162
|
+
PRODUCT_FILENAME: appInfo.productFilename,
|
|
163
|
+
APP_FILENAME: getWindowsInstallationDirName(appInfo, !oneClick || isPerMachine),
|
|
164
|
+
APP_DESCRIPTION: appInfo.description,
|
|
165
|
+
VERSION: appInfo.version,
|
|
166
|
+
PROJECT_DIR: packager.projectDir,
|
|
167
|
+
BUILD_RESOURCES_DIR: packager.buildResourcesDir,
|
|
168
|
+
APP_PACKAGE_NAME: getWindowsInstallationAppPackageName(appInfo.name),
|
|
169
|
+
};
|
|
170
|
+
if (options.customNsisBinary?.debugLogging) {
|
|
171
|
+
defines.ENABLE_LOGGING_ELECTRON_BUILDER = null;
|
|
172
|
+
}
|
|
173
|
+
if (uninstallAppKey !== guid) {
|
|
174
|
+
defines.UNINSTALL_REGISTRY_KEY_2 = `Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\${guid}`;
|
|
175
|
+
}
|
|
176
|
+
const { homepage } = this.packager.metadata;
|
|
177
|
+
use(options.uninstallUrlHelp || homepage, it => (defines.UNINSTALL_URL_HELP = it));
|
|
178
|
+
use(options.uninstallUrlInfoAbout || homepage, it => (defines.UNINSTALL_URL_INFO_ABOUT = it));
|
|
179
|
+
use(options.uninstallUrlUpdateInfo || homepage, it => (defines.UNINSTALL_URL_UPDATE_INFO = it));
|
|
180
|
+
use(options.uninstallUrlReadme || homepage, it => (defines.UNINSTALL_URL_README = it));
|
|
181
|
+
const commands = {
|
|
182
|
+
OutFile: `"${installerPath}"`,
|
|
183
|
+
VIProductVersion: appInfo.getVersionInWeirdWindowsForm(),
|
|
184
|
+
VIAddVersionKey: this.computeVersionKey(),
|
|
185
|
+
Unicode: this.isUnicodeEnabled,
|
|
186
|
+
};
|
|
187
|
+
const isPortable = this.isPortable;
|
|
188
|
+
const iconPath = (isPortable ? null : await packager.getResource(options.installerIcon, "installerIcon.ico")) || (await packager.getIconPath());
|
|
189
|
+
if (iconPath != null) {
|
|
190
|
+
if (isPortable) {
|
|
191
|
+
commands.Icon = `"${iconPath}"`;
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
defines.MUI_ICON = iconPath;
|
|
195
|
+
defines.MUI_UNICON = iconPath;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
const { packageFiles, estimatedSize } = await this.resolveArchPackageFiles(archs, defines, packager);
|
|
199
|
+
this.configureDefinesForAllTypeOfInstaller(defines);
|
|
200
|
+
if (isPortable) {
|
|
201
|
+
const { unpackDirName, requestExecutionLevel, splashImage } = options;
|
|
202
|
+
defines.REQUEST_EXECUTION_LEVEL = requestExecutionLevel || "user";
|
|
203
|
+
// https://github.com/electron-userland/electron-builder/issues/5764
|
|
204
|
+
if (typeof unpackDirName === "string" || !unpackDirName) {
|
|
205
|
+
defines.UNPACK_DIR_NAME = unpackDirName || generateKsuid();
|
|
206
|
+
}
|
|
207
|
+
if (splashImage != null) {
|
|
208
|
+
defines.SPLASH_IMAGE = path.resolve(packager.projectDir, splashImage);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
await this.configureDefines(oneClick, defines);
|
|
213
|
+
}
|
|
214
|
+
if (estimatedSize !== 0) {
|
|
215
|
+
// in kb
|
|
216
|
+
defines.ESTIMATED_SIZE = Math.round(estimatedSize / 1024);
|
|
217
|
+
}
|
|
218
|
+
if (packager.compression === "store") {
|
|
219
|
+
commands.SetCompress = "off";
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
// difference - 33.540 vs 33.601, only 61 KB (but zip is faster to decompress)
|
|
223
|
+
// do not use /SOLID - "With solid compression, files are uncompressed to temporary file before they are copied to their final destination",
|
|
224
|
+
// it is not good for portable installer (where built-in NSIS compression is used). http://forums.winamp.com/showpost.php?p=2982902&postcount=6
|
|
225
|
+
commands.SetCompressor = "zlib";
|
|
226
|
+
if (!this.isWebInstaller) {
|
|
227
|
+
defines.COMPRESS = "auto";
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
debug(defines);
|
|
231
|
+
debug(commands);
|
|
232
|
+
if (packager.packagerOptions.effectiveOptionComputed != null && (await packager.packagerOptions.effectiveOptionComputed([defines, commands]))) {
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
// prepare short-version variants of defines and commands, to make an uninstaller that doesn't differ much from the previous one
|
|
236
|
+
const definesUninstaller = { ...defines };
|
|
237
|
+
const commandsUninstaller = { ...commands };
|
|
238
|
+
if (appInfo.shortVersion != null) {
|
|
239
|
+
definesUninstaller.VERSION = appInfo.shortVersion;
|
|
240
|
+
commandsUninstaller.VIProductVersion = appInfo.shortVersionWindows;
|
|
241
|
+
commandsUninstaller.VIAddVersionKey = this.computeVersionKey(true);
|
|
242
|
+
}
|
|
243
|
+
this.buildQueueManager.add(async () => {
|
|
244
|
+
const sharedHeader = await this.computeCommonInstallerScriptHeader();
|
|
245
|
+
let rawScript;
|
|
246
|
+
let isCustomScript = false;
|
|
247
|
+
if (isPortable) {
|
|
248
|
+
rawScript = await readFile(path.join(nsisTemplatesDir, "portable.nsi"), "utf8");
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
const result = await this.computeScriptAndSignUninstaller(definesUninstaller, commandsUninstaller, installerPath, sharedHeader, archs);
|
|
252
|
+
rawScript = result.script;
|
|
253
|
+
isCustomScript = result.isCustomScript;
|
|
254
|
+
}
|
|
255
|
+
// copy outfile name into main options, as the computeScriptAndSignUninstaller function was kind enough to add important data to temporary defines.
|
|
256
|
+
defines.UNINSTALLER_OUT_FILE = definesUninstaller.UNINSTALLER_OUT_FILE;
|
|
257
|
+
// Skip size verification for portable (NSIS recompresses the archive, installer < archive is normal)
|
|
258
|
+
// and for custom scripts (may not embed archives).
|
|
259
|
+
await this.executeMakensis(defines, commands, sharedHeader + (await this.computeFinalScript(rawScript, true, archs)), { skipSizeVerification: isPortable || isCustomScript });
|
|
260
|
+
await Promise.all([packager.signIf(installerPath), defines.UNINSTALLER_OUT_FILE == null ? Promise.resolve() : unlink(defines.UNINSTALLER_OUT_FILE)]);
|
|
261
|
+
const safeArtifactName = computeSafeArtifactNameIfNeeded(installerFilename, () => this.generateGitHubInstallerName(primaryArch, defaultArch));
|
|
262
|
+
let updateInfo;
|
|
263
|
+
if (this.isWebInstaller) {
|
|
264
|
+
updateInfo = createNsisWebDifferentialUpdateInfo(installerPath, packageFiles);
|
|
265
|
+
}
|
|
266
|
+
else if (this.isBuildDifferentialAware) {
|
|
267
|
+
updateInfo = await createBlockmap(installerPath, this, packager, safeArtifactName);
|
|
268
|
+
}
|
|
269
|
+
if (updateInfo != null && isPerMachine && (oneClick || options.packElevateHelper)) {
|
|
270
|
+
updateInfo.isAdminRightsRequired = true;
|
|
271
|
+
}
|
|
272
|
+
await packager.emitArtifactBuildCompleted({
|
|
273
|
+
file: installerPath,
|
|
274
|
+
updateInfo,
|
|
275
|
+
target: this,
|
|
276
|
+
packager,
|
|
277
|
+
arch: primaryArch,
|
|
278
|
+
safeArtifactName,
|
|
279
|
+
isWriteUpdateInfo: !this.isPortable,
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
async resolveArchPackageFiles(archs, defines, packager) {
|
|
284
|
+
const packageFiles = {};
|
|
285
|
+
let estimatedSize = 0;
|
|
286
|
+
const options = this.options;
|
|
287
|
+
if (this.isPortable && options.useZip) {
|
|
288
|
+
for (const [arch, dir] of archs.entries()) {
|
|
289
|
+
defines[arch === Arch.x64 ? "APP_DIR_64" : arch === Arch.arm64 ? "APP_DIR_ARM64" : "APP_DIR_32"] = dir;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
else if (USE_NSIS_BUILT_IN_COMPRESSOR && archs.size === 1) {
|
|
293
|
+
const value = archs.keys().next().value;
|
|
294
|
+
use(value, v => (defines.APP_BUILD_DIR = archs.get(v)));
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
await Promise.all(Array.from(archs.keys()).map(async (arch) => {
|
|
298
|
+
const { fileInfo, unpackedSize } = await this.packageHelper.packArch(arch, this);
|
|
299
|
+
const file = fileInfo.path;
|
|
300
|
+
const defineKey = arch === Arch.x64 ? "APP_64" : arch === Arch.arm64 ? "APP_ARM64" : "APP_32";
|
|
301
|
+
defines[defineKey] = file;
|
|
302
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
303
|
+
const defineNameKey = `${defineKey}_NAME`;
|
|
304
|
+
defines[defineNameKey] = path.basename(file);
|
|
305
|
+
// nsis expect a hexadecimal string
|
|
306
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
307
|
+
const defineHashKey = `${defineKey}_HASH`;
|
|
308
|
+
defines[defineHashKey] = Buffer.from(fileInfo.sha512, "base64").toString("hex").toUpperCase();
|
|
309
|
+
// NSIS accepts size in KiloBytes and supports only whole numbers
|
|
310
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
|
311
|
+
const defineUnpackedSizeKey = `${defineKey}_UNPACKED_SIZE`;
|
|
312
|
+
defines[defineUnpackedSizeKey] = Math.ceil(unpackedSize / 1024).toString();
|
|
313
|
+
if (this.isWebInstaller) {
|
|
314
|
+
await packager.emitArtifactBuildCompleted({ file, target: this, arch, packager });
|
|
315
|
+
packageFiles[Arch[arch]] = fileInfo;
|
|
316
|
+
}
|
|
317
|
+
estimatedSize += unpackedSize;
|
|
318
|
+
}));
|
|
319
|
+
}
|
|
320
|
+
return { packageFiles, estimatedSize };
|
|
321
|
+
}
|
|
322
|
+
generateGitHubInstallerName(primaryArch, defaultArch) {
|
|
323
|
+
const appInfo = this.packager.appInfo;
|
|
324
|
+
const classifier = appInfo.name.toLowerCase() === appInfo.name ? "setup-" : "Setup-";
|
|
325
|
+
const archSuffix = !this.shouldBuildUniversalInstaller && primaryArch != null ? getArchSuffix(primaryArch, defaultArch) : "";
|
|
326
|
+
return `${appInfo.name}-${this.isPortable ? "" : classifier}${appInfo.version}${archSuffix}.exe`;
|
|
327
|
+
}
|
|
328
|
+
get isUnicodeEnabled() {
|
|
329
|
+
return this.options.unicode !== false;
|
|
330
|
+
}
|
|
331
|
+
get isWebInstaller() {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
async computeScriptAndSignUninstaller(defines, commands, installerPath, sharedHeader, archs) {
|
|
335
|
+
const packager = this.packager;
|
|
336
|
+
const customScriptPath = await packager.getResource(this.options.script, "installer.nsi");
|
|
337
|
+
const script = await readFile(customScriptPath || path.join(nsisTemplatesDir, "installer.nsi"), "utf8");
|
|
338
|
+
if (customScriptPath != null) {
|
|
339
|
+
log.info({ reason: "custom NSIS script is used" }, "uninstaller is not signed by electron-builder");
|
|
340
|
+
return { script, isCustomScript: true };
|
|
341
|
+
}
|
|
342
|
+
// https://github.com/electron-userland/electron-builder/issues/2103
|
|
343
|
+
// it is more safe and reliable to write uninstaller to our out dir
|
|
344
|
+
// to support parallel builds, the uninstaller path must be unique to each target and arch combination
|
|
345
|
+
const uninstallerPath = path.join(this.outDir, `${path.basename(installerPath, "exe")}__uninstaller.exe`);
|
|
346
|
+
const isWin = process.platform === "win32";
|
|
347
|
+
defines.BUILD_UNINSTALLER = null;
|
|
348
|
+
defines.UNINSTALLER_OUT_FILE = isWin ? uninstallerPath : path.win32.join("Z:", uninstallerPath);
|
|
349
|
+
await this.executeMakensis(defines, commands, sharedHeader + (await this.computeFinalScript(script, false, archs)));
|
|
350
|
+
// http://forums.winamp.com/showthread.php?p=3078545
|
|
351
|
+
// TODO: remove workaround when wine is fully upgraded to 11
|
|
352
|
+
if (isMacOsCatalina()) {
|
|
353
|
+
try {
|
|
354
|
+
await UninstallerReader.exec(installerPath, uninstallerPath);
|
|
355
|
+
}
|
|
356
|
+
catch (error) {
|
|
357
|
+
log.warn(`packager.vm is used: ${error.message}`);
|
|
358
|
+
const vm = await packager.vm.value;
|
|
359
|
+
await vm.exec(installerPath, []);
|
|
360
|
+
// Parallels VM can exit after command execution, but NSIS continue to be running
|
|
361
|
+
let i = 0;
|
|
362
|
+
while (!(await exists(uninstallerPath)) && i++ < 100) {
|
|
363
|
+
// noinspection JSUnusedLocalSymbols
|
|
364
|
+
await sleep(300);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
else {
|
|
369
|
+
const wineVm = new WineVmManager(packager.config.toolsets?.wine, packager.buildResourcesDir);
|
|
370
|
+
await wineVm.exec(installerPath, [], { env: { __COMPAT_LAYER: "RunAsInvoker" } });
|
|
371
|
+
}
|
|
372
|
+
await packager.signIf(uninstallerPath);
|
|
373
|
+
delete defines.BUILD_UNINSTALLER;
|
|
374
|
+
// platform-specific path, not wine
|
|
375
|
+
defines.UNINSTALLER_OUT_FILE = uninstallerPath;
|
|
376
|
+
return { script, isCustomScript: false };
|
|
377
|
+
}
|
|
378
|
+
computeVersionKey(short = false) {
|
|
379
|
+
// Error: invalid VIProductVersion format, should be X.X.X.X
|
|
380
|
+
// so, we must strip beta
|
|
381
|
+
const localeId = this.options.language || "1033";
|
|
382
|
+
const appInfo = this.packager.appInfo;
|
|
383
|
+
const versionKey = [
|
|
384
|
+
`/LANG=${localeId} ProductName "${nsisEscapeString(appInfo.productName)}"`,
|
|
385
|
+
`/LANG=${localeId} ProductVersion "${nsisEscapeString(appInfo.version)}"`,
|
|
386
|
+
`/LANG=${localeId} LegalCopyright "${nsisEscapeString(appInfo.copyright)}"`,
|
|
387
|
+
`/LANG=${localeId} FileDescription "${nsisEscapeString(appInfo.description)}"`,
|
|
388
|
+
`/LANG=${localeId} FileVersion "${nsisEscapeString(appInfo.buildVersion)}"`,
|
|
389
|
+
];
|
|
390
|
+
if (short) {
|
|
391
|
+
versionKey[1] = `/LANG=${localeId} ProductVersion "${nsisEscapeString(appInfo.shortVersion)}"`;
|
|
392
|
+
versionKey[4] = `/LANG=${localeId} FileVersion "${nsisEscapeString(appInfo.shortVersion)}"`;
|
|
393
|
+
}
|
|
394
|
+
use(this.packager.platformOptions.legalTrademarks, it => versionKey.push(`/LANG=${localeId} LegalTrademarks "${nsisEscapeString(it)}"`));
|
|
395
|
+
use(appInfo.companyName, it => versionKey.push(`/LANG=${localeId} CompanyName "${nsisEscapeString(it)}"`));
|
|
396
|
+
return versionKey;
|
|
397
|
+
}
|
|
398
|
+
configureDefines(oneClick, defines) {
|
|
399
|
+
const packager = this.packager;
|
|
400
|
+
const options = this.options;
|
|
401
|
+
const asyncTaskManager = new AsyncTaskManager(packager.cancellationToken);
|
|
402
|
+
if (oneClick) {
|
|
403
|
+
defines.ONE_CLICK = null;
|
|
404
|
+
if (options.runAfterFinish !== false) {
|
|
405
|
+
defines.RUN_AFTER_FINISH = null;
|
|
406
|
+
}
|
|
407
|
+
asyncTaskManager.add(() => this.loadInstallerHeaderIcon(defines));
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
if (options.runAfterFinish === false) {
|
|
411
|
+
defines.HIDE_RUN_AFTER_FINISH = null;
|
|
412
|
+
}
|
|
413
|
+
asyncTaskManager.add(() => this.loadInstallerHeader(defines));
|
|
414
|
+
asyncTaskManager.add(() => this.loadInstallerSidebar(defines));
|
|
415
|
+
if (options.allowElevation !== false) {
|
|
416
|
+
defines.MULTIUSER_INSTALLMODE_ALLOW_ELEVATION = null;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
if (options.perMachine === true) {
|
|
420
|
+
defines.INSTALL_MODE_PER_ALL_USERS = null;
|
|
421
|
+
}
|
|
422
|
+
if (options.selectPerMachineByDefault === true) {
|
|
423
|
+
defines.INSTALL_MODE_PER_ALL_USERS_DEFAULT = null;
|
|
424
|
+
}
|
|
425
|
+
if (!oneClick || options.perMachine === true) {
|
|
426
|
+
defines.INSTALL_MODE_PER_ALL_USERS_REQUIRED = null;
|
|
427
|
+
}
|
|
428
|
+
if (options.allowToChangeInstallationDirectory) {
|
|
429
|
+
if (oneClick) {
|
|
430
|
+
throw new InvalidConfigurationError("allowToChangeInstallationDirectory makes sense only for assisted installer (please set oneClick to false)");
|
|
431
|
+
}
|
|
432
|
+
defines.allowToChangeInstallationDirectory = null;
|
|
433
|
+
}
|
|
434
|
+
if (options.removeDefaultUninstallWelcomePage) {
|
|
435
|
+
defines.removeDefaultUninstallWelcomePage = null;
|
|
436
|
+
}
|
|
437
|
+
const commonOptions = getEffectiveOptions(options, packager);
|
|
438
|
+
if (commonOptions.menuCategory != null) {
|
|
439
|
+
defines.MENU_FILENAME = commonOptions.menuCategory;
|
|
440
|
+
}
|
|
441
|
+
defines.SHORTCUT_NAME = commonOptions.shortcutName;
|
|
442
|
+
if (options.deleteAppDataOnUninstall) {
|
|
443
|
+
defines.DELETE_APP_DATA_ON_UNINSTALL = null;
|
|
444
|
+
}
|
|
445
|
+
asyncTaskManager.add(() => this.loadUninstallerIcon(defines));
|
|
446
|
+
defines.UNINSTALL_DISPLAY_NAME = packager.expandMacro(options.uninstallDisplayName || "${productName} ${version}", null, {}, false);
|
|
447
|
+
if (commonOptions.isCreateDesktopShortcut === DesktopShortcutCreationPolicy.NEVER) {
|
|
448
|
+
defines.DO_NOT_CREATE_DESKTOP_SHORTCUT = null;
|
|
449
|
+
}
|
|
450
|
+
if (commonOptions.isCreateDesktopShortcut === DesktopShortcutCreationPolicy.ALWAYS) {
|
|
451
|
+
defines.RECREATE_DESKTOP_SHORTCUT = null;
|
|
452
|
+
}
|
|
453
|
+
if (!commonOptions.isCreateStartMenuShortcut) {
|
|
454
|
+
defines.DO_NOT_CREATE_START_MENU_SHORTCUT = null;
|
|
455
|
+
}
|
|
456
|
+
if (options.displayLanguageSelector === true) {
|
|
457
|
+
defines.DISPLAY_LANG_SELECTOR = null;
|
|
458
|
+
}
|
|
459
|
+
return asyncTaskManager.awaitTasks();
|
|
460
|
+
}
|
|
461
|
+
async loadInstallerHeaderIcon(defines) {
|
|
462
|
+
const icon = await this.packager.getResource(this.options.installerHeaderIcon, "installerHeaderIcon.ico");
|
|
463
|
+
if (icon != null) {
|
|
464
|
+
defines.HEADER_ICO = icon;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
async loadInstallerHeader(defines) {
|
|
468
|
+
const header = await this.packager.getResource(this.options.installerHeader, "installerHeader.bmp");
|
|
469
|
+
if (header != null) {
|
|
470
|
+
defines.MUI_HEADERIMAGE = null;
|
|
471
|
+
defines.MUI_HEADERIMAGE_RIGHT = null;
|
|
472
|
+
defines.MUI_HEADERIMAGE_BITMAP = header;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
async loadInstallerSidebar(defines) {
|
|
476
|
+
const bitmap = (await this.packager.getResource(this.options.installerSidebar, "installerSidebar.bmp")) || "${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp";
|
|
477
|
+
defines.MUI_WELCOMEFINISHPAGE_BITMAP = bitmap;
|
|
478
|
+
defines.MUI_UNWELCOMEFINISHPAGE_BITMAP = (await this.packager.getResource(this.options.uninstallerSidebar, "uninstallerSidebar.bmp")) || bitmap;
|
|
479
|
+
}
|
|
480
|
+
async loadUninstallerIcon(defines) {
|
|
481
|
+
const icon = await this.packager.getResource(this.options.uninstallerIcon, "uninstallerIcon.ico");
|
|
482
|
+
if (icon != null) {
|
|
483
|
+
// we don't need to copy MUI_UNICON (defaults to app icon), so, we have 2 defines
|
|
484
|
+
defines.UNINSTALLER_ICON = icon;
|
|
485
|
+
defines.MUI_UNICON = icon;
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
configureDefinesForAllTypeOfInstaller(defines) {
|
|
489
|
+
const appInfo = this.packager.appInfo;
|
|
490
|
+
const companyName = appInfo.companyName;
|
|
491
|
+
if (companyName != null) {
|
|
492
|
+
defines.COMPANY_NAME = companyName;
|
|
493
|
+
}
|
|
494
|
+
// electron uses product file name as app data, define it as well to remove on uninstall
|
|
495
|
+
if (defines.APP_FILENAME !== appInfo.productFilename) {
|
|
496
|
+
defines.APP_PRODUCT_FILENAME = appInfo.productFilename;
|
|
497
|
+
}
|
|
498
|
+
if (this.isWebInstaller) {
|
|
499
|
+
defines.APP_PACKAGE_STORE_FILE = `${appInfo.updaterCacheDirName}\\${CURRENT_APP_PACKAGE_FILE_NAME}`;
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
defines.APP_INSTALLER_STORE_FILE = `${appInfo.updaterCacheDirName}\\${CURRENT_APP_INSTALLER_FILE_NAME}`;
|
|
503
|
+
}
|
|
504
|
+
if (!this.isWebInstaller && defines.APP_BUILD_DIR == null) {
|
|
505
|
+
const options = this.options;
|
|
506
|
+
if (options.useZip) {
|
|
507
|
+
defines.ZIP_COMPRESSION = null;
|
|
508
|
+
}
|
|
509
|
+
defines.COMPRESSION_METHOD = options.useZip ? "zip" : "7z";
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
async executeMakensis(defines, commands, script, opts = {}) {
|
|
513
|
+
const args = this.options.warningsAsErrors === false ? [] : ["-WX"];
|
|
514
|
+
args.push("-INPUTCHARSET", "UTF8");
|
|
515
|
+
for (const name of Object.keys(defines)) {
|
|
516
|
+
const value = defines[name];
|
|
517
|
+
if (value == null) {
|
|
518
|
+
args.push(`-D${name}`);
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
// nsisEscapeString prevents three classes of injection:
|
|
522
|
+
// 1. Newlines → replaced with spaces; a bare \n in a define value
|
|
523
|
+
// would terminate the current script line and let whatever follows
|
|
524
|
+
// be parsed as a new preprocessor directive (e.g. !system, !include).
|
|
525
|
+
// 2. bare $ → escaped to $$; unescaped $ in a define value would cause
|
|
526
|
+
// NSIS to expand an unintended variable reference. ${...} references
|
|
527
|
+
// are left intact so NSIS compile-time defines like ${NSISDIR} still
|
|
528
|
+
// expand correctly.
|
|
529
|
+
// 3. " chars → escaped to $\"; an unescaped " would break out of
|
|
530
|
+
// double-quoted NSIS string literals where ${DEFINE} is expanded.
|
|
531
|
+
args.push(`-D${name}=${nsisEscapeString(String(value))}`);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
for (const name of Object.keys(commands)) {
|
|
535
|
+
const value = commands[name];
|
|
536
|
+
if (Array.isArray(value)) {
|
|
537
|
+
for (const c of value) {
|
|
538
|
+
args.push(`-X${name} ${c}`);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
else {
|
|
542
|
+
args.push(`-X${name} ${value}`);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
args.push("-");
|
|
546
|
+
if (this.packager.debugLogger.isEnabled) {
|
|
547
|
+
this.packager.debugLogger.add("nsis.script", script);
|
|
548
|
+
}
|
|
549
|
+
if (process.platform === "win32") {
|
|
550
|
+
// fix for an issue caused by virus scanners, locking the file during write
|
|
551
|
+
// https://github.com/electron-userland/electron-builder/issues/5005
|
|
552
|
+
await ensureNotBusy(commands["OutFile"].replace(/"/g, ""));
|
|
553
|
+
}
|
|
554
|
+
const makensis = await getMakeNsisPath(this.packager.config.toolsets?.nsis, this.packager.buildResourcesDir);
|
|
555
|
+
const { stdout, stderr } = await spawnAndWriteWithOutput(makensis.path, args, script, {
|
|
556
|
+
env: { ...process.env, ...(makensis.env ?? {}) },
|
|
557
|
+
cwd: nsisTemplatesDir,
|
|
558
|
+
});
|
|
559
|
+
checkMakensisOutput(stdout, stderr);
|
|
560
|
+
// Only verify output size for the final, non-web installer.
|
|
561
|
+
// BUILD_UNINSTALLER: intermediate uninstaller build — no embedded archives.
|
|
562
|
+
// APP_PACKAGE_STORE_FILE: nsis-web — archives downloaded at install-time.
|
|
563
|
+
// skipSizeVerification: portable builds (NSIS recompresses the archive, so
|
|
564
|
+
// installer < archive_size is normal) and custom scripts (may not embed archives).
|
|
565
|
+
if (!("BUILD_UNINSTALLER" in defines) && !("APP_PACKAGE_STORE_FILE" in defines) && !opts.skipSizeVerification) {
|
|
566
|
+
const outFile = commands["OutFile"].replace(/^"|"$/g, "");
|
|
567
|
+
await verifyInstallerSize(outFile, defines);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
async computeCommonInstallerScriptHeader() {
|
|
571
|
+
const packager = this.packager;
|
|
572
|
+
const options = this.options;
|
|
573
|
+
const scriptGenerator = new NsisScriptGenerator();
|
|
574
|
+
const langConfigurator = new LangConfigurator(options);
|
|
575
|
+
scriptGenerator.include(path.join(nsisTemplatesDir, "include", "StdUtils.nsh"));
|
|
576
|
+
const includeDir = path.join(nsisTemplatesDir, "include");
|
|
577
|
+
scriptGenerator.addIncludeDir(includeDir);
|
|
578
|
+
scriptGenerator.flags(["updated", "force-run", "keep-shortcuts", "no-desktop-shortcut", "delete-app-data", "allusers", "currentuser"]);
|
|
579
|
+
createAddLangsMacro(scriptGenerator, langConfigurator);
|
|
580
|
+
const taskManager = new AsyncTaskManager(packager.cancellationToken);
|
|
581
|
+
const pluginArch = this.isUnicodeEnabled ? "x86-unicode" : "x86-ansi";
|
|
582
|
+
taskManager.add(async () => {
|
|
583
|
+
scriptGenerator.addPluginDir(pluginArch, path.join(await getNsisPluginsPath(this.packager.config.toolsets?.nsis, this.packager.buildResourcesDir), pluginArch));
|
|
584
|
+
});
|
|
585
|
+
taskManager.add(async () => {
|
|
586
|
+
const userPluginDir = path.join(packager.buildResourcesDir, pluginArch);
|
|
587
|
+
const stat = await statOrNull(userPluginDir);
|
|
588
|
+
if (stat != null && stat.isDirectory()) {
|
|
589
|
+
scriptGenerator.addPluginDir(pluginArch, userPluginDir);
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
taskManager.addTask(addCustomMessageFileInclude("messages.yml", packager, scriptGenerator, langConfigurator));
|
|
593
|
+
if (!this.isPortable) {
|
|
594
|
+
if (options.oneClick === false) {
|
|
595
|
+
taskManager.addTask(addCustomMessageFileInclude("assistedMessages.yml", packager, scriptGenerator, langConfigurator));
|
|
596
|
+
}
|
|
597
|
+
taskManager.add(async () => {
|
|
598
|
+
const customInclude = await packager.getResource(this.options.include, "installer.nsh");
|
|
599
|
+
if (customInclude != null) {
|
|
600
|
+
scriptGenerator.addIncludeDir(packager.buildResourcesDir);
|
|
601
|
+
scriptGenerator.include(customInclude);
|
|
602
|
+
}
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
await taskManager.awaitTasks();
|
|
606
|
+
return scriptGenerator.build();
|
|
607
|
+
}
|
|
608
|
+
async computeFinalScript(originalScript, isInstaller, archs) {
|
|
609
|
+
const packager = this.packager;
|
|
610
|
+
const options = this.options;
|
|
611
|
+
const langConfigurator = new LangConfigurator(options);
|
|
612
|
+
const scriptGenerator = new NsisScriptGenerator();
|
|
613
|
+
const taskManager = new AsyncTaskManager(packager.cancellationToken);
|
|
614
|
+
if (isInstaller) {
|
|
615
|
+
// http://stackoverflow.com/questions/997456/nsis-license-file-based-on-language-selection
|
|
616
|
+
taskManager.add(() => computeLicensePage(packager, options, scriptGenerator, langConfigurator.langs));
|
|
617
|
+
}
|
|
618
|
+
await taskManager.awaitTasks();
|
|
619
|
+
if (this.isPortable) {
|
|
620
|
+
return scriptGenerator.build() + originalScript;
|
|
621
|
+
}
|
|
622
|
+
const preCompressedFileExtensions = this.getPreCompressedFileExtensions();
|
|
623
|
+
if (preCompressedFileExtensions != null && preCompressedFileExtensions.length !== 0) {
|
|
624
|
+
for (const [arch, dir] of archs.entries()) {
|
|
625
|
+
await generateForPreCompressed(preCompressedFileExtensions, dir, arch, scriptGenerator);
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
const fileAssociations = packager.fileAssociations;
|
|
629
|
+
if (fileAssociations.length !== 0) {
|
|
630
|
+
scriptGenerator.include(path.join(path.join(nsisTemplatesDir, "include"), "FileAssociation.nsh"));
|
|
631
|
+
if (isInstaller) {
|
|
632
|
+
const registerFileAssociationsScript = new NsisScriptGenerator();
|
|
633
|
+
for (const item of fileAssociations) {
|
|
634
|
+
const extensions = asArray(item.ext).map(normalizeExt);
|
|
635
|
+
for (const ext of extensions) {
|
|
636
|
+
const customIcon = await packager.getResource(getPlatformIconFileName(item.icon, false), `${extensions[0]}.ico`);
|
|
637
|
+
let installedIconPath = "$appExe,0";
|
|
638
|
+
if (customIcon != null) {
|
|
639
|
+
installedIconPath = `$INSTDIR\\resources\\${nsisEscapeString(path.basename(customIcon))}`;
|
|
640
|
+
registerFileAssociationsScript.file(installedIconPath, customIcon);
|
|
641
|
+
}
|
|
642
|
+
const icon = `"${installedIconPath}"`;
|
|
643
|
+
const commandText = `"Open with ${nsisEscapeString(packager.appInfo.productName)}"`;
|
|
644
|
+
const command = '"$appExe $\\"%1$\\""';
|
|
645
|
+
registerFileAssociationsScript.insertMacro("APP_ASSOCIATE", `"${nsisEscapeString(ext)}" "${nsisEscapeString(item.name || ext)}" "${nsisEscapeString(item.description || "")}" ${icon} ${commandText} ${command}`);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
scriptGenerator.macro("registerFileAssociations", registerFileAssociationsScript);
|
|
649
|
+
}
|
|
650
|
+
else {
|
|
651
|
+
const unregisterFileAssociationsScript = new NsisScriptGenerator();
|
|
652
|
+
for (const item of fileAssociations) {
|
|
653
|
+
for (const ext of asArray(item.ext)) {
|
|
654
|
+
unregisterFileAssociationsScript.insertMacro("APP_UNASSOCIATE", `"${normalizeExt(ext)}" "${item.name || ext}"`);
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
scriptGenerator.macro("unregisterFileAssociations", unregisterFileAssociationsScript);
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
return scriptGenerator.build() + originalScript;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
async function generateForPreCompressed(preCompressedFileExtensions, dir, arch, scriptGenerator) {
|
|
664
|
+
const resourcesDir = path.join(dir, "resources");
|
|
665
|
+
const dirInfo = await statOrNull(resourcesDir);
|
|
666
|
+
if (dirInfo == null || !dirInfo.isDirectory()) {
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
const nodeModules = `${path.sep}node_modules`;
|
|
670
|
+
const preCompressedAssets = await walk(resourcesDir, (file, stat) => {
|
|
671
|
+
if (stat.isDirectory()) {
|
|
672
|
+
return !file.endsWith(nodeModules);
|
|
673
|
+
}
|
|
674
|
+
else {
|
|
675
|
+
return preCompressedFileExtensions.some(it => file.endsWith(it));
|
|
676
|
+
}
|
|
677
|
+
});
|
|
678
|
+
if (preCompressedAssets.length !== 0) {
|
|
679
|
+
const macro = new NsisScriptGenerator();
|
|
680
|
+
for (const file of preCompressedAssets) {
|
|
681
|
+
macro.file(`$INSTDIR\\${nsisEscapeString(path.relative(dir, file).replace(/\//g, "\\"))}`, file);
|
|
682
|
+
}
|
|
683
|
+
scriptGenerator.macro(`customFiles_${Arch[arch]}`, macro);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
async function ensureNotBusy(outFile) {
|
|
687
|
+
function isBusy(wasBusyBefore) {
|
|
688
|
+
return new Promise((resolve, reject) => {
|
|
689
|
+
fs.open(outFile, "r+", (error, fd) => {
|
|
690
|
+
try {
|
|
691
|
+
if (error != null && error.code === "EBUSY") {
|
|
692
|
+
if (!wasBusyBefore) {
|
|
693
|
+
log.info({}, "output file is locked for writing (maybe by virus scanner) => waiting for unlock...");
|
|
694
|
+
}
|
|
695
|
+
resolve(false);
|
|
696
|
+
}
|
|
697
|
+
else if (fd == null) {
|
|
698
|
+
resolve(true);
|
|
699
|
+
}
|
|
700
|
+
else {
|
|
701
|
+
fs.close(fd, () => resolve(true));
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
catch (error) {
|
|
705
|
+
reject(error);
|
|
706
|
+
}
|
|
707
|
+
});
|
|
708
|
+
}).then(result => {
|
|
709
|
+
if (result) {
|
|
710
|
+
return true;
|
|
711
|
+
}
|
|
712
|
+
else {
|
|
713
|
+
return sleep(2000).then(() => isBusy(true));
|
|
714
|
+
}
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
await isBusy(false);
|
|
718
|
+
}
|
|
719
|
+
async function createPackageFileInfo(file) {
|
|
720
|
+
return {
|
|
721
|
+
path: file,
|
|
722
|
+
size: (await stat(file)).size,
|
|
723
|
+
sha512: await hashFile(file),
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
//# sourceMappingURL=NsisTarget.js.map
|