使用 HM NSIS 编辑器处理 NSIS 中可选部分的小问题
我有一个简单的小问题:
根据 此处的文档 我应该有一个 可选部分应该允许用户勾选它,对吗?
我有这样的部分:
Section "SayHello"
DetailPrint "blah blah"
MessageBox MB_OK "hello"
SectionEnd
我尝试了各种组合和调整,但它从未显示为可选检查,无论如何,消息框每次都会执行。当然,如果我添加 /o
,它只会抛出消息框,但没有选项来检查它的开/关。
它只是让我吃了一点,我似乎不知道出了什么问题?
另外,各部分是否按照定义的顺序执行?
注意:我的整个代码是由 生成的HM NIS 编辑器 我刚刚运行了基本安装程序的向导并保存了脚本,然后,我添加了此部分。它还使用了现代用户界面。
谢谢
I have simple little problem:
According to the docs here I should have a optional section which should allow the user to check it off right?
I have a section like this:
Section "SayHello"
DetailPrint "blah blah"
MessageBox MB_OK "hello"
SectionEnd
I've tried all sorts of combinations and tweaks but it never shows up an as optional check, the message box just executes every time no matter what. Except of course if I add an /o
it just does throw the message box at all, but no option to check it on/off.
Its just eating me a little and I cannot seem to figure what is wrong?
Also, are sections executed in the order they are defined?
Note: My whole code, is generated by HM NIS editor I just ran the wizard for a basic installer and saved the script, then, I added this section. It also used Modern UI.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望能够切换部分,则需要在 instfiles 页面之前插入一个组件页面。
是的,各部分按照脚本中定义的顺序执行。
If you want the ability to toggle sections, you need to insert a components page before the instfiles page.
Yes, sections execute in the order they are defined in the script.