跳到内容

electron builder.Interface.NsisWebOptions

Electron-Builder / electron-builder / NsisWebOptions

Web 安装程序选项。

继承自

属性

allowElevation?

readonly optional allowElevation: boolean

仅限辅助安装程序。 允许请求提升权限。如果为 false,用户将需要使用提升的权限重新启动安装程序。

默认

true

继承自

NsisOptions.allowElevation


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 标头设置为 3264


artifactName?

readonly optional artifactName: null | string

文件构件名称模板。默认为 ${productName} Web Setup ${version}.${ext}

覆盖

NsisOptions.artifactName


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 进行调试日志记录的 makensis。(日志记录还需要选项 debugLogging = true

继承自

NsisOptions.customNsisBinary


deleteAppDataOnUninstall?

readonly optional deleteAppDataOnUninstall: boolean

仅限一键安装程序。 卸载时是否删除应用程序数据。

默认

false

继承自

NsisOptions.deleteAppDataOnUninstall


displayLanguageSelector?

readonly optional displayLanguageSelector: boolean

是否显示语言选择对话框。不建议(默认情况下将使用操作系统语言检测)。

默认

false

继承自

NsisOptions.displayLanguageSelector


guid?

readonly optional guid: null | string

请参阅 GUID 与应用程序名称

继承自

NsisOptions.guid


include?

readonly optional include: null | string

用于自定义安装程序的 NSIS include 脚本的路径。默认为 build/installer.nsh。请参阅 自定义 NSIS 脚本

继承自

NsisOptions.include


installerHeader?

readonly optional installerHeader: null | string

仅限辅助安装程序。 MUI_HEADERIMAGE,相对于构建资源或项目目录。

默认

build/installerHeader.bmp

继承自

NsisOptions.installerHeader


installerHeaderIcon?

readonly optional installerHeaderIcon: null | string

仅限一键安装程序。 标头图标的路径(在进度条上方),相对于构建资源或项目目录。默认为 build/installerHeaderIcon.ico 或应用程序图标。

继承自

NsisOptions.installerHeaderIcon


installerIcon?

readonly optional installerIcon: null | string

安装程序图标的路径,相对于构建资源或项目目录。默认为 build/installerIcon.ico 或应用程序图标。

继承自

NsisOptions.installerIcon


installerLanguages?

readonly optional installerLanguages: null | string | string[]

安装程序语言(例如 en_USde_DE)。仅在您了解自己在做什么以及为了什么时才更改。

继承自

NsisOptions.installerLanguages


installerSidebar?

readonly optional installerSidebar: null | string

仅限辅助安装程序。 MUI_WELCOMEFINISHPAGE_BITMAP,相对于构建资源或项目目录。默认为 build/installerSidebar.bmp${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp。图像尺寸 164 × 314 像素。

继承自

NsisOptions.installerSidebar


language?

readonly optional language: null | string

LCID Dec,默认为 1033英语 - 美国)。

继承自

NsisOptions.language


license?

readonly optional license: null | string

EULA 许可文件路径。默认为 license.txteula.txt(或大写变体)。除了支持 txtrtfhtml 外(不要忘记为链接使用 target="_blank")。

支持多种语言的许可文件 — 使用语言后缀(例如 _de_ru)。例如,在构建资源中创建文件 license_de.txtlicense_en.txt。如果操作系统语言是德语,将显示 license_de.txt。请参阅 语言代码到名称 的映射。

将由用户操作系统语言选择合适的许可文件。

继承自

NsisOptions.license


readonly optional menuCategory: string | boolean

是否为开始菜单快捷方式和程序文件目录创建子菜单。如果为 true,将使用公司名称。或字符串值。

默认

false

继承自

NsisOptions.menuCategory


multiLanguageInstaller?

readonly optional multiLanguageInstaller: boolean

是否创建多语言安装程序。默认为 unicode 选项值。

继承自

NsisOptions.multiLanguageInstaller


oneClick?

readonly optional oneClick: boolean

是否创建一键安装程序或辅助安装程序。

默认

true

继承自

NsisOptions.oneClick


packElevateHelper?

readonly optional packElevateHelper: boolean

是否打包 elevate 可执行文件(如果使用每机器安装程序或将来可能使用,则 electron-updater 需要)。如果 perMachine 设置为 true,则忽略。

默认

true

继承自

NsisOptions.packElevateHelper


perMachine?

readonly optional perMachine: boolean

是否为辅助安装程序显示安装模式安装程序页面(选择每机器或每用户)。或者安装是否始终针对所有用户(每机器)。

如果 oneClicktrue(默认):是否为所有用户安装(每机器)。

如果 oneClickfalseperMachinetrue:无安装模式安装程序页面,始终为每机器安装。

如果 oneClickfalseperMachinefalse(默认):安装模式安装程序页面。

默认

false

继承自

NsisOptions.perMachine


preCompressedFileExtensions?

readonly optional preCompressedFileExtensions: null | string | string[]

将不压缩的文件的文件扩展名。仅适用于 extraResourcesextraFiles 文件。

默认

[".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"]

继承自

NsisOptions.preCompressedFileExtensions


publish?

optional publish: Publish

继承自

NsisOptions.publish


removeDefaultUninstallWelcomePage?

readonly optional removeDefaultUninstallWelcomePage: boolean

仅限辅助安装程序。 删除默认的卸载欢迎页面。

默认

false

继承自

NsisOptions.removeDefaultUninstallWelcomePage


runAfterFinish?

readonly optional runAfterFinish: boolean

完成后是否运行已安装的应用程序。对于辅助安装程序,将删除相应的复选框。

默认

true

继承自

NsisOptions.runAfterFinish


script?

readonly optional script: null | string

用于自定义安装程序的 NSIS 脚本的路径。默认为 build/installer.nsi。请参阅 自定义 NSIS 脚本

继承自

NsisOptions.script


selectPerMachineByDefault?

readonly optional selectPerMachineByDefault: boolean

是否在安装模式安装程序页面上将每机器或每用户安装设置为默认选择。

默认

false

继承自

NsisOptions.selectPerMachineByDefault


shortcutName?

readonly optional shortcutName: null | string

将用于所有快捷方式的名称。默认为应用程序名称。

继承自

NsisOptions.shortcutName


unicode?

readonly optional unicode: boolean

是否创建 Unicode 安装程序

默认

true

继承自

NsisOptions.unicode


uninstallDisplayName?

readonly optional uninstallDisplayName: string

控制面板中的卸载程序显示名称。

默认

${productName} ${version}

继承自

NsisOptions.uninstallDisplayName


uninstallerIcon?

readonly optional uninstallerIcon: null | string

卸载程序图标的路径,相对于构建资源或项目目录。默认为 build/uninstallerIcon.ico 或应用程序图标。

继承自

NsisOptions.uninstallerIcon


uninstallerSidebar?

readonly optional uninstallerSidebar: null | string

仅限辅助安装程序。 MUI_UNWELCOMEFINISHPAGE_BITMAP,相对于构建资源或项目目录。默认为 installerSidebar 选项或 build/uninstallerSidebar.bmpbuild/installerSidebar.bmp${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp

继承自

NsisOptions.uninstallerSidebar


warningsAsErrors?

readonly optional warningsAsErrors: boolean

如果 warningsAsErrorstrue(默认):NSIS 会将警告视为错误。 如果 warningsAsErrorsfalse:NSIS 将允许警告。

默认

true

继承自

NsisOptions.warningsAsErrors