Archive: How to change the License page title and sub-title


How to change the License page title and sub-title
Hi, I wanted (and managed after some effort :)) to change the title texts on the license page...

"License Agreement" -- to --> "General Information" and the subtitle text
"Please review..." -- to --> "Read the general information and enjoy !!!".

I want to know if what I did is the right way to do it, or is there a better (correct ?) way of doing it ? :(

This is what I did...

in my script:
--- code ---
.
.
.
!define MUI_TEXT_LICENSE_TITLE "General Information"
!define MUI_TEXT_LICENSE_SUBTITLE "Read the general information and enjoy !!!"

;befor
!insertmacro MUI_LANGUAGE "English"
.
.
.
--- code ---

I did the following changes to the file "English.nsh"

--- code ---
.
.
.
!ifndef MUI_TEXT_LICENSE_TITLE <-- my change
!define MUI_TEXT_LICENSE_TITLE "License Agreement"
!endif <-- my change

!ifndef MUI_TEXT_LICENSE_SUBTITLE <-- my change
!define MUI_TEXT_LICENSE_SUBTITLE "Please review the license terms before installing $(^NameDA)."
!endif <-- my change
.
.
.
---- code ---

:) :(


You only have to define MUI_PAGE_HEADER_TEXT and
MUI_PAGE_HEADER_SUBTEXT before inserting the page macro, there is no need to modify any language files.


I have tried and I just can't change it without changing the language file too. Here's my code:

; Load up the Individual Wizard Screens
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "..\$(AppName)_${APPVERSION}\readme.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

; Load up the Uninstall Wizard Screens
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

; Set languages (first is default language)
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_RESERVEFILE_LANGDLL

; Change the Defult License Agreement to Look like a Readme Dialog
!define MUI_TEXT_LICENSE_TITLE "Readme File"
!define MUI_TEXT_LICENSE_SUBTITLE "Please review the readme file before installing $(^NameDA)."
!define MUI_INNERTEXT_LICENSE_TOP "Press Page Down to see the rest of the readme file."
!define MUI_INNERTEXT_LICENSE_BOTTOM "When you have finished reading, click on Next to start installing."
When I compile with this code it ignores the changes and sticks in the default code. When I place the !insertmacro MUI_LANGUAGE "English" after the updated !define statements then I get a notice that the variable is already defined.

I have tried placing the block in different positions and can't get it to work. Is there a bug or is it my code.

Yeah I've had a similar problem too with this sort of thing. Language defines being ignored or erroring, depending on whether the define is before the page macro or after.

I got bored of it and started making custom language files instead.


You only have to define MUI_PAGE_HEADER_TEXT and
MUI_PAGE_HEADER_SUBTEXT before inserting the page macro, there is no need to modify any language files.
Did anybody read Joost's post?
before inserting the page macro

When I move it to before the page insert I get lots of lines about LangString "MUI_UNTEXT_FINISH_TITLE" is not set in language table of language English, etc.

When I move the !insertmacro MUI_LANGUAGE "English" line after the page macro it gives me the line about !define: "MUI_TEXT_LICENSE_TITLE" already defined!.

When I paste the code in as per this post As per post http://forums.winamp.com/showthread....readid=246754. I get the !define: "MUI_TEXT_LICENSE_TITLE" already defined! too.


You're right, you should make it like this:
!define MUI_PAGE_HEADER_TEXT "Readme File"
!define MUI_PAGE_HEADER_SUBTEXT "Please review the readme file before installing $(^NameDA)."
!define MUI_LICENSEPAGE_TEXT_TOP "Press Page Down to see the rest of the readme file."
!define MUI_LICENSEPAGE_TEXT_BOTTOM "When you have finished reading, click on Next to start installing."


That works. You are cool. Thanks for the help.

Can you tell me if this is a change or was I always wrong?


It is because we both did not read documentation carefully :-)


Originally posted by RobGrant
depending on whether the define is before the page macro or after.
Originally posted by Red Wine
Did anybody read Joost's post?
before inserting the page macro
Yep! :)

I had read some threats on this subject to get a solution.

Thanks to RedWine, he confirmed that it is not my fault but a bug in NSIS

I tried to make a "clean" License Page but i couldn get rid of the Line:
"If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(^NameDA)."

thats because it is not possible to do a "" with MUI_LICENSEPAGE_TEXT_BOTTOM

to make it clear- this does NOT work:

!define MUI_PAGE_HEADER_TEXT "blah"
!define MUI_PAGE_HEADER_SUBTEXT ""
!define MUI_LICENSEPAGE_TEXT_TOP ""
!define MUI_LICENSEPAGE_TEXT_BOTTOM ""


and this does work! (space sign)

...
!define MUI_LICENSEPAGE_TEXT_BOTTOM " "



i just want to mention it for other users...
bye

This is not a bug, but a feature. MUI uses LicenseText underneath which states:

The default string will be used if a string is empty ("").
I suppose a note in the MUI readme wouldn't hurt though.

Stu