diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt
index 130b7642..3296189e 100644
--- a/Contrib/Modern UI/Changelog.txt
+++ b/Contrib/Modern UI/Changelog.txt
@@ -1,7 +1,10 @@
NSIS Modern User Interface - VERSION HISTORY
-1.62b - March 2, 2003
+1.62b - March 6, 2003
* New system for custom functions
+* New InstallOptions macro's that do not remove the return value from
+ the stack
+* Support for custom pages before the finish page
* Renamed Start Menu page defines
* 'Do not create shortcuts' checkbox can be removed
* RTL support
diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html
index 6542d09e..d54d4510 100644
--- a/Contrib/Modern UI/Readme.html
+++ b/Contrib/Modern UI/Readme.html
@@ -416,11 +416,15 @@ Function FunctionName ;FunctionName defined with Page command
FunctionEnd
+
To read or write values to the INI Files on runtime, use these macro's:
!insertmacro MUI_INSTALLOPTIONS_READ $VAR "ioFile.ini" "Field #" "Value Name"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Value Name" "Value"
+If you need the InstallOptions return value (success, back, cancel, error),
+use the MUI_INSTALLOPTIONS_DISPLAY_RETURN or MUI_INSTALLOPTIONS_SHOW_RETURN macro. The
+return value will be added to the stack, so you can use the Pop command to get it.
If you are using BZIP2 compression, it's important that
files which are being extracted in the .onInit function or in Page
@@ -540,9 +544,12 @@ FunctionEnd
-- 1.62b - March 2, 2003
+
- 1.62b - March 6, 2003
- New system for custom functions
+ - New InstallOptions macro's that do not remove the return value from
+ the stack
+ - Support for custom pages before the finish page
- Renamed Start Menu page defines
- 'Do not create shortcuts' checkbox can be removed
- RTL support
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 3ebb90ce..184952ae 100644
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -724,6 +724,24 @@
!macroend
+!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
+
+ !ifndef MUI_NOVERBOSE
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+ !endif
+
+ InstallOptions::dialog "$PLUGINSDIR\${FILE}"
+
+ !ifndef MUI_NOVERBOSE
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
+ !endif
+
+!macroend
+
!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
!ifndef MUI_NOVERBOSE
@@ -749,7 +767,30 @@
!verbose 3
!endif
!endif
+
+ Push ${MUI_TEMP1}
+ InstallOptions::show
+ Pop ${MUI_TEMP1}
+
+ Pop ${MUI_TEMP1}
+
+ !ifndef MUI_NOVERBOSE
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
+ !endif
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_SHOW_RETURN
+
+ !ifndef MUI_NOVERBOSE
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+ !endif
+
InstallOptions::show
!ifndef MUI_NOVERBOSE
@@ -1355,7 +1396,7 @@
Call "${MUI_CUSTOMFUNCTION_FINISH_SHOW}"
!endif
- !insertmacro MUI_INSTALLOPTIONS_SHOW
+ !insertmacro MUI_INSTALLOPTIONS_SHOW_RETURN
GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1028
ShowWindow ${MUI_TEMP1} ${SW_NORMAL}
@@ -1369,6 +1410,9 @@
GetDlgItem ${MUI_TEMP1} $HWNDPARENT 1045
ShowWindow ${MUI_TEMP1} ${SW_HIDE}
+ Pop ${MUI_TEMP1}
+ StrCmp ${MUI_TEMP1} "success" "" done
+
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
IfRebootFlag "" noreboot_end
@@ -1416,10 +1460,8 @@
!endif
- !ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
done:
- !endif
-
+
Pop ${MUI_TEMP3}
Pop ${MUI_TEMP2}
Pop ${MUI_TEMP1}