NSIS选择页面
我最初想问的是如何在set文件中实现我所拥有的几个特性。我现在有两个问题。自从我弄明白了其他的一切,我就拍着自己的背:) 好的,下面是我想要的: 有没有可能让列表更高,这样就不会滚动?也 我们能把标题改成那样而不加复选框吗?(它们是单选按钮,标题是它们的分组) 我怎样才能在自定义页面中创建相同的内容,从而控制元素?(包括组件页面的鼠标移动功能) 谢谢你的关注,希望你能帮我把它编码出来 代码:(是的,我知道测试中不需要全部包含!购买我的应用程序,所以我只留下了它)验证和其他一些设置也没有完成,我只是得到一些示例。)NSIS选择页面,nsis,Nsis,我最初想问的是如何在set文件中实现我所拥有的几个特性。我现在有两个问题。自从我弄明白了其他的一切,我就拍着自己的背:) 好的,下面是我想要的: 有没有可能让列表更高,这样就不会滚动?也 我们能把标题改成那样而不加复选框吗?(它们是单选按钮,标题是它们的分组) 我怎样才能在自定义页面中创建相同的内容,从而控制元素?(包括组件页面的鼠标移动功能) 谢谢你的关注,希望你能帮我把它编码出来 代码:(是的,我知道测试中不需要全部包含!购买我的应用程序,所以我只留下了它)验证和其他一些设置也没有完成,我只
您不能在“内置组件”页面上组合单选按钮和复选标记,但可以将自己的自定义单选按钮.BMP文件与
一起使用!定义MUI\U组件页面检查位图“myradio.bmp”
您可以通过定义MUI_COMPONENTSPAGE_SMALLDESC
或MUI_COMPONENTSPAGE_NODESC
稍微自定义MUI组件页面,但如果需要更多,则必须使用复制和修改“…\NSIS\Contrib\UI\modern.exe”,并使用MUI_UI
应用此自定义UI
将components页面复制为自定义页面可能是可行的,但这需要大量的工作。nsDialogs对TreeView控件没有太多的支持,因此,如果您选择此方法,您将完全依靠自己。您不能在内置组件页面上组合单选按钮和复选标记,但您可以将自己的自定义单选按钮.BMP文件与
一起使用!定义MUI\U组件页面检查位图“myradio.bmp”
您可以通过定义MUI_COMPONENTSPAGE_SMALLDESC
或MUI_COMPONENTSPAGE_NODESC
稍微自定义MUI组件页面,但如果需要更多,则必须使用复制和修改“…\NSIS\Contrib\UI\modern.exe”,并使用MUI_UI
应用此自定义UI
将components页面复制为自定义页面可能是可行的,但这需要大量的工作。nsDialogs没有太多对TreeView控件的支持,因此如果您按照此路线进行操作,您几乎可以依靠自己
!include WinVer.nsh
!include LogicLib.nsh
!include x64.nsh
!include FileFunc.nsh
!include MUI.nsh
!include WinMessages.nsh
!include InstallOptions.nsh
!include Sections.nsh
!define MUI_COMPONENTSPAGE_TEXT_TOP "Please select the options that best match your setup and preferances."
!define MUI_COMPONENTSPAGE_TEXT_COMPLIST " "
!define MUI_PAGE_HEADER_TEXT "Setup Options"
!define MUI_PAGE_HEADER_SUBTEXT " "
!define MUI_COMPONENTSPAGE_smallDESC
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "English"
SectionGroup /e "!Sets" SetsTitle #Section Should be Radio Buttons
Section "Set 1" Set1
SectionEnd
Section /o "Set 2" Set2
SectionEnd
Section /o "Skip" SetSkip
SectionEnd
SectionGroupEnd
SubSection /e "!Setup" SetupTitle #Section Should be Radio Buttons
Section "Setup 1" setup1
SectionEnd
Section /o "Setup 2" setup2
SectionEnd
Section /o "None" setupNone
SectionEnd
SubSectionEnd
SubSection /e "!AutoLoad" ALTitle #Section Should be Radio Buttons
Section "Yes" ALYes
SectionEnd
Section /o "No" ALNo
SectionEnd
SubSectionEnd
SubSection /e "!Disable Feature" DFTitle #Section Should be Check Boxes
Section "Feature 1" DAF1
SectionEnd
Section "Feature 2" DAF2
SectionEnd
SubSectionEnd
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SetsTitle} "Sets Description"
!insertmacro MUI_DESCRIPTION_TEXT ${Set1} "Set1 Description"
!insertmacro MUI_DESCRIPTION_TEXT ${Set2} "Set2 Description"
!insertmacro MUI_DESCRIPTION_TEXT ${SetSkip} "SetNone Description"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Section -InstallSelectedOptions
${If} ${SectionIsSelected} ${set1}
MessageBox MB_OK|MB_USERICON|MB_TOPMOST "set1"
${endif}
${If} ${SectionIsSelected} ${set2}
MessageBox MB_OK|MB_USERICON|MB_TOPMOST "set2"
${endif}
${If} ${SectionIsSelected} ${setskip}
MessageBox MB_OK|MB_USERICON|MB_TOPMOST "setnone"
${endif}
${If} ${Setup1} == true
${endif}
SectionEnd
Function .onInit
StrCpy $1 ${set1} ; Group 1 - Option 1 is selected by default
StrCpy $2 ${setup1} ; Group 2 - Option 1 is selected by default
FunctionEnd
Function .onSelChange
!insertmacro StartRadioButtons $1
!insertmacro RadioButton ${set1}
!insertmacro RadioButton ${set2}
!insertmacro RadioButton ${setskip}
!insertmacro EndRadioButtons
!insertmacro StartRadioButtons $2
!insertmacro RadioButton ${setup1}
!insertmacro RadioButton ${setup2}
!insertmacro RadioButton ${setupNone}
!insertmacro EndRadioButtons
FunctionEnd