我如何在其他部分做一个部分? [英] how I can do a section in other section?

查看:39
本文介绍了我如何在其他部分做一个部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在其他部分制作一个部分,我该怎么做?

I want to make a section in other section, how I can do this thing ?

Section  /o "Control System Toolbox"

     Section   "Communications Toolbox"
     SectionIn RO
FileWrite $9 "product=Control System Toolbox$\r$\n"
    AddSize 0
SectionEnd
FileWrite $9 "product=Control System Toolbox$\r$\n"
    AddSize 0
SectionEnd

推荐答案

您可以在节组中组织节.这些组无法执行代码,但您可以在其中放置隐藏部分:

You can organize sections in section groups. The groups cannot execute code but you can put hidden sections in them:

Page Components
Page InstFiles

SectionGroup /e "Main Component"

Section "" SID_MAIN
DetailPrint "Installing Main Component..."
SectionEnd

Section /o "Bonus feature" SID_BONUS
DetailPrint "Installing bonus Component..."
SectionEnd

SectionGroupEnd

!include Sections.nsh
!include LogicLib.nsh
Function .OnSelChange
${If} ${SectionIsSelected} ${SID_BONUS}
    !insertmacro SelectSection ${SID_MAIN} ; The main component is required when installing the bonus component
${EndIf}
FunctionEnd

这篇关于我如何在其他部分做一个部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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