Any Linux Target
The top-level linux key contains set of options instructing electron-builder on how it should build Linux targets. These options applicable for any Linux target.
Base Linux Configuration¶
Electron-Builder / app-builder-lib / LinuxConfiguration
Extends¶
Properties¶
appId?¶
readonlyoptionalappId:null|string
The application id. Used as CFBundleIdentifier for MacOS and as Application User Model ID for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
Default¶
com.electron.${name}
Inherited from¶
PlatformSpecificBuildOptions.appId
artifactName?¶
readonlyoptionalartifactName:null|string
The artifact file name template. Defaults to ${productName}-${version}.${ext} (some target can have other defaults, see corresponding options).
Inherited from¶
PlatformSpecificBuildOptions.artifactName
asar?¶
readonlyoptionalasar:null|boolean|AsarOptions
Whether to package the application’s source code into an archive, using Electron’s archive format.
Node modules, that must be unpacked, will be detected automatically, you don’t need to explicitly set asarUnpack - please file an issue if this doesn’t work.
Default¶
true
Inherited from¶
PlatformSpecificBuildOptions.asar
asarUnpack?¶
readonlyoptionalasarUnpack:null|string|string[]
A glob patterns relative to the app directory, which specifies which files to unpack when creating the asar archive.
Inherited from¶
PlatformSpecificBuildOptions.asarUnpack
category?¶
readonlyoptionalcategory:null|string
The application category.
Inherited from¶
compression?¶
readonlyoptionalcompression:null|CompressionLevel
The compression level. If you want to rapidly test build, store can reduce build time significantly. maximum doesn’t lead to noticeable size difference, but increase build time.
Default¶
normal
Inherited from¶
PlatformSpecificBuildOptions.compression
cscKeyPassword?¶
optionalcscKeyPassword:null|string
Inherited from¶
PlatformSpecificBuildOptions.cscKeyPassword
cscLink?¶
optionalcscLink:null|string
Inherited from¶
PlatformSpecificBuildOptions.cscLink
defaultArch?¶
readonlyoptionaldefaultArch:string
Inherited from¶
PlatformSpecificBuildOptions.defaultArch
description?¶
readonlyoptionaldescription:null|string
As description from application package.json, but allows you to specify different for Linux.
Inherited from¶
CommonLinuxOptions.description
desktop?¶
readonlyoptionaldesktop:null|LinuxDesktopFile
The Desktop file
Inherited from¶
detectUpdateChannel?¶
readonlyoptionaldetectUpdateChannel:boolean
Whether to infer update channel from application version pre-release components. e.g. if version 0.12.1-alpha.1, channel will be set to alpha. Otherwise to latest.
This does not apply to github publishing, which will never auto-detect the update channel.
Default¶
true
Inherited from¶
PlatformSpecificBuildOptions.detectUpdateChannel
disableDefaultIgnoredFiles?¶
optionaldisableDefaultIgnoredFiles:null|boolean
Whether to exclude all default ignored files(https://www.electron.build/contents#files) and options. Defaults to false.
Default¶
false
Inherited from¶
PlatformSpecificBuildOptions.disableDefaultIgnoredFiles
electronLanguages?¶
readonlyoptionalelectronLanguages:string|string[]
The electron locales to keep. By default, all Electron locales used as-is.
Inherited from¶
PlatformSpecificBuildOptions.electronLanguages
electronUpdaterCompatibility?¶
readonlyoptionalelectronUpdaterCompatibility:null|string
The electron-updater compatibility semver range.
Inherited from¶
PlatformSpecificBuildOptions.electronUpdaterCompatibility
executableArgs?¶
readonlyoptionalexecutableArgs:null|string[]
The executable parameters. Pass to executableName
Inherited from¶
CommonLinuxOptions.executableArgs
executableName?¶
readonlyoptionalexecutableName:null|string
The executable name. Defaults to productName.
Inherited from¶
PlatformSpecificBuildOptions.executableName
extraFiles?¶
optionalextraFiles:null|string|FileSet| (string|FileSet)[]
The same as extraResources but copy into the app’s content directory (Contents for MacOS, root directory for Linux and Windows).
Inherited from¶
PlatformSpecificBuildOptions.extraFiles
extraResources?¶
optionalextraResources:null|string|FileSet| (string|FileSet)[]
A glob patterns relative to the project directory, when specified, copy the file or directory with matching names directly into the app’s resources directory (Contents/Resources for MacOS, resources for Linux and Windows).
File patterns (and support for from and to fields) the same as for files.
Inherited from¶
PlatformSpecificBuildOptions.extraResources
fileAssociations?¶
readonlyoptionalfileAssociations:FileAssociation|FileAssociation[]
The file associations.
Inherited from¶
PlatformSpecificBuildOptions.fileAssociations
files?¶
optionalfiles:null|string|FileSet| (string|FileSet)[]
A glob patterns relative to the app directory, which specifies which files to include when copying files to create the package.
Defaults to:
[
"**/*",
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}",
"!.editorconfig",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}",
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}",
"!**/{appveyor.yml,.travis.yml,circle.yml}",
"!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}"
]
Development dependencies are never copied in any case. You don’t need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default.
Default pattern **/* is not added to your custom if some of your patterns is not ignore (i.e. not starts with !). package.json and **/node_modules/**/* (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don’t need to repeat it if you configure own patterns.
May be specified in the platform options (e.g. in the mac).
You may also specify custom source and destination directories by using FileSet objects instead of simple glob patterns.
[
{
"from": "path/to/source",
"to": "path/to/destination",
"filter": ["**/*", "!foo/*.js"]
}
]
You can use file macros in the from and to fields as well. from and to can be files and you can use this to rename a file while packaging.
Inherited from¶
PlatformSpecificBuildOptions.files
forceCodeSigning?¶
readonlyoptionalforceCodeSigning:boolean
Whether to fail if app will be not code signed.
Inherited from¶
PlatformSpecificBuildOptions.forceCodeSigning
generateUpdatesFilesForAllChannels?¶
readonlyoptionalgenerateUpdatesFilesForAllChannels:boolean
Please see Building and Releasing using Channels.
Default¶
false
Inherited from¶
PlatformSpecificBuildOptions.generateUpdatesFilesForAllChannels
icon?¶
readonlyoptionalicon:string
The path to icon set directory or one png file, relative to the build resources or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon. By default will be generated automatically based on the macOS icns file.
Overrides¶
PlatformSpecificBuildOptions.icon
maintainer?¶
readonlyoptionalmaintainer:null|string
The maintainer. Defaults to author.
mimeTypes?¶
readonlyoptionalmimeTypes:null|string[]
The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
Inherited from¶
protocols?¶
The URL protocol schemes.
Inherited from¶
PlatformSpecificBuildOptions.protocols
publish?¶
optionalpublish:Publish
Publisher configuration. See Auto Update for more information.
Inherited from¶
PlatformSpecificBuildOptions.publish
releaseInfo?¶
readonlyoptionalreleaseInfo:ReleaseInfo
The release info. Intended for command line usage:
-c.releaseInfo.releaseNotes="new features"
Inherited from¶
PlatformSpecificBuildOptions.releaseInfo
synopsis?¶
readonlyoptionalsynopsis:null|string
The short description.
Inherited from¶
target?¶
readonlyoptionaltarget:TargetConfigType
Target package type: list of AppImage, flatpak, snap, deb, rpm, freebsd, pacman, p5p, apk, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir.
electron-builder docker image can be used to build Linux targets on any platform.
Please do not put an AppImage into another archive like a .zip or .tar.gz.
Default¶
AppImage
Overrides¶
PlatformSpecificBuildOptions.target
vendor?¶
readonlyoptionalvendor:null|string
The vendor. Defaults to author.
Debian Package Options¶
The top-level deb key contains set of options instructing electron-builder on how it should build Debian package.
Electron-Builder / app-builder-lib / DebOptions
Extends¶
Properties¶
afterInstall?¶
readonlyoptionalafterInstall:null|string
File path to script to be passed to FPM for --after-install arg.
Inherited from¶
LinuxTargetSpecificOptions.afterInstall
afterRemove?¶
readonlyoptionalafterRemove:null|string
File path to script to be passed to FPM for --after-remove arg.
Inherited from¶
LinuxTargetSpecificOptions.afterRemove
appArmorProfile?¶
readonlyoptionalappArmorProfile:null|string
File path to custom AppArmor profile (Ubuntu 24+)
Inherited from¶
LinuxTargetSpecificOptions.appArmorProfile
artifactName?¶
readonlyoptionalartifactName:null|string
The artifact file name template.
Inherited from¶
LinuxTargetSpecificOptions.artifactName
category?¶
readonlyoptionalcategory:null|string
The application category.
Inherited from¶
LinuxTargetSpecificOptions.category
compression?¶
readonlyoptionalcompression:null|"gz"|"bzip2"|"xz"|"lzo"
The compression type.
Default¶
xz
Inherited from¶
LinuxTargetSpecificOptions.compression
depends?¶
readonlyoptionaldepends:null|string[]
Package dependencies.
If need to support Debian, libappindicator1 should be removed, it is deprecated in Debian.
If need to support KDE, gconf2 and gconf-service should be removed as it’s no longer used by GNOME.
Default¶
["libgtk-3-0", "libnotify4", "libnss3", "libxss1", "libxtst6", "xdg-utils", "libatspi2.0-0", "libuuid1", "libsecret-1-0"]
Overrides¶
LinuxTargetSpecificOptions.depends
description?¶
readonlyoptionaldescription:null|string
As description from application package.json, but allows you to specify different for Linux.
Inherited from¶
LinuxTargetSpecificOptions.description
desktop?¶
readonlyoptionaldesktop:null|LinuxDesktopFile
The Desktop file
Inherited from¶
LinuxTargetSpecificOptions.desktop
executableArgs?¶
readonlyoptionalexecutableArgs:null|string[]
The executable parameters. Pass to executableName
Inherited from¶
LinuxTargetSpecificOptions.executableArgs
fpm?¶
readonlyoptionalfpm:null|string[]
Advanced only The fpm options.
Example: ["--before-install=build/deb-preinstall.sh", "--after-upgrade=build/deb-postinstall.sh"]
Inherited from¶
LinuxTargetSpecificOptions.fpm
icon?¶
readonlyoptionalicon:string
Inherited from¶
LinuxTargetSpecificOptions.icon
maintainer?¶
readonlyoptionalmaintainer:null|string
Inherited from¶
LinuxTargetSpecificOptions.maintainer
mimeTypes?¶
readonlyoptionalmimeTypes:null|string[]
The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
Inherited from¶
LinuxTargetSpecificOptions.mimeTypes
packageCategory?¶
readonlyoptionalpackageCategory:null|string
The package category.
Overrides¶
LinuxTargetSpecificOptions.packageCategory
packageName?¶
readonlyoptionalpackageName:null|string
The name of the package.
Inherited from¶
LinuxTargetSpecificOptions.packageName
priority?¶
readonlyoptionalpriority:null|string
The Priority attribute.
publish?¶
optionalpublish:Publish
Inherited from¶
LinuxTargetSpecificOptions.publish
recommends?¶
readonlyoptionalrecommends:null|string[]
The recommended package dependencies.
Default¶
["libappindicator3-1"]
synopsis?¶
readonlyoptionalsynopsis:null|string
The short description.
Inherited from¶
LinuxTargetSpecificOptions.synopsis
vendor?¶
readonlyoptionalvendor:null|string
Inherited from¶
LinuxTargetSpecificOptions.vendor
All LinuxTargetSpecificOptions can be also specified in the deb to customize Debian package.
LinuxTargetSpecificOptions APK, FreeBSD, Pacman, P5P and RPM Options¶
The top-level apk, freebsd, pacman, p5p and rpm keys contains set of options instructing electron-builder on how it should build corresponding Linux target.
Electron-Builder / app-builder-lib / LinuxTargetSpecificOptions
Extends¶
Extended by¶
Properties¶
afterInstall?¶
readonlyoptionalafterInstall:null|string
File path to script to be passed to FPM for --after-install arg.
afterRemove?¶
readonlyoptionalafterRemove:null|string
File path to script to be passed to FPM for --after-remove arg.
appArmorProfile?¶
readonlyoptionalappArmorProfile:null|string
File path to custom AppArmor profile (Ubuntu 24+)
artifactName?¶
readonlyoptionalartifactName:null|string
The artifact file name template.
Inherited from¶
TargetSpecificOptions.artifactName
category?¶
readonlyoptionalcategory:null|string
The application category.
Inherited from¶
compression?¶
readonlyoptionalcompression:null|"gz"|"bzip2"|"xz"|"lzo"
The compression type.
Default¶
xz
depends?¶
readonlyoptionaldepends:null|string[]
Package dependencies.
rpm defaults to ["gtk3", "libnotify", "nss", "libXScrnSaver", "(libXtst or libXtst6)", "xdg-utils", "at-spi2-core", "(libuuid or libuuid1)"]
pacman defaults to ["c-ares", "ffmpeg", "gtk3", "http-parser", "libevent", "libvpx", "libxslt", "libxss", "minizip", "nss", "re2", "snappy", "libnotify", "libappindicator-gtk3"]
description?¶
readonlyoptionaldescription:null|string
As description from application package.json, but allows you to specify different for Linux.
Inherited from¶
CommonLinuxOptions.description
desktop?¶
readonlyoptionaldesktop:null|LinuxDesktopFile
The Desktop file
Inherited from¶
executableArgs?¶
readonlyoptionalexecutableArgs:null|string[]
The executable parameters. Pass to executableName
Inherited from¶
CommonLinuxOptions.executableArgs
fpm?¶
readonlyoptionalfpm:null|string[]
Advanced only The fpm options.
Example: ["--before-install=build/deb-preinstall.sh", "--after-upgrade=build/deb-postinstall.sh"]
icon?¶
readonlyoptionalicon:string
maintainer?¶
readonlyoptionalmaintainer:null|string
mimeTypes?¶
readonlyoptionalmimeTypes:null|string[]
The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
Inherited from¶
packageCategory?¶
readonlyoptionalpackageCategory:null|string
The package category.
packageName?¶
readonlyoptionalpackageName:null|string
The name of the package.
publish?¶
optionalpublish:Publish
Inherited from¶
synopsis?¶
readonlyoptionalsynopsis:null|string
The short description.
Inherited from¶
vendor?¶
readonlyoptionalvendor:null|string