电子生成器自定义NSIS包含脚本宏不起作用 [英] electron-builder custom NSIS include script macro not working

查看:106
本文介绍了电子生成器自定义NSIS包含脚本宏不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了 electron 桌面应用,并使用

I have created a electron desktop app and created a installer using electron-builder.

现在我想尝试像 customInstall customUnInstall

我的 installer.nsh 文件是

!macro customInstall
  MessageBox MB_OK "Test output 1"
!macroend

!macro customUnInstall
  MessageBox MB_OK "Test output 2"
!macroend

我的 electron-builder 配置是

"build": {
    "nsis": {
      "include": "installer.nsh"
    },
    "mac": {
      "icon": "build/icon.png"
    },
    "win": {
      "icon": "build/icon.png"
    }
  }

但这对我不起作用.我已经通过引入错误来确认 installer.nsh 是否可以正常工作.
我缺少使它正常工作的东西吗?

But this is not working for me. I have confirmed that installer.nsh is working by introducing error in that.
What I am missing to make it working?

推荐答案

目前,实际上一切正常.

Actually everything is working fine at this moment.

您的宏 customInstall customUnInstall 定义正确,但是没有从任何地方调用它们.

Your macros customInstall and customUnInstall are defined correctly, but they are not called from any place.

只需从相应的部分/功能/位置/情况/等调用.

Simply call them from appropriate section/function/place/situation/etc.

它们的执行完全取决于您,不会从脚本中自动调用它们.

Their execution depends entirely on you, there are no automatic call of them from script.

这篇关于电子生成器自定义NSIS包含脚本宏不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆