diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index 42ed1a25..69fdf091 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -1,6 +1,12 @@ NSIS Modern User Interface - VERSION HISTORY -1.5 - Novermber 11, 2002 +1.6 - November 15, 2002 +* Welcome / Finish pages +* Automatic ask for reboot on finish page +* Create no shortcut option on Start Menu Folder selection page +* Customizing GUIInit functions easier + +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 @@ -9,7 +15,7 @@ NSIS Modern User Interface - VERSION HISTORY * 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 new paging system +* Compatible with updated paging system * Renamed macro's and defines * Some small fixes diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index d6ac6185..b1a7b860 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -121,9 +121,8 @@ with a custom user interface.

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.

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

+ scripts, but you can also modify an existing script.

+ How to use the Modern UI in an existing script:

1. Include the header file

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

2. Define the name and version of your software

@@ -134,15 +133,21 @@ with a custom user interface.

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_WELCOMEPAGE ;Welcome page
 !define MUI_COMPONENTSPAGE ;Component-selection page
 !define MUI_DIRECTORYPAGE ;Directory-selection page
 !define MUI_LICENSEPAGE ;License page
 !define MUI_STARTMENUPAGE ;Start Menu Folder selection page
+!define MUI_FINISHPAGE ;Finish page with options to run the program or reboot
+  !define MUI_FINISHPAGE_RUN "$INSTDIR\File.exe" ;File to run on the Finish page
+
 !define MUI_ABORTWARNING ;Abort warning messagebox
 !define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
+!define MUI_CUSTOMGUIINIT ;Use customized .onGUIInit function
 
 !define MUI_UNINSTALLER ;Uninstaller
 !define MUI_UNCUSTOMPAGECOMMANDS ;Use customized uninstaller pages
+!define MUI_UNCUSTOMGUIINIT ;Use customized un.onGUIInit function
 

4. Insert language files

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

@@ -158,9 +163,10 @@ with a custom user interface.

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

NOTE: Not all language files contain strings for the - new Start Menu Folder selection page yet. If you are using a language file which does not contain - these strings, you should always define them.
Please help to translate the new strings and - post them at the NSIS Forum.

+ new Start Menu Folder selection, Welcome and Finish pages yet. If you are using one of these + pages and the language file does not contain these strings, you should always define them.
+ Please help to translate the new strings and post them at the + NSIS Forum.

5. Define interface settings (optional)

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

!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
@@ -181,12 +187,16 @@ with a custom user interface.

- The hexadecimal colors of the details screen ("foreground" "background")
MUI_PROGRESSBAR (smooth) - The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or "" - for a old-school windows look)

+ for a old-school windows look)
+ MUI_WIZARDINI (${NSISDIR}\Contrib\ioWizard.ini) + - Install Options INI File for the Welcome and Finish pages
+ MUI_WIZARDBITMAP (${NSISDIR}\Contrib\Icons\modern-wizard.bmp) + - Bitmap for the Welcome and Finish pages

6. Insert the MUI_SYSTEM macro

!insertmacro MUI_SYSTEM

7. Insert the MUI_SECTIONS_FINISHHEADER macro -

You should insert the MUI_SECTIONS_FINISHHEADER after all the - sections to display the finish-header.

+

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 Unintaller section.

@@ -215,6 +225,16 @@ SectionEnd Section "Section Name 2" SectionName2 ... SectionEnd + +

9. Insert MUI_WELCOMEFINISHPAGE_INIT (for Welcome/Finish page)

+

If you are using a Welcome or Finish page, you should insert MUI_WELCOMEFINISHPAGE_INIT + in your .onInit function:

+
+Function .onInit
+
+  !insertmacro MUI_WELCOMEFINISHPAGE_INIT
+  
+FunctionEnd
 

Custom pages

Have a look at the @@ -223,7 +243,7 @@ Install Options documentation for info about creating Install Options INI Fi

If you want add custom pages to your installer, you should insert you own page commands to set the order of the pages and the names of the page functions.

-LangString TEXT_IO_WINDOWTITLE ": Install Options Page"
+LangString TEXT_IO_WINDOWTITLE ": Install Options Page Title"
 
 !insertmacro MUI_PAGECOMMAND_LICENSE
 !insertmacro MUI_PAGECOMMAND_COMPONENTS
@@ -233,7 +253,7 @@ Page custom FunctionName $(TEXT_IO_WINDOWTITLE) ;A custom page
 

This is also possible in the uninstaller:

-LangString UNTEXT_IO_WINDOWTITLE ": Install Options Page"
+LangString UNTEXT_IO_WINDOWTITLE ": Install Options Page Title"
 
 !insertmacro MUI_UNPAGECOMMAND_CONFIRM
 UninstPage custom FunctionName $(TEXT_IO_WINDOWTITLE) ;A custom page
@@ -244,8 +264,8 @@ MUI_UNCUSTOMPAGECOMMANDS before inserting the MUI_SYSTEM macro.

Call Install Options

You can call Install Options in FunctionName:

-LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page"
-LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
+LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title"
+LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle"
 
 Function FunctionName
   !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
@@ -257,6 +277,7 @@ FunctionEnd
   Multilanguage: MultiLanguage.nsi
Custom pages: InstallOptions.nsi
Start Menu Folder selection: StartMenu.nsi
+ Welcome/Finish page: WelcomeFinish.nsi

The interface

Modern.exe and modern2.exe

@@ -268,18 +289,41 @@ FunctionEnd

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 - Resource Hacker.

-The 'Loading Setup' text on the splash screen which + 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 'Verifying installer' and 'Unpacking data' texts are defined in + 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.

+

To modify the Welcome and Finish dialog, edit the Install + Options INI File ioWizard.ini in the 'Contrib\Modern UI' directory. +

Customize the GUIInit function

+

If you want to insert your own code in the .onGUIInit function, +define MUI_CUSTOMGUIINIT before inserting MUI_SYSTEM and insert the MUI_GUIINIT +macro in your .onGUIInit function.

+
+!define MUI_CUSTOMGUIINIT
+
+Function .onGUIInit
+  !insertmacro MUI_GUIINIT
+  ...your own code...
+FunctionEnd
+
+

For the uninstaller, define MUI_UNCUSTOMGUIINIT.

Version history

Complete version history

Credits

Made by Joost Verburg.
Icons designed by Nikos Adamamas, aka adni18.
- Thanks to Amir Szekely, aka KiCHiK for his work on NSIS + Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.

Help

Please post questions at the NSIS