From ebada2f217302d13eccbfd764a992af81cea690c Mon Sep 17 00:00:00 2001 From: joostverburg Date: Sun, 3 Nov 2002 23:24:45 +0000 Subject: [PATCH] more info git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1577 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI/Readme.html | 69 ++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 26 deletions(-) diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index f98fcd59..67a03537 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -123,22 +123,23 @@ with a custom user interface.

scripts, but you can also modify an existing script.

There are 7 things you need to insert in an existing script to use the Modern UI (in order).

-

1. Insert the header files

-

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

-

2. Define the name and version of your software

+

1. Insert the header files

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

2. Define the name and version of your software

!define NAME "Test Software" ;Define your own software name here
-!define VERSION "1.0" ;Define your own software version here

-

3. Define which elements you are using

- The Modern UI should know which things it should insert. Use the following defines:

+!define VERSION "1.0" ;Define your own software version here +

3. Define which elements you are using

+ The Modern UI should know which things it should insert. Use the following defines:

!define MUI_LICENSEPAGE ;License page
 !define MUI_COMPONENTSPAGE ;Component-selection page
 !define MUI_DIRECTORYPAGE ;Directory-selection page
 !define MUI_LICENSEPAGE ;License page
 !define MUI_UNINSTALL ;Uninstaller
-!define MUI_ABORTWARNING ;Abort warning messabox

+!define MUI_ABORTWARNING ;Abort warning messabox +!define MUI_INSTALLOPTIONS ;Using Install Options

4. Insert language files

- Insert the Modern UI language files for the languages you are using:
-

!include "${NSISDIR}\Contrib\Modern UI\Language files\English.nsh"

+ Insert the Modern UI language files for the languages you are using:

+
!include "${NSISDIR}\Contrib\Modern UI\Language files\English.nsh"

5. Interface settings (optional)

You can change the settings of the interface by usings defines:

!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"

@@ -160,9 +161,9 @@ with a custom user interface.

MUI_PROGRESSBAR (smooth) - The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or "" for a old-school windows look)

-

6. Insert the MUI_SYSTEM macro

-

!insertmacro MUI_SYSTEM

-

7. Set the descriptions for the sections

+

6. Insert the MUI_SYSTEM macro

+
!insertmacro MUI_SYSTEM
+

7. Set the descriptions for the sections

 LangString DESC_SectionName1 ${LANG_ENGLISH} "Description of section 1."
 LangString DESC_SectionName2 ${LANG_ENGLISH} "Description of section 2."
@@ -171,8 +172,8 @@ LangString DESC_SectionName2 ${LANG_ENGLISH} "Description of section 2."
   !insertmacro MUI_DESCRIPTION_TEXT ${SectionName1} $(DESC_SectionName1)
   !insertmacro MUI_DESCRIPTION_TEXT ${SectionName2} $(DESC_SectionName2)
 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
-

-

Note: Always set a name for a section:

+ +

Note: Always set a name for a section:

 Section "Section Name 1" SectionName1
  ...
@@ -181,19 +182,20 @@ SectionEnd
 Section "Section Name 2" SectionName2
  ...
 SectionEnd
-

-

Custom pages

- If you want add custom pages to your installer using Install Options, - you can customize the page commands:

+ +

Custom pages

+

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

+

If you want add custom pages to your installer using Install Options, +you should insert you own page commands to set the order of the pages and the names +of the page functions:

 !define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
 
 !insertmacro MUI_PAGECOMMAND_LICENSE
-Page custom [function name]
-Page custom [function name]
 !insertmacro MUI_PAGECOMMAND_COMPONENTS
 !insertmacro MUI_PAGECOMMAND_DIRECTORY
-Page custom [function name]
+Page custom [function name] ;A custom page
 !insertmacro MUI_PAGECOMMAND_INSTFILES
 

You can call Install Options in [function name]:

@@ -203,14 +205,29 @@ LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!" Function [function name] !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE) - !insertmacro MUI_INSTALLOPTIONS_SHOW "iniFile.ini" + !insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini" FunctionEnd -

Examples

- Basic: Basic.nsi
+

If you have defined MUI_INSTALLOPTIONS, there is a LangString for +the setup caption available which you can use to write the caption in the current +language to an Install Options INI File:

+
+LangString TEXT_IO_PAGETITLE ${LANG_ENGLISH} "Page Title"
+
+!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" \
+"Settings" "Title" "$(MUI_TEXT_SETUPCAPTION): $(TEXT_IO_PAGETITLE)"
+
+

If you are using abort warnings, you should also write the abort +warning in the current language to an Install Options INI File:

+
+!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" \
+"Settings" "CancelConfirm" "$(MUI_TEXT_ABORTWARNING)"
+
+

Examples

+

Basic: Basic.nsi
Multilanguage: MultiLanguage.nsi
- Cutom pages: - InstallOptions.nsi
+ Cutom pages: InstallOptions.nsi
+

The interface

Modern.exe and modern2.exe

There are two different versions of the interface.