Skip to content

app builder lib.Class.PlatformPackager

Electron-Builder / app-builder-lib / PlatformPackager

Extended by

Type Parameters

DC extends PlatformSpecificBuildOptions

Constructors

new PlatformPackager()

protected new PlatformPackager<DC>(info, platform): PlatformPackager<DC>

Parameters

info: Packager

platform: Platform

Returns

PlatformPackager<DC>

Properties

appInfo

readonly appInfo: AppInfo


info

readonly info: Packager


platform

readonly platform: Platform


platformSpecificBuildOptions

readonly platformSpecificBuildOptions: DC

Accessors

buildResourcesDir

get buildResourcesDir(): string

Returns

string


compression

get compression(): CompressionLevel

Returns

CompressionLevel


config

get config(): Configuration

Returns

Configuration


debugLogger

get debugLogger(): DebugLogger

Returns

DebugLogger


defaultTarget

get abstract defaultTarget(): string[]

Returns

string[]


fileAssociations

get fileAssociations(): FileAssociation[]

Returns

FileAssociation[]


forceCodeSigning

get forceCodeSigning(): boolean

Returns

boolean


packagerOptions

get packagerOptions(): PackagerOptions

Returns

PackagerOptions


projectDir

get projectDir(): string

Returns

string


resourceList

get resourceList(): Promise<string[]>

Returns

Promise<string[]>

Methods

artifactPatternConfig()

artifactPatternConfig(targetSpecificOptions, defaultPattern): object

Parameters

targetSpecificOptions: undefined | null | TargetSpecificOptions

defaultPattern: undefined | string

Returns

object

isUserForced

isUserForced: boolean = !!userSpecifiedPattern

pattern

pattern: string


computeAppOutDir()

protected computeAppOutDir(outDir, arch): string

Parameters

outDir: string

arch: Arch

Returns

string


computeSafeArtifactName()

computeSafeArtifactName(suggestedName, ext, arch?, skipDefaultArch?, defaultArch?, safePattern?): null | string

Parameters

suggestedName: null | string

ext: string

arch?: null | Arch

skipDefaultArch?: boolean = true

defaultArch?: string

safePattern?: string = "${name}-${version}-${arch}.${ext}"

Returns

null | string


createGetFileMatchersOptions()

createGetFileMatchersOptions(outDir, arch, customBuildOptions): GetFileMatchersOptions

Parameters

outDir: string

arch: Arch

customBuildOptions: PlatformSpecificBuildOptions

Returns

GetFileMatchersOptions


createTargets()

abstract createTargets(targets, mapper): void

Parameters

targets: string[]

mapper

Returns

void


createTransformerForExtraFiles()

protected createTransformerForExtraFiles(packContext): null | FileTransformer

Parameters

packContext: PackContext

Returns

null | FileTransformer


dispatchArtifactCreated()

dispatchArtifactCreated(file, target, arch, safeArtifactName?): Promise<void>

Parameters

file: string

target: null | Target

arch: null | Arch

safeArtifactName?: null | string

Returns

Promise<void>


doGetCscPassword()

doGetCscPassword(): undefined | null | string

Returns

undefined | null | string


doPack()

protected doPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets, sign, disableAsarIntegrity): Promise<void>

Parameters

outDir: string

appOutDir: string

platformName: ElectronPlatformName

arch: Arch

platformSpecificBuildOptions: DC

targets: Target[]

sign: boolean = true

disableAsarIntegrity: boolean = false

Returns

Promise<void>


doSignAfterPack()

protected doSignAfterPack(outDir, appOutDir, platformName, arch, platformSpecificBuildOptions, targets): Promise<void>

Parameters

outDir: string

appOutDir: string

platformName: ElectronPlatformName

arch: Arch

platformSpecificBuildOptions: DC

targets: Target[]

Returns

Promise<void>


expandArtifactBeautyNamePattern()

expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch?): string

Parameters

targetSpecificOptions: undefined | null | TargetSpecificOptions

ext: string

arch?: null | Arch

Returns

string


expandArtifactNamePattern()

expandArtifactNamePattern(targetSpecificOptions, ext, arch?, defaultPattern?, skipDefaultArch?, defaultArch?): string

Parameters

targetSpecificOptions: undefined | null | TargetSpecificOptions

ext: string

arch?: null | Arch

defaultPattern?: string

skipDefaultArch?: boolean = true

defaultArch?: string

Returns

string


expandMacro()

expandMacro(pattern, arch?, extra?, isProductNameSanitized?): string

Parameters

pattern: string

arch?: null | string

extra?: any = {}

isProductNameSanitized?: boolean = true

Returns

string


generateName2()

generateName2(ext, classifier, deployment): string

Parameters

ext: null | string

classifier: undefined | null | string

deployment: boolean

Returns

string


getCscLink(extraEnvName?): undefined | null | string

Parameters

extraEnvName?: null | string

Returns

undefined | null | string


getCscPassword()

getCscPassword(): string

Returns

string


getDefaultFrameworkIcon()

getDefaultFrameworkIcon(): null | string

Returns

null | string


getElectronDestinationDir()

getElectronDestinationDir(appOutDir): string

Parameters

appOutDir: string

Returns

string


getElectronSrcDir()

getElectronSrcDir(dist): string

Parameters

dist: string

Returns

string


getIconPath()

getIconPath(): Promise<null | string>

Returns

Promise<null | string>


getMacOsResourcesDir()

getMacOsResourcesDir(appOutDir): string

Parameters

appOutDir: string

Returns

string


getOrConvertIcon()

protected getOrConvertIcon(format): Promise<null | string>

Parameters

format: IconFormat

Returns

Promise<null | string>


getResource()

getResource(custom, …names): Promise<null | string>

Parameters

custom: undefined | null | string

• …names: string[]

Returns

Promise<null | string>


getResourcesDir()

getResourcesDir(appOutDir): string

Parameters

appOutDir: string

Returns

string


getTempFile()

getTempFile(suffix): Promise<string>

Parameters

suffix: string

Returns

Promise<string>


pack()

pack(outDir, arch, targets, taskManager): Promise<any>

Parameters

outDir: string

arch: Arch

targets: Target[]

taskManager: AsyncTaskManager

Returns

Promise<any>


packageInDistributableFormat()

protected packageInDistributableFormat(appOutDir, arch, targets, taskManager): void

Parameters

appOutDir: string

arch: Arch

targets: Target[]

taskManager: AsyncTaskManager

Returns

void


prepareAppInfo()

protected prepareAppInfo(appInfo): AppInfo

Parameters

appInfo: AppInfo

Returns

AppInfo


resolveIcon()

resolveIcon(sources, fallbackSources, outputFormat): Promise<IconInfo[]>

Parameters

sources: string[]

fallbackSources: string[]

outputFormat: IconFormat

Returns

Promise<IconInfo[]>


signApp()

protected signApp(packContext, isAsar): Promise<boolean>

Parameters

packContext: PackContext

isAsar: boolean

Returns

Promise<boolean>