diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 104ffa93..eac62189 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -121,47 +121,49 @@ a:hover
Introduction
NSIS 2 makes it is possible to create installers - with a custom user interface. The Modern UI is an interface like - the wizards of recent Windows versions.
+ with a custom user interface. The Modern UI is an interface with a + style 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.
+(Welcome, Finish, Start Menu) and a description area on the components + page. The interface and the graphics can be customized using the + provided settings. +Using the Modern UI macro's and language files, +writing scripts with a modern interface is easy. This document contains +information about writing Modern UI scripts and a reference of all +settings.
Important: Because the Modern UI has its own macro system, its own default settings and a lot of new features, the interface configuration works differently. So you -should not use commands like Icon, BrandingText etc. Read this document -for more info.
+should not use commands like Icon, BrandingText etc.Screenshots
How to use
-The Modern UI has a macro system, so most of the code - has already been written for you!
-The easiest way to use the Modern UI is to customize -one of the example scripts, but you can also -modify an existing script.
+The Modern UI has a macro system, so all the code the +control the interface has already been written for you.
+If you want to start a new Modern UI script or upgrade +an older script with the Classic UI, follow the steps below.
+Taking a look at the example scripts +will also help you to learn more about the Modern UI.
Note: If you want to add a double quote (") to a Modern UI string, you should always escape it ($\"), because the Modern UI macro's use " to separate parameters.
-To use the Modern UI in an existing script, you should -follow these steps:
1. Include the header file
!include "MUI.nsh"-
MUI.nsh is in the Include directory, so you don't have +
MUI.nsh is in the Include directory, so you don't have to specify a path.
2. Define the name and version of your software
!define MUI_PRODUCT "Your Software" !define MUI_VERSION "1.0"+
This information will be used inside the texts for the installer + interface.
3. Pages
-Insert the following macro's to set the pages you want to use
- and the order of the pages. You can insert custom Page commmands between
- the macro's to add custom pages.
+
Insert the following macro's to set the pages you want to use.
+ The pages will appear in the order you insert them in your script.
+ You can also insert custom Page commmands between the macro's to add custom pages.
More info about custom pages...
Example:
!insertmacro MUI_PAGE_COMPONENTS@@ -213,7 +215,7 @@ follow these steps:
MUI_COMPONENTSPAGE_NODESC
No description area.
Start Menu Folder Selection Page Settings
+Start Menu Folder Page Settings
If you did not disable the 'Do not create shortcuts' checkbox, put the script code to write the shortcuts between these macro's, @@ -312,15 +314,17 @@ follow these steps:
The icon of the installer.MUI_UNICON icon_file
The icon of the uninstaller.
Default: ${NSISDIR}\Contrib\Icons\modern-uninstall.ico
MUI_LICENSEBKCOLOR color: RRGGBB
- The background color for the license textbox.
Default: /windows
MUI_LICENSEBKCOLOR
+ (/windows | /grey | (color: RRGGBB))
+ The background color for the license textbox. Use /windows for the default text background (usually white).
+ Use the /grey for the standard window background (usually grey).
Default: /windows
MUI_CHECKBITMAP bitmap_file
The bitmap with images for the checks of the component select treeview.
Default: ${NSISDIR}\Contrib\Icons\modern.bmp
MUI_INSTALLCOLORS (/windows | (foreground color: RRGGBB)
- (background color: RRGGBB))
- The colors of the details screen. Use /windows instead of the colors to use the Windows
- colors (the default).
Default: /windows
MUI_INSTALLCOLORS (/windows |
+ (foreground color: RRGGBB) (background color: RRGGBB))
+ The colors of the details screen. Use /windows for the default colors.
+ Default: /windows
MUI_PROGRESSBAR ("" | colored | smooth)
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
Default: smooth
MUI_HEADERBITMAP bmp_file
@@ -354,7 +358,7 @@ follow these steps:
5. Define custom functions (optional)
If you want add your own code to functions inserted by the Modern UI (i.e. the .onGUIInit function and the page functions), create your - own function and let the Modern UI functions call them..
+ own function and let the Modern UI functions call them.6. Insert language files
Insert the Modern UI language files for the languages you are using:
@@ -395,6 +399,7 @@ follow these steps: MUI_FONTSTYLE_TITLE weight [/ITALIC] [/UNDERLINE] [/STRIKE]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:
@@ -428,11 +433,21 @@ FunctionEndMUI_LANGDLL_ALWAYSSHOW
Always show the language selection dialog, even if a language has been stored in the registry.
The language stored in the registry will be selected by default.
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. - If you don't want to use descriptions, use the modern3.exe UI.
+The descriptions of sections will be displayed on the + componens page, when the users hovers the mouse over a section. + If you don't want to use descriptions, use the MUI_COMPONENTSPAGE_NODESC + setting.
+To set a description for a section, you have to add an + additional parameter to the Section commmand with a name for the define + that should contain the section number:
++Section "Section Name 1" Section1 + ... +SectionEnd ++
Use these macro's to set the descriptions:
LangString DESC_Section1 ${LANG_ENGLISH} "Description of section 1." LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2." @@ -442,13 +457,6 @@ LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2." !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2) !insertmacro MUI_FUNCTIONS_DESCRIPTION_END-
Add an extra parameter to the Section command to -set the define with the section number:
--Section "Section Name 1" Section1 - ... -SectionEnd -
8. Reserve Files
If you are using BZIP2 compression, you might need to insert ReserveFile commands. More info...
@@ -556,7 +564,7 @@ ReserveFile "${NSISDIR}\Contrib\Icons\modern-header.bmp" ;Your header bitmap !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE ;Welcome- or Finish page !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions !insertmacro MUI_RESERVEFILE_LANGDLL ;LangDLL (language selection dialog) -!insertmacro MUI_RESERVEFILE_STARTMENU ;Start Menu folder selection page +!insertmacro MUI_RESERVEFILE_STARTMENU ;Start Menu Folder pageBasic: Basic.nsi
@@ -564,7 +572,7 @@ ReserveFile "${NSISDIR}\Contrib\Icons\modern-header.bmp" ;Your header bitmap
Multilanguage: MultiLanguage.nsi
Header bitmap: HeaderBitmap.nsi
Custom pages: InstallOptions.nsi
- Start Menu Folder selection: StartMenu.nsi
+ Start Menu Folder page: StartMenu.nsi
Customize the dialogs
To change elements on the dialogs, modify the @@ -603,7 +611,7 @@ MUI_CUSTOMFUNCTION_UNGUIINIT
Welcome Page
MUI_CUSTOMFUNCTION_WELCOME_PRE - You can write to the IO INI file of the page (ioSpecial.ini)
-MUI_CUSTOMFUNCTION_WELCOME_SHOW - $MUI_HWND contains HWND of Welcome dialog
+MUI_CUSTOMFUNCTION_WELCOME_SHOW - $MUI_HWND contains the HWND of the Welcome dialog
MUI_CUSTOMFUNCTION_WELCOME_LEAVE
@@ -630,7 +638,7 @@ MUI_CUSTOMFUNCTION_STARTMENU_PRE
MUI_CUSTOMFUNCTION_STARTMENU_LEAVE
-Install Files Page
+Install Page
MUI_CUSTOMFUNCTION_INSTFILES_PRE
MUI_CUSTOMFUNCTION_INSTFILES_SHOW
MUI_CUSTOMFUNCTION_INSTFILES_LEAVE
@@ -638,7 +646,7 @@ MUI_CUSTOMFUNCTION_INSTFILES_LEAVE
Finish Page
MUI_CUSTOMFUNCTION_FINISH_PRE - You can write to the IO INI file of the page (ioSpecial.ini)
-MUI_CUSTOMFUNCTION_FINISH_SHOW - $MUI_HWND contains HWND of Finish dialog
+MUI_CUSTOMFUNCTION_FINISH_SHOW - $MUI_HWND contains the HWND of the Finish dialog
MUI_CUSTOMFUNCTION_FINISH_LEAVE
@@ -652,7 +660,7 @@ MUI_UNCUSTOMFUNCTION_CONFIRM_SHOW
MUI_UNCUSTOMFUNCTION_CONFIRM_LEAVE
-Uninstaller - Uninstall Files Page
+Uninstaller - Uninstall Page
MUI_UNCUSTOMFUNCTION_INSTFILES_PRE
MUI_UNCUSTOMFUNCTION_INSTFILES_SHOW
MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE