我有一个包含两个部分的SectionGroup
SectionGroup /e "myGroup" GRPCONNECTOR
Section "sec32" SEC32
..
SectionEnd
Section "sec64" SEC64
..
SectionEnd
SectionGroupEnd
两者都显示在组件页面
中现在我想只显示SEC64部分,如果正在运行的操作系统是64位。 我该怎么办?
我尝试了常见的${if}${RunningX64}
,但在这里失败了。
答案 0 :(得分:0)
你走在正确的轨道上。使用x64.nsh中的宏来处理64位/ WoW内容以及Sections.nsh中的帮助程序宏来处理部分:
SectionGroup /e "myGroup" GRPCONNECTOR
Section "sec32" SEC32
SectionEnd
Section "sec64" SEC64 ; This must be placed before the usage of ${SEC64} in your .NSI file.
SectionEnd
SectionGroupEnd
!include x64.nsh
!include LogicLib.nsh
!include Sections.nsh
Function .onInit
${IfNot} ${RunningX64}
SectionSetText ${SEC64} "" ; Hide the section
!insertmacro UnselectSection ${SEC64} ; And uncheck it
${EndIf}
FunctionEnd
Page Components
Page InstFiles