From 0bde4a0399c1a6dd189f1e56dd206f49a967c95a Mon Sep 17 00:00:00 2001 From: joostverburg Date: Sat, 16 Nov 2002 22:05:56 +0000 Subject: [PATCH] welcome/finish init called by modern ui, guiinit changes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1768 212acab6-be3b-0410-9dea-997c60f758d6 --- Contrib/Modern UI/Changelog.txt | 2 +- Contrib/Modern UI/Readme.html | 26 +++++++++----------------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt index 69fdf091..297f5b5d 100644 --- a/Contrib/Modern UI/Changelog.txt +++ b/Contrib/Modern UI/Changelog.txt @@ -1,6 +1,6 @@ NSIS Modern User Interface - VERSION HISTORY -1.6 - November 15, 2002 +1.6 - November 16, 2002 * Welcome / Finish pages * Automatic ask for reboot on finish page * Create no shortcut option on Start Menu Folder selection page diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html index 02ce79b3..d9dfac5f 100644 --- a/Contrib/Modern UI/Readme.html +++ b/Contrib/Modern UI/Readme.html @@ -132,11 +132,11 @@ 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_LICENSEPAGE ;License 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" ;Option to run a file
@@ -229,31 +229,23 @@ 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 Install Options documentation for info about creating Install Options INI Files.

Custom page commands

-

If you want add custom pages to your installer, you should insert you +

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.

 LangString TEXT_IO_WINDOWTITLE ": Install Options Page Title"
 
+!insertmacro MUI_PAGECOMMAND_WELCOME
 !insertmacro MUI_PAGECOMMAND_LICENSE
 !insertmacro MUI_PAGECOMMAND_COMPONENTS
 !insertmacro MUI_PAGECOMMAND_DIRECTORY
 Page custom FunctionName $(TEXT_IO_WINDOWTITLE) ;A custom page
 !insertmacro MUI_PAGECOMMAND_INSTFILES
+!insertmacro MUI_PAGECOMMAND_FINISH
 

This is also possible in the uninstaller:

@@ -307,8 +299,9 @@ FunctionEnd
   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 (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.

 !define MUI_CUSTOMGUIINIT
 
@@ -317,10 +310,9 @@ Function .onGUIInit
   ...your own code...
 FunctionEnd
 
-

For the uninstaller, define MUI_UNCUSTOMGUIINIT.

Version history

    -
  • 1.6 - November 15, 2002 +
  • 1.6 - November 16, 2002
    • Welcome / Finish pages
    • Automatic ask for reboot on finish page