NSIS新手在这里。使用nsis v2.51和MUI2(现代UI 2)
如上所述,我的问题是即使我设置MUI_PAGE_HEADER_TEXT
定义,生成的安装程序也不会显示任何文本。 MUI_PAGE_HEADER_SUBTEXT
也是如此。但是,页面特定的文本定义正确显示。
这是演示此问题的最小NSIS脚本:
Name "Just for show"
OutFile "MuiText.exe"
!include "MUI2.nsh"
!define MUI_PAGE_HEADER_TEXT "AAAAAAA"
!define MUI_PAGE_HEADER_SUBTEXT "CHANGE MEEEEEEE! CHANGE MEEEEEEE!!!!"
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the directory where you want this fine program installed."
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Enter Directory"
!insertmacro MUI_PAGE_DIRECTORY
Section
SectionEnd
这是生成的安装程序的屏幕截图:
关于如何让文字显示的任何想法?谢谢。
答案 0 :(得分:2)
您必须使用MUI_LANGUAGE指定至少一种语言,否则UI无法正常工作:
!include "MUI2.nsh"
!define MUI_PAGE_HEADER_TEXT "AAAAAAA"
!define MUI_PAGE_HEADER_SUBTEXT "CHANGE MEEEEEEE! CHANGE MEEEEEEE!!!!"
!define MUI_DIRECTORYPAGE_TEXT_TOP "Please select the directory where you want this fine program installed."
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Enter Directory"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"