app builder lib.Interface.NsisWebOptions
Electron-Builder / app-builder-lib / NsisWebOptions
Web 安装程序选项。
继承自¶
属性¶
allowElevation?¶
readonly
optional
allowElevation:boolean
仅限辅助安装程序。 允许请求提升权限。如果为 false,用户将必须以提升的权限重新启动安装程序。
默认值¶
true
继承自¶
allowToChangeInstallationDirectory?¶
readonly
optional
allowToChangeInstallationDirectory:boolean
仅限辅助安装程序。 是否允许用户更改安装目录。
默认值¶
false
继承自¶
NsisOptions
.allowToChangeInstallationDirectory
appPackageUrl?¶
readonly
optional
appPackageUrl:null
|string
应用程序包下载 URL。 可选 — 默认情况下使用发布配置计算。
类似 https://example.com/download/latest
的 URL 允许 Web 安装程序与版本无关(安装程序将下载最新的应用程序包)。请注意 — 这是 完整 URL。
自定义 X-Arch
http 标头设置为 32
或 64
。
artifactName?¶
readonly
optional
artifactName:null
|string
工件文件名模板。默认为 ${productName} Web Setup ${version}.${ext}
。
覆盖¶
buildUniversalInstaller?¶
readonly
optional
buildUniversalInstaller:true
NsisOptions.buildUniversalInstaller
的覆盖。nsis-web 需要通用安装程序
默认值¶
true
覆盖¶
NsisOptions
.buildUniversalInstaller
createDesktopShortcut?¶
readonly
optional
createDesktopShortcut:boolean
|"always"
是否创建桌面快捷方式。如果要在重新安装时也重新创建(即使已被用户删除),请设置为 always
。
默认值¶
true
继承自¶
NsisOptions
.createDesktopShortcut
createStartMenuShortcut?¶
readonly
optional
createStartMenuShortcut:boolean
是否创建开始菜单快捷方式。
默认值¶
true
继承自¶
NsisOptions
.createStartMenuShortcut
customNsisBinary?¶
readonly
optional
customNsisBinary:null
|CustomNsisBinary
允许您提供自己的 makensis
,例如支持通过 LogSet 和 LogText 进行调试日志记录的版本。(日志记录还需要选项 debugLogging = true
)
继承自¶
deleteAppDataOnUninstall?¶
readonly
optional
deleteAppDataOnUninstall:boolean
仅限一键安装程序。 是否在卸载时删除应用程序数据。
默认值¶
false
继承自¶
NsisOptions
.deleteAppDataOnUninstall
displayLanguageSelector?¶
readonly
optional
displayLanguageSelector:boolean
是否显示语言选择对话框。不推荐(默认情况下将使用操作系统语言检测)。
默认值¶
false
继承自¶
NsisOptions
.displayLanguageSelector
guid?¶
readonly
optional
guid:null
|string
请参阅 GUID 与应用程序名称。
继承自¶
include?¶
readonly
optional
include:null
|string
NSIS 包含脚本的路径,用于自定义安装程序。默认为 build/installer.nsh
。请参阅 自定义 NSIS 脚本。
继承自¶
installerHeader?¶
readonly
optional
installerHeader:null
|string
仅限辅助安装程序。 MUI_HEADERIMAGE
,相对于 构建资源 或项目目录。
默认值¶
build/installerHeader.bmp
继承自¶
installerHeaderIcon?¶
readonly
optional
installerHeaderIcon:null
|string
仅限一键安装程序。 标题图标(进度条上方)的路径,相对于 构建资源 或项目目录。默认为 build/installerHeaderIcon.ico
或应用程序图标。
继承自¶
NsisOptions
.installerHeaderIcon
installerIcon?¶
readonly
optional
installerIcon:null
|string
安装程序图标的路径,相对于 构建资源 或项目目录。默认为 build/installerIcon.ico
或应用程序图标。
继承自¶
installerLanguages?¶
readonly
optional
installerLanguages:null
|string
|string
[]
安装程序语言(例如 en_US
、de_DE
)。仅在您了解自己在做什么以及为了什么目的时才更改。
继承自¶
NsisOptions
.installerLanguages
installerSidebar?¶
readonly
optional
installerSidebar:null
|string
仅限辅助安装程序。 MUI_WELCOMEFINISHPAGE_BITMAP
,相对于 构建资源 或项目目录。默认为 build/installerSidebar.bmp
或 ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp
。图像尺寸 164 × 314 像素。
继承自¶
language?¶
readonly
optional
language:null
|string
LCID Dec,默认为 1033
(英语 - 美国
)。
继承自¶
license?¶
readonly
optional
license:null
|string
EULA 许可文件路径。默认为 license.txt
或 eula.txt
(或大写变体)。除了 txt
,还支持 rtf
和 html
(不要忘记为链接使用 target="_blank"
)。
支持多种语言的许可文件 — 使用 lang 后缀(例如 _de
,_ru
)。例如,在构建资源中创建文件 license_de.txt
和 license_en.txt
。如果操作系统语言为德语,将显示 license_de.txt
。请参阅 语言代码到名称 的映射。
将根据用户操作系统语言选择合适的许可文件。
继承自¶
menuCategory?¶
readonly
optional
menuCategory:string
|boolean
是否为开始菜单快捷方式和程序文件目录创建子菜单。如果为 true
,将使用公司名称。或字符串值。
默认值¶
false
继承自¶
multiLanguageInstaller?¶
readonly
optional
multiLanguageInstaller:boolean
是否创建多语言安装程序。默认为 unicode
选项值。
继承自¶
NsisOptions
.multiLanguageInstaller
oneClick?¶
readonly
optional
oneClick:boolean
是否创建一键安装程序或辅助安装程序。
默认值¶
true
继承自¶
packElevateHelper?¶
readonly
optional
packElevateHelper:boolean
是否打包 elevate 可执行文件(如果使用按机器安装程序或将来可能使用,electron-updater 需要)。如果 perMachine
设置为 true
,则忽略。
默认值¶
true
继承自¶
perMachine?¶
readonly
optional
perMachine:boolean
是否为辅助安装程序显示安装模式安装程序页面(选择按机器或按用户)。或者安装是否始终对所有用户(按机器)进行。
如果 oneClick
为 true
(默认值):是否按所有用户(按机器)安装。
如果 oneClick
为 false
且 perMachine
为 true
:不显示安装模式安装程序页面,始终按机器安装。
如果 oneClick
为 false
且 perMachine
为 false
(默认值):显示安装模式安装程序页面。
默认值¶
false
继承自¶
preCompressedFileExtensions?¶
readonly
optional
preCompressedFileExtensions:null
|string
|string
[]
将不压缩的文件的文件扩展名。仅适用于 extraResources
和 extraFiles
文件。
默认值¶
[".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"]
继承自¶
NsisOptions
.preCompressedFileExtensions
publish?¶
optional
publish:Publish
继承自¶
removeDefaultUninstallWelcomePage?¶
readonly
optional
removeDefaultUninstallWelcomePage:boolean
仅限辅助安装程序。 删除默认的卸载欢迎页面。
默认值¶
false
继承自¶
NsisOptions
.removeDefaultUninstallWelcomePage
runAfterFinish?¶
readonly
optional
runAfterFinish:boolean
是否在完成后运行已安装的应用程序。对于辅助安装程序,将删除相应的复选框。
默认值¶
true
继承自¶
script?¶
readonly
optional
script:null
|string
NSIS 脚本的路径,用于自定义安装程序。默认为 build/installer.nsi
。请参阅 自定义 NSIS 脚本。
继承自¶
selectPerMachineByDefault?¶
readonly
optional
selectPerMachineByDefault:boolean
是否在安装模式安装程序页面上将按机器或按用户安装设置为默认选择。
默认值¶
false
继承自¶
NsisOptions
.selectPerMachineByDefault
shortcutName?¶
readonly
optional
shortcutName:null
|string
将用于所有快捷方式的名称。默认为应用程序名称。
继承自¶
unicode?¶
readonly
optional
unicode:boolean
是否创建 Unicode 安装程序。
默认值¶
true
继承自¶
uninstallDisplayName?¶
readonly
optional
uninstallDisplayName:string
控制面板中的卸载程序显示名称。
默认值¶
${productName} ${version}
继承自¶
NsisOptions
.uninstallDisplayName
uninstallerIcon?¶
readonly
optional
uninstallerIcon:null
|string
卸载程序图标的路径,相对于 构建资源 或项目目录。默认为 build/uninstallerIcon.ico
或应用程序图标。
继承自¶
uninstallerSidebar?¶
readonly
optional
uninstallerSidebar:null
|string
仅限辅助安装程序。 MUI_UNWELCOMEFINISHPAGE_BITMAP
,相对于 构建资源 或项目目录。默认为 installerSidebar
选项或 build/uninstallerSidebar.bmp
或 build/installerSidebar.bmp
或 ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp
继承自¶
NsisOptions
.uninstallerSidebar
warningsAsErrors?¶
readonly
optional
warningsAsErrors:boolean
如果 warningsAsErrors
为 true
(默认值):NSIS 会将警告视为错误。如果 warningsAsErrors
为 false
:NSIS 将允许警告。
默认值¶
true