diff --git a/.changeset/serious-nails-shop.md b/.changeset/serious-nails-shop.md
new file mode 100644
index 00000000000..777bd402d48
--- /dev/null
+++ b/.changeset/serious-nails-shop.md
@@ -0,0 +1,7 @@
+---
+"app-builder-lib": minor
+"dmg-builder": minor
+"electron-builder": minor
+---
+
+feat: export Packager sub-classes from main electron-builder types
diff --git a/docs/api/electron-builder.md b/docs/api/electron-builder.md
index c75430035e2..d80b09c2273 100644
--- a/docs/api/electron-builder.md
+++ b/docs/api/electron-builder.md
@@ -109,6 +109,51 @@ Developer API only. See [Configuration](../configuration/configuration.md) for u
.getVersionInWeirdWindowsForm(isSetBuildNumber)
⇒ String
+.LinuxPackager ⇐ PlatformPackager
+
+.createTargets(targets, mapper)
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getIconPath()
⇒ Promise< | String>
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
+
+
+.MacPackager ⇐ PlatformPackager
+
+.applyCommonInfo(appPlist, contentsPath)
⇒ Promise<void>
+.createTargets(targets, mapper)
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.getIconPath()
⇒ Promise< | String>
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<void>
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
+
+
.Packager
+.WinPackager ⇐ PlatformPackager
+
+.createTargets(targets, mapper)
+.getIconPath()
⇒ Promise< | String>
+.sign(file, logMessagePrefix)
⇒ Promise<Boolean>
+.signAndEditResources(file, arch, outDir, internalName, requestedExecutionLevel)
⇒ Promise<void>
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
+
+
.build(options, packager)
⇒ Promise<Array<String>>
.buildForge(forgeOptions, options)
⇒ Promise<Array<String>>
@@ -425,57 +494,43 @@ Developer API only. See [Configuration](../configuration/configuration.md) for u
-
-Packager
+
+
Kind: class of app-builder-lib
+Extends: PlatformPackager
Properties
-projectDir
String
-appDir
String
-metadata
Metadata
-areNodeModulesHandledExternally
Boolean
-isPrepackedAppAsar
Boolean
-devMetadata
Metadata | “undefined”
-config
Configuration
-isTwoPackageJsonProjectLayoutUsed
= false
Boolean
-eventEmitter
= new EventEmitter()
module:events.EventEmitter
-_appInfo
AppInfo | “undefined”
-appInfo
AppInfo
-tempDirManager
= new TmpDir("packager")
TmpDir
-options
PackagerOptions
-debugLogger
= new DebugLogger(log.isDebugEnabled)
DebugLogger
-repositoryInfo
Promise< | SourceRepositoryInfo>
-[stageDirPathCustomizer=(target, packager, arch) => {
-return path.join(target.outDir, __${target.name}-${getArtifactArchName(arch, target.name)}
)
-}]
callback
-buildResourcesDir
String
-relativeBuildResourcesDirname
String
-framework
Framework
+executableName
String
+defaultTarget
Array<String>
Methods
-- .Packager
+
- .LinuxPackager ⇐
PlatformPackager
-._build(configuration, metadata, devMetadata, repositoryInfo)
⇒ Promise<BuildResult>
-.addAfterPackHandler(handler)
-.afterPack(context)
⇒ Promise<any>
-.artifactCreated(handler)
⇒ Packager
-.build()
⇒ Promise<BuildResult>
-.callAppxManifestCreated(path)
⇒ Promise<void>
-.callArtifactBuildCompleted(event)
⇒ Promise<void>
-.callArtifactBuildStarted(event, logFields)
⇒ Promise<void>
-.callMsiProjectCreated(path)
⇒ Promise<void>
-.dispatchArtifactCreated(event)
-.disposeOnBuildFinish(disposer)
-.installAppDependencies(platform, arch)
⇒ Promise<any>
-.getNodeDependencyInfo(platform)
⇒ Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>
+.createTargets(targets, mapper)
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getIconPath()
⇒ Promise< | String>
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
-
-
+
+linuxPackager.createTargets(targets, mapper)
+Overrides: createTargets
@@ -485,25 +540,17 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-configuration |
-Configuration |
-
-
-metadata |
-Metadata |
-
-
-devMetadata |
-Metadata | “undefined” |
+targets |
+Array<String> |
-repositoryInfo |
-SourceRepositoryInfo |
+mapper |
+callback |
-
-packager.addAfterPackHandler(handler)
+
+
@@ -513,13 +560,17 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-handler |
-callback |
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+defaultPattern |
+String | undefined |
-
-packager.afterPack(context)
⇒ Promise<any>
+
+linuxPackager.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
@@ -529,47 +580,35 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-context |
-module:app-builder-lib/out/configuration.PackContext |
+suggestedName |
+String | “undefined” |
-
-
-
-packager.artifactCreated(handler)
⇒ Packager
-
-
-Param |
-Type |
+ext |
+String |
-
-
-handler |
-callback |
+arch |
+Arch | “undefined” |
-
-
-
-packager.build()
⇒ Promise<BuildResult>
-
-packager.callAppxManifestCreated(path)
⇒ Promise<void>
-
-
-Param |
-Type |
+skipDefaultArch |
+ |
-
-
-path |
+defaultArch |
String |
+
+safePattern |
+ |
+
-
-packager.callArtifactBuildCompleted(event)
⇒ Promise<void>
+
+linuxPackager.getDefaultFrameworkIcon()
⇒ null
| String
+
+linuxPackager.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
@@ -579,33 +618,25 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-event |
-ArtifactCreated |
+file |
+String |
-
-
-
-packager.callArtifactBuildStarted(event, logFields)
⇒ Promise<void>
-
-
-Param |
-Type |
+target |
+Target | “undefined” |
-
-
-event |
-ArtifactBuildStarted |
+arch |
+Arch | “undefined” |
-logFields |
-any |
+safeArtifactName |
+String | “undefined” |
-
-packager.callMsiProjectCreated(path)
⇒ Promise<void>
+
+linuxPackager.getElectronDestinationDir(appOutDir)
⇒ String
@@ -615,14 +646,13 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-path |
+appOutDir |
String |
-
-packager.dispatchArtifactCreated(event)
-Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted
.
+
+linuxPackager.getElectronSrcDir(dist)
⇒ String
@@ -632,13 +662,13 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-event |
-ArtifactCreated |
+dist |
+String |
-
-packager.disposeOnBuildFinish(disposer)
+
+linuxPackager.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
@@ -648,33 +678,21 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-disposer |
-callback |
-
-
-
-
-
-
-
-
+
+linuxPackager.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
@@ -684,33 +702,1462 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-platform |
-Platform | “undefined” |
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+defaultPattern |
+String |
+
+
+skipDefaultArch |
+ |
+
+
+defaultArch |
+String |
+
+
+
+
+linuxPackager.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+pattern |
+String |
+
+
+arch |
+String | “undefined” |
+
+
+extra |
+any |
+
+
+isProductNameSanitized |
+ |
+
+
+
+
+linuxPackager.generateName2(ext, classifier, deployment)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+ext |
+String | “undefined” |
+
+
+classifier |
+String | “undefined” | undefined |
+
+
+deployment |
+Boolean |
+
+
+
+
+linuxPackager.getIconPath()
⇒ Promise< | String>
+
+linuxPackager.getMacOsResourcesDir(appOutDir)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+linuxPackager.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
+
+
+
+Param |
+Type |
+
+
+
+
+outDir |
+String |
+
+
+arch |
+Arch |
+
+
+targets |
+Array<Target> |
+
+
+taskManager |
+AsyncTaskManager |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+sources |
+Array<String> |
+
+
+fallbackSources |
+Array<String> |
+
+
+outputFormat |
+“set” | “icns” | “ico” |
+
+
+
+
+linuxPackager.getResource(custom, names)
⇒ Promise< | String>
+
+
+
+Param |
+Type |
+
+
+
+
+custom |
+String | “undefined” | undefined |
+
+
+names |
+Array<String> |
+
+
+
+
+linuxPackager.getResourcesDir(appOutDir)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+linuxPackager.getTempFile(suffix)
⇒ Promise<String>
+
+
+
+Param |
+Type |
+
+
+
+
+suffix |
+String |
+
+
+
+
+
+Kind: class of app-builder-lib
+Extends: PlatformPackager
+Properties
+
+-
+
**<code id="MacPackager-[codeSigningInfo=new Lazy(() => {
+const cscLink = this.getCscLink()
+if (cscLink == null || process.platform !== “darwin”) {
+return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })
+}
+return createKeychain({
+tmpDir: this.info.tempDirManager,
+cscLink,
+cscKeyPassword: this.getCscPassword(),
+cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),
+cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),
+currentDir: this.projectDir,
+}).then(result => {
+const keychainFile = result.keychainFile
+if (keychainFile != null) {
+this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))
+}
+return result
+})
+})]">[codeSigningInfo=new Lazy(() => {
+const cscLink = this.getCscLink()
+if (cscLink == null || process.platform !== “darwin”) {
+return Promise.resolve({ keychainFile: process.env.CSC_KEYCHAIN || null })
+}
+return createKeychain({
+tmpDir: this.info.tempDirManager,
+cscLink,
+cscKeyPassword: this.getCscPassword(),
+cscILink: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerLink, process.env.CSC_INSTALLER_LINK),
+cscIKeyPassword: chooseNotNull(this.platformSpecificBuildOptions.cscInstallerKeyPassword, process.env.CSC_INSTALLER_KEY_PASSWORD),
+currentDir: this.projectDir,
+}).then(result => {
+const keychainFile = result.keychainFile
+if (keychainFile != null) {
+this.info.disposeOnBuildFinish(() => removeKeychain(keychainFile))
+}
+return result
+})
+})]** Lazy<module:app-builder-lib/out/codeSign/macCodeSign.CodeSigningInfo>
+
+-
+
defaultTarget
Array<String>
+
+
+Methods
+
+- .MacPackager ⇐
PlatformPackager
+
+.applyCommonInfo(appPlist, contentsPath)
⇒ Promise<void>
+.createTargets(targets, mapper)
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.getIconPath()
⇒ Promise< | String>
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<void>
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
+
+
+
+
+macPackager.applyCommonInfo(appPlist, contentsPath)
⇒ Promise<void>
+
+
+
+Param |
+Type |
+
+
+
+
+appPlist |
+any |
+
+
+contentsPath |
+String |
+
+
+
+
+macPackager.createTargets(targets, mapper)
+Overrides: createTargets
+
+
+
+Param |
+Type |
+
+
+
+
+targets |
+Array<String> |
+
+
+mapper |
+callback |
+
+
+
+
+macPackager.getElectronDestinationDir(appOutDir)
⇒ String
+Overrides: getElectronDestinationDir
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+macPackager.getElectronSrcDir(dist)
⇒ String
+Overrides: getElectronSrcDir
+
+
+
+Param |
+Type |
+
+
+
+
+dist |
+String |
+
+
+
+
+macPackager.getIconPath()
⇒ Promise< | String>
+Overrides: getIconPath
+
+macPackager.pack(outDir, arch, targets, taskManager)
⇒ Promise<void>
+Overrides: pack
+
+
+
+Param |
+Type |
+
+
+
+
+outDir |
+String |
+
+
+arch |
+Arch |
+
+
+targets |
+Array<Target> |
+
+
+taskManager |
+AsyncTaskManager |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+defaultPattern |
+String | undefined |
+
+
+
+
+macPackager.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+
+
+
+Param |
+Type |
+
+
+
+
+suggestedName |
+String | “undefined” |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+skipDefaultArch |
+ |
+
+
+defaultArch |
+String |
+
+
+safePattern |
+ |
+
+
+
+
+macPackager.getDefaultFrameworkIcon()
⇒ null
| String
+
+macPackager.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+
+
+
+Param |
+Type |
+
+
+
+
+file |
+String |
+
+
+target |
+Target | “undefined” |
+
+
+arch |
+Arch | “undefined” |
+
+
+safeArtifactName |
+String | “undefined” |
+
+
+
+
+macPackager.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+
+
+macPackager.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+defaultPattern |
+String |
+
+
+skipDefaultArch |
+ |
+
+
+defaultArch |
+String |
+
+
+
+
+macPackager.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+pattern |
+String |
+
+
+arch |
+String | “undefined” |
+
+
+extra |
+any |
+
+
+isProductNameSanitized |
+ |
+
+
+
+
+macPackager.generateName2(ext, classifier, deployment)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+ext |
+String | “undefined” |
+
+
+classifier |
+String | “undefined” | undefined |
+
+
+deployment |
+Boolean |
+
+
+
+
+macPackager.getMacOsResourcesDir(appOutDir)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+sources |
+Array<String> |
+
+
+fallbackSources |
+Array<String> |
+
+
+outputFormat |
+“set” | “icns” | “ico” |
+
+
+
+
+macPackager.getResource(custom, names)
⇒ Promise< | String>
+
+
+
+Param |
+Type |
+
+
+
+
+custom |
+String | “undefined” | undefined |
+
+
+names |
+Array<String> |
+
+
+
+
+macPackager.getResourcesDir(appOutDir)
⇒ String
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+macPackager.getTempFile(suffix)
⇒ Promise<String>
+
+
+
+Param |
+Type |
+
+
+
+
+suffix |
+String |
+
+
+
+
+Packager
+Kind: class of app-builder-lib
+Properties
+
+projectDir
String
+appDir
String
+metadata
Metadata
+areNodeModulesHandledExternally
Boolean
+isPrepackedAppAsar
Boolean
+devMetadata
Metadata | “undefined”
+config
Configuration
+isTwoPackageJsonProjectLayoutUsed
= false
Boolean
+eventEmitter
= new EventEmitter()
module:events.EventEmitter
+_appInfo
AppInfo | “undefined”
+appInfo
AppInfo
+tempDirManager
= new TmpDir("packager")
TmpDir
+options
PackagerOptions
+debugLogger
= new DebugLogger(log.isDebugEnabled)
DebugLogger
+repositoryInfo
Promise< | SourceRepositoryInfo>
+[stageDirPathCustomizer=(target, packager, arch) => {
+return path.join(target.outDir, __${target.name}-${getArtifactArchName(arch, target.name)}
)
+}]
callback
+buildResourcesDir
String
+relativeBuildResourcesDirname
String
+framework
Framework
+
+Methods
+
+
+
+
+
+packager.addAfterPackHandler(handler)
+
+
+
+Param |
+Type |
+
+
+
+
+handler |
+callback |
+
+
+
+
+packager.afterPack(context)
⇒ Promise<any>
+
+
+
+Param |
+Type |
+
+
+
+
+context |
+module:app-builder-lib/out/configuration.PackContext |
+
+
+
+
+packager.artifactCreated(handler)
⇒ Packager
+
+
+
+Param |
+Type |
+
+
+
+
+handler |
+callback |
+
+
+
+
+packager.build()
⇒ Promise<BuildResult>
+
+packager.callAppxManifestCreated(path)
⇒ Promise<void>
+
+
+
+Param |
+Type |
+
+
+
+
+path |
+String |
+
+
+
+
+packager.callArtifactBuildCompleted(event)
⇒ Promise<void>
+
+
+packager.callArtifactBuildStarted(event, logFields)
⇒ Promise<void>
+
+
+packager.callMsiProjectCreated(path)
⇒ Promise<void>
+
+
+
+Param |
+Type |
+
+
+
+
+path |
+String |
+
+
+
+
+packager.dispatchArtifactCreated(event)
+Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted
.
+
+
+packager.disposeOnBuildFinish(disposer)
+
+
+
+Param |
+Type |
+
+
+
+
+disposer |
+callback |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+platform |
+Platform |
+
+
+arch |
+Arch |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+platform |
+Platform | “undefined” |
+
+
+
+
+
+Kind: class of app-builder-lib
+Properties
+
+MAC
= new Platform("mac", "mac", "darwin")
Platform
+LINUX
= new Platform("linux", "linux", "linux")
Platform
+WINDOWS
= new Platform("windows", "win", "win32")
Platform
+
+Methods
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+type |
+String | Array<String> | “undefined” |
+
+
+archs |
+Array<Arch> |
+
+
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+name |
+String |
+
+
+
+
+
+
+
+Kind: class of app-builder-lib
+Properties
+
+packagerOptions
PackagerOptions
+buildResourcesDir
String
+projectDir
String
+config
Configuration
+platformSpecificBuildOptions
module:app-builder-lib/out/platformPackager.DC
+resourceList
Promise<Array<String>>
+appInfo
AppInfo
+compression
“store” | “normal” | “maximum”
+debugLogger
DebugLogger
+defaultTarget
Array<String>
+fileAssociations
Array<FileAssociation>
+forceCodeSigning
Boolean
+
+Methods
+
+- .PlatformPackager
+
+.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
+.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
+.createTargets(targets, mapper)
+.getDefaultFrameworkIcon()
⇒ null
| String
+.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
+.getElectronDestinationDir(appOutDir)
⇒ String
+.getElectronSrcDir(dist)
⇒ String
+.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
+.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
+.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
+.generateName2(ext, classifier, deployment)
⇒ String
+.getIconPath()
⇒ Promise< | String>
+.getMacOsResourcesDir(appOutDir)
⇒ String
+.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
+.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
+.getResource(custom, names)
⇒ Promise< | String>
+.getResourcesDir(appOutDir)
⇒ String
+.getTempFile(suffix)
⇒ Promise<String>
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+defaultPattern |
+String | undefined |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+suggestedName |
+String | “undefined” |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+skipDefaultArch |
+ |
+
+
+defaultArch |
+String |
+
+
+safePattern |
+ |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+targets |
+Array<String> |
+
+
+mapper |
+callback |
+
+
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+file |
+String |
+
+
+target |
+Target | “undefined” |
+
+
+arch |
+Arch | “undefined” |
+
+
+safeArtifactName |
+String | “undefined” |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+dist |
+String |
-
-
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+targetSpecificOptions |
+TargetSpecificOptions | “undefined” | undefined |
+
+
+ext |
+String |
+
+
+arch |
+Arch | “undefined” |
+
+
+defaultPattern |
+String |
+
+
+skipDefaultArch |
+ |
+
+
+defaultArch |
+String |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+pattern |
+String |
+
+
+arch |
+String | “undefined” |
+
+
+extra |
+any |
+
+
+isProductNameSanitized |
+ |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+ext |
+String | “undefined” |
+
+
+classifier |
+String | “undefined” | undefined |
+
+
+deployment |
+Boolean |
+
+
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+outDir |
+String |
+
+
+arch |
+Arch |
+
+
+targets |
+Array<Target> |
+
+
+taskManager |
+AsyncTaskManager |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+sources |
+Array<String> |
+
+
+fallbackSources |
+Array<String> |
+
+
+outputFormat |
+“set” | “icns” | “ico” |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+custom |
+String | “undefined” | undefined |
+
+
+names |
+Array<String> |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+appOutDir |
+String |
+
+
+
+
+
+
+
+
+Param |
+Type |
+
+
+
+
+suffix |
+String |
+
+
+
+
+PublishManager ⇐ module:packages/electron-publish/out/publisher.PublishContext
+Kind: class of app-builder-lib
+Extends: module:packages/electron-publish/out/publisher.PublishContext
+Properties
+
+isPublish
= false
Boolean
+progress
= (process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : null
MultiProgress
+
+Methods
+
+- .PublishManager ⇐
module:packages/electron-publish/out/publisher.PublishContext
+
+
+
+
+publishManager.awaitTasks()
⇒ Promise<void>
+
+publishManager.cancelTasks()
+
+publishManager.getGlobalPublishConfigurations()
⇒ Promise< | Array>
+
+Target
Kind: class of app-builder-lib
Properties
-MAC
= new Platform("mac", "mac", "darwin")
Platform
-LINUX
= new Platform("linux", "linux", "linux")
Platform
-WINDOWS
= new Platform("windows", "win", "win32")
Platform
+outDir
String
+options
TargetSpecificOptions | “undefined” | undefined
Methods
-
-
+
+target.build(appOutDir, arch)
⇒ Promise<any>
@@ -720,60 +2167,192 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-type |
-String | Array<String> | “undefined” |
-
-
-archs |
-Array<Arch> |
-
-
-
-
-
-
-
-
-
-
-Param |
-Type |
+appOutDir |
+String |
-
-
-name |
-String |
+arch |
+Arch |
-
-
-
-
+
+target.finishBuild()
⇒ Promise<any>
+
+
Kind: class of app-builder-lib
+Extends: PlatformPackager
Properties
-packagerOptions
PackagerOptions
-buildResourcesDir
String
-projectDir
String
-config
Configuration
-platformSpecificBuildOptions
module:app-builder-lib/out/platformPackager.DC
-resourceList
Promise<Array<String>>
-appInfo
AppInfo
-compression
“store” | “normal” | “maximum”
-debugLogger
DebugLogger
-defaultTarget
Array<String>
-fileAssociations
Array<FileAssociation>
-forceCodeSigning
Boolean
+-
+
**<code id="WinPackager-[cscInfo=new Lazy<FileCodeSigningInfo | CertificateFromStoreInfo | null>(() => {
+const platformSpecificBuildOptions = this.platformSpecificBuildOptions
+if (platformSpecificBuildOptions.certificateSubjectName != null || platformSpecificBuildOptions.certificateSha1 != null) {
+return this.vm.value
+.then(vm => getCertificateFromStoreInfo(platformSpecificBuildOptions, vm))
+.catch((e: any) => {
+// https://github.com/electron-userland/electron-builder/pull/2397
+if (platformSpecificBuildOptions.sign == null) {
+throw e
+} else {
+log.debug({ error: e }, “getCertificateFromStoreInfo error”)
+return null
+}
+})
+}
+const certificateFile = platformSpecificBuildOptions.certificateFile
+if (certificateFile != null) {
+const certificatePassword = this.getCscPassword()
+return Promise.resolve({
+file: certificateFile,
+password: certificatePassword == null ? null : certificatePassword.trim(),
+})
+}
+const cscLink = this.getCscLink(“WIN_CSC_LINK”)
+if (cscLink == null) {
+return Promise.resolve(null)
+}
+return (
+importCertificate(cscLink, this.info.tempDirManager, this.projectDir)
+// before then
+.catch((e: any) => {
+if (e instanceof InvalidConfigurationError) {
+throw new InvalidConfigurationError(Env WIN_CSC_LINK is not correct, cannot resolve: ${e.message}
)
+} else {
+throw e
+}
+})
+.then(path => {
+return {
+file: path,
+password: this.getCscPassword(),
+}
+})
+)
+})]">[cscInfo=new Lazy<FileCodeSigningInfo | CertificateFromStoreInfo | null>(() => {
+const platformSpecificBuildOptions = this.platformSpecificBuildOptions
+if (platformSpecificBuildOptions.certificateSubjectName != null || platformSpecificBuildOptions.certificateSha1 != null) {
+return this.vm.value
+.then(vm => getCertificateFromStoreInfo(platformSpecificBuildOptions, vm))
+.catch((e: any) => {
+// https://github.com/electron-userland/electron-builder/pull/2397
+if (platformSpecificBuildOptions.sign == null) {
+throw e
+} else {
+log.debug({ error: e }, “getCertificateFromStoreInfo error”)
+return null
+}
+})
+}
+const certificateFile = platformSpecificBuildOptions.certificateFile
+if (certificateFile != null) {
+const certificatePassword = this.getCscPassword()
+return Promise.resolve({
+file: certificateFile,
+password: certificatePassword == null ? null : certificatePassword.trim(),
+})
+}
+const cscLink = this.getCscLink(“WIN_CSC_LINK”)
+if (cscLink == null) {
+return Promise.resolve(null)
+}
+return (
+importCertificate(cscLink, this.info.tempDirManager, this.projectDir)
+// before then
+.catch((e: any) => {
+if (e instanceof InvalidConfigurationError) {
+throw new InvalidConfigurationError(Env WIN_CSC_LINK is not correct, cannot resolve: ${e.message}
)
+} else {
+throw e
+}
+})
+.then(path => {
+return {
+file: path,
+password: this.getCscPassword(),
+}
+})
+)
+})]** Lazy< | FileCodeSigningInfo | CertificateFromStoreInfo>
+
+-
+
vm
= new Lazy<VmManager>(() => (process.platform === "win32" ? Promise.resolve(new VmManager()) : getWindowsVm(this.debugLogger)))
Lazy<module:app-builder-lib/out/vm/vm.VmManager>
+
+-
+
**<code id="WinPackager-[computedPublisherName=new Lazy<Array | null>(async () => {
+const publisherName = this.platformSpecificBuildOptions.publisherName
+if (publisherName === null) {
+return null
+} else if (publisherName != null) {
+return asArray(publisherName)
+}
+const certInfo = await this.lazyCertInfo.value
+return certInfo == null ? null : [certInfo.commonName]
+})]">[computedPublisherName=new Lazy<Array | null>(async () => {
+const publisherName = this.platformSpecificBuildOptions.publisherName
+if (publisherName === null) {
+return null
+} else if (publisherName != null) {
+return asArray(publisherName)
+}
+const certInfo = await this.lazyCertInfo.value
+return certInfo == null ? null : [certInfo.commonName]
+})]** Lazy< | Array>
+
+-
+
**<code id="WinPackager-[lazyCertInfo=new Lazy<CertificateInfo | null>(async () => {
+const cscInfo = await this.cscInfo.value
+if (cscInfo == null) {
+return null
+}
+if (“subject” in cscInfo) {
+const bloodyMicrosoftSubjectDn = cscInfo.subject
+return {
+commonName: parseDn(bloodyMicrosoftSubjectDn).get(“CN”)!,
+bloodyMicrosoftSubjectDn,
+}
+}
+const cscFile = cscInfo.file
+if (cscFile == null) {
+return null
+}
+return await getCertInfo(cscFile, cscInfo.password || “”)
+})]">[lazyCertInfo=new Lazy<CertificateInfo | null>(async () => {
+const cscInfo = await this.cscInfo.value
+if (cscInfo == null) {
+return null
+}
+if (“subject” in cscInfo) {
+const bloodyMicrosoftSubjectDn = cscInfo.subject
+return {
+commonName: parseDn(bloodyMicrosoftSubjectDn).get(“CN”)!,
+bloodyMicrosoftSubjectDn,
+}
+}
+const cscFile = cscInfo.file
+if (cscFile == null) {
+return null
+}
+return await getCertInfo(cscFile, cscInfo.password || “”)
+})]** Lazy< | module:app-builder-lib/out/codeSign/windowsCodeSign.CertificateInfo>
+
+-
+
isForceCodeSigningVerification
Boolean
+
+-
+
defaultTarget
Array<String>
+
Methods
-- .PlatformPackager
+
- .WinPackager ⇐
PlatformPackager
+.createTargets(targets, mapper)
+.getIconPath()
⇒ Promise< | String>
+.sign(file, logMessagePrefix)
⇒ Promise<Boolean>
+.signAndEditResources(file, arch, outDir, internalName, requestedExecutionLevel)
⇒ Promise<void>
.artifactPatternConfig(targetSpecificOptions, defaultPattern)
⇒ module:app-builder-lib/out/platformPackager.__object
.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
-.createTargets(targets, mapper)
.getDefaultFrameworkIcon()
⇒ null
| String
.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
.getElectronDestinationDir(appOutDir)
⇒ String
@@ -782,7 +2361,6 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
.generateName2(ext, classifier, deployment)
⇒ String
-.getIconPath()
⇒ Promise< | String>
.getMacOsResourcesDir(appOutDir)
⇒ String
.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
.resolveIcon(sources, fallbackSources, outputFormat)
⇒ Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>
@@ -792,8 +2370,84 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
+
+winPackager.createTargets(targets, mapper)
+Overrides: createTargets
+
+
+
+Param |
+Type |
+
+
+
+
+targets |
+Array<String> |
+
+
+mapper |
+callback |
+
+
+
+
+winPackager.getIconPath()
⇒ Promise< | String>
+Overrides: getIconPath
+
+winPackager.sign(file, logMessagePrefix)
⇒ Promise<Boolean>
+
+
+
+Param |
+Type |
+
+
+
+
+file |
+String |
+
+
+logMessagePrefix |
+String |
+
+
+
+
+winPackager.signAndEditResources(file, arch, outDir, internalName, requestedExecutionLevel)
⇒ Promise<void>
+
+
+
+Param |
+Type |
+
+
+
+
+file |
+String |
+
+
+arch |
+Arch |
+
+
+outDir |
+String |
+
+
+internalName |
+String | “undefined” |
+
+
+requestedExecutionLevel |
+“asInvoker” | “highestAvailable” | “requireAdministrator” | “undefined” |
+
+
+
-
+
@@ -813,7 +2467,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)
⇒ null
| String
@@ -848,30 +2502,10 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
-
-
-
-
-Param |
-Type |
-
-
-
-
-targets |
-Array<String> |
-
-
-mapper |
-callback |
-
-
-
-
+winPackager.getDefaultFrameworkIcon()
⇒ null
| String
-
+winPackager.dispatchArtifactCreated(file, target, arch, safeArtifactName)
⇒ Promise<void>
@@ -899,7 +2533,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.getElectronDestinationDir(appOutDir)
⇒ String
@@ -915,7 +2549,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.getElectronSrcDir(dist)
⇒ String
@@ -931,7 +2565,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)
⇒ String
@@ -955,7 +2589,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)
⇒ String
@@ -991,7 +2625,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.expandMacro(pattern, arch, extra, isProductNameSanitized)
⇒ String
@@ -1019,7 +2653,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.generateName2(ext, classifier, deployment)
⇒ String
@@ -1042,10 +2676,8 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
-
-
+winPackager.getMacOsResourcesDir(appOutDir)
⇒ String
@@ -1061,7 +2693,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.pack(outDir, arch, targets, taskManager)
⇒ Promise<any>
@@ -1089,7 +2721,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+
@@ -1113,7 +2745,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.getResource(custom, names)
⇒ Promise< | String>
@@ -1133,7 +2765,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.getResourcesDir(appOutDir)
⇒ String
@@ -1149,7 +2781,7 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
+winPackager.getTempFile(suffix)
⇒ Promise<String>
@@ -1164,70 +2796,6 @@ return path.join(target.outDir, __${target.name}-${getArtifactArchName(arc
-
-PublishManager ⇐ module:packages/electron-publish/out/publisher.PublishContext
-Kind: class of app-builder-lib
-Extends: module:packages/electron-publish/out/publisher.PublishContext
-Properties
-
-isPublish
= false
Boolean
-progress
= (process.stdout as TtyWriteStream).isTTY ? new MultiProgress() : null
MultiProgress
-
-Methods
-
-- .PublishManager ⇐
module:packages/electron-publish/out/publisher.PublishContext
-
-
-
-
-publishManager.awaitTasks()
⇒ Promise<void>
-
-publishManager.cancelTasks()
-
-publishManager.getGlobalPublishConfigurations()
⇒ Promise< | Array>
-
-Target
-Kind: class of app-builder-lib
-Properties
-
-Methods
-
-
-target.build(appOutDir, arch)
⇒ Promise<any>
-
-
-
-Param |
-Type |
-
-
-
-
-appOutDir |
-String |
-
-
-arch |
-Arch |
-
-
-
-
-target.finishBuild()
⇒ Promise<any>
app-builder-lib.build(options, packager)
⇒ Promise<Array<String>>
Kind: method of app-builder-lib
diff --git a/packages/app-builder-lib/src/electron/ElectronFramework.ts b/packages/app-builder-lib/src/electron/ElectronFramework.ts
index d47c64bf186..3c5c467439b 100644
--- a/packages/app-builder-lib/src/electron/ElectronFramework.ts
+++ b/packages/app-builder-lib/src/electron/ElectronFramework.ts
@@ -7,7 +7,7 @@ import { Configuration } from "../configuration"
import { BeforeCopyExtraFilesOptions, Framework, PrepareApplicationStageDirectoryOptions } from "../Framework"
import { Packager, Platform } from "../index"
import { LinuxPackager } from "../linuxPackager"
-import MacPackager from "../macPackager"
+import { MacPackager } from "../macPackager"
import { getTemplatePath } from "../util/pathManager"
import { createMacApp } from "./electronMac"
import { computeElectronVersion, getElectronVersionFromInstalled } from "./electronVersion"
diff --git a/packages/app-builder-lib/src/electron/electronMac.ts b/packages/app-builder-lib/src/electron/electronMac.ts
index 960d3271a09..419ebbf6c94 100644
--- a/packages/app-builder-lib/src/electron/electronMac.ts
+++ b/packages/app-builder-lib/src/electron/electronMac.ts
@@ -5,7 +5,7 @@ import { rename, utimes } from "fs/promises"
import * as path from "path"
import { filterCFBundleIdentifier } from "../appInfo"
import { AsarIntegrity } from "../asar/integrity"
-import MacPackager from "../macPackager"
+import { MacPackager } from "../macPackager"
import { normalizeExt } from "../platformPackager"
import { executeAppBuilderAndWriteJson, executeAppBuilderAsJson } from "../util/appBuilder"
import { createBrandingOpts } from "./ElectronFramework"
diff --git a/packages/app-builder-lib/src/frameworks/LibUiFramework.ts b/packages/app-builder-lib/src/frameworks/LibUiFramework.ts
index f60c16530fe..e8137e8d7f3 100644
--- a/packages/app-builder-lib/src/frameworks/LibUiFramework.ts
+++ b/packages/app-builder-lib/src/frameworks/LibUiFramework.ts
@@ -6,7 +6,7 @@ import { AfterPackContext } from "../configuration"
import { Platform } from "../core"
import { Framework, PrepareApplicationStageDirectoryOptions } from "../Framework"
import { LinuxPackager } from "../linuxPackager"
-import MacPackager from "../macPackager"
+import { MacPackager } from "../macPackager"
import { executeAppBuilderAndWriteJson } from "../util/appBuilder"
export class LibUiFramework implements Framework {
diff --git a/packages/app-builder-lib/src/index.ts b/packages/app-builder-lib/src/index.ts
index c43805afee4..b47c3add6a2 100644
--- a/packages/app-builder-lib/src/index.ts
+++ b/packages/app-builder-lib/src/index.ts
@@ -39,6 +39,7 @@ export { SnapOptions, PlugDescriptor, SlotDescriptor } from "./options/SnapOptio
export { Metadata, AuthorMetadata, RepositoryInfo } from "./options/metadata"
export { AppInfo } from "./appInfo"
export { SquirrelWindowsOptions } from "./options/SquirrelWindowsOptions"
+
export { CustomMacSign, CustomMacSignOptions } from "./macPackager"
export {
WindowsSignOptions,
@@ -54,6 +55,9 @@ export { PublishManager } from "./publish/PublishManager"
export { PlatformPackager } from "./platformPackager"
export { Framework, PrepareApplicationStageDirectoryOptions } from "./Framework"
export { buildForge, ForgeOptions } from "./forge-maker"
+export { LinuxPackager } from "./linuxPackager"
+export { WinPackager } from "./winPackager"
+export { MacPackager } from "./macPackager"
const expectedOptions = new Set(["publish", "targets", "mac", "win", "linux", "projectDir", "platformPackagerFactory", "config", "effectiveOptionComputed", "prepackaged"])
diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts
index e4e4fdf625e..b8dc19f27e3 100644
--- a/packages/app-builder-lib/src/macPackager.ts
+++ b/packages/app-builder-lib/src/macPackager.ts
@@ -31,7 +31,7 @@ import {
export type CustomMacSignOptions = SignOptions
export type CustomMacSign = (configuration: CustomMacSignOptions, packager: MacPackager) => Promise
-export default class MacPackager extends PlatformPackager {
+export class MacPackager extends PlatformPackager {
readonly codeSigningInfo = new Lazy(() => {
const cscLink = this.getCscLink()
if (cscLink == null || process.platform !== "darwin") {
diff --git a/packages/app-builder-lib/src/packager.ts b/packages/app-builder-lib/src/packager.ts
index 5a22d018709..605a803eb60 100644
--- a/packages/app-builder-lib/src/packager.ts
+++ b/packages/app-builder-lib/src/packager.ts
@@ -473,7 +473,7 @@ export class Packager {
switch (platform) {
case Platform.MAC: {
- const helperClass = (await import("./macPackager")).default
+ const helperClass = (await import("./macPackager")).MacPackager
return new helperClass(this)
}
diff --git a/packages/app-builder-lib/src/targets/pkg.ts b/packages/app-builder-lib/src/targets/pkg.ts
index 70ca1bb2140..0e37981fb82 100644
--- a/packages/app-builder-lib/src/targets/pkg.ts
+++ b/packages/app-builder-lib/src/targets/pkg.ts
@@ -8,7 +8,7 @@ import * as path from "path"
import { filterCFBundleIdentifier } from "../appInfo"
import { findIdentity, Identity } from "../codeSign/macCodeSign"
import { Target } from "../core"
-import MacPackager from "../macPackager"
+import { MacPackager } from "../macPackager"
import { readdirSync } from "fs"
const certType = "Developer ID Installer"
diff --git a/packages/dmg-builder/src/dmg.ts b/packages/dmg-builder/src/dmg.ts
index 3504693b705..94b0eed8ac5 100644
--- a/packages/dmg-builder/src/dmg.ts
+++ b/packages/dmg-builder/src/dmg.ts
@@ -1,6 +1,6 @@
import { DmgOptions, Target } from "app-builder-lib"
import { findIdentity, isSignAllowed } from "app-builder-lib/out/codeSign/macCodeSign"
-import MacPackager from "app-builder-lib/out/macPackager"
+import { MacPackager } from "app-builder-lib/out/macPackager"
import { createBlockmap } from "app-builder-lib/out/targets/differentialUpdateInfoBuilder"
import { executeAppBuilderAsJson } from "app-builder-lib/out/util/appBuilder"
import { sanitizeFileName } from "app-builder-lib/out/util/filename"
diff --git a/packages/electron-builder/src/index.ts b/packages/electron-builder/src/index.ts
index e0d1a14ee07..dd42d19e68c 100644
--- a/packages/electron-builder/src/index.ts
+++ b/packages/electron-builder/src/index.ts
@@ -1,4 +1,4 @@
-export { getArchSuffix, Arch, archFromString } from "builder-util"
+export { getArchSuffix, Arch, archFromString, log } from "builder-util"
export { build, CliOptions, createTargets } from "./builder"
export {
TargetConfiguration,
@@ -63,6 +63,9 @@ export {
PublishManager,
PublishOptions,
ProgressInfo,
+ MacPackager,
+ WinPackager,
+ LinuxPackager,
} from "app-builder-lib"
export { buildForge, ForgeOptions } from "app-builder-lib"
export { CancellationToken } from "builder-util-runtime"
diff --git a/test/src/helpers/CheckingPackager.ts b/test/src/helpers/CheckingPackager.ts
index 8f6190449b3..79a5d43ad64 100644
--- a/test/src/helpers/CheckingPackager.ts
+++ b/test/src/helpers/CheckingPackager.ts
@@ -2,7 +2,7 @@ import { AsyncTaskManager } from "builder-util"
import { Arch, MacConfiguration, Packager, Target } from "electron-builder"
import SquirrelWindowsTarget from "electron-builder-squirrel-windows"
import { Identity } from "app-builder-lib/out/codeSign/macCodeSign"
-import MacPackager from "app-builder-lib/out/macPackager"
+import { MacPackager } from "app-builder-lib/out/macPackager"
import { DmgTarget } from "dmg-builder"
import { WinPackager } from "app-builder-lib/out/winPackager"
import { SignOptions as MacSignOptions } from "@electron/osx-sign/dist/cjs/types"