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
package/out/targets/MsiTarget.js
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const builder_util_1 = require("builder-util");
|
|
4
|
-
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
5
|
-
const crypto_1 = require("crypto");
|
|
6
|
-
const ejs = require("ejs");
|
|
7
|
-
const promises_1 = require("fs/promises");
|
|
8
|
-
const lazy_val_1 = require("lazy-val");
|
|
9
|
-
const path = require("path");
|
|
10
|
-
const binDownload_1 = require("../binDownload");
|
|
11
|
-
const core_1 = require("../core");
|
|
12
|
-
const CommonWindowsInstallerConfiguration_1 = require("../options/CommonWindowsInstallerConfiguration");
|
|
13
|
-
const platformPackager_1 = require("../platformPackager");
|
|
14
|
-
const pathManager_1 = require("../util/pathManager");
|
|
15
|
-
const vm_1 = require("../vm/vm");
|
|
16
|
-
const WineVm_1 = require("../vm/WineVm");
|
|
17
|
-
const toolsetLock_1 = require("../util/toolsetLock");
|
|
18
|
-
const targetUtil_1 = require("./targetUtil");
|
|
19
|
-
const ELECTRON_BUILDER_UPGRADE_CODE_NS_UUID = builder_util_runtime_1.UUID.parse("d752fe43-5d44-44d5-9fc9-6dd1bf19d5cc");
|
|
20
|
-
const ROOT_DIR_ID = "APPLICATIONFOLDER";
|
|
21
|
-
// WiX doesn't support Mono, so, dontnet462 is required to be installed for wine (preinstalled in our bundled wine)
|
|
22
|
-
class MsiTarget extends core_1.Target {
|
|
23
|
-
constructor(packager, outDir, name = "msi", isAsyncSupported = true) {
|
|
24
|
-
var _a;
|
|
25
|
-
super(name, isAsyncSupported);
|
|
26
|
-
this.packager = packager;
|
|
27
|
-
this.outDir = outDir;
|
|
28
|
-
this.vm = process.platform === "win32" ? new vm_1.VmManager() : new WineVm_1.WineVmManager((_a = this.packager.config.toolsets) === null || _a === void 0 ? void 0 : _a.wine);
|
|
29
|
-
this.options = (0, builder_util_runtime_1.deepAssign)(this.packager.platformSpecificBuildOptions, this.packager.config.msi);
|
|
30
|
-
this.projectTemplate = new lazy_val_1.Lazy(async () => {
|
|
31
|
-
const template = (await (0, promises_1.readFile)(path.join((0, pathManager_1.getTemplatePath)(this.name), "template.xml"), "utf8"))
|
|
32
|
-
.replace(/{{/g, "<%")
|
|
33
|
-
.replace(/}}/g, "%>")
|
|
34
|
-
.replace(/\${([^}]+)}/g, "<%=$1%>");
|
|
35
|
-
return ejs.compile(template);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* A product-specific string that can be used in an [MSI Identifier](https://docs.microsoft.com/en-us/windows/win32/msi/identifier).
|
|
40
|
-
*/
|
|
41
|
-
get productMsiIdPrefix() {
|
|
42
|
-
const sanitizedId = this.packager.appInfo.productFilename.replace(/[^\w.]/g, "").replace(/^[^A-Za-z_]+/, "");
|
|
43
|
-
return sanitizedId.length > 0 ? sanitizedId : "App" + this.upgradeCode.replace(/-/g, "");
|
|
44
|
-
}
|
|
45
|
-
get iconId() {
|
|
46
|
-
return `${this.productMsiIdPrefix}Icon.exe`;
|
|
47
|
-
}
|
|
48
|
-
get upgradeCode() {
|
|
49
|
-
return (this.options.upgradeCode || builder_util_runtime_1.UUID.v5(this.packager.appInfo.id, ELECTRON_BUILDER_UPGRADE_CODE_NS_UUID)).toUpperCase();
|
|
50
|
-
}
|
|
51
|
-
async build(appOutDir, arch) {
|
|
52
|
-
const packager = this.packager;
|
|
53
|
-
const artifactName = packager.expandArtifactBeautyNamePattern(this.options, "msi", arch);
|
|
54
|
-
const artifactPath = path.join(this.outDir, artifactName);
|
|
55
|
-
await packager.info.emitArtifactBuildStarted({
|
|
56
|
-
targetPresentableName: "MSI",
|
|
57
|
-
file: artifactPath,
|
|
58
|
-
arch,
|
|
59
|
-
});
|
|
60
|
-
const stageDir = await (0, targetUtil_1.createStageDir)(this, packager, arch);
|
|
61
|
-
const vm = this.vm;
|
|
62
|
-
const commonOptions = (0, CommonWindowsInstallerConfiguration_1.getEffectiveOptions)(this.options, this.packager);
|
|
63
|
-
// wix 4.0.0.5512.2 doesn't support the arm64 architecture so default to x64 when building for arm64.
|
|
64
|
-
// This will result in an x64 MSI installer that installs an arm64 version of the application. This is a
|
|
65
|
-
// stopgap until the electron-builder-binaries wix version is upgraded to a version that supports arm64:
|
|
66
|
-
// https://github.com/electron-userland/electron-builder/issues/6077
|
|
67
|
-
const wixArch = arch == builder_util_1.Arch.arm64 ? builder_util_1.Arch.x64 : arch;
|
|
68
|
-
const projectFile = stageDir.getTempFile("project.wxs");
|
|
69
|
-
const objectFiles = ["project.wixobj"];
|
|
70
|
-
await (0, promises_1.writeFile)(projectFile, await this.writeManifest(appOutDir, wixArch, commonOptions));
|
|
71
|
-
await packager.info.emitMsiProjectCreated(projectFile);
|
|
72
|
-
// noinspection SpellCheckingInspection
|
|
73
|
-
const vendorPath = await (0, binDownload_1.getBinFromUrl)("wix-4.0.0.5512.2", "wix-4.0.0.5512.2.7z", "fe677fcd837b18c9b912985d91636bbd8a1e800c3b3a6a841b6f96e89624e839");
|
|
74
|
-
// noinspection SpellCheckingInspection
|
|
75
|
-
const candleArgs = ["-arch", wixArch === builder_util_1.Arch.ia32 ? "x86" : "x64", `-dappDir=${vm.toVmFile(appOutDir)}`].concat(this.getCommonWixArgs());
|
|
76
|
-
candleArgs.push("project.wxs");
|
|
77
|
-
await (0, toolsetLock_1.withToolsetLock)(async () => {
|
|
78
|
-
await vm.exec(vm.toVmFile(path.join(vendorPath, "candle.exe")), candleArgs, {
|
|
79
|
-
cwd: stageDir.dir,
|
|
80
|
-
});
|
|
81
|
-
await this.light(objectFiles, vm, artifactPath, appOutDir, vendorPath, stageDir.dir);
|
|
82
|
-
});
|
|
83
|
-
await stageDir.cleanup();
|
|
84
|
-
await packager.signIf(artifactPath);
|
|
85
|
-
await packager.info.emitArtifactBuildCompleted({
|
|
86
|
-
file: artifactPath,
|
|
87
|
-
packager,
|
|
88
|
-
arch,
|
|
89
|
-
safeArtifactName: packager.computeSafeArtifactName(artifactName, "msi"),
|
|
90
|
-
target: this,
|
|
91
|
-
isWriteUpdateInfo: false,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
async light(objectFiles, vm, artifactPath, appOutDir, vendorPath, tempDir) {
|
|
95
|
-
// noinspection SpellCheckingInspection
|
|
96
|
-
const lightArgs = [
|
|
97
|
-
"-out",
|
|
98
|
-
vm.toVmFile(artifactPath),
|
|
99
|
-
"-v",
|
|
100
|
-
// https://github.com/wixtoolset/issues/issues/5169
|
|
101
|
-
"-spdb",
|
|
102
|
-
// https://sourceforge.net/p/wix/bugs/2405/
|
|
103
|
-
// error LGHT1076 : ICE61: This product should remove only older versions of itself. The Maximum version is not less than the current product. (1.1.0.42 1.1.0.42)
|
|
104
|
-
"-sw1076",
|
|
105
|
-
`-dappDir=${vm.toVmFile(appOutDir)}`,
|
|
106
|
-
// "-dcl:high",
|
|
107
|
-
]
|
|
108
|
-
.concat(this.getCommonWixArgs())
|
|
109
|
-
.concat(this.getAdditionalLightArgs());
|
|
110
|
-
// http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Build-3-5-2229-0-give-me-the-following-error-error-LGHT0216-An-unexpected-Win32-exception-with-errorn-td5707443.html
|
|
111
|
-
if (process.platform !== "win32") {
|
|
112
|
-
// noinspection SpellCheckingInspection
|
|
113
|
-
lightArgs.push("-sval");
|
|
114
|
-
}
|
|
115
|
-
if (this.options.oneClick === false) {
|
|
116
|
-
lightArgs.push("-ext", "WixUIExtension");
|
|
117
|
-
}
|
|
118
|
-
// objectFiles - only filenames, we set current directory to our temp stage dir
|
|
119
|
-
lightArgs.push(...objectFiles);
|
|
120
|
-
await vm.exec(vm.toVmFile(path.join(vendorPath, "light.exe")), lightArgs, {
|
|
121
|
-
cwd: tempDir,
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
getAdditionalLightArgs() {
|
|
125
|
-
const args = [];
|
|
126
|
-
if (this.options.additionalLightArgs != null) {
|
|
127
|
-
args.push(...this.options.additionalLightArgs);
|
|
128
|
-
}
|
|
129
|
-
return args;
|
|
130
|
-
}
|
|
131
|
-
getCommonWixArgs() {
|
|
132
|
-
const args = ["-pedantic"];
|
|
133
|
-
if (this.options.warningsAsErrors !== false) {
|
|
134
|
-
args.push("-wx");
|
|
135
|
-
}
|
|
136
|
-
if (this.options.additionalWixArgs != null) {
|
|
137
|
-
args.push(...this.options.additionalWixArgs);
|
|
138
|
-
}
|
|
139
|
-
return args;
|
|
140
|
-
}
|
|
141
|
-
async writeManifest(appOutDir, wixArch, commonOptions) {
|
|
142
|
-
const appInfo = this.packager.appInfo;
|
|
143
|
-
const { files, dirs } = await this.computeFileDeclaration(appOutDir);
|
|
144
|
-
const options = this.options;
|
|
145
|
-
return (await this.projectTemplate.value)({
|
|
146
|
-
...(await this.getBaseOptions(commonOptions)),
|
|
147
|
-
isCreateDesktopShortcut: commonOptions.isCreateDesktopShortcut !== CommonWindowsInstallerConfiguration_1.DesktopShortcutCreationPolicy.NEVER,
|
|
148
|
-
isRunAfterFinish: options.runAfterFinish !== false,
|
|
149
|
-
// https://stackoverflow.com/questions/1929038/compilation-error-ice80-the-64bitcomponent-uses-32bitdirectory
|
|
150
|
-
programFilesId: wixArch === builder_util_1.Arch.x64 ? "ProgramFiles64Folder" : "ProgramFilesFolder",
|
|
151
|
-
// wix in the name because special wix format can be used in the name
|
|
152
|
-
installationDirectoryWixName: (0, targetUtil_1.getWindowsInstallationDirName)(appInfo, commonOptions.isAssisted || commonOptions.isPerMachine === true),
|
|
153
|
-
dirs,
|
|
154
|
-
files,
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
async getBaseOptions(commonOptions) {
|
|
158
|
-
const appInfo = this.packager.appInfo;
|
|
159
|
-
const iconPath = await this.packager.getIconPath();
|
|
160
|
-
const compression = this.packager.compression;
|
|
161
|
-
const companyName = appInfo.companyName;
|
|
162
|
-
if (!companyName) {
|
|
163
|
-
builder_util_1.log.warn(`Manufacturer is not set for MSI — please set "author" in the package.json`);
|
|
164
|
-
}
|
|
165
|
-
return {
|
|
166
|
-
...commonOptions,
|
|
167
|
-
iconPath: iconPath == null ? null : this.vm.toVmFile(iconPath),
|
|
168
|
-
iconId: this.iconId,
|
|
169
|
-
compressionLevel: compression === "store" ? "none" : "high",
|
|
170
|
-
version: appInfo.getVersionInWeirdWindowsForm(),
|
|
171
|
-
productName: appInfo.productName,
|
|
172
|
-
upgradeCode: this.upgradeCode,
|
|
173
|
-
manufacturer: companyName || appInfo.productName,
|
|
174
|
-
appDescription: appInfo.description,
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
async computeFileDeclaration(appOutDir) {
|
|
178
|
-
const appInfo = this.packager.appInfo;
|
|
179
|
-
let isRootDirAddedToRemoveTable = false;
|
|
180
|
-
const dirNames = new Set();
|
|
181
|
-
const dirs = [];
|
|
182
|
-
const fileSpace = " ".repeat(6);
|
|
183
|
-
const commonOptions = (0, CommonWindowsInstallerConfiguration_1.getEffectiveOptions)(this.options, this.packager);
|
|
184
|
-
const files = (await (0, builder_util_1.walk)(appOutDir)).map(file => {
|
|
185
|
-
const packagePath = file.substring(appOutDir.length + 1);
|
|
186
|
-
const lastSlash = packagePath.lastIndexOf(path.sep);
|
|
187
|
-
const fileName = lastSlash > 0 ? packagePath.substring(lastSlash + 1) : packagePath;
|
|
188
|
-
let directoryId = null;
|
|
189
|
-
let dirName = "";
|
|
190
|
-
// Wix Directory.FileSource doesn't work - https://stackoverflow.com/questions/21519388/wix-filesource-confusion
|
|
191
|
-
if (lastSlash > 0) {
|
|
192
|
-
// This Name attribute may also define multiple directories using the inline directory syntax.
|
|
193
|
-
// For example, "ProgramFilesFolder:\My Company\My Product\bin" would create a reference to a Directory element with Id="ProgramFilesFolder" then create directories named "My Company" then "My Product" then "bin" nested beneath each other.
|
|
194
|
-
// This syntax is a shortcut to defining each directory in an individual Directory element.
|
|
195
|
-
dirName = packagePath.substring(0, lastSlash);
|
|
196
|
-
// https://github.com/electron-userland/electron-builder/issues/3027
|
|
197
|
-
directoryId = "d" + (0, crypto_1.createHash)("md5").update(dirName).digest("base64").replace(/\//g, "_").replace(/\+/g, ".").replace(/=+$/, "");
|
|
198
|
-
if (!dirNames.has(dirName)) {
|
|
199
|
-
dirNames.add(dirName);
|
|
200
|
-
dirs.push(`<Directory Id="${directoryId}" Name="${ROOT_DIR_ID}:\\${dirName.replace(/\//g, "\\")}\\"/>`);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
else if (!isRootDirAddedToRemoveTable) {
|
|
204
|
-
isRootDirAddedToRemoveTable = true;
|
|
205
|
-
}
|
|
206
|
-
// since RegistryValue can be part of Component, *** *** *** *** *** *** *** *** *** wix cannot auto generate guid
|
|
207
|
-
// https://stackoverflow.com/questions/1405100/change-my-component-guid-in-wix
|
|
208
|
-
let result = `<Component${directoryId === null ? "" : ` Directory="${directoryId}"`}>`;
|
|
209
|
-
result += `\n${fileSpace} <File Name="${xmlAttr(fileName)}" Source="$(var.appDir)${path.sep}${xmlAttr(packagePath)}" ReadOnly="yes" KeyPath="yes"`;
|
|
210
|
-
const isMainExecutable = packagePath === `${appInfo.productFilename}.exe`;
|
|
211
|
-
if (isMainExecutable) {
|
|
212
|
-
result += ' Id="mainExecutable"';
|
|
213
|
-
}
|
|
214
|
-
else if (directoryId === null) {
|
|
215
|
-
result += ` Id="${path.basename(packagePath)}_f"`;
|
|
216
|
-
}
|
|
217
|
-
const isCreateDesktopShortcut = commonOptions.isCreateDesktopShortcut !== CommonWindowsInstallerConfiguration_1.DesktopShortcutCreationPolicy.NEVER;
|
|
218
|
-
if (isMainExecutable && (isCreateDesktopShortcut || commonOptions.isCreateStartMenuShortcut)) {
|
|
219
|
-
result += `>\n`;
|
|
220
|
-
const shortcutName = commonOptions.shortcutName;
|
|
221
|
-
if (isCreateDesktopShortcut) {
|
|
222
|
-
result += `${fileSpace} <Shortcut Id="desktopShortcut" Directory="DesktopFolder" Name="${xmlAttr(shortcutName)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}"/>\n`;
|
|
223
|
-
}
|
|
224
|
-
const hasMenuCategory = commonOptions.menuCategory != null;
|
|
225
|
-
const startMenuShortcutDirectoryId = hasMenuCategory ? "AppProgramMenuDir" : "ProgramMenuFolder";
|
|
226
|
-
if (commonOptions.isCreateStartMenuShortcut) {
|
|
227
|
-
if (hasMenuCategory) {
|
|
228
|
-
dirs.push(`<Directory Id="${startMenuShortcutDirectoryId}" Name="ProgramMenuFolder:\\${commonOptions.menuCategory}\\"/>`);
|
|
229
|
-
}
|
|
230
|
-
result += `${fileSpace} <Shortcut Id="startMenuShortcut" Directory="${startMenuShortcutDirectoryId}" Name="${xmlAttr(shortcutName)}" WorkingDirectory="APPLICATIONFOLDER" Advertise="yes" Icon="${this.iconId}">\n`;
|
|
231
|
-
result += `${fileSpace} <ShortcutProperty Key="System.AppUserModel.ID" Value="${xmlAttr(this.packager.appInfo.id)}"/>\n`;
|
|
232
|
-
result += `${fileSpace} </Shortcut>\n`;
|
|
233
|
-
}
|
|
234
|
-
result += `${fileSpace}</File>`;
|
|
235
|
-
if (hasMenuCategory) {
|
|
236
|
-
result += `<RemoveFolder Id="${startMenuShortcutDirectoryId}" Directory="${startMenuShortcutDirectoryId}" On="uninstall"/>\n`;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
else {
|
|
240
|
-
result += `/>`;
|
|
241
|
-
}
|
|
242
|
-
const fileAssociations = this.packager.fileAssociations;
|
|
243
|
-
if (isMainExecutable && fileAssociations.length !== 0) {
|
|
244
|
-
for (const item of fileAssociations) {
|
|
245
|
-
const extensions = (0, builder_util_1.asArray)(item.ext).map(platformPackager_1.normalizeExt);
|
|
246
|
-
for (const ext of extensions) {
|
|
247
|
-
result += `${fileSpace} <ProgId Id="${this.productMsiIdPrefix}.${ext}" Advertise="yes" Icon="${this.iconId}" ${item.description ? `Description="${item.description}"` : ""}>\n`;
|
|
248
|
-
result += `${fileSpace} <Extension Id="${ext}" Advertise="yes">\n`;
|
|
249
|
-
result += `${fileSpace} <Verb Id="open" Command="Open with ${xmlAttr(this.packager.appInfo.productName)}" Argument=""%1""/>\n`;
|
|
250
|
-
result += `${fileSpace} </Extension>\n`;
|
|
251
|
-
result += `${fileSpace} </ProgId>\n`;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
return `${result}\n${fileSpace}</Component>`;
|
|
256
|
-
});
|
|
257
|
-
return { dirs: listToString(dirs, 2), files: listToString(files, 3) };
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
exports.default = MsiTarget;
|
|
261
|
-
function listToString(list, indentLevel) {
|
|
262
|
-
const space = " ".repeat(indentLevel * 2);
|
|
263
|
-
return list.join(`\n${space}`);
|
|
264
|
-
}
|
|
265
|
-
function xmlAttr(str) {
|
|
266
|
-
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
267
|
-
}
|
|
268
|
-
//# sourceMappingURL=MsiTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-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E,YAAY,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAA;IACvE,CAAC;CACF;AAvRD,4BAuRC;AAED,SAAS,YAAY,CAAC,IAAmB,EAAE,WAAmB;IAC5D,MAAM,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,CAAA;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAA;AAChC,CAAC;AAED,SAAS,OAAO,CAAC,GAAW;IAC1B,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;AAC/H,CAAC","sourcesContent":["import { Arch, asArray, log, walk } from \"builder-util\"\nimport { deepAssign, UUID } from \"builder-util-runtime\"\nimport { createHash } from \"crypto\"\nimport * as ejs from \"ejs\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { MsiOptions } from \"../\"\nimport { getBinFromUrl } from \"../binDownload\"\nimport { Target } from \"../core\"\nimport { DesktopShortcutCreationPolicy, FinalCommonWindowsInstallerOptions, getEffectiveOptions } from \"../options/CommonWindowsInstallerConfiguration\"\nimport { normalizeExt } from \"../platformPackager\"\nimport { getTemplatePath } from \"../util/pathManager\"\nimport { VmManager } from \"../vm/vm\"\nimport { WineVmManager } from \"../vm/WineVm\"\nimport { WinPackager } from \"../winPackager\"\nimport { withToolsetLock } from \"../util/toolsetLock\"\nimport { createStageDir, getWindowsInstallationDirName } from \"./targetUtil\"\n\nconst ELECTRON_BUILDER_UPGRADE_CODE_NS_UUID = UUID.parse(\"d752fe43-5d44-44d5-9fc9-6dd1bf19d5cc\")\nconst ROOT_DIR_ID = \"APPLICATIONFOLDER\"\n\n// WiX doesn't support Mono, so, dontnet462 is required to be installed for wine (preinstalled in our bundled wine)\nexport default class MsiTarget extends Target {\n protected readonly vm = process.platform === \"win32\" ? new VmManager() : new WineVmManager(this.packager.config.toolsets?.wine)\n\n readonly options: MsiOptions = deepAssign(this.packager.platformSpecificBuildOptions, this.packager.config.msi)\n\n constructor(\n protected readonly packager: WinPackager,\n readonly outDir: string,\n name = \"msi\",\n isAsyncSupported = true\n ) {\n super(name, isAsyncSupported)\n }\n\n protected projectTemplate = new Lazy<(data: any) => string>(async () => {\n const template = (await readFile(path.join(getTemplatePath(this.name), \"template.xml\"), \"utf8\"))\n .replace(/{{/g, \"<%\")\n .replace(/}}/g, \"%>\")\n .replace(/\\${([^}]+)}/g, \"<%=$1%>\")\n return ejs.compile(template)\n })\n\n /**\n * A product-specific string that can be used in an [MSI Identifier](https://docs.microsoft.com/en-us/windows/win32/msi/identifier).\n */\n private get productMsiIdPrefix() {\n const sanitizedId = this.packager.appInfo.productFilename.replace(/[^\\w.]/g, \"\").replace(/^[^A-Za-z_]+/, \"\")\n return sanitizedId.length > 0 ? sanitizedId : \"App\" + this.upgradeCode.replace(/-/g, \"\")\n }\n\n protected get iconId() {\n return `${this.productMsiIdPrefix}Icon.exe`\n }\n\n protected get upgradeCode(): string {\n return (this.options.upgradeCode || UUID.v5(this.packager.appInfo.id, ELECTRON_BUILDER_UPGRADE_CODE_NS_UUID)).toUpperCase()\n }\n\n async build(appOutDir: string, arch: Arch) {\n const packager = this.packager\n const artifactName = packager.expandArtifactBeautyNamePattern(this.options, \"msi\", arch)\n const artifactPath = path.join(this.outDir, artifactName)\n await packager.info.emitArtifactBuildStarted({\n targetPresentableName: \"MSI\",\n file: artifactPath,\n arch,\n })\n\n const stageDir = await createStageDir(this, packager, arch)\n const vm = this.vm\n\n const commonOptions = getEffectiveOptions(this.options, this.packager)\n\n // wix 4.0.0.5512.2 doesn't support the arm64 architecture so default to x64 when building for arm64.\n // This will result in an x64 MSI installer that installs an arm64 version of the application. This is a\n // stopgap until the electron-builder-binaries wix version is upgraded to a version that supports arm64:\n // https://github.com/electron-userland/electron-builder/issues/6077\n const wixArch = arch == Arch.arm64 ? Arch.x64 : arch\n\n const projectFile = stageDir.getTempFile(\"project.wxs\")\n const objectFiles = [\"project.wixobj\"]\n await writeFile(projectFile, await this.writeManifest(appOutDir, wixArch, commonOptions))\n\n await packager.info.emitMsiProjectCreated(projectFile)\n\n // noinspection SpellCheckingInspection\n const vendorPath = await getBinFromUrl(\"wix-4.0.0.5512.2\", \"wix-4.0.0.5512.2.7z\", \"fe677fcd837b18c9b912985d91636bbd8a1e800c3b3a6a841b6f96e89624e839\")\n\n // noinspection SpellCheckingInspection\n const candleArgs = [\"-arch\", wixArch === Arch.ia32 ? \"x86\" : \"x64\", `-dappDir=${vm.toVmFile(appOutDir)}`].concat(this.getCommonWixArgs())\n candleArgs.push(\"project.wxs\")\n await withToolsetLock(async () => {\n await vm.exec(vm.toVmFile(path.join(vendorPath, \"candle.exe\")), candleArgs, {\n cwd: stageDir.dir,\n })\n await this.light(objectFiles, vm, artifactPath, appOutDir, vendorPath, stageDir.dir)\n })\n\n await stageDir.cleanup()\n\n await packager.signIf(artifactPath)\n\n await packager.info.emitArtifactBuildCompleted({\n file: artifactPath,\n packager,\n arch,\n safeArtifactName: packager.computeSafeArtifactName(artifactName, \"msi\"),\n target: this,\n isWriteUpdateInfo: false,\n })\n }\n\n private async light(objectFiles: Array<string>, vm: VmManager, artifactPath: string, appOutDir: string, vendorPath: string, tempDir: string) {\n // noinspection SpellCheckingInspection\n const lightArgs = [\n \"-out\",\n vm.toVmFile(artifactPath),\n \"-v\",\n // https://github.com/wixtoolset/issues/issues/5169\n \"-spdb\",\n // https://sourceforge.net/p/wix/bugs/2405/\n // error LGHT1076 : ICE61: This product should remove only older versions of itself. The Maximum version is not less than the current product. (1.1.0.42 1.1.0.42)\n \"-sw1076\",\n `-dappDir=${vm.toVmFile(appOutDir)}`,\n // \"-dcl:high\",\n ]\n .concat(this.getCommonWixArgs())\n .concat(this.getAdditionalLightArgs())\n\n // http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Build-3-5-2229-0-give-me-the-following-error-error-LGHT0216-An-unexpected-Win32-exception-with-errorn-td5707443.html\n if (process.platform !== \"win32\") {\n // noinspection SpellCheckingInspection\n lightArgs.push(\"-sval\")\n }\n\n if (this.options.oneClick === false) {\n lightArgs.push(\"-ext\", \"WixUIExtension\")\n }\n\n // objectFiles - only filenames, we set current directory to our temp stage dir\n lightArgs.push(...objectFiles)\n await vm.exec(vm.toVmFile(path.join(vendorPath, \"light.exe\")), lightArgs, {\n cwd: tempDir,\n })\n }\n\n private getAdditionalLightArgs() {\n const args: Array<string> = []\n if (this.options.additionalLightArgs != null) {\n args.push(...this.options.additionalLightArgs)\n }\n return args\n }\n\n private getCommonWixArgs() {\n const args: Array<string> = [\"-pedantic\"]\n if (this.options.warningsAsErrors !== false) {\n args.push(\"-wx\")\n }\n if (this.options.additionalWixArgs != null) {\n args.push(...this.options.additionalWixArgs)\n }\n return args\n }\n\n protected async writeManifest(appOutDir: string, wixArch: Arch, commonOptions: FinalCommonWindowsInstallerOptions) {\n const appInfo = this.packager.appInfo\n const { files, dirs } = await this.computeFileDeclaration(appOutDir)\n const options = this.options\n\n return (await this.projectTemplate.value)({\n ...(await this.getBaseOptions(commonOptions)),\n isCreateDesktopShortcut: commonOptions.isCreateDesktopShortcut !== DesktopShortcutCreationPolicy.NEVER,\n isRunAfterFinish: options.runAfterFinish !== false,\n // https://stackoverflow.com/questions/1929038/compilation-error-ice80-the-64bitcomponent-uses-32bitdirectory\n programFilesId: wixArch === Arch.x64 ? \"ProgramFiles64Folder\" : \"ProgramFilesFolder\",\n // wix in the name because special wix format can be used in the name\n installationDirectoryWixName: getWindowsInstallationDirName(appInfo, commonOptions.isAssisted || commonOptions.isPerMachine === true),\n dirs,\n files,\n })\n }\n\n protected async getBaseOptions(commonOptions: FinalCommonWindowsInstallerOptions): Promise<any> {\n const appInfo = this.packager.appInfo\n const iconPath = await this.packager.getIconPath()\n const compression = this.packager.compression\n\n const companyName = appInfo.companyName\n if (!companyName) {\n log.warn(`Manufacturer is not set for MSI — please set \"author\" in the package.json`)\n }\n\n return {\n ...commonOptions,\n iconPath: iconPath == null ? null : this.vm.toVmFile(iconPath),\n iconId: this.iconId,\n compressionLevel: compression === \"store\" ? \"none\" : \"high\",\n version: appInfo.getVersionInWeirdWindowsForm(),\n productName: appInfo.productName,\n upgradeCode: this.upgradeCode,\n manufacturer: companyName || appInfo.productName,\n appDescription: appInfo.description,\n }\n }\n\n private async computeFileDeclaration(appOutDir: string) {\n const appInfo = this.packager.appInfo\n let isRootDirAddedToRemoveTable = false\n const dirNames = new Set<string>()\n const dirs: Array<string> = []\n const fileSpace = \" \".repeat(6)\n const commonOptions = getEffectiveOptions(this.options, this.packager)\n const files = (await walk(appOutDir)).map(file => {\n const packagePath = file.substring(appOutDir.length + 1)\n\n const lastSlash = packagePath.lastIndexOf(path.sep)\n const fileName = lastSlash > 0 ? packagePath.substring(lastSlash + 1) : packagePath\n let directoryId: string | null = null\n let dirName = \"\"\n // Wix Directory.FileSource doesn't work - https://stackoverflow.com/questions/21519388/wix-filesource-confusion\n if (lastSlash > 0) {\n // This Name attribute may also define multiple directories using the inline directory syntax.\n // For example, \"ProgramFilesFolder:\\My Company\\My Product\\bin\" would create a reference to a Directory element with Id=\"ProgramFilesFolder\" then create directories named \"My Company\" then \"My Product\" then \"bin\" nested beneath each other.\n // This syntax is a shortcut to defining each directory in an individual Directory element.\n dirName = packagePath.substring(0, lastSlash)\n // https://github.com/electron-userland/electron-builder/issues/3027\n directoryId = \"d\" + createHash(\"md5\").update(dirName).digest(\"base64\").replace(/\\//g, \"_\").replace(/\\+/g, \".\").replace(/=+$/, \"\")\n if (!dirNames.has(dirName)) {\n dirNames.add(dirName)\n dirs.push(`<Directory Id=\"${directoryId}\" Name=\"${ROOT_DIR_ID}:\\\\${dirName.replace(/\\//g, \"\\\\\")}\\\\\"/>`)\n }\n } else if (!isRootDirAddedToRemoveTable) {\n isRootDirAddedToRemoveTable = true\n }\n\n // since RegistryValue can be part of Component, *** *** *** *** *** *** *** *** *** wix cannot auto generate guid\n // https://stackoverflow.com/questions/1405100/change-my-component-guid-in-wix\n let result = `<Component${directoryId === null ? \"\" : ` Directory=\"${directoryId}\"`}>`\n result += `\\n${fileSpace} <File Name=\"${xmlAttr(fileName)}\" Source=\"$(var.appDir)${path.sep}${xmlAttr(packagePath)}\" ReadOnly=\"yes\" KeyPath=\"yes\"`\n const isMainExecutable = packagePath === `${appInfo.productFilename}.exe`\n if (isMainExecutable) {\n result += ' Id=\"mainExecutable\"'\n } else if (directoryId === null) {\n result += ` Id=\"${path.basename(packagePath)}_f\"`\n }\n\n const isCreateDesktopShortcut = commonOptions.isCreateDesktopShortcut !== DesktopShortcutCreationPolicy.NEVER\n if (isMainExecutable && (isCreateDesktopShortcut || commonOptions.isCreateStartMenuShortcut)) {\n result += `>\\n`\n const shortcutName = commonOptions.shortcutName\n if (isCreateDesktopShortcut) {\n result += `${fileSpace} <Shortcut Id=\"desktopShortcut\" Directory=\"DesktopFolder\" Name=\"${xmlAttr(\n shortcutName\n )}\" WorkingDirectory=\"APPLICATIONFOLDER\" Advertise=\"yes\" Icon=\"${this.iconId}\"/>\\n`\n }\n\n const hasMenuCategory = commonOptions.menuCategory != null\n const startMenuShortcutDirectoryId = hasMenuCategory ? \"AppProgramMenuDir\" : \"ProgramMenuFolder\"\n if (commonOptions.isCreateStartMenuShortcut) {\n if (hasMenuCategory) {\n dirs.push(`<Directory Id=\"${startMenuShortcutDirectoryId}\" Name=\"ProgramMenuFolder:\\\\${commonOptions.menuCategory}\\\\\"/>`)\n }\n result += `${fileSpace} <Shortcut Id=\"startMenuShortcut\" Directory=\"${startMenuShortcutDirectoryId}\" Name=\"${xmlAttr(\n shortcutName\n )}\" WorkingDirectory=\"APPLICATIONFOLDER\" Advertise=\"yes\" Icon=\"${this.iconId}\">\\n`\n result += `${fileSpace} <ShortcutProperty Key=\"System.AppUserModel.ID\" Value=\"${xmlAttr(this.packager.appInfo.id)}\"/>\\n`\n result += `${fileSpace} </Shortcut>\\n`\n }\n result += `${fileSpace}</File>`\n\n if (hasMenuCategory) {\n result += `<RemoveFolder Id=\"${startMenuShortcutDirectoryId}\" Directory=\"${startMenuShortcutDirectoryId}\" On=\"uninstall\"/>\\n`\n }\n } else {\n result += `/>`\n }\n\n const fileAssociations = this.packager.fileAssociations\n if (isMainExecutable && fileAssociations.length !== 0) {\n for (const item of fileAssociations) {\n const extensions = asArray(item.ext).map(normalizeExt)\n for (const ext of extensions) {\n result += `${fileSpace} <ProgId Id=\"${this.productMsiIdPrefix}.${ext}\" Advertise=\"yes\" Icon=\"${this.iconId}\" ${\n item.description ? `Description=\"${item.description}\"` : \"\"\n }>\\n`\n result += `${fileSpace} <Extension Id=\"${ext}\" Advertise=\"yes\">\\n`\n result += `${fileSpace} <Verb Id=\"open\" Command=\"Open with ${xmlAttr(this.packager.appInfo.productName)}\" Argument=\""%1"\"/>\\n`\n result += `${fileSpace} </Extension>\\n`\n result += `${fileSpace} </ProgId>\\n`\n }\n }\n }\n\n return `${result}\\n${fileSpace}</Component>`\n })\n\n return { dirs: listToString(dirs, 2), files: listToString(files, 3) }\n }\n}\n\nfunction listToString(list: Array<string>, indentLevel: number) {\n const space = \" \".repeat(indentLevel * 2)\n return list.join(`\\n${space}`)\n}\n\nfunction xmlAttr(str: string) {\n return str.replace(/&/g, \"&\").replace(/</g, \"<\").replace(/>/g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\")\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Arch } from "builder-util";
|
|
2
|
-
import { MsiWrappedOptions } from "../";
|
|
3
|
-
import { FinalCommonWindowsInstallerOptions } from "../options/CommonWindowsInstallerConfiguration";
|
|
4
|
-
import { WinPackager } from "../winPackager";
|
|
5
|
-
import MsiTarget from "./MsiTarget";
|
|
6
|
-
export default class MsiWrappedTarget extends MsiTarget {
|
|
7
|
-
readonly outDir: string;
|
|
8
|
-
readonly options: MsiWrappedOptions;
|
|
9
|
-
/** @private */
|
|
10
|
-
private readonly archs;
|
|
11
|
-
constructor(packager: WinPackager, outDir: string);
|
|
12
|
-
private get productId();
|
|
13
|
-
private validatePrerequisites;
|
|
14
|
-
build(appOutDir: string, arch: Arch): Promise<any>;
|
|
15
|
-
finishBuild(): Promise<any>;
|
|
16
|
-
protected get installerFilenamePattern(): string;
|
|
17
|
-
private getExeSourcePath;
|
|
18
|
-
protected writeManifest(_appOutDir: string, arch: Arch, commonOptions: FinalCommonWindowsInstallerOptions): Promise<string>;
|
|
19
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const builder_util_1 = require("builder-util");
|
|
4
|
-
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const MsiTarget_1 = require("./MsiTarget");
|
|
7
|
-
const ELECTRON_MSI_WRAPPED_NS_UUID = builder_util_runtime_1.UUID.parse("467f7bb2-a83c-442f-b776-394d316e8e53");
|
|
8
|
-
class MsiWrappedTarget extends MsiTarget_1.default {
|
|
9
|
-
constructor(packager, outDir) {
|
|
10
|
-
// must be synchronous so it can run after nsis
|
|
11
|
-
super(packager, outDir, "msiWrapped", false);
|
|
12
|
-
this.outDir = outDir;
|
|
13
|
-
this.options = (0, builder_util_runtime_1.deepAssign)(this.packager.platformSpecificBuildOptions, this.packager.config.msiWrapped);
|
|
14
|
-
/** @private */
|
|
15
|
-
this.archs = new Map();
|
|
16
|
-
}
|
|
17
|
-
get productId() {
|
|
18
|
-
// this id is only required to build the installer
|
|
19
|
-
// however it serves no purpose as this msi is just
|
|
20
|
-
// a wrapper for an exe
|
|
21
|
-
return builder_util_runtime_1.UUID.v5(this.packager.appInfo.id, ELECTRON_MSI_WRAPPED_NS_UUID).toUpperCase();
|
|
22
|
-
}
|
|
23
|
-
validatePrerequisites() {
|
|
24
|
-
const config = this.packager.config;
|
|
25
|
-
// this target requires nsis to be configured and executed
|
|
26
|
-
// as this build re-bundles the nsis executable and wraps it in an msi
|
|
27
|
-
if (!config.win || !config.win.target || !Array.isArray(config.win.target)) {
|
|
28
|
-
throw new Error("No windows target found!");
|
|
29
|
-
}
|
|
30
|
-
const target = config.win.target;
|
|
31
|
-
const nsisTarget = "nsis";
|
|
32
|
-
if (!target
|
|
33
|
-
.map((t) => {
|
|
34
|
-
const result = typeof t === "string" ? t : t.target;
|
|
35
|
-
return result.toLowerCase().trim();
|
|
36
|
-
})
|
|
37
|
-
.some(t => t === nsisTarget)) {
|
|
38
|
-
throw new Error("No nsis target found! Please specify an nsis target");
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
build(appOutDir, arch) {
|
|
42
|
-
this.archs.set(arch, appOutDir);
|
|
43
|
-
return Promise.resolve();
|
|
44
|
-
}
|
|
45
|
-
async finishBuild() {
|
|
46
|
-
await super.finishBuild();
|
|
47
|
-
const [arch, appOutDir] = this.archs.entries().next().value;
|
|
48
|
-
this.validatePrerequisites();
|
|
49
|
-
const exeSourcePath = this.getExeSourcePath(arch);
|
|
50
|
-
if (!(await (0, builder_util_1.exists)(exeSourcePath))) {
|
|
51
|
-
throw new builder_util_1.InvalidConfigurationError(`NSIS executable not found at ${exeSourcePath} - ensure the NSIS target builds before msiWrapped. Try listing 'nsis' before 'msiWrapped' in your target configuration.`);
|
|
52
|
-
}
|
|
53
|
-
return super.build(appOutDir, arch);
|
|
54
|
-
}
|
|
55
|
-
get installerFilenamePattern() {
|
|
56
|
-
// big assumption is made here for the moment that the pattern didn't change
|
|
57
|
-
// tslint:disable:no-invalid-template-strings
|
|
58
|
-
return "${productName} Setup ${version}.${ext}";
|
|
59
|
-
}
|
|
60
|
-
getExeSourcePath(arch) {
|
|
61
|
-
const packager = this.packager;
|
|
62
|
-
// in this case, we want .exe, this way we can wrap the existing package if it exists
|
|
63
|
-
const artifactName = packager.expandArtifactNamePattern(this.options, "exe", arch, this.installerFilenamePattern, false, this.packager.platformSpecificBuildOptions.defaultArch);
|
|
64
|
-
const artifactPath = path.join(this.outDir, artifactName);
|
|
65
|
-
return artifactPath;
|
|
66
|
-
}
|
|
67
|
-
async writeManifest(_appOutDir, arch, commonOptions) {
|
|
68
|
-
const exeSourcePath = this.getExeSourcePath(arch);
|
|
69
|
-
const options = this.options;
|
|
70
|
-
return (await this.projectTemplate.value)({
|
|
71
|
-
...(await this.getBaseOptions(commonOptions)),
|
|
72
|
-
exeSourcePath: exeSourcePath,
|
|
73
|
-
productId: this.productId,
|
|
74
|
-
impersonate: options.impersonate === true ? "yes" : "no",
|
|
75
|
-
wrappedInstallerArgs: options.wrappedInstallerArgs,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.default = MsiWrappedTarget;
|
|
80
|
-
//# sourceMappingURL=MsiWrappedTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MsiWrappedTarget.js","sourceRoot":"","sources":["../../src/targets/MsiWrappedTarget.ts"],"names":[],"mappings":";;AAAA,+CAAsE;AACtE,+DAAuD;AACvD,6BAA4B;AAK5B,2CAAmC;AAEnC,MAAM,4BAA4B,GAAG,2BAAI,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAA;AAEvF,MAAqB,gBAAiB,SAAQ,mBAAS;IAMrD,YACE,QAAqB,EACZ,MAAc;QAEvB,+CAA+C;QAC/C,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,CAAA;QAHnC,WAAM,GAAN,MAAM,CAAQ;QAPhB,YAAO,GAAsB,IAAA,iCAAU,EAAC,IAAI,CAAC,QAAQ,CAAC,4BAA4B,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;QAE7H,eAAe;QACE,UAAK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;QAE5B,OAAO,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;YACxC,GAAG,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC7C,aAAa,EAAE,aAAa;YAC5B,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,WAAW,EAAE,OAAO,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;YACxD,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;SACnD,CAAC,CAAA;IACJ,CAAC;CACF;AA7FD,mCA6FC","sourcesContent":["import { Arch, exists, InvalidConfigurationError } from \"builder-util\"\nimport { deepAssign, UUID } from \"builder-util-runtime\"\nimport * as path from \"path\"\nimport { MsiWrappedOptions } from \"../\"\nimport { TargetConfiguration } from \"../core\"\nimport { FinalCommonWindowsInstallerOptions } from \"../options/CommonWindowsInstallerConfiguration\"\nimport { WinPackager } from \"../winPackager\"\nimport MsiTarget from \"./MsiTarget\"\n\nconst ELECTRON_MSI_WRAPPED_NS_UUID = UUID.parse(\"467f7bb2-a83c-442f-b776-394d316e8e53\")\n\nexport default class MsiWrappedTarget extends MsiTarget {\n readonly options: MsiWrappedOptions = deepAssign(this.packager.platformSpecificBuildOptions, this.packager.config.msiWrapped)\n\n /** @private */\n private readonly archs: Map<Arch, string> = new Map()\n\n constructor(\n packager: WinPackager,\n readonly outDir: string\n ) {\n // must be synchronous so it can run after nsis\n super(packager, outDir, \"msiWrapped\", false)\n }\n\n private get productId(): string {\n // this id is only required to build the installer\n // however it serves no purpose as this msi is just\n // a wrapper for an exe\n return UUID.v5(this.packager.appInfo.id, ELECTRON_MSI_WRAPPED_NS_UUID).toUpperCase()\n }\n\n private validatePrerequisites(): void {\n const config = this.packager.config\n // this target requires nsis to be configured and executed\n // as this build re-bundles the nsis executable and wraps it in an msi\n\n if (!config.win || !config.win.target || !Array.isArray(config.win.target)) {\n throw new Error(\"No windows target found!\")\n }\n\n const target = config.win.target\n const nsisTarget = \"nsis\"\n if (\n !target\n .map((t: TargetConfiguration | string): string => {\n const result: string = typeof t === \"string\" ? t : t.target\n return result.toLowerCase().trim()\n })\n .some(t => t === nsisTarget)\n ) {\n throw new Error(\"No nsis target found! Please specify an nsis target\")\n }\n }\n\n build(appOutDir: string, arch: Arch): Promise<any> {\n this.archs.set(arch, appOutDir)\n return Promise.resolve()\n }\n\n async finishBuild(): Promise<any> {\n await super.finishBuild()\n const [arch, appOutDir] = this.archs.entries().next().value!\n\n this.validatePrerequisites()\n\n const exeSourcePath = this.getExeSourcePath(arch)\n\n if (!(await exists(exeSourcePath))) {\n throw new InvalidConfigurationError(\n `NSIS executable not found at ${exeSourcePath} - ensure the NSIS target builds before msiWrapped. Try listing 'nsis' before 'msiWrapped' in your target configuration.`\n )\n }\n\n return super.build(appOutDir, arch)\n }\n\n protected get installerFilenamePattern(): string {\n // big assumption is made here for the moment that the pattern didn't change\n // tslint:disable:no-invalid-template-strings\n return \"${productName} Setup ${version}.${ext}\"\n }\n\n private getExeSourcePath(arch: Arch) {\n const packager = this.packager\n // in this case, we want .exe, this way we can wrap the existing package if it exists\n const artifactName = packager.expandArtifactNamePattern(this.options, \"exe\", arch, this.installerFilenamePattern, false, this.packager.platformSpecificBuildOptions.defaultArch)\n const artifactPath = path.join(this.outDir, artifactName)\n\n return artifactPath\n }\n\n protected async writeManifest(_appOutDir: string, arch: Arch, commonOptions: FinalCommonWindowsInstallerOptions) {\n const exeSourcePath = this.getExeSourcePath(arch)\n const options = this.options\n\n return (await this.projectTemplate.value)({\n ...(await this.getBaseOptions(commonOptions)),\n exeSourcePath: exeSourcePath,\n productId: this.productId,\n impersonate: options.impersonate === true ? \"yes\" : \"no\",\n wrappedInstallerArgs: options.wrappedInstallerArgs,\n })\n }\n}\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Arch } from "builder-util";
|
|
2
|
-
import { Target } from "../../core";
|
|
3
|
-
import { LinuxPackager } from "../../linuxPackager";
|
|
4
|
-
import { AppImageOptions } from "../../options/linuxOptions";
|
|
5
|
-
import { LinuxTargetHelper } from "../LinuxTargetHelper";
|
|
6
|
-
export declare const APP_RUN_ENTRYPOINT = "AppRun";
|
|
7
|
-
export default class AppImageTarget extends Target {
|
|
8
|
-
private readonly packager;
|
|
9
|
-
private readonly helper;
|
|
10
|
-
readonly outDir: string;
|
|
11
|
-
readonly options: AppImageOptions;
|
|
12
|
-
private readonly desktopEntry;
|
|
13
|
-
constructor(_ignored: string, packager: LinuxPackager, helper: LinuxTargetHelper, outDir: string);
|
|
14
|
-
build(appOutDir: string, arch: Arch): Promise<any>;
|
|
15
|
-
}
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.APP_RUN_ENTRYPOINT = void 0;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const fs_extra_1 = require("fs-extra");
|
|
6
|
-
const lazy_val_1 = require("lazy-val");
|
|
7
|
-
const path = require("path");
|
|
8
|
-
const core_1 = require("../../core");
|
|
9
|
-
const PublishManager_1 = require("../../publish/PublishManager");
|
|
10
|
-
const license_1 = require("../../util/license");
|
|
11
|
-
const targetUtil_1 = require("../targetUtil");
|
|
12
|
-
const appImageUtil_1 = require("./appImageUtil");
|
|
13
|
-
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
14
|
-
// https://unix.stackexchange.com/questions/375191/append-to-sub-directory-inside-squashfs-file
|
|
15
|
-
exports.APP_RUN_ENTRYPOINT = "AppRun";
|
|
16
|
-
class AppImageTarget extends core_1.Target {
|
|
17
|
-
constructor(_ignored, packager, helper, outDir) {
|
|
18
|
-
super("appImage");
|
|
19
|
-
this.packager = packager;
|
|
20
|
-
this.helper = helper;
|
|
21
|
-
this.outDir = outDir;
|
|
22
|
-
this.options = (0, builder_util_runtime_1.deepAssign)({}, this.packager.platformSpecificBuildOptions, this.packager.config[this.name]);
|
|
23
|
-
this.desktopEntry = new lazy_val_1.Lazy(() => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
const appimageTool = (_a = packager.config.toolsets) === null || _a === void 0 ? void 0 : _a.appimage;
|
|
26
|
-
const defaultArgs = appimageTool == null || appimageTool === "0.0.0" ? ["--no-sandbox"] : [];
|
|
27
|
-
const args = (_b = this.options.executableArgs) !== null && _b !== void 0 ? _b : defaultArgs;
|
|
28
|
-
const exec = [exports.APP_RUN_ENTRYPOINT, ...args, "%U"].join(" ");
|
|
29
|
-
return helper.computeDesktopEntry(this.options, exec, {
|
|
30
|
-
"X-AppImage-Version": `${packager.appInfo.buildVersion}`,
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
async build(appOutDir, arch) {
|
|
35
|
-
var _a;
|
|
36
|
-
const packager = this.packager;
|
|
37
|
-
const options = this.options;
|
|
38
|
-
// https://github.com/electron-userland/electron-builder/issues/775
|
|
39
|
-
// https://github.com/electron-userland/electron-builder/issues/1726
|
|
40
|
-
const artifactName = packager.expandArtifactNamePattern(options, "AppImage", arch);
|
|
41
|
-
const artifactPath = path.join(this.outDir, artifactName);
|
|
42
|
-
await packager.info.emitArtifactBuildStarted({
|
|
43
|
-
targetPresentableName: "AppImage",
|
|
44
|
-
file: artifactPath,
|
|
45
|
-
arch,
|
|
46
|
-
});
|
|
47
|
-
// Parallelize independent async operations
|
|
48
|
-
const [publishConfig, stageDir, desktopEntry, icons, license] = await Promise.all([
|
|
49
|
-
(0, PublishManager_1.getAppUpdatePublishConfiguration)(packager, options, arch, false),
|
|
50
|
-
(0, targetUtil_1.createStageDir)(this, packager, arch),
|
|
51
|
-
this.desktopEntry.value,
|
|
52
|
-
this.helper.icons,
|
|
53
|
-
(0, license_1.getNotLocalizedLicenseFile)(options.license, this.packager, ["txt", "html"]),
|
|
54
|
-
]);
|
|
55
|
-
if (publishConfig != null) {
|
|
56
|
-
await (0, fs_extra_1.outputFile)(path.join(packager.getResourcesDir(appOutDir), "app-update.yml"), (0, builder_util_1.serializeToYaml)(publishConfig));
|
|
57
|
-
}
|
|
58
|
-
// Validated once here; throws InvalidConfigurationError for path traversal / NUL.
|
|
59
|
-
const desktopBaseName = this.helper.getDesktopFileName();
|
|
60
|
-
if (this.packager.packagerOptions.effectiveOptionComputed != null &&
|
|
61
|
-
(await this.packager.packagerOptions.effectiveOptionComputed({ desktop: desktopEntry, desktopFileName: `${desktopBaseName}.desktop` }))) {
|
|
62
|
-
await stageDir.cleanup();
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
let updateInfo;
|
|
66
|
-
try {
|
|
67
|
-
const appimageTool = (_a = this.packager.config.toolsets) === null || _a === void 0 ? void 0 : _a.appimage;
|
|
68
|
-
if (appimageTool == null || appimageTool === "0.0.0") {
|
|
69
|
-
updateInfo = await (0, appImageUtil_1.buildLegacyFuse2AppImage)({
|
|
70
|
-
appDir: appOutDir,
|
|
71
|
-
stageDir: stageDir.dir,
|
|
72
|
-
arch,
|
|
73
|
-
output: artifactPath,
|
|
74
|
-
options: {
|
|
75
|
-
productName: packager.appInfo.productName,
|
|
76
|
-
productFilename: packager.appInfo.productFilename,
|
|
77
|
-
executableName: packager.executableName,
|
|
78
|
-
license,
|
|
79
|
-
desktopEntry,
|
|
80
|
-
icons,
|
|
81
|
-
fileAssociations: packager.fileAssociations,
|
|
82
|
-
desktopBaseName,
|
|
83
|
-
compression: (() => {
|
|
84
|
-
const c = options.compression;
|
|
85
|
-
if (c === "xz" || c === "gzip") {
|
|
86
|
-
return c;
|
|
87
|
-
}
|
|
88
|
-
if (packager.compression === "maximum") {
|
|
89
|
-
return "xz";
|
|
90
|
-
}
|
|
91
|
-
return undefined; // normal/store/unset/zstd → mksquashfs defaults to gzip
|
|
92
|
-
})(),
|
|
93
|
-
},
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
updateInfo = await (0, appImageUtil_1.buildStaticRuntimeAppImage)(appimageTool, {
|
|
98
|
-
appDir: appOutDir,
|
|
99
|
-
stageDir: stageDir.dir,
|
|
100
|
-
arch,
|
|
101
|
-
output: artifactPath,
|
|
102
|
-
options: {
|
|
103
|
-
productName: packager.appInfo.productName,
|
|
104
|
-
productFilename: packager.appInfo.productFilename,
|
|
105
|
-
executableName: packager.executableName,
|
|
106
|
-
license,
|
|
107
|
-
desktopEntry,
|
|
108
|
-
icons,
|
|
109
|
-
fileAssociations: packager.fileAssociations,
|
|
110
|
-
desktopBaseName,
|
|
111
|
-
compression: (() => {
|
|
112
|
-
const c = options.compression;
|
|
113
|
-
if (c === "gzip" || c === "zstd") {
|
|
114
|
-
return c;
|
|
115
|
-
}
|
|
116
|
-
if (c === "xz") {
|
|
117
|
-
return "zstd"; // nearest equivalent; static runtime does not support xz
|
|
118
|
-
}
|
|
119
|
-
if (packager.compression === "store") {
|
|
120
|
-
return "gzip";
|
|
121
|
-
}
|
|
122
|
-
return "zstd"; // maximum/normal/unset → zstd for static runtime
|
|
123
|
-
})(),
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
builder_util_1.log.error({ error: error.message }, "failed to build AppImage");
|
|
130
|
-
throw error;
|
|
131
|
-
}
|
|
132
|
-
finally {
|
|
133
|
-
await stageDir.cleanup().catch(() => { });
|
|
134
|
-
}
|
|
135
|
-
await packager.info.emitArtifactBuildCompleted({
|
|
136
|
-
file: artifactPath,
|
|
137
|
-
safeArtifactName: packager.computeSafeArtifactName(artifactName, "AppImage", arch, false),
|
|
138
|
-
target: this,
|
|
139
|
-
arch,
|
|
140
|
-
packager,
|
|
141
|
-
isWriteUpdateInfo: true,
|
|
142
|
-
updateInfo,
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
exports.default = AppImageTarget;
|
|
147
|
-
//# sourceMappingURL=AppImageTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":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AC,CAAA;YAC/D,MAAM,KAAK,CAAA;QACb,CAAC;gBAAS,CAAC;YACT,MAAM,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QAC1C,CAAC;QAED,MAAM,QAAQ,CAAC,IAAI,CAAC,0BAA0B,CAAC;YAC7C,IAAI,EAAE,YAAY;YAClB,gBAAgB,EAAE,QAAQ,CAAC,uBAAuB,CAAC,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC;YACzF,MAAM,EAAE,IAAI;YACZ,IAAI;YACJ,QAAQ;YACR,iBAAiB,EAAE,IAAI;YACvB,UAAU;SACX,CAAC,CAAA;IACJ,CAAC;CACF;AA7ID,iCA6IC","sourcesContent":["import { Arch, log, serializeToYaml } from \"builder-util\"\nimport { outputFile } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport { Target } from \"../../core\"\nimport { LinuxPackager } from \"../../linuxPackager\"\nimport { AppImageOptions } from \"../../options/linuxOptions\"\nimport { getAppUpdatePublishConfiguration } from \"../../publish/PublishManager\"\nimport { getNotLocalizedLicenseFile } from \"../../util/license\"\nimport { LinuxTargetHelper } from \"../LinuxTargetHelper\"\nimport { createStageDir } from \"../targetUtil\"\nimport { buildLegacyFuse2AppImage, buildStaticRuntimeAppImage } from \"./appImageUtil\"\nimport { BlockMapDataHolder, deepAssign } from \"builder-util-runtime\"\n\n// https://unix.stackexchange.com/questions/375191/append-to-sub-directory-inside-squashfs-file\n\nexport const APP_RUN_ENTRYPOINT = \"AppRun\"\n\nexport default class AppImageTarget extends Target {\n readonly options: AppImageOptions = deepAssign({}, this.packager.platformSpecificBuildOptions, (this.packager.config as any)[this.name])\n\n private readonly desktopEntry: Lazy<string>\n\n constructor(\n _ignored: string,\n private readonly packager: LinuxPackager,\n private readonly helper: LinuxTargetHelper,\n readonly outDir: string\n ) {\n super(\"appImage\")\n\n this.desktopEntry = new Lazy<string>(() => {\n const appimageTool = packager.config.toolsets?.appimage\n const defaultArgs = appimageTool == null || appimageTool === \"0.0.0\" ? [\"--no-sandbox\"] : []\n const args = this.options.executableArgs ?? defaultArgs\n const exec = [APP_RUN_ENTRYPOINT, ...args, \"%U\"].join(\" \")\n return helper.computeDesktopEntry(this.options, exec, {\n \"X-AppImage-Version\": `${packager.appInfo.buildVersion}`,\n })\n })\n }\n\n async build(appOutDir: string, arch: Arch): Promise<any> {\n const packager = this.packager\n\n const options = this.options\n // https://github.com/electron-userland/electron-builder/issues/775\n // https://github.com/electron-userland/electron-builder/issues/1726\n const artifactName = packager.expandArtifactNamePattern(options, \"AppImage\", arch)\n const artifactPath = path.join(this.outDir, artifactName)\n\n await packager.info.emitArtifactBuildStarted({\n targetPresentableName: \"AppImage\",\n file: artifactPath,\n arch,\n })\n\n // Parallelize independent async operations\n const [publishConfig, stageDir, desktopEntry, icons, license] = await Promise.all([\n getAppUpdatePublishConfiguration(packager, options, arch, false),\n createStageDir(this, packager, arch),\n this.desktopEntry.value,\n this.helper.icons,\n getNotLocalizedLicenseFile(options.license, this.packager, [\"txt\", \"html\"]),\n ])\n\n if (publishConfig != null) {\n await outputFile(path.join(packager.getResourcesDir(appOutDir), \"app-update.yml\"), serializeToYaml(publishConfig))\n }\n\n // Validated once here; throws InvalidConfigurationError for path traversal / NUL.\n const desktopBaseName = this.helper.getDesktopFileName()\n\n if (\n this.packager.packagerOptions.effectiveOptionComputed != null &&\n (await this.packager.packagerOptions.effectiveOptionComputed({ desktop: desktopEntry, desktopFileName: `${desktopBaseName}.desktop` }))\n ) {\n await stageDir.cleanup()\n return\n }\n\n let updateInfo: BlockMapDataHolder\n try {\n const appimageTool = this.packager.config.toolsets?.appimage\n if (appimageTool == null || appimageTool === \"0.0.0\") {\n updateInfo = await buildLegacyFuse2AppImage({\n appDir: appOutDir,\n stageDir: stageDir.dir,\n arch,\n output: artifactPath,\n options: {\n productName: packager.appInfo.productName,\n productFilename: packager.appInfo.productFilename,\n executableName: packager.executableName,\n license,\n desktopEntry,\n icons,\n fileAssociations: packager.fileAssociations,\n desktopBaseName,\n compression: (() => {\n const c = options.compression\n if (c === \"xz\" || c === \"gzip\") {\n return c\n }\n if (packager.compression === \"maximum\") {\n return \"xz\"\n }\n return undefined // normal/store/unset/zstd → mksquashfs defaults to gzip\n })(),\n },\n })\n } else {\n updateInfo = await buildStaticRuntimeAppImage(appimageTool, {\n appDir: appOutDir,\n stageDir: stageDir.dir,\n arch,\n output: artifactPath,\n options: {\n productName: packager.appInfo.productName,\n productFilename: packager.appInfo.productFilename,\n executableName: packager.executableName,\n license,\n desktopEntry,\n icons,\n fileAssociations: packager.fileAssociations,\n desktopBaseName,\n compression: (() => {\n const c = options.compression\n if (c === \"gzip\" || c === \"zstd\") {\n return c\n }\n if (c === \"xz\") {\n return \"zstd\" // nearest equivalent; static runtime does not support xz\n }\n if (packager.compression === \"store\") {\n return \"gzip\"\n }\n return \"zstd\" // maximum/normal/unset → zstd for static runtime\n })(),\n },\n })\n }\n } catch (error: any) {\n log.error({ error: error.message }, \"failed to build AppImage\")\n throw error\n } finally {\n await stageDir.cleanup().catch(() => {})\n }\n\n await packager.info.emitArtifactBuildCompleted({\n file: artifactPath,\n safeArtifactName: packager.computeSafeArtifactName(artifactName, \"AppImage\", arch, false),\n target: this,\n arch,\n packager,\n isWriteUpdateInfo: true,\n updateInfo,\n })\n }\n}\n"]}
|