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
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createMacApp = createMacApp;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const promises_1 = require("fs/promises");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const fs = require("fs");
|
|
8
|
-
const appInfo_1 = require("../appInfo");
|
|
9
|
-
const platformPackager_1 = require("../platformPackager");
|
|
10
|
-
const plist_1 = require("../util/plist");
|
|
11
|
-
const ElectronFramework_1 = require("./ElectronFramework");
|
|
12
|
-
function doRename(basePath, oldName, newName) {
|
|
13
|
-
return (0, promises_1.rename)(path.join(basePath, oldName), path.join(basePath, newName));
|
|
14
|
-
}
|
|
15
|
-
function moveHelpers(helperSuffixes, frameworksPath, appName, prefix) {
|
|
16
|
-
return Promise.all(helperSuffixes.map(suffix => {
|
|
17
|
-
const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
|
18
|
-
return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`));
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
function getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist) {
|
|
22
|
-
const result = [" Helper"];
|
|
23
|
-
if (helperEHPlist != null) {
|
|
24
|
-
result.push(" Helper EH");
|
|
25
|
-
}
|
|
26
|
-
if (helperNPPlist != null) {
|
|
27
|
-
result.push(" Helper NP");
|
|
28
|
-
}
|
|
29
|
-
if (helperRendererPlist != null) {
|
|
30
|
-
result.push(" Helper (Renderer)");
|
|
31
|
-
}
|
|
32
|
-
if (helperPluginPlist != null) {
|
|
33
|
-
result.push(" Helper (Plugin)");
|
|
34
|
-
}
|
|
35
|
-
if (helperGPUPlist != null) {
|
|
36
|
-
result.push(" Helper (GPU)");
|
|
37
|
-
}
|
|
38
|
-
return result;
|
|
39
|
-
}
|
|
40
|
-
/** @internal */
|
|
41
|
-
async function createMacApp(packager, appOutDir, asarIntegrity, isMas) {
|
|
42
|
-
var _a, _b;
|
|
43
|
-
const appInfo = packager.appInfo;
|
|
44
|
-
// Electon uses the application name (CFBundleName) to resolve helper apps
|
|
45
|
-
// https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm
|
|
46
|
-
// https://github.com/electron-userland/electron-builder/issues/6962
|
|
47
|
-
const appFilename = appInfo.sanitizedProductName;
|
|
48
|
-
const electronBranding = (0, ElectronFramework_1.createBrandingOpts)(packager.config);
|
|
49
|
-
const contentsPath = path.join(appOutDir, packager.info.framework.distMacOsAppName, "Contents");
|
|
50
|
-
const frameworksPath = path.join(contentsPath, "Frameworks");
|
|
51
|
-
const loginItemPath = path.join(contentsPath, "Library", "LoginItems");
|
|
52
|
-
const appPlistFilename = path.join(contentsPath, "Info.plist");
|
|
53
|
-
const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, "Contents", "Info.plist");
|
|
54
|
-
const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, "Contents", "Info.plist");
|
|
55
|
-
const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, "Contents", "Info.plist");
|
|
56
|
-
const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, "Contents", "Info.plist");
|
|
57
|
-
const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, "Contents", "Info.plist");
|
|
58
|
-
const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, "Contents", "Info.plist");
|
|
59
|
-
const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, "Contents", "Info.plist");
|
|
60
|
-
const safeParsePlistFile = async (filePath) => {
|
|
61
|
-
if (!fs.existsSync(filePath)) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
return await (0, plist_1.parsePlistFile)(filePath);
|
|
65
|
-
};
|
|
66
|
-
const appPlist = (await safeParsePlistFile(appPlistFilename));
|
|
67
|
-
if (appPlist == null) {
|
|
68
|
-
throw new Error("corrupted Electron dist");
|
|
69
|
-
}
|
|
70
|
-
// Replace the multiple parsePlistFile calls with:
|
|
71
|
-
const helperPlist = await safeParsePlistFile(helperPlistFilename);
|
|
72
|
-
const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename);
|
|
73
|
-
const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename);
|
|
74
|
-
const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename);
|
|
75
|
-
const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename);
|
|
76
|
-
const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename);
|
|
77
|
-
const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename);
|
|
78
|
-
const buildMetadata = packager.config;
|
|
79
|
-
/**
|
|
80
|
-
* Configure bundleIdentifier for the generic Electron Helper process
|
|
81
|
-
*
|
|
82
|
-
* This was the only Helper in Electron 5 and before. Allow users to configure
|
|
83
|
-
* the bundleIdentifier for continuity.
|
|
84
|
-
*/
|
|
85
|
-
const oldHelperBundleId = buildMetadata["helper-bundle-id"];
|
|
86
|
-
if (oldHelperBundleId != null) {
|
|
87
|
-
builder_util_1.log.warn("build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId");
|
|
88
|
-
}
|
|
89
|
-
const defaultAppId = packager.platformSpecificBuildOptions.appId;
|
|
90
|
-
const cfBundleIdentifier = (0, appInfo_1.filterCFBundleIdentifier)((isMas ? (_a = packager.config.mas) === null || _a === void 0 ? void 0 : _a.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier);
|
|
91
|
-
const defaultHelperId = packager.platformSpecificBuildOptions.helperBundleId;
|
|
92
|
-
const helperBundleIdentifier = (0, appInfo_1.filterCFBundleIdentifier)((isMas ? (_b = packager.config.mas) === null || _b === void 0 ? void 0 : _b.helperBundleId : defaultHelperId) || defaultHelperId || oldHelperBundleId || `${cfBundleIdentifier}.helper`);
|
|
93
|
-
appPlist.CFBundleIdentifier = cfBundleIdentifier;
|
|
94
|
-
await packager.applyCommonInfo(appPlist, contentsPath);
|
|
95
|
-
// required for electron-updater proxy
|
|
96
|
-
if (!isMas) {
|
|
97
|
-
configureLocalhostAts(appPlist);
|
|
98
|
-
}
|
|
99
|
-
if (helperPlist != null) {
|
|
100
|
-
helperPlist.CFBundleExecutable = `${appFilename} Helper`;
|
|
101
|
-
helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`;
|
|
102
|
-
helperPlist.CFBundleIdentifier = helperBundleIdentifier;
|
|
103
|
-
helperPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Configure bundleIdentifier for Electron 5+ Helper processes
|
|
107
|
-
*
|
|
108
|
-
* In Electron 6, parts of the generic Electron Helper process were split into
|
|
109
|
-
* individual helper processes. Allow users to configure the bundleIdentifiers
|
|
110
|
-
* for continuity, specifically because macOS keychain access relies on
|
|
111
|
-
* bundleIdentifiers not changing (i.e. across versions of Electron).
|
|
112
|
-
*/
|
|
113
|
-
function configureHelper(helper, postfix, userProvidedBundleIdentifier) {
|
|
114
|
-
helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`;
|
|
115
|
-
helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`;
|
|
116
|
-
helper.CFBundleIdentifier = userProvidedBundleIdentifier
|
|
117
|
-
? (0, appInfo_1.filterCFBundleIdentifier)(userProvidedBundleIdentifier)
|
|
118
|
-
: (0, appInfo_1.filterCFBundleIdentifier)(`${helperBundleIdentifier}.${postfix}`);
|
|
119
|
-
helper.CFBundleVersion = appPlist.CFBundleVersion;
|
|
120
|
-
}
|
|
121
|
-
if (helperRendererPlist != null) {
|
|
122
|
-
configureHelper(helperRendererPlist, "(Renderer)", packager.platformSpecificBuildOptions.helperRendererBundleId);
|
|
123
|
-
}
|
|
124
|
-
if (helperPluginPlist != null) {
|
|
125
|
-
configureHelper(helperPluginPlist, "(Plugin)", packager.platformSpecificBuildOptions.helperPluginBundleId);
|
|
126
|
-
}
|
|
127
|
-
if (helperGPUPlist != null) {
|
|
128
|
-
configureHelper(helperGPUPlist, "(GPU)", packager.platformSpecificBuildOptions.helperGPUBundleId);
|
|
129
|
-
}
|
|
130
|
-
if (helperEHPlist != null) {
|
|
131
|
-
configureHelper(helperEHPlist, "EH", packager.platformSpecificBuildOptions.helperEHBundleId);
|
|
132
|
-
}
|
|
133
|
-
if (helperNPPlist != null) {
|
|
134
|
-
configureHelper(helperNPPlist, "NP", packager.platformSpecificBuildOptions.helperNPBundleId);
|
|
135
|
-
}
|
|
136
|
-
if (helperLoginPlist != null) {
|
|
137
|
-
helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`;
|
|
138
|
-
helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`;
|
|
139
|
-
// noinspection SpellCheckingInspection
|
|
140
|
-
helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`;
|
|
141
|
-
helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion;
|
|
142
|
-
}
|
|
143
|
-
const protocols = (0, builder_util_1.asArray)(buildMetadata.protocols).concat((0, builder_util_1.asArray)(packager.platformSpecificBuildOptions.protocols));
|
|
144
|
-
if (protocols.length > 0) {
|
|
145
|
-
appPlist.CFBundleURLTypes = protocols.map(protocol => {
|
|
146
|
-
const schemes = (0, builder_util_1.asArray)(protocol.schemes);
|
|
147
|
-
if (schemes.length === 0) {
|
|
148
|
-
throw new builder_util_1.InvalidConfigurationError(`Protocol "${protocol.name}": must be at least one scheme specified`);
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
CFBundleURLName: protocol.name,
|
|
152
|
-
CFBundleTypeRole: protocol.role || "Editor",
|
|
153
|
-
CFBundleURLSchemes: schemes.slice(),
|
|
154
|
-
};
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
const fileAssociations = packager.fileAssociations;
|
|
158
|
-
if (fileAssociations.length > 0) {
|
|
159
|
-
const documentTypes = await Promise.all(fileAssociations.map(async (fileAssociation) => {
|
|
160
|
-
const extensions = (0, builder_util_1.asArray)(fileAssociation.ext).map(platformPackager_1.normalizeExt);
|
|
161
|
-
const customIcon = await packager.getResource((0, builder_util_1.getPlatformIconFileName)(fileAssociation.icon, true), `${extensions[0]}.icns`);
|
|
162
|
-
let iconFile = appPlist.CFBundleIconFile;
|
|
163
|
-
if (customIcon != null) {
|
|
164
|
-
iconFile = path.basename(customIcon);
|
|
165
|
-
await (0, builder_util_1.copyOrLinkFile)(customIcon, path.join(path.join(contentsPath, "Resources"), iconFile));
|
|
166
|
-
}
|
|
167
|
-
const result = {
|
|
168
|
-
CFBundleTypeExtensions: extensions,
|
|
169
|
-
CFBundleTypeName: fileAssociation.name || extensions[0],
|
|
170
|
-
CFBundleTypeRole: fileAssociation.role || "Editor",
|
|
171
|
-
LSHandlerRank: fileAssociation.rank || "Default",
|
|
172
|
-
CFBundleTypeIconFile: iconFile,
|
|
173
|
-
};
|
|
174
|
-
if (fileAssociation.isPackage) {
|
|
175
|
-
result.LSTypeIsPackage = true;
|
|
176
|
-
}
|
|
177
|
-
return result;
|
|
178
|
-
}));
|
|
179
|
-
// `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case
|
|
180
|
-
appPlist.CFBundleDocumentTypes = [...(appPlist.CFBundleDocumentTypes || []), ...documentTypes];
|
|
181
|
-
}
|
|
182
|
-
const toPlistObject = (asarIntegrity) => {
|
|
183
|
-
const result = {};
|
|
184
|
-
for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {
|
|
185
|
-
result[filePath] = {
|
|
186
|
-
algorithm: headerHash.algorithm,
|
|
187
|
-
hash: headerHash.hash,
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
return result;
|
|
191
|
-
};
|
|
192
|
-
if (asarIntegrity != null) {
|
|
193
|
-
appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity);
|
|
194
|
-
}
|
|
195
|
-
if (helperEHPlist != null) {
|
|
196
|
-
await (0, plist_1.savePlistFile)(helperEHPlistFilename, helperEHPlist);
|
|
197
|
-
}
|
|
198
|
-
if (helperNPPlist != null) {
|
|
199
|
-
await (0, plist_1.savePlistFile)(helperNPPlistFilename, helperNPPlist);
|
|
200
|
-
}
|
|
201
|
-
if (helperRendererPlist != null) {
|
|
202
|
-
await (0, plist_1.savePlistFile)(helperRendererPlistFilename, helperRendererPlist);
|
|
203
|
-
}
|
|
204
|
-
if (helperPluginPlist != null) {
|
|
205
|
-
await (0, plist_1.savePlistFile)(helperPluginPlistFilename, helperPluginPlist);
|
|
206
|
-
}
|
|
207
|
-
if (helperGPUPlist != null) {
|
|
208
|
-
await (0, plist_1.savePlistFile)(helperGPUPlistFilename, helperGPUPlist);
|
|
209
|
-
}
|
|
210
|
-
if (helperLoginPlist != null) {
|
|
211
|
-
await (0, plist_1.savePlistFile)(helperLoginPlistFilename, helperLoginPlist);
|
|
212
|
-
}
|
|
213
|
-
await (0, plist_1.savePlistFile)(appPlistFilename, appPlist);
|
|
214
|
-
if (helperPlist != null) {
|
|
215
|
-
await (0, plist_1.savePlistFile)(helperPlistFilename, helperPlist);
|
|
216
|
-
}
|
|
217
|
-
await Promise.all([
|
|
218
|
-
doRename(path.join(contentsPath, "MacOS"), electronBranding.productName, appPlist.CFBundleExecutable),
|
|
219
|
-
(0, builder_util_1.unlinkIfExists)(path.join(appOutDir, "LICENSE")),
|
|
220
|
-
(0, builder_util_1.unlinkIfExists)(path.join(appOutDir, "LICENSES.chromium.html")),
|
|
221
|
-
]);
|
|
222
|
-
await moveHelpers(getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist), frameworksPath, appFilename, electronBranding.productName);
|
|
223
|
-
if (helperLoginPlist != null) {
|
|
224
|
-
const prefix = electronBranding.productName;
|
|
225
|
-
const suffix = " Login Helper";
|
|
226
|
-
const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, "Contents", "MacOS");
|
|
227
|
-
await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`));
|
|
228
|
-
}
|
|
229
|
-
const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`);
|
|
230
|
-
await (0, promises_1.rename)(path.dirname(contentsPath), appPath);
|
|
231
|
-
// https://github.com/electron-userland/electron-builder/issues/840
|
|
232
|
-
const now = Date.now() / 1000;
|
|
233
|
-
await (0, promises_1.utimes)(appPath, now, now);
|
|
234
|
-
}
|
|
235
|
-
function configureLocalhostAts(appPlist) {
|
|
236
|
-
// https://bencoding.com/2015/07/20/app-transport-security-and-localhost/
|
|
237
|
-
let ats = appPlist.NSAppTransportSecurity;
|
|
238
|
-
if (ats == null) {
|
|
239
|
-
ats = {};
|
|
240
|
-
appPlist.NSAppTransportSecurity = ats;
|
|
241
|
-
}
|
|
242
|
-
ats.NSAllowsLocalNetworking = true;
|
|
243
|
-
// https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814
|
|
244
|
-
ats.NSAllowsArbitraryLoads = true;
|
|
245
|
-
let exceptionDomains = ats.NSExceptionDomains;
|
|
246
|
-
if (exceptionDomains == null) {
|
|
247
|
-
exceptionDomains = {};
|
|
248
|
-
ats.NSExceptionDomains = exceptionDomains;
|
|
249
|
-
}
|
|
250
|
-
if (exceptionDomains.localhost == null) {
|
|
251
|
-
const allowHttp = {
|
|
252
|
-
NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,
|
|
253
|
-
NSIncludesSubdomains: false,
|
|
254
|
-
NSTemporaryExceptionAllowsInsecureHTTPLoads: true,
|
|
255
|
-
NSTemporaryExceptionMinimumTLSVersion: "1.0",
|
|
256
|
-
NSTemporaryExceptionRequiresForwardSecrecy: false,
|
|
257
|
-
};
|
|
258
|
-
exceptionDomains.localhost = allowHttp;
|
|
259
|
-
exceptionDomains["127.0.0.1"] = allowHttp;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
//# sourceMappingURL=electronMac.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"electronMac.js","sourceRoot":"","sources":["../../src/electron/electronMac.ts"],"names":[],"mappings":";;AAmDA,oCA4OC;AA/RD,+CAA+H;AAC/H,0CAA4C;AAC5C,6BAA4B;AAC5B,yBAAwB;AACxB,wCAAqD;AAGrD,0DAAkD;AAClD,yCAAsF;AACtF,2DAAwD;AAExD,SAAS,QAAQ,CAAC,QAAgB,EAAE,OAAe,EAAE,OAAe;IAClE,OAAO,IAAA,iBAAM,EAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAC3E,CAAC;AAED,SAAS,WAAW,CAAC,cAA6B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["import { asArray, copyOrLinkFile, getPlatformIconFileName, InvalidConfigurationError, log, unlinkIfExists } from \"builder-util\"\nimport { rename, utimes } from \"fs/promises\"\nimport * as path from \"path\"\nimport * as fs from \"fs\"\nimport { filterCFBundleIdentifier } from \"../appInfo\"\nimport { AsarIntegrity } from \"../asar/integrity\"\nimport { MacPackager } from \"../macPackager\"\nimport { normalizeExt } from \"../platformPackager\"\nimport { savePlistFile, parsePlistFile, PlistObject, PlistValue } from \"../util/plist\"\nimport { createBrandingOpts } from \"./ElectronFramework\"\n\nfunction doRename(basePath: string, oldName: string, newName: string) {\n return rename(path.join(basePath, oldName), path.join(basePath, newName))\n}\n\nfunction moveHelpers(helperSuffixes: Array<string>, frameworksPath: string, appName: string, prefix: string): Promise<any> {\n return Promise.all(\n helperSuffixes.map(suffix => {\n const executableBasePath = path.join(frameworksPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n return doRename(executableBasePath, `${prefix}${suffix}`, appName + suffix).then(() => doRename(frameworksPath, `${prefix}${suffix}.app`, `${appName}${suffix}.app`))\n })\n )\n}\n\nfunction getAvailableHelperSuffixes(\n helperEHPlist: PlistObject | null,\n helperNPPlist: PlistObject | null,\n helperRendererPlist: PlistObject | null,\n helperPluginPlist: PlistObject | null,\n helperGPUPlist: PlistObject | null\n) {\n const result = [\" Helper\"]\n if (helperEHPlist != null) {\n result.push(\" Helper EH\")\n }\n if (helperNPPlist != null) {\n result.push(\" Helper NP\")\n }\n if (helperRendererPlist != null) {\n result.push(\" Helper (Renderer)\")\n }\n if (helperPluginPlist != null) {\n result.push(\" Helper (Plugin)\")\n }\n if (helperGPUPlist != null) {\n result.push(\" Helper (GPU)\")\n }\n return result\n}\n\n/** @internal */\nexport async function createMacApp(packager: MacPackager, appOutDir: string, asarIntegrity: AsarIntegrity | null, isMas: boolean) {\n const appInfo = packager.appInfo\n // Electon uses the application name (CFBundleName) to resolve helper apps\n // https://github.com/electron/electron/blob/main/shell/app/electron_main_delegate_mac.mm\n // https://github.com/electron-userland/electron-builder/issues/6962\n const appFilename = appInfo.sanitizedProductName\n const electronBranding = createBrandingOpts(packager.config)\n\n const contentsPath = path.join(appOutDir, packager.info.framework.distMacOsAppName, \"Contents\")\n const frameworksPath = path.join(contentsPath, \"Frameworks\")\n const loginItemPath = path.join(contentsPath, \"Library\", \"LoginItems\")\n\n const appPlistFilename = path.join(contentsPath, \"Info.plist\")\n const helperPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper.app`, \"Contents\", \"Info.plist\")\n const helperEHPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper EH.app`, \"Contents\", \"Info.plist\")\n const helperNPPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper NP.app`, \"Contents\", \"Info.plist\")\n const helperRendererPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Renderer).app`, \"Contents\", \"Info.plist\")\n const helperPluginPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (Plugin).app`, \"Contents\", \"Info.plist\")\n const helperGPUPlistFilename = path.join(frameworksPath, `${electronBranding.productName} Helper (GPU).app`, \"Contents\", \"Info.plist\")\n const helperLoginPlistFilename = path.join(loginItemPath, `${electronBranding.productName} Login Helper.app`, \"Contents\", \"Info.plist\")\n\n const safeParsePlistFile = async (filePath: string): Promise<PlistObject | null> => {\n if (!fs.existsSync(filePath)) {\n return null\n }\n return await parsePlistFile(filePath)\n }\n\n const appPlist = (await safeParsePlistFile(appPlistFilename))!\n if (appPlist == null) {\n throw new Error(\"corrupted Electron dist\")\n }\n\n // Replace the multiple parsePlistFile calls with:\n const helperPlist = await safeParsePlistFile(helperPlistFilename)\n const helperEHPlist = await safeParsePlistFile(helperEHPlistFilename)\n const helperNPPlist = await safeParsePlistFile(helperNPPlistFilename)\n const helperRendererPlist = await safeParsePlistFile(helperRendererPlistFilename)\n const helperPluginPlist = await safeParsePlistFile(helperPluginPlistFilename)\n const helperGPUPlist = await safeParsePlistFile(helperGPUPlistFilename)\n const helperLoginPlist = await safeParsePlistFile(helperLoginPlistFilename)\n\n const buildMetadata = packager.config\n\n /**\n * Configure bundleIdentifier for the generic Electron Helper process\n *\n * This was the only Helper in Electron 5 and before. Allow users to configure\n * the bundleIdentifier for continuity.\n */\n\n const oldHelperBundleId = (buildMetadata as any)[\"helper-bundle-id\"]\n if (oldHelperBundleId != null) {\n log.warn(\"build.helper-bundle-id is deprecated, please set as build.mac.helperBundleId\")\n }\n\n const defaultAppId = packager.platformSpecificBuildOptions.appId\n const cfBundleIdentifier = filterCFBundleIdentifier((isMas ? packager.config.mas?.appId : defaultAppId) || defaultAppId || appInfo.macBundleIdentifier)\n\n const defaultHelperId = packager.platformSpecificBuildOptions.helperBundleId\n const helperBundleIdentifier = filterCFBundleIdentifier(\n (isMas ? packager.config.mas?.helperBundleId : defaultHelperId) || defaultHelperId || oldHelperBundleId || `${cfBundleIdentifier}.helper`\n )\n\n appPlist.CFBundleIdentifier = cfBundleIdentifier\n\n await packager.applyCommonInfo(appPlist, contentsPath)\n\n // required for electron-updater proxy\n if (!isMas) {\n configureLocalhostAts(appPlist)\n }\n\n if (helperPlist != null) {\n helperPlist.CFBundleExecutable = `${appFilename} Helper`\n helperPlist.CFBundleDisplayName = `${appInfo.productName} Helper`\n helperPlist.CFBundleIdentifier = helperBundleIdentifier\n helperPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n /**\n * Configure bundleIdentifier for Electron 5+ Helper processes\n *\n * In Electron 6, parts of the generic Electron Helper process were split into\n * individual helper processes. Allow users to configure the bundleIdentifiers\n * for continuity, specifically because macOS keychain access relies on\n * bundleIdentifiers not changing (i.e. across versions of Electron).\n */\n\n function configureHelper(helper: any, postfix: string, userProvidedBundleIdentifier?: string | null) {\n helper.CFBundleExecutable = `${appFilename} Helper ${postfix}`\n helper.CFBundleDisplayName = `${appInfo.productName} Helper ${postfix}`\n helper.CFBundleIdentifier = userProvidedBundleIdentifier\n ? filterCFBundleIdentifier(userProvidedBundleIdentifier)\n : filterCFBundleIdentifier(`${helperBundleIdentifier}.${postfix}`)\n helper.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n if (helperRendererPlist != null) {\n configureHelper(helperRendererPlist, \"(Renderer)\", packager.platformSpecificBuildOptions.helperRendererBundleId)\n }\n if (helperPluginPlist != null) {\n configureHelper(helperPluginPlist, \"(Plugin)\", packager.platformSpecificBuildOptions.helperPluginBundleId)\n }\n if (helperGPUPlist != null) {\n configureHelper(helperGPUPlist, \"(GPU)\", packager.platformSpecificBuildOptions.helperGPUBundleId)\n }\n if (helperEHPlist != null) {\n configureHelper(helperEHPlist, \"EH\", packager.platformSpecificBuildOptions.helperEHBundleId)\n }\n if (helperNPPlist != null) {\n configureHelper(helperNPPlist, \"NP\", packager.platformSpecificBuildOptions.helperNPBundleId)\n }\n if (helperLoginPlist != null) {\n helperLoginPlist.CFBundleExecutable = `${appFilename} Login Helper`\n helperLoginPlist.CFBundleDisplayName = `${appInfo.productName} Login Helper`\n // noinspection SpellCheckingInspection\n helperLoginPlist.CFBundleIdentifier = `${cfBundleIdentifier}.loginhelper`\n helperLoginPlist.CFBundleVersion = appPlist.CFBundleVersion\n }\n\n const protocols = asArray(buildMetadata.protocols).concat(asArray(packager.platformSpecificBuildOptions.protocols))\n if (protocols.length > 0) {\n appPlist.CFBundleURLTypes = protocols.map(protocol => {\n const schemes = asArray(protocol.schemes)\n if (schemes.length === 0) {\n throw new InvalidConfigurationError(`Protocol \"${protocol.name}\": must be at least one scheme specified`)\n }\n return {\n CFBundleURLName: protocol.name,\n CFBundleTypeRole: protocol.role || \"Editor\",\n CFBundleURLSchemes: schemes.slice(),\n }\n })\n }\n\n const fileAssociations = packager.fileAssociations\n if (fileAssociations.length > 0) {\n const documentTypes = await Promise.all(\n fileAssociations.map(async fileAssociation => {\n const extensions = asArray(fileAssociation.ext).map(normalizeExt)\n const customIcon = await packager.getResource(getPlatformIconFileName(fileAssociation.icon, true), `${extensions[0]}.icns`)\n let iconFile = appPlist.CFBundleIconFile\n if (customIcon != null) {\n iconFile = path.basename(customIcon)\n await copyOrLinkFile(customIcon, path.join(path.join(contentsPath, \"Resources\"), iconFile))\n }\n\n const result = {\n CFBundleTypeExtensions: extensions,\n CFBundleTypeName: fileAssociation.name || extensions[0],\n CFBundleTypeRole: fileAssociation.role || \"Editor\",\n LSHandlerRank: fileAssociation.rank || \"Default\",\n CFBundleTypeIconFile: iconFile,\n } as any\n\n if (fileAssociation.isPackage) {\n result.LSTypeIsPackage = true\n }\n return result\n })\n )\n\n // `CFBundleDocumentTypes` may be defined in `mac.extendInfo`, so we need to merge it in that case\n appPlist.CFBundleDocumentTypes = [...((appPlist.CFBundleDocumentTypes as PlistValue[]) || []), ...documentTypes]\n }\n\n const toPlistObject = (asarIntegrity: AsarIntegrity): PlistObject => {\n const result: PlistObject = {}\n for (const [filePath, headerHash] of Object.entries(asarIntegrity)) {\n result[filePath] = {\n algorithm: headerHash.algorithm,\n hash: headerHash.hash,\n }\n }\n return result\n }\n\n if (asarIntegrity != null) {\n appPlist.ElectronAsarIntegrity = toPlistObject(asarIntegrity)\n }\n\n if (helperEHPlist != null) {\n await savePlistFile(helperEHPlistFilename, helperEHPlist)\n }\n\n if (helperNPPlist != null) {\n await savePlistFile(helperNPPlistFilename, helperNPPlist)\n }\n\n if (helperRendererPlist != null) {\n await savePlistFile(helperRendererPlistFilename, helperRendererPlist)\n }\n\n if (helperPluginPlist != null) {\n await savePlistFile(helperPluginPlistFilename, helperPluginPlist)\n }\n\n if (helperGPUPlist != null) {\n await savePlistFile(helperGPUPlistFilename, helperGPUPlist)\n }\n\n if (helperLoginPlist != null) {\n await savePlistFile(helperLoginPlistFilename, helperLoginPlist)\n }\n\n await savePlistFile(appPlistFilename, appPlist)\n if (helperPlist != null) {\n await savePlistFile(helperPlistFilename, helperPlist)\n }\n\n await Promise.all([\n doRename(path.join(contentsPath, \"MacOS\"), electronBranding.productName, appPlist.CFBundleExecutable as string),\n unlinkIfExists(path.join(appOutDir, \"LICENSE\")),\n unlinkIfExists(path.join(appOutDir, \"LICENSES.chromium.html\")),\n ])\n\n await moveHelpers(\n getAvailableHelperSuffixes(helperEHPlist, helperNPPlist, helperRendererPlist, helperPluginPlist, helperGPUPlist),\n frameworksPath,\n appFilename,\n electronBranding.productName\n )\n\n if (helperLoginPlist != null) {\n const prefix = electronBranding.productName\n const suffix = \" Login Helper\"\n const executableBasePath = path.join(loginItemPath, `${prefix}${suffix}.app`, \"Contents\", \"MacOS\")\n await doRename(executableBasePath, `${prefix}${suffix}`, appFilename + suffix).then(() => doRename(loginItemPath, `${prefix}${suffix}.app`, `${appFilename}${suffix}.app`))\n }\n\n const appPath = path.join(appOutDir, `${appInfo.productFilename}.app`)\n await rename(path.dirname(contentsPath), appPath)\n // https://github.com/electron-userland/electron-builder/issues/840\n const now = Date.now() / 1000\n await utimes(appPath, now, now)\n}\n\nfunction configureLocalhostAts(appPlist: any) {\n // https://bencoding.com/2015/07/20/app-transport-security-and-localhost/\n let ats = appPlist.NSAppTransportSecurity\n if (ats == null) {\n ats = {}\n appPlist.NSAppTransportSecurity = ats\n }\n\n ats.NSAllowsLocalNetworking = true\n // https://github.com/electron-userland/electron-builder/issues/3377#issuecomment-446035814\n ats.NSAllowsArbitraryLoads = true\n\n let exceptionDomains = ats.NSExceptionDomains\n if (exceptionDomains == null) {\n exceptionDomains = {}\n ats.NSExceptionDomains = exceptionDomains\n }\n\n if (exceptionDomains.localhost == null) {\n const allowHttp = {\n NSTemporaryExceptionAllowsInsecureHTTPSLoads: false,\n NSIncludesSubdomains: false,\n NSTemporaryExceptionAllowsInsecureHTTPLoads: true,\n NSTemporaryExceptionMinimumTLSVersion: \"1.0\",\n NSTemporaryExceptionRequiresForwardSecrecy: false,\n }\n exceptionDomains.localhost = allowHttp\n exceptionDomains[\"127.0.0.1\"] = allowHttp\n }\n}\n"]}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Lazy } from "lazy-val";
|
|
2
|
-
import { Configuration } from "../configuration";
|
|
3
|
-
export type MetadataValue = Lazy<Record<string, any> | null>;
|
|
4
|
-
export declare function getElectronVersion(projectDir: string, config?: Configuration): Promise<string>;
|
|
5
|
-
export declare function getElectronVersionFromInstalled(projectDir: string): Promise<string | null>;
|
|
6
|
-
export declare function getElectronPackage(projectDir: string): Promise<any>;
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getElectronVersion = getElectronVersion;
|
|
4
|
-
exports.getElectronVersionFromInstalled = getElectronVersionFromInstalled;
|
|
5
|
-
exports.getElectronPackage = getElectronPackage;
|
|
6
|
-
exports.computeElectronVersion = computeElectronVersion;
|
|
7
|
-
const builder_util_1 = require("builder-util");
|
|
8
|
-
const builder_util_runtime_1 = require("builder-util-runtime");
|
|
9
|
-
const fs_extra_1 = require("fs-extra");
|
|
10
|
-
const path = require("path");
|
|
11
|
-
const semver = require("semver");
|
|
12
|
-
const config_1 = require("../util/config/config");
|
|
13
|
-
const load_1 = require("../util/config/load");
|
|
14
|
-
const search_module_1 = require("./search-module");
|
|
15
|
-
const electronPackages = ["electron", "electron-prebuilt", "electron-prebuilt-compile", "electron-nightly"];
|
|
16
|
-
async function getElectronVersion(projectDir, config) {
|
|
17
|
-
if (config == null) {
|
|
18
|
-
config = await (0, config_1.getConfig)(projectDir, null, null);
|
|
19
|
-
}
|
|
20
|
-
if (config.electronVersion != null) {
|
|
21
|
-
return config.electronVersion;
|
|
22
|
-
}
|
|
23
|
-
return computeElectronVersion(projectDir);
|
|
24
|
-
}
|
|
25
|
-
async function getElectronVersionFromInstalled(projectDir) {
|
|
26
|
-
for (const name of electronPackages) {
|
|
27
|
-
try {
|
|
28
|
-
return (await (0, fs_extra_1.readJson)(path.join(projectDir, "node_modules", name, "package.json"))).version;
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
if (e.code !== "ENOENT") {
|
|
32
|
-
builder_util_1.log.warn({ name, error: e }, `cannot read electron version package.json`);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
async function getElectronPackage(projectDir) {
|
|
39
|
-
for (const name of electronPackages) {
|
|
40
|
-
try {
|
|
41
|
-
return await (0, fs_extra_1.readJson)(path.join(projectDir, "node_modules", name, "package.json"));
|
|
42
|
-
}
|
|
43
|
-
catch (e) {
|
|
44
|
-
if (e.code !== "ENOENT") {
|
|
45
|
-
builder_util_1.log.warn({ name, error: e }, `cannot find electron in package.json`);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
/** @internal */
|
|
52
|
-
async function computeElectronVersion(projectDir) {
|
|
53
|
-
const result = await getElectronVersionFromInstalled(projectDir);
|
|
54
|
-
if (result != null) {
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
const potentialRootDirs = [projectDir, await (0, search_module_1.getProjectRootPath)(projectDir)];
|
|
58
|
-
let dependency = null;
|
|
59
|
-
for (const dir of potentialRootDirs) {
|
|
60
|
-
const metadata = await (0, load_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(dir, "package.json")));
|
|
61
|
-
dependency = metadata ? findFromPackageMetadata(metadata) : null;
|
|
62
|
-
if (dependency) {
|
|
63
|
-
break;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if ((dependency === null || dependency === void 0 ? void 0 : dependency.name) === "electron-nightly") {
|
|
67
|
-
builder_util_1.log.info("You are using a nightly version of electron, be warned that those builds are highly unstable.");
|
|
68
|
-
const feedXml = await builder_util_1.httpExecutor.request({
|
|
69
|
-
hostname: "github.com",
|
|
70
|
-
path: `/electron/nightlies/releases.atom`,
|
|
71
|
-
headers: {
|
|
72
|
-
accept: "application/xml, application/atom+xml, text/xml, */*",
|
|
73
|
-
},
|
|
74
|
-
});
|
|
75
|
-
const feed = (0, builder_util_runtime_1.parseXml)(feedXml);
|
|
76
|
-
const latestRelease = feed.element("entry", false, `No published versions on GitHub`);
|
|
77
|
-
const v = /\/tag\/v?([^/]+)$/.exec(latestRelease.element("link").attribute("href"))[1];
|
|
78
|
-
return v.startsWith("v") ? v.substring(1) : v;
|
|
79
|
-
}
|
|
80
|
-
else if ((dependency === null || dependency === void 0 ? void 0 : dependency.version) === "latest") {
|
|
81
|
-
builder_util_1.log.warn('Electron version is set to "latest", but it is recommended to set it to some more restricted version range.');
|
|
82
|
-
try {
|
|
83
|
-
const releaseInfo = JSON.parse((await builder_util_1.httpExecutor.request({
|
|
84
|
-
hostname: "github.com",
|
|
85
|
-
path: `/electron/${dependency.name === "electron-nightly" ? "nightlies" : "electron"}/releases/latest`,
|
|
86
|
-
headers: {
|
|
87
|
-
accept: "application/json",
|
|
88
|
-
},
|
|
89
|
-
})));
|
|
90
|
-
const version = releaseInfo.tag_name.startsWith("v") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name;
|
|
91
|
-
builder_util_1.log.info({ version }, `resolve ${dependency.name}@${dependency.version}`);
|
|
92
|
-
return version;
|
|
93
|
-
}
|
|
94
|
-
catch (e) {
|
|
95
|
-
builder_util_1.log.warn(e);
|
|
96
|
-
}
|
|
97
|
-
throw new builder_util_1.InvalidConfigurationError(`Cannot find electron dependency to get electron version in the '${path.join(projectDir, "package.json")}'`);
|
|
98
|
-
}
|
|
99
|
-
const version = dependency === null || dependency === void 0 ? void 0 : dependency.version;
|
|
100
|
-
if (version == null) {
|
|
101
|
-
throw new builder_util_1.InvalidConfigurationError(`Cannot compute electron version from installed node modules - none of the possible electron modules are installed.\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`);
|
|
102
|
-
}
|
|
103
|
-
const pinnedVersion = semver.valid(version);
|
|
104
|
-
if (pinnedVersion === null) {
|
|
105
|
-
builder_util_1.log.error({ version }, `Electron version "${version}" is a range, not a fixed version. electron-builder requires an exact version because it downloads platform-specific binaries for a specific release — a range cannot be resolved without electron installed in node_modules. ` +
|
|
106
|
-
`Pin the version in package.json (e.g. "15.3.0" instead of "^15.3.0") or set "electronVersion" explicitly in your electron-builder config.`);
|
|
107
|
-
throw new builder_util_1.InvalidConfigurationError(`Cannot compute electron version from installed node modules - version ("${version}") is not fixed in project.\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`);
|
|
108
|
-
}
|
|
109
|
-
return pinnedVersion;
|
|
110
|
-
}
|
|
111
|
-
function findFromPackageMetadata(packageData) {
|
|
112
|
-
for (const name of electronPackages) {
|
|
113
|
-
const devDependencies = packageData.devDependencies;
|
|
114
|
-
let dep = devDependencies == null ? null : devDependencies[name];
|
|
115
|
-
if (dep == null) {
|
|
116
|
-
const dependencies = packageData.dependencies;
|
|
117
|
-
dep = dependencies == null ? null : dependencies[name];
|
|
118
|
-
}
|
|
119
|
-
if (dep != null) {
|
|
120
|
-
return { name, version: dep };
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=electronVersion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"electronVersion.js","sourceRoot":"","sources":["../../src/electron/electronVersion.ts"],"names":[],"mappings":";;AAeA,gDAQC;AAED,0EAWC;AAED,gDAWC;AAGD,wDAqEC;AAzHD,+CAA2E;AAC3E,+DAA+C;AAC/C,uCAAmC;AAEnC,6BAA4B;AAC5B,iCAAgC;AAEhC,kDAAiD;AACjD,8CAA0D;AAC1D,mDAAoD;AAIpD,MAAM,gBAAgB,GAAG,CAAC,UAAU,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,kBAAkB,CAAC,CAAA;AAEpG,KAAK,UAAU,kBAAkB,CAAC,UAAkB,EAAE,MAAsB;IACjF,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;QACnB,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,CAAA;IAClD,CAAC;IACD,I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,CAAA;IACnC,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;QACpB,MAAM,IAAI,wCAAyB,CACjC,kNAAkN,CACnN,CAAA;IACH,CAAC;IAED,MAAM,aAAa,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;IAC3C,IAAI,aAAa,KAAK,IAAI,EAAE,CAAC;QAC3B,kBAAG,CAAC,KAAK,CACP,EAAE,OAAO,EAAE,EACX,qBAAqB,OAAO,gOAAgO;YAC1P,2IAA2I,CAC9I,CAAA;QACD,MAAM,IAAI,wCAAyB,CACjC,2EAA2E,OAAO,2HAA2H,CAC9M,CAAA;IACH,CAAC;IAED,OAAO,aAAa,CAAA;AACtB,CAAC;AAOD,SAAS,uBAAuB,CAAC,WAAgB;IAC/C,KAAK,MAAM,IAAI,IAAI,gBAAgB,EAAE,CAAC;QACpC,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CAAA;QACnD,IAAI,GAAG,GAAG,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;QAChE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,MAAM,YAAY,GAAG,WAAW,CAAC,YAAY,CAAA;YAC7C,GAAG,GAAG,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAA;QACxD,CAAC;QACD,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YAChB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;QAC/B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["import { httpExecutor, InvalidConfigurationError, log } from \"builder-util\"\nimport { parseXml } from \"builder-util-runtime\"\nimport { readJson } from \"fs-extra\"\nimport { Lazy } from \"lazy-val\"\nimport * as path from \"path\"\nimport * as semver from \"semver\"\nimport { Configuration } from \"../configuration\"\nimport { getConfig } from \"../util/config/config\"\nimport { orNullIfFileNotExist } from \"../util/config/load\"\nimport { getProjectRootPath } from \"./search-module\"\n\nexport type MetadataValue = Lazy<Record<string, any> | null>\n\nconst electronPackages = [\"electron\", \"electron-prebuilt\", \"electron-prebuilt-compile\", \"electron-nightly\"]\n\nexport async function getElectronVersion(projectDir: string, config?: Configuration): Promise<string> {\n if (config == null) {\n config = await getConfig(projectDir, null, null)\n }\n if (config.electronVersion != null) {\n return config.electronVersion\n }\n return computeElectronVersion(projectDir)\n}\n\nexport async function getElectronVersionFromInstalled(projectDir: string): Promise<string | null> {\n for (const name of electronPackages) {\n try {\n return (await readJson(path.join(projectDir, \"node_modules\", name, \"package.json\"))).version\n } catch (e: any) {\n if (e.code !== \"ENOENT\") {\n log.warn({ name, error: e }, `cannot read electron version package.json`)\n }\n }\n }\n return null\n}\n\nexport async function getElectronPackage(projectDir: string) {\n for (const name of electronPackages) {\n try {\n return await readJson(path.join(projectDir, \"node_modules\", name, \"package.json\"))\n } catch (e: any) {\n if (e.code !== \"ENOENT\") {\n log.warn({ name, error: e }, `cannot find electron in package.json`)\n }\n }\n }\n return null\n}\n\n/** @internal */\nexport async function computeElectronVersion(projectDir: string): Promise<string> {\n const result = await getElectronVersionFromInstalled(projectDir)\n if (result != null) {\n return result\n }\n\n const potentialRootDirs = [projectDir, await getProjectRootPath(projectDir)]\n let dependency: NameAndVersion | null = null\n for (const dir of potentialRootDirs) {\n const metadata = await orNullIfFileNotExist(readJson(path.join(dir, \"package.json\")))\n dependency = metadata ? findFromPackageMetadata(metadata) : null\n if (dependency) {\n break\n }\n }\n if (dependency?.name === \"electron-nightly\") {\n log.info(\"You are using a nightly version of electron, be warned that those builds are highly unstable.\")\n const feedXml = await httpExecutor.request({\n hostname: \"github.com\",\n path: `/electron/nightlies/releases.atom`,\n headers: {\n accept: \"application/xml, application/atom+xml, text/xml, */*\",\n },\n })\n const feed = parseXml(feedXml!)\n const latestRelease = feed.element(\"entry\", false, `No published versions on GitHub`)\n const v = /\\/tag\\/v?([^/]+)$/.exec(latestRelease.element(\"link\").attribute(\"href\"))![1]\n return v.startsWith(\"v\") ? v.substring(1) : v\n } else if (dependency?.version === \"latest\") {\n log.warn('Electron version is set to \"latest\", but it is recommended to set it to some more restricted version range.')\n try {\n const releaseInfo = JSON.parse(\n (await httpExecutor.request({\n hostname: \"github.com\",\n path: `/electron/${dependency.name === \"electron-nightly\" ? \"nightlies\" : \"electron\"}/releases/latest`,\n headers: {\n accept: \"application/json\",\n },\n }))!\n )\n const version = releaseInfo.tag_name.startsWith(\"v\") ? releaseInfo.tag_name.substring(1) : releaseInfo.tag_name\n log.info({ version }, `resolve ${dependency.name}@${dependency.version}`)\n return version\n } catch (e: any) {\n log.warn(e)\n }\n\n throw new InvalidConfigurationError(`Cannot find electron dependency to get electron version in the '${path.join(projectDir, \"package.json\")}'`)\n }\n const version = dependency?.version\n if (version == null) {\n throw new InvalidConfigurationError(\n `Cannot compute electron version from installed node modules - none of the possible electron modules are installed.\\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`\n )\n }\n\n const pinnedVersion = semver.valid(version)\n if (pinnedVersion === null) {\n log.error(\n { version },\n `Electron version \"${version}\" is a range, not a fixed version. electron-builder requires an exact version because it downloads platform-specific binaries for a specific release — a range cannot be resolved without electron installed in node_modules. ` +\n `Pin the version in package.json (e.g. \"15.3.0\" instead of \"^15.3.0\") or set \"electronVersion\" explicitly in your electron-builder config.`\n )\n throw new InvalidConfigurationError(\n `Cannot compute electron version from installed node modules - version (\"${version}\") is not fixed in project.\\nSee https://github.com/electron-userland/electron-builder/issues/3984#issuecomment-504968246`\n )\n }\n\n return pinnedVersion\n}\n\ninterface NameAndVersion {\n readonly name: string\n readonly version: string\n}\n\nfunction findFromPackageMetadata(packageData: any): NameAndVersion | null {\n for (const name of electronPackages) {\n const devDependencies = packageData.devDependencies\n let dep = devDependencies == null ? null : devDependencies[name]\n if (dep == null) {\n const dependencies = packageData.dependencies\n dep = dependencies == null ? null : dependencies[name]\n }\n if (dep != null) {\n return { name, version: dep }\n }\n }\n return null\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addWinAsarIntegrity = addWinAsarIntegrity;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const promises_1 = require("fs/promises");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const resedit_1 = require("resedit");
|
|
8
|
-
/** @internal */
|
|
9
|
-
async function addWinAsarIntegrity(executablePath, asarIntegrity) {
|
|
10
|
-
const buffer = await (0, promises_1.readFile)(executablePath);
|
|
11
|
-
const executable = resedit_1.NtExecutable.from(buffer);
|
|
12
|
-
const resource = resedit_1.NtExecutableResource.from(executable);
|
|
13
|
-
const versionInfo = resedit_1.Resource.VersionInfo.fromEntries(resource.entries);
|
|
14
|
-
if (versionInfo.length !== 1) {
|
|
15
|
-
throw new Error(`Failed to parse version info in ${executablePath}`);
|
|
16
|
-
}
|
|
17
|
-
const languages = versionInfo[0].getAllLanguagesForStringValues();
|
|
18
|
-
if (languages.length !== 1) {
|
|
19
|
-
throw new Error(`Failed to locate languages in ${executablePath}`);
|
|
20
|
-
}
|
|
21
|
-
// See: https://github.com/electron/packager/blob/00d20b99cf4aa4621103dbbd09ff7de7d2f7f539/src/resedit.ts#L124
|
|
22
|
-
const integrityList = Array.from(Object.entries(asarIntegrity)).map(([file, { algorithm: alg, hash: value }]) => ({
|
|
23
|
-
file: path.win32.normalize(file),
|
|
24
|
-
alg,
|
|
25
|
-
value,
|
|
26
|
-
}));
|
|
27
|
-
resource.entries.push({
|
|
28
|
-
type: "INTEGRITY",
|
|
29
|
-
id: "ELECTRONASAR",
|
|
30
|
-
bin: Buffer.from(JSON.stringify(integrityList)),
|
|
31
|
-
lang: languages[0].lang,
|
|
32
|
-
codepage: languages[0].codepage,
|
|
33
|
-
});
|
|
34
|
-
resource.outputResource(executable);
|
|
35
|
-
await (0, promises_1.writeFile)(executablePath, Buffer.from(executable.generate()));
|
|
36
|
-
builder_util_1.log.info({ executablePath: builder_util_1.log.filePath(executablePath) }, "updating asar integrity executable resource");
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=electronWin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"electronWin.js","sourceRoot":"","sources":["../../src/electron/electronWin.ts"],"names":[],"mappings":";;AAOA,kDAkCC;AAzCD,+CAAkC;AAClC,0CAAiD;AACjD,6BAA4B;AAC5B,qCAAsE;AAGtE,gBAAgB;AACT,KAAK,UAAU,mBAAmB,CAAC,cAAsB,EAAE,aAA4B;IAC5F,MAAM,MAAM,GAAG,MAAM,IAAA,mBAAQ,EAAC,cAAc,CAAC,CAAA;IAC7C,MAAM,UAAU,GAAG,sBAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC5C,MAAM,QAAQ,GAAG,8BAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IAEtD,MAAM,WAAW,GAAG,kBAAQ,CAAC,WAAW,CAAC,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACtE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,mCAAmC,cAAc,EAAE,CAAC,CAAA;IACtE,CAAC;IAED,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,8BAA8B,EAAE,CAAA;IACjE,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,iCAAiC,cAAc,EAAE,CAAC,CAAA;IACpE,CAAC;IAED,8GAA8G;IAC9G,MAAM,aAAa,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAChH,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;QAChC,GAAG;QACH,KAAK;KACN,CAAC,CAAC,CAAA;IAEH,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;QACpB,IAAI,EAAE,WAAW;QACjB,EAAE,EAAE,cAAc;QAClB,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;QAC/C,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI;QACvB,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ;KAChC,CAAC,CAAA;IAEF,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAA;IAEnC,MAAM,IAAA,oBAAS,EAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;IACnE,kBAAG,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,kBAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,EAAE,6CAA6C,CAAC,CAAA;AAC3G,CAAC","sourcesContent":["import { log } from \"builder-util\"\nimport { readFile, writeFile } from \"fs/promises\"\nimport * as path from \"path\"\nimport { NtExecutable, NtExecutableResource, Resource } from \"resedit\"\nimport { AsarIntegrity } from \"../asar/integrity\"\n\n/** @internal */\nexport async function addWinAsarIntegrity(executablePath: string, asarIntegrity: AsarIntegrity) {\n const buffer = await readFile(executablePath)\n const executable = NtExecutable.from(buffer)\n const resource = NtExecutableResource.from(executable)\n\n const versionInfo = Resource.VersionInfo.fromEntries(resource.entries)\n if (versionInfo.length !== 1) {\n throw new Error(`Failed to parse version info in ${executablePath}`)\n }\n\n const languages = versionInfo[0].getAllLanguagesForStringValues()\n if (languages.length !== 1) {\n throw new Error(`Failed to locate languages in ${executablePath}`)\n }\n\n // See: https://github.com/electron/packager/blob/00d20b99cf4aa4621103dbbd09ff7de7d2f7f539/src/resedit.ts#L124\n const integrityList = Array.from(Object.entries(asarIntegrity)).map(([file, { algorithm: alg, hash: value }]) => ({\n file: path.win32.normalize(file),\n alg,\n value,\n }))\n\n resource.entries.push({\n type: \"INTEGRITY\",\n id: \"ELECTRONASAR\",\n bin: Buffer.from(JSON.stringify(integrityList)),\n lang: languages[0].lang,\n codepage: languages[0].codepage,\n })\n\n resource.outputResource(executable)\n\n await writeFile(executablePath, Buffer.from(executable.generate()))\n log.info({ executablePath: log.filePath(executablePath) }, \"updating asar integrity executable resource\")\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PrepareApplicationStageDirectoryOptions } from "../Framework";
|
|
2
|
-
import { ElectronBrandingOptions } from "./ElectronFramework";
|
|
3
|
-
export declare class FFMPEGInjector {
|
|
4
|
-
private readonly options;
|
|
5
|
-
private readonly electronVersion;
|
|
6
|
-
private readonly branding;
|
|
7
|
-
constructor(options: PrepareApplicationStageDirectoryOptions, electronVersion: string, branding: Required<ElectronBrandingOptions>);
|
|
8
|
-
inject(): Promise<string>;
|
|
9
|
-
private downloadFFMPEG;
|
|
10
|
-
private copyFFMPEG;
|
|
11
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FFMPEGInjector = void 0;
|
|
4
|
-
const builder_util_1 = require("builder-util");
|
|
5
|
-
const fs = require("fs-extra");
|
|
6
|
-
const path = require("path");
|
|
7
|
-
const core_1 = require("../core");
|
|
8
|
-
const electronGet_1 = require("../util/electronGet");
|
|
9
|
-
class FFMPEGInjector {
|
|
10
|
-
constructor(options, electronVersion, branding) {
|
|
11
|
-
this.options = options;
|
|
12
|
-
this.electronVersion = electronVersion;
|
|
13
|
-
this.branding = branding;
|
|
14
|
-
}
|
|
15
|
-
async inject() {
|
|
16
|
-
const libPath = this.options.platformName === core_1.Platform.MAC.nodeName
|
|
17
|
-
? path.join(this.options.appOutDir, `${this.branding.productName}.app`, "Contents", "Frameworks", `${this.branding.productName} Framework.framework`, "Versions", "A", "Libraries")
|
|
18
|
-
: this.options.appOutDir;
|
|
19
|
-
const ffmpegDir = await this.downloadFFMPEG();
|
|
20
|
-
return this.copyFFMPEG(libPath, ffmpegDir);
|
|
21
|
-
}
|
|
22
|
-
async downloadFFMPEG() {
|
|
23
|
-
const ffmpegFileName = `ffmpeg-v${this.electronVersion}-${this.options.platformName}-${this.options.arch}`;
|
|
24
|
-
builder_util_1.log.info({ ffmpegFileName }, "downloading");
|
|
25
|
-
const { packager: { config: { electronDownload }, }, platformName, arch, } = this.options;
|
|
26
|
-
return (0, electronGet_1.downloadElectronArtifact)({
|
|
27
|
-
electronDownload,
|
|
28
|
-
artifactName: "ffmpeg",
|
|
29
|
-
platformName,
|
|
30
|
-
arch,
|
|
31
|
-
version: this.electronVersion,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
async copyFFMPEG(targetPath, sourcePath) {
|
|
35
|
-
let fileName = "ffmpeg.dll";
|
|
36
|
-
if (["darwin", "mas"].includes(this.options.platformName)) {
|
|
37
|
-
fileName = "libffmpeg.dylib";
|
|
38
|
-
}
|
|
39
|
-
else if (this.options.platformName === "linux") {
|
|
40
|
-
fileName = "libffmpeg.so";
|
|
41
|
-
}
|
|
42
|
-
const libPath = path.resolve(sourcePath, fileName);
|
|
43
|
-
const libTargetPath = path.resolve(targetPath, fileName);
|
|
44
|
-
builder_util_1.log.info({ lib: builder_util_1.log.filePath(libPath), target: libTargetPath }, "copying non-proprietary FFMPEG");
|
|
45
|
-
// If the source doesn't exist we have a problem
|
|
46
|
-
if (!fs.existsSync(libPath)) {
|
|
47
|
-
throw new Error(`Failed to find FFMPEG library file at path: ${libPath}`);
|
|
48
|
-
}
|
|
49
|
-
// If we are copying to the source we can stop immediately
|
|
50
|
-
if (libPath !== libTargetPath) {
|
|
51
|
-
await fs.copyFile(libPath, libTargetPath);
|
|
52
|
-
}
|
|
53
|
-
return libTargetPath;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.FFMPEGInjector = FFMPEGInjector;
|
|
57
|
-
//# sourceMappingURL=injectFFMPEG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"injectFFMPEG.js","sourceRoot":"","sources":["../../src/electron/injectFFMPEG.ts"],"names":[],"mappings":";;;AAAA,+CAAkC;AAClC,+BAA8B;AAC9B,6BAA4B;AAC5B,kCAAkC;AAElC,qDAA8D;AAG9D,MAAa,cAAc;IACzB,YACmB,OAAgD,EAChD,eAAuB,EACvB,QAA2C;QAF3C,YAAO,GAAP,OAAO,CAAyC;QAChD,oBAAe,GAAf,eAAe,CAAQ;QACvB,aAAQ,GAAR,QAAQ,CAAmC;IAC3D,CAAC;IAEJ,KAAK,CAAC,MAAM;QACV,MAAM,OAAO,GACX,IAAI,CAAC,OAAO,CAAC,YAAY,KAAK,eAAQ,CAAC,GAAG,CAAC,QAAQ;YACjD,CAAC,CAAC,IAAI,CAAC,IAAI,CACP,IAAI,CAAC,OAAO,CAAC,SAAS,EACtB,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,MAAM,EAClC,UAAU,EACV,YAAY,EACZ,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,sBAAsB,EAClD,UAAU,EACV,GAAG,EACH,WAAW,CACZ;YACH,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAA;QAE5B,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,EAAE,CAAA;QAC7C,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAA;IAC5C,CAAC;IAEO,KAAK,CAAC,cAAc;QAC1B,MAAM,cAAc,GAAG,WAAW,IAAI,CAAC,eAAe,IAAI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AA+C,OAAO,EAAE,CAAC,CAAA;QAC3E,CAAC;QAED,0DAA0D;QAC1D,IAAI,OAAO,KAAK,aAAa,EAAE,CAAC;YAC9B,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,CAAA;QAC3C,CAAC;QACD,OAAO,aAAa,CAAA;IACtB,CAAC;CACF;AAvED,wCAuEC","sourcesContent":["import { log } from \"builder-util\"\nimport * as fs from \"fs-extra\"\nimport * as path from \"path\"\nimport { Platform } from \"../core\"\nimport { PrepareApplicationStageDirectoryOptions } from \"../Framework\"\nimport { downloadElectronArtifact } from \"../util/electronGet\"\nimport { ElectronBrandingOptions } from \"./ElectronFramework\"\n\nexport class FFMPEGInjector {\n constructor(\n private readonly options: PrepareApplicationStageDirectoryOptions,\n private readonly electronVersion: string,\n private readonly branding: Required<ElectronBrandingOptions>\n ) {}\n\n async inject() {\n const libPath =\n this.options.platformName === Platform.MAC.nodeName\n ? path.join(\n this.options.appOutDir,\n `${this.branding.productName}.app`,\n \"Contents\",\n \"Frameworks\",\n `${this.branding.productName} Framework.framework`,\n \"Versions\",\n \"A\",\n \"Libraries\"\n )\n : this.options.appOutDir\n\n const ffmpegDir = await this.downloadFFMPEG()\n return this.copyFFMPEG(libPath, ffmpegDir)\n }\n\n private async downloadFFMPEG(): Promise<string> {\n const ffmpegFileName = `ffmpeg-v${this.electronVersion}-${this.options.platformName}-${this.options.arch}`\n\n log.info({ ffmpegFileName }, \"downloading\")\n\n const {\n packager: {\n config: { electronDownload },\n },\n platformName,\n arch,\n } = this.options\n\n return downloadElectronArtifact({\n electronDownload,\n artifactName: \"ffmpeg\",\n platformName,\n arch,\n version: this.electronVersion,\n })\n }\n\n private async copyFFMPEG(targetPath: string, sourcePath: string) {\n let fileName = \"ffmpeg.dll\"\n if ([\"darwin\", \"mas\"].includes(this.options.platformName)) {\n fileName = \"libffmpeg.dylib\"\n } else if (this.options.platformName === \"linux\") {\n fileName = \"libffmpeg.so\"\n }\n\n const libPath = path.resolve(sourcePath, fileName)\n const libTargetPath = path.resolve(targetPath, fileName)\n log.info({ lib: log.filePath(libPath), target: libTargetPath }, \"copying non-proprietary FFMPEG\")\n\n // If the source doesn't exist we have a problem\n if (!fs.existsSync(libPath)) {\n throw new Error(`Failed to find FFMPEG library file at path: ${libPath}`)\n }\n\n // If we are copying to the source we can stop immediately\n if (libPath !== libTargetPath) {\n await fs.copyFile(libPath, libTargetPath)\n }\n return libTargetPath\n }\n}\n"]}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Find all instances of a given module in node_modules subdirectories while traversing up
|
|
3
|
-
* ancestor directories.
|
|
4
|
-
*
|
|
5
|
-
* @param cwd the initial directory to traverse
|
|
6
|
-
* @param moduleName the Node module name (should work for scoped modules as well)
|
|
7
|
-
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
8
|
-
*/
|
|
9
|
-
export declare function searchForModule(cwd: string, moduleName: string, rootPath?: string): Promise<string[]>;
|
|
10
|
-
/**
|
|
11
|
-
* Find all instances of node_modules subdirectories while traversing up ancestor directories.
|
|
12
|
-
*
|
|
13
|
-
* @param cwd the initial directory to traverse
|
|
14
|
-
* @param rootPath the project's root path. If provided, the traversal will stop at this path.
|
|
15
|
-
*/
|
|
16
|
-
export declare function searchForNodeModules(cwd: string, rootPath?: string): Promise<string[]>;
|
|
17
|
-
/**
|
|
18
|
-
* Determine the root directory of a given project, by looking for a directory with an
|
|
19
|
-
* NPM or yarn lockfile or pnpm lockfile.
|
|
20
|
-
*
|
|
21
|
-
* @param cwd the initial directory to traverse
|
|
22
|
-
*/
|
|
23
|
-
export declare function getProjectRootPath(cwd: string): Promise<string>;
|