Change the text of install folder page in NSIS

2019-07-23 22:58发布

问题:

I need to change the text on the "Choose Install Location" page of an NSIS installer to say that my program can not be installed in a directory containing spaces in the name.

What is the best way to change this text?

回答1:

!include MUI2.nsh
!define MUI_PAGE_HEADER_TEXT Foo
!define MUI_PAGE_HEADER_SUBTEXT Bar
!define MUI_DIRECTORYPAGE_TEXT_TOP Baz
!define MUI_DIRECTORYPAGE_TEXT_DESTINATION Bob
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE English

You might also want to check the path when the user is about to leave the page (In the page leave callback)...