electron - Electron Nsis-Web,如何更改工件名称

标签 electron nsis electron-builder electron-updater

如何使用自动更新程序更改nsis-web的工件名称?
默认情况下,Web安装程序的文件名为{appName} {version}-{arch}。{ext}

• building embedded block map  file=dist/nsis-web/app-1.0.0-ia32.nsis.7z
• building embedded block map  file=dist/nsis-web/app-1.0.0-x64.nsis.7z

我如何从这里删除版本控制?

应该是这样
• building embedded block map  file=dist/nsis-web/app-ia32.nsis.7z
• building embedded block map  file=dist/nsis-web/app-x64.nsis.7z

最佳答案

根据electron-build nsis build docs,您可以定义应用程序名称

artifactName String - The artifact file name template. Defaults to ${productName} Setup ${version}.${ext}



您可以在此处添加以下macros

${arch} — expanded to ia32, x64. If no arch, macro will be removed from your pattern with leading space, - and _ (so, you don’t need to worry and can reuse pattern).

${os} — expanded to mac, linux or win according to target platform. ${platform} — expanded to darwin, linux or win32 according to Node.js process.platform property.

${name} – package.json name.

${productName} — Sanitized product name.

${version}

${channel} — detected prerelease component from version (e.g. beta).

${env.ENV_NAME} — any environment variable.

关于electron - Electron Nsis-Web,如何更改工件名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61167439/

相关文章:

nsis - 在NSIS中使用 'ExecWait'时禁止Windows命令输出

electron - 我如何使 Electron 重建工作,以便可以使用sqlite3?

javascript - 如何从渲染器进程(浏览器窗口)添加 menuItem

electron - 如何在 github 的 Electron 框架中包含部分 html?

electron - Electron nsis Installer x 64不包括node_modules?

javascript - 如何使用环境变量构建不同的版本

node.js - 尝试将 Electron 更新程序添加到 Electron 项目时出现错误 TS2305 : Module '"http "' has no exported member ' OutgoingHttpHeaders'.

node.js - 打印 Node terminal/main.js日志到渲染器控制台(开发人员工具)

NSIS - 删除除一个文件之外的所有文件

electron - 如何从 Windows 上下文菜单启动 Electron-app