diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index fc14903d..9bda7389 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -2,7 +2,10 @@ NSIS Modern User Interface - VERSION HISTORY 1.64 - March 26, 2003 * Support for license page with checkbox or radiobuttons to let the -user accept the agreement or not + user accept the agreement or not +* Macro's for finish headers don't have to be inserted anymore +* Language preference stored when installation has completed, + no problems anymore when the users selects the wrong language * Language files have to be updated 1.63 - March 9, 2003 diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index a4f01e29..848e51e6 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -332,6 +332,7 @@ follow these steps:

Have a look at the language files for a complete list of all the string names.

+

Language selection dialog

If you want the installer to display a language selection dialog (have a look at the MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in .onInit:

@@ -342,25 +343,18 @@ Function .onInit FunctionEnd -

To customize the texts on the language selection dialog, define - MUI_TEXT_LANGDLL_WINDOWTITLE and MUI_TEXT_LANGDLL_INFO before inserting the macro.

-

If you want the installer to remember the users language - preference, define MUI_STARTMENUPAGE_REGISTRY_ROOT, MUI_STARTMENUPAGE_REGISTRY_KEY - and MUI_STARTMENUPAGE_REGISTRY_VALUENAME to set a registry key to store the - language. You can also use it in the uninstaller to display the right language. - Don't forget to remove this key in the uninstaller.

-

7. Insert the MUI_SECTIONS_FINISHHEADER macro

-

If you are not using a Finish page without - MUI_FINISHPAGE_NOAUTOCLOSEWINDOW and have not set AutoCloseWindow - to true, you should insert the MUI_SECTIONS_FINISHHEADER - after all the sections to display the finish header:

-
!insertmacro MUI_SECTIONS_FINISHHEADER
-

For the uninstaller, insert MUI_UNFINISHHEADER at the end of the -Uninstall section:

-
-!insertmacro MUI_UNFINISHHEADER
-
-

8. Set the descriptions for the sections

+

To customize the language selection dialog, use these defines:

+

MUI_LANGDLL_WINDOWTITLE
+ The window title of the language selection dialog.

+

MUI_LANGDLL_INFO
+ The text on the language selection dialog.

+

MUI_LANGDLL_REGISTRY_ROOT root
+ MUI_LANGDLL_REGISTRY_KEY key
+ MUI_LANGDLL_REGISTRY_VALUENAME value_name
+ The registry key to store the language. The users preference will be remembered. + You can also use it in the uninstaller to display the right language. Don't forget + to remove this key in the uninstaller.

+

7. Set the descriptions for the sections

Insert the description macro's to set the descriptions for the sections. These descriptions will be displayed on the component selection page, when the users hovers the mouse over a section. @@ -381,7 +375,7 @@ Section "Section Name 1" Section1 ... SectionEnd -

9. Reserve Files

+

8. Reserve Files

If you are using BZIP2 compression, you might need to insert ReserveFile commands. More info...

Custom pages

@@ -595,6 +589,9 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh index cd14944a..62a08fbd 100644 --- a/Contrib/Modern UI/System.nsh +++ b/Contrib/Modern UI/System.nsh @@ -270,36 +270,16 @@ !macro MUI_FINISHHEADER - !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE - !verbose 3 + !ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE + !insertmacro MUI_HEADER_TEXT $(MUI_TEXT_FINISH_TITLE) $(MUI_TEXT_FINISH_SUBTITLE) !endif - - ;Finish text on the header (white rectangle) - !insertmacro MUI_HEADER_TEXT $(MUI_TEXT_FINISH_TITLE) $(MUI_TEXT_FINISH_SUBTITLE) - - !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE - !verbose 4 - !endif - + !macroend !macro MUI_UNFINISHHEADER - - !ifndef MUI_MANUALVERBOSE - !verbose 3 - !endif - !define MUI_NOVERBOSE - - ;Finish text on the header (white rectangle) !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_FINISHED_TITLE) $(un.MUI_UNTEXT_FINISHED_SUBTITLE) - !undef MUI_NOVERBOSE - - !ifndef MUI_MANUALVERBOSE - !verbose 4 - !endif - !macroend !macro MUI_ABORTWARNING @@ -483,7 +463,6 @@ Abort !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME - WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE langdll_done: !endif @@ -493,6 +472,14 @@ !macroend +!macro MUI_LANGDLL_SAVELANGUAGE + + !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME + WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE + !endif + +!macroend + ;-------------------------------- ;PAGE COMMANDS @@ -833,24 +820,8 @@ !macro MUI_SECTIONS_FINISHHEADER - !ifndef MUI_MANUALVERBOSE - !verbose 3 - !endif - - !define MUI_NOVERBOSE - - Section "" - - ;Invisible section to display the Finish header - !insertmacro MUI_FINISHHEADER - - SectionEnd - - !undef MUI_NOVERBOSE - - !ifndef MUI_MANUALVERBOSE - !verbose 4 - !endif + ;1.63 compatibility + !error "Remove '!insertmacro MUI_SECTIONS_FINISHHEADER' from your script." !macroend @@ -1168,6 +1139,10 @@ !ifdef MUI_CUSTOMFUNCTION_INSTFILES_LEAVE Call "${MUI_CUSTOMFUNCTION_INSTFILES_LEAVE}" !endif + + !insertmacro MUI_FINISHHEADER + !insertmacro MUI_LANGDLL_SAVELANGUAGE + FunctionEnd !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE @@ -1534,10 +1509,10 @@ !endif Function "${PRE}" - !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE) !ifdef MUI_UNCUSTOMFUNCTION_CONFIRM_PRE Call "${MUI_UNCUSTOMFUNCTION_CONFIRM_PRE}" !endif + !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_INTRO_TITLE) $(un.MUI_UNTEXT_INTRO_SUBTITLE) FunctionEnd Function "${SHOW}" @@ -1565,10 +1540,10 @@ !endif Function ${PRE} - !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE) !ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_PRE Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_PRE}" !endif + !insertmacro MUI_HEADER_TEXT $(un.MUI_UNTEXT_UNINSTALLING_TITLE) $(un.MUI_UNTEXT_UNINSTALLING_SUBTITLE) FunctionEnd Function "${SHOW}" @@ -1581,6 +1556,7 @@ !ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE}" !endif + !insertmacro MUI_UNFINISHHEADER FunctionEnd !ifndef MUI_NOVERBOSE && MUI_MANUALVERBOSE @@ -1934,8 +1910,10 @@ !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_TITLE" !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_SUBTITLE" - !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE" - !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE" + !ifndef MUI_FINISHPAGE && MUI_FINISHPAGE_NOAUTOCLOSE + !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_TITLE" + !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_FINISH_SUBTITLE" + !endif !ifdef MUI_FINISHPAGE !insertmacro MUI_LANGUAGEFILE_NSISCOMMAND_MULTIPARAMETER "MiscButtonText" "MUI_TEXT_FINISH_BUTTON" '"" "" "" "${MUI_TEXT_FINISH_BUTTON}"' diff --git a/Examples/Modern UI/Basic.nsi b/Examples/Modern UI/Basic.nsi index 26eb7566..20f3e1b8 100644 --- a/Examples/Modern UI/Basic.nsi +++ b/Examples/Modern UI/Basic.nsi @@ -65,10 +65,6 @@ Section "modern.exe" SecCopyUI SectionEnd -;Display the Finish header -;Insert this macro after the sections if you are not using a finish page -!insertmacro MUI_SECTIONS_FINISHHEADER - ;-------------------------------- ;Descriptions @@ -89,8 +85,5 @@ Section "Uninstall" RMDir "$INSTDIR" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - - ;Display the Finish header - !insertmacro MUI_UNFINISHHEADER SectionEnd \ No newline at end of file diff --git a/Examples/Modern UI/HeaderBitmap.nsi b/Examples/Modern UI/HeaderBitmap.nsi index b8fe9e7e..3bfead3f 100644 --- a/Examples/Modern UI/HeaderBitmap.nsi +++ b/Examples/Modern UI/HeaderBitmap.nsi @@ -75,10 +75,6 @@ Section "modern.exe" SecCopyUI SectionEnd -;Display the Finish header -;Insert this macro after the sections if you are not using a finish page -!insertmacro MUI_SECTIONS_FINISHHEADER - ;-------------------------------- ;Descriptions @@ -100,7 +96,4 @@ Section "Uninstall" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - ;Display the Finish header - !insertmacro MUI_UNFINISHHEADER - SectionEnd \ No newline at end of file diff --git a/Examples/Modern UI/InstallOptions.nsi b/Examples/Modern UI/InstallOptions.nsi index 362ff5db..9d7cdce3 100644 --- a/Examples/Modern UI/InstallOptions.nsi +++ b/Examples/Modern UI/InstallOptions.nsi @@ -101,10 +101,6 @@ Section "modern.exe" SecCopyUI SectionEnd -;Display the Finish header -;Insert this macro after the sections if you are not using a finish page -!insertmacro MUI_SECTIONS_FINISHHEADER - ;-------------------------------- ;Descriptions @@ -152,7 +148,5 @@ Section "Uninstall" RMDir "$INSTDIR" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - - !insertmacro MUI_UNFINISHHEADER - + SectionEnd \ No newline at end of file diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi index 52d92830..25cece24 100644 --- a/Examples/Modern UI/MultiLanguage.nsi +++ b/Examples/Modern UI/MultiLanguage.nsi @@ -147,10 +147,6 @@ Section "modern.exe" SecCopyUI WriteUninstaller "$INSTDIR\Uninstall.exe" SectionEnd - -;Display the Finish header -;Insert this macro after the sections if you are not using a finish page -!insertmacro MUI_SECTIONS_FINISHHEADER ;-------------------------------- ;Installer Functions @@ -182,9 +178,6 @@ Section "Uninstall" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - ;Display the Finish header - !insertmacro MUI_UNFINISHHEADER - SectionEnd ;-------------------------------- diff --git a/Examples/Modern UI/StartMenu.nsi b/Examples/Modern UI/StartMenu.nsi index 9d9dc44a..894816b5 100644 --- a/Examples/Modern UI/StartMenu.nsi +++ b/Examples/Modern UI/StartMenu.nsi @@ -89,10 +89,6 @@ Section "modern.exe" SecCopyUI SectionEnd -;Display the Finish header -;Insert this macro after the sections if you are not using a finish page -!insertmacro MUI_SECTIONS_FINISHHEADER - ;-------------------------------- ;Descriptions @@ -125,7 +121,4 @@ Section "Uninstall" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - ;Display the Finish header - !insertmacro MUI_UNFINISHHEADER - SectionEnd \ No newline at end of file diff --git a/Examples/Modern UI/WelcomeFinish.nsi b/Examples/Modern UI/WelcomeFinish.nsi index 55a12721..73edf7f2 100644 --- a/Examples/Modern UI/WelcomeFinish.nsi +++ b/Examples/Modern UI/WelcomeFinish.nsi @@ -96,6 +96,4 @@ Section "Uninstall" DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}" - !insertmacro MUI_UNFINISHHEADER - SectionEnd \ No newline at end of file