Archive: HOWTO: Upgrade from MUI pre-1.66 to 1.70


HOWTO: Upgrade from MUI pre-1.66 to 1.70
I just upgraded to NSIS 2.0 release, which ships with MUI 1.70. Much to my chagrin, my scripts were not working anymore.

I dug through the documentation, examples, and even System.nsh, and I think I isolated the problem.

The problem was inserting the MUI_LANGUAGE macro too early! (Note that there's nothing in the docs AFAIK that says anything about this).

So for example, this won't work:

--------------------------------------------------
!define MUI_VENDOR "Foo"
!define MUI_ICON foo.ico
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_COMPONENTSPAGE_NODESC
!insertmacro MUI_LANGUAGE "English"

#### Pages
!insertmacro MUI_PAGE_LICENSE "license.rtf"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
--------------------------------------------------
(the header image will be ignored and the NODESC will be ignored)
But this works:

--------------------------------------------------
!define MUI_VENDOR "Foo"
!define MUI_ICON foo.ico
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "header.bmp"
!define MUI_COMPONENTSPAGE_NODESC

#### Pages
!insertmacro MUI_PAGE_LICENSE "license.rtf"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"
--------------------------------------------------

Just thought I'd share this tidbit with anybody who might be struggling with the same issue.


Turns out that my old script (pre 1.66) had the

!insertmacro MUI_LANGUAGE "English"

at the end, too, but as I was bringing my script into 1.70 compliance, I moved some things around. It's quite possible that putting this macro up higher in the script would have broken 1.65 as well.

But if you're building a script and pulling your hair out wondering why your !defines are being ignored, check the placement of your language macro.