Class: MacPackager
Extends
Constructors
Constructor
new MacPackager(
info):MacPackager
Parameters
info
Returns
MacPackager
Overrides
Properties
appInfo
readonlyappInfo:AppInfo
Inherited from
codeSigningInfo
readonlycodeSigningInfo:MemoLazy<CreateKeychainOptions|null,CodeSigningInfo>
info
readonlyinfo:Packager
Inherited from
platform
readonlyplatform:Platform
Inherited from
platformSpecificBuildOptions
readonlyplatformSpecificBuildOptions:MacConfiguration
Inherited from
PlatformPackager.platformSpecificBuildOptions
Accessors
buildResourcesDir
Get Signature
get buildResourcesDir():
string
Returns
string
Inherited from
PlatformPackager.buildResourcesDir
compression
Get Signature
get compression():
CompressionLevel
Returns
Inherited from
config
Get Signature
get config():
Configuration
Returns
Inherited from
debugLogger
Get Signature
get debugLogger():
DebugLogger
Returns
DebugLogger
Inherited from
defaultTarget
Get Signature
get defaultTarget():
string[]
Returns
string[]
Overrides
PlatformPackager.defaultTarget
fileAssociations
Get Signature
get fileAssociations():
FileAssociation[]
Returns
Inherited from
PlatformPackager.fileAssociations
forceCodeSigning
Get Signature
get forceCodeSigning():
boolean
Returns
boolean
Inherited from
PlatformPackager.forceCodeSigning
packagerOptions
Get Signature
get packagerOptions():
PackagerOptions
Returns
Inherited from
PlatformPackager.packagerOptions
projectDir
Get Signature
get projectDir():
string
Returns
string
Inherited from
resourceList
Get Signature
get resourceList():
Promise<string[]>
Returns
Promise<string[]>
Inherited from
Methods
addElectronFuses()
addElectronFuses(
context,fuses):Promise<number>
Use AfterPackContext here to keep available for public API
Parameters
context
fuses
FuseConfig
Can be used in afterPack hook for custom fuse logic like below. It's an alternative approach if one wants to override electron-builder's @electron/fuses version
await context.packager.addElectronFuses(context, { ... })
Returns
Promise<number>
Inherited from
PlatformPackager.addElectronFuses
applyCommonInfo()
applyCommonInfo(
appPlist,contentsPath):Promise<void>
Parameters
appPlist
any
contentsPath
string
Returns
Promise<void>
artifactPatternConfig()
artifactPatternConfig(
targetSpecificOptions,defaultPattern):object
Parameters
targetSpecificOptions
TargetSpecificOptions | Nullish
defaultPattern
string | undefined
Returns
object
isUserForced
isUserForced:
boolean=!!userSpecifiedPattern
pattern
pattern:
string
Inherited from
PlatformPackager.artifactPatternConfig
computeAppOutDir()
protectedcomputeAppOutDir(outDir,arch):string
Parameters
outDir
string
arch
Returns
string
Inherited from
PlatformPackager.computeAppOutDir
computeSafeArtifactName()
computeSafeArtifactName(
suggestedName,ext,arch?,skipDefaultArch?,defaultArch?,safePattern?):string|null
Parameters
suggestedName
string | null
ext
string
arch?
Arch | null
skipDefaultArch?
boolean = true
defaultArch?
string
safePattern?
string = "${name}-${version}-${arch}.${ext}"
Returns
string | null
Inherited from
PlatformPackager.computeSafeArtifactName
createGetFileMatchersOptions()
createGetFileMatchersOptions(
outDir,arch,customBuildOptions):GetFileMatchersOptions
Parameters
outDir
string
arch
customBuildOptions
Returns
GetFileMatchersOptions
Inherited from
PlatformPackager.createGetFileMatchersOptions
createTargets()
createTargets(
targets,mapper):void
Parameters
targets
string[]
mapper
(name, factory) => void
Returns
void
Overrides
PlatformPackager.createTargets
createTransformerForExtraFiles()
protectedcreateTransformerForExtraFiles(packContext):FileTransformer|null
Parameters
packContext
Returns
FileTransformer | null
Inherited from
PlatformPackager.createTransformerForExtraFiles
doAddElectronFuses()
protecteddoAddElectronFuses(packContext):Promise<void>
Parameters
packContext
Returns
Promise<void>
Inherited from
PlatformPackager.doAddElectronFuses
doFlat()
protecteddoFlat(appPath,outFile,identity,keychain):Promise<any>
Parameters
appPath
string
outFile
string
identity
Identity
keychain
string | Nullish
Returns
Promise<any>
doGetCscPassword()
doGetCscPassword():
string|Nullish
Returns
string | Nullish
Inherited from
PlatformPackager.doGetCscPassword
doPack()
protecteddoPack(config):Promise<any>
Parameters
config
DoPackOptions<MacConfiguration>
Returns
Promise<any>
Overrides
doSign()
protecteddoSign(opts,customSignOptions,identity):Promise<void>
Parameters
opts
SignOptions
customSignOptions
identity
Identity | null
Returns
Promise<void>
doSignAfterPack()
protecteddoSignAfterPack(outDir,appOutDir,platformName,arch,platformSpecificBuildOptions,targets):Promise<void>
Parameters
outDir
string
appOutDir
string
platformName
arch
platformSpecificBuildOptions
targets
Target[]
Returns
Promise<void>
Inherited from
PlatformPackager.doSignAfterPack
expandArch()
expandArch(
pattern,arch?):string[]
Parameters
pattern
string
arch?
Arch | null
Returns
string[]
expandArtifactBeautyNamePattern()
expandArtifactBeautyNamePattern(
targetSpecificOptions,ext,arch?):string
Parameters
targetSpecificOptions
TargetSpecificOptions | Nullish
ext
string
arch?
Arch | null
Returns
string
Inherited from
PlatformPackager.expandArtifactBeautyNamePattern
expandArtifactNamePattern()
expandArtifactNamePattern(
targetSpecificOptions,ext,arch?,defaultPattern?,skipDefaultArch?,defaultArch?):string
Parameters
targetSpecificOptions
TargetSpecificOptions | Nullish
ext
string
arch?
Arch | null
defaultPattern?
string
skipDefaultArch?
boolean = true
defaultArch?
string
Returns
string
Inherited from
PlatformPackager.expandArtifactNamePattern
expandMacro()
expandMacro(
pattern,arch?,extra?,isProductNameSanitized?):string
Parameters
pattern
string
arch?
string | null
extra?
any = {}
isProductNameSanitized?
boolean = true
Returns
string
Inherited from
generateAssetCatalogData()
protectedgenerateAssetCatalogData(iconPath):Promise<AssetCatalogResult>
Parameters
iconPath
string
Returns
Promise<AssetCatalogResult>
Inherited from
PlatformPackager.generateAssetCatalogData
generateIcnsFromIcon()
generateIcnsFromIcon(
iconPath):Promise<string>
Parameters
iconPath
string
Returns
Promise<string>
Inherited from
PlatformPackager.generateIcnsFromIcon
generateName2()
generateName2(
ext,classifier,deployment):string
Parameters
ext
string | null
classifier
string | Nullish
deployment
boolean
Returns
string
Inherited from
PlatformPackager.generateName2
getCscLink()
getCscLink(
extraEnvName?):string|Nullish
Parameters
extraEnvName?
string | null
Returns
string | Nullish
Inherited from
getCscPassword()
getCscPassword():
string
Returns
string
Inherited from
PlatformPackager.getCscPassword
getDefaultFrameworkIcon()
getDefaultFrameworkIcon():
string|null
Returns
string | null
Inherited from
PlatformPackager.getDefaultFrameworkIcon
getElectronDestinationDir()
getElectronDestinationDir(
appOutDir):string
Parameters
appOutDir
string
Returns
string
Overrides
PlatformPackager.getElectronDestinationDir
getElectronSrcDir()
getElectronSrcDir(
dist):string
Parameters
dist
string
Returns
string
Overrides
PlatformPackager.getElectronSrcDir
getIconPath()
getIconPath():
Promise<string|null>
Returns
Promise<string | null>
Overrides
getMacOsElectronFrameworkResourcesDir()
getMacOsElectronFrameworkResourcesDir(
appOutDir):string
Parameters
appOutDir
string
Returns
string
Inherited from
PlatformPackager.getMacOsElectronFrameworkResourcesDir
getMacOsResourcesDir()
getMacOsResourcesDir(
appOutDir):string
Parameters
appOutDir
string
Returns
string
Inherited from
PlatformPackager.getMacOsResourcesDir
getOrConvertIcon()
protectedgetOrConvertIcon(format):Promise<string|null>
Parameters
format
IconFormat
Returns
Promise<string | null>
Inherited from
PlatformPackager.getOrConvertIcon
getResource()
getResource(
custom, ...names):Promise<string|null>
Parameters
custom
string | Nullish
names
...string[]
Returns
Promise<string | null>
Inherited from
getResourcesDir()
getResourcesDir(
appOutDir):string
Parameters
appOutDir
string
Returns
string
Inherited from
PlatformPackager.getResourcesDir
getTempFile()
getTempFile(
suffix):Promise<string>
Parameters
suffix
string
Returns
Promise<string>
Inherited from
notarizeIfProvided()
notarizeIfProvided(
appPath):Promise<void>
Parameters
appPath
string
Returns
Promise<void>
pack()
pack(
outDir,arch,targets,taskManager):Promise<void>
Parameters
outDir
string
arch
targets
Target[]
taskManager
AsyncTaskManager
Returns
Promise<void>
Overrides
packageInDistributableFormat()
protectedpackageInDistributableFormat(appOutDir,arch,targets,taskManager):void
Parameters
appOutDir
string
arch
targets
Target[]
taskManager
AsyncTaskManager
Returns
void
Inherited from
PlatformPackager.packageInDistributableFormat
prepareAppInfo()
protectedprepareAppInfo(appInfo):AppInfo
Parameters
appInfo
Returns
Overrides
PlatformPackager.prepareAppInfo
resolveIcon()
resolveIcon(
sources,fallbackSources,outputFormat):Promise<IconInfo[]>
Parameters
sources
string[]
fallbackSources
string[]
outputFormat
IconFormat
Returns
Promise<IconInfo[]>
Inherited from
signApp()
protectedsignApp(packContext,isAsar):Promise<boolean>
Parameters
packContext
isAsar
boolean
Returns
Promise<boolean>