diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 0536d3d8..9edf8a83 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -102,13 +102,14 @@ a:hover
Introduction
NSIS 2 makes it is possible to create installers -with a custom user interface.
-I made this interface with a modern wizard style, - like the wizards of recent Windows versions. This new interface - also features new graphics and a description area on the - component selection page.
-To use this new interface for your installer, you need - to add some code to your NSIS script. Read this document for more info!
+ with a custom user interface. The Modern UI is an interface like + the wizards of recent Windows versions. +This new interface also features new pages +(Welcome, Finish, Start Menu) and a description area on the component + selection page.
+Because of the macro system with support for plugins +and the special language files, writing scripts for the Modern UI is +easy. Read this document for more info.
Screenshots
All defines are optional, if you don't define - a page, the page won't be shown. If you don't define a value, - the Modern UI won't use that option.
+All defines are optional. If you don't define + a page or option, the page won't use or show it.
MUI_WELCOMEPAGE
Show the welcome page.
MUI_LICENSEPAGE
@@ -265,7 +265,7 @@ follow these steps:
!insertmacro MUI_SYSTEM
8. Insert custom pages (optional)
If you want to use custom pages (define MUI_CUSTOMPAGECOMMANDS - or MUI_UNCUSTOMPAGECOMMANDS!), insert them before inserting the language files.
+ or MUI_UNCUSTOMPAGECOMMANDS), insert them before inserting the language files.9. Insert language files
Insert the Modern UI language files for the languages you are using:
@@ -285,7 +285,7 @@ follow these steps: MultiLanguage.nsi example) use MUI_LANGDLL_PUSH to add the name of the language (in the language itself) to the stack:-!insertmacro MUI_LANGDLL_PUSH "English" ;Language file name in English+!insertmacro MUI_LANGDLL_PUSH "English" ;Parameter = Language file name in English
8. Insert the MUI_SECTIONS_FINISHHEADER macro
If you are not using a Finish page without defining MUI_FINISHPAGE_NOAUTOCLOSEWINDOW and have not set AutoCloseWindow @@ -293,7 +293,7 @@ follow these steps:
after all the sections to display the finish header:!insertmacro MUI_SECTIONS_FINISHHEADER
For the uninstaller, insert MUI_UNFINISHHEADER at the end of the -Uninstaller section:
+Uninstall section:!insertmacro MUI_UNFINISHHEADER@@ -324,7 +324,8 @@ insert ReserveFile commands. More info...
Custom page commands
If you want add custom pages to your installer, you should insert your -own page commands to set the order of the pages and the names of the page functions:
+own page commands to set the order of the pages and the names of the page functions. +For the normal Modern UI pages, insert one of the PAGECOMMAND macro's:LangString TEXT_IO_WINDOWTITLE ": Install Options Page Title" @@ -336,7 +337,7 @@ Page custom FunctionName $(TEXT_IO_WINDOWTITLE) ;A custom page !insertmacro MUI_PAGECOMMAND_INSTFILES !insertmacro MUI_PAGECOMMAND_FINISH-
This is also possible in the uninstaller:
+For the uninstaller:
LangString un.UNTEXT_IO_WINDOWTITLE ": Install Options Page Title" @@ -345,13 +346,14 @@ UninstPage custom un.FunctionName $(UNTEXT_IO_WINDOWTITLE) ;A custom page !insertmacro MUI_UNPAGECOMMAND_INSTFILES
Don't forget to define MUI_CUSTOMPAGECOMMANDS or -MUI_UNCUSTOMPAGECOMMANDS and to insert the Page commands before -on the right position.
+MUI_UNCUSTOMPAGECOMMANDS and to insert the Page commands on the +right position.Call Install Options
Have a look at the Install Options documentation for info about creating Install Options INI Files.
First, you need to extract your InstallOptions INI -File in the .onInit function (un.onInit for the uninstaller):
+File in the .onInit function (un.onInit for the uninstaller) using +the MUI_INSTALLOPTIONS_EXTRACT macro:Function .onInit !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioFile.ini" @@ -367,12 +369,13 @@ Function .onInit FunctionEnd
You can call Install Options in the function defined with the Page -or UninstPage command:
+or UninstPage command. Use the MUI_HEADER_TEXT macro to set the text in the +white box:LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title" LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle" -Function FunctionName +Function FunctionName ;FunctionName defined with Page command !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioFile.ini" FunctionEnd @@ -425,7 +428,7 @@ ReserveFile "ioFile.ini" ;Your own InstallOptions INI files !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;Welcome- or Finish page !insertmacro MUI_RESERVEFILE_INSTALLOPTION ;InstallOptions -!insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection page) +!insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection dialog)
Basic: Basic.nsi
@@ -524,9 +527,9 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
Example:
-!define MUI_CUSTOMFUNCTION_ONGUIINIT .ownGuiInit +!define MUI_CUSTOMFUNCTION_ONGUIINIT myGuiInit -Function .ownGUIInit +Function .myGUIInit ...your own code... FunctionEnd@@ -597,7 +600,7 @@ FunctionEnd
Please post questions at the NSIS Forum.
License
-Copyright © 2002 Joost Verburg +Copyright © 2002-2003 Joost Verburg This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages