电子生成器自定义NSIS包含脚本宏不起作用

编程入门 行业动态 更新时间:2024-10-28 22:24:28
本文介绍了电子生成器自定义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包含脚本宏不起作用

本文发布于:2023-11-06 04:27:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1562716.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:生成器   自定义   脚本   不起作用   电子

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!