how I can do a section in other section?

馋奶兔 提交于 2019-12-12 03:45:31

问题


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

回答1:


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


来源:https://stackoverflow.com/questions/32093828/how-i-can-do-a-section-in-other-section

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!