diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 3a78e90e..17d394ea 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -125,7 +125,7 @@ with a custom user interface.

scripts, but you can also modify an existing script.

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.

-

How to use the Modern UI in an existing script:

+

How to use the Modern UI in an existing scrip (in order, from the beginning of the script):

1. Include the header file

!include "${NSISDIR}\Contrib\Modern UI\System.nsh"

2. Define the name and version of your software

@@ -160,7 +160,7 @@ you should always escape it ($\"), because the Modern UI macro's use " You cannot use this variable in your script (or you should Push/Pop it) if you are using the Start Menu Folder selection page.

MUI_STARTMENU_DEFAULTFOLDER
- The default start menu Folder. Define $(LANGSTRINGNAME) is you want + The default start menu Folder. Use $(LANGSTRINGNAME) as value is you want to use a language string.

MUI_FINISHPAGE
Show the Finish page.

@@ -172,7 +172,8 @@ you should always escape it ($\"), because the Modern UI macro's use " quotes ($\") in the value.

MUI_FINISHPAGE_SHOWREADME
File which the user can select to view (using a checkbox). - You don't need to put quotes around the value when it contains spaces.

+ You don't need to put quotes around the value when it contains spaces. + Use $(LANGSTRINGNAME) as value is you want to use a language string.

MUI_FINISHPAGE_NOAUTOCLOSE
Do not automatically jump to the finish page, to allow the user to check the log.

@@ -251,32 +252,30 @@ you should always escape it ($\"), because the Modern UI macro's use "

If you are not using a Finish page, you should insert the MUI_SECTIONS_FINISHHEADER after all the sections to display the finish-header.

!insertmacro MUI_SECTIONS_FINISHHEADER
-

In the uninstaller, insert MUI_UNFINISHHEADER at the end of the +

For the uninstaller, insert MUI_UNFINISHHEADER at the end of the Unintaller section.

 !insertmacro MUI_UNFINISHHEADER
 

8. Set the descriptions for the sections

Insert the description macro's to set the descriptions - for the sections. These descriptions will be displayed when the user - hovers the mouse over a component in the component-selection page:

+ 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.

-LangString DESC_SectionName1 ${LANG_ENGLISH} "Description of section 1."
-LangString DESC_SectionName2 ${LANG_ENGLISH} "Description of section 2."
+LangString DESC_Section1 ${LANG_ENGLISH} "Description of section 1."
+LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2."
 
 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
-  !insertmacro MUI_DESCRIPTION_TEXT ${SectionName1} $(DESC_SectionName1)
-  !insertmacro MUI_DESCRIPTION_TEXT ${SectionName2} $(DESC_SectionName2)
+  !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+  !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
 
-

Always set a name for a section:

+

Add an extra parameter to the Section command to +set a define with the section number:

-Section "Section Name 1" SectionName1
- ...
-SectionEnd
-
-Section "Section Name 2" SectionName2
- ...
+Section "Section Name 1" Section1
+  ...
 SectionEnd
 

Custom pages

@@ -306,20 +305,15 @@ UninstPage custom un.FunctionName $(UNTEXT_IO_WINDOWTITLE) ;A custom page

Don't forget to define MUI_CUSTOMPAGECOMMANDS or MUI_UNCUSTOMPAGECOMMANDS before inserting the MUI_SYSTEM macro.

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):

 Function .onInit
   !insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioFile.ini"
 FunctionEnd
-
-Function FunctionName
-  !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
-  !insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini"
-FunctionEnd
 
-

Have a look at the -Install Options documentation for info about creating Install Options INI Files.

You can call Install Options in the function defined with the Page or UninstPage command:

@@ -340,22 +334,21 @@ FunctionEnd
   

The interface

Different versions

-

There are three different versions of the interface - available. Modern.exe contains the dialogs of the standard interface. - If you have an installer with a lot of subsections - or long section names, use modern2.exe, which has a different - component-selection page. Use modern3.exe if you are not using - descriptions.

+

There are three different versions of the Modern UI. + Modern.exe contains the dialogs of the standard interface. + If you have an installer with a lot of subsections or long section + names, use modern2.exe, which has a different component-selection page. + Use modern3.exe if you are not using descriptions.

Customize the dialogs

-

To change elements on the dialogs, modify modern.exe or - modern2.exe in the Contrib\UIs directory using a resource editor such as +

To change elements on the dialogs, modify modern?.exe + in the Contrib\UIs directory using a resource editor such as Resource Hacker.

-

The 'Loading Setup' text on the splash screen which - is being displayed when the installer is starting (Verifying - installer, Unpacking data) cannot be changed by the script, - because the installer is not started yet when this dialog is being - displayed. If you want to change this text, modify dialog 111 of - modern(2).exe.
+

The 'Please wait while Setup is loading...' text + on the splash screen which is being displayed when the installer + is starting (Verifying installer, Unpacking data) cannot be changed + by the script, because the installer is not started yet when this + dialog is being displayed. If you want to change this text, modify + dialog 111 of modern?.exe.
The 'Verifying installer' and 'Unpacking data' texts are defined in the language header file of the NSIS exehead (Source\exehead\lang.h). To change them, you need to edit this file and recompile NSIS.

@@ -365,7 +358,7 @@ FunctionEnd

If you want to insert your own code in the .onGUIInit function, define MUI_CUSTOMGUIINIT (MUI_UNCUSTOMGUIINIT for the uninstaller) before inserting MUI_SYSTEM and insert the MUI_GUIINIT (MUI_UNGUIINIT for the uninstaller) macro -in your .onGUIInit or un.onGUInit function.

+in your .onGUIInit or un.onGUInit function:

 !define MUI_CUSTOMGUIINIT
 
@@ -393,24 +386,6 @@ FunctionEnd
     
  • Customizing GUIInit functions easier
  • Minor font / UI changes -

    -
  • 1.5 - November 11, 2002 -
      -
    • New language file format -
    • Language strings can be changed in the script without editing - language files -
    • Start Menu Folder selection page -
    • 'Click Next to continue' and 'Click Install to start the installation' - texts automatically change to the page order -
    • Install Options macro's updated. MUI_INSTALLOPTIONS_DISPLAY is - the standard macro now. Use MUI_INSTALLOPTIONS_INITDIALOG and - MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls. -
    • No more writing window titles & abort warnings to Install Options - INI Files -
    • Compatible with updated paging system -
    • Renamed macro's and defines -
    • Some small fixes -

    Complete version history

    Credits