diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt
index dcf80981..c7c63900 100644
--- a/Contrib/Modern UI/Changelog.txt
+++ b/Contrib/Modern UI/Changelog.txt
@@ -1,5 +1,11 @@
NSIS Modern User Interface - VERSION HISTORY
+1.65 - May 25, 2003
+* New page configuration system, no different system for installers
+ with custom pages
+* Default windows color for the license text background
+* New format for example scripts
+
1.64 - April 27, 2003
* Support for license page with checkbox or radiobuttons to let the
user accept the agreement or not
diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html
index 716d690f..4f8d605e 100644
--- a/Contrib/Modern UI/Readme.html
+++ b/Contrib/Modern UI/Readme.html
@@ -65,11 +65,19 @@ table
.subheader
{
margin: 20px;
- font-size: 11pt;
+ font-size: 12pt;
font-weight: bold;
color: #303030;
}
+.sub2header
+ {
+ margin: 20px;
+ font-size: 11pt;
+ font-weight: bold;
+ color: #2B5885;
+ }
+
.footer
{
margin: 5px 5px 5px 5px;
@@ -142,31 +150,49 @@ follow these steps:
to specify a path.
Use defines to let the Modern UI know what it
- should insert. Most defines (i.e. MUI_WELCOMEPAGE) don't need
- a value, there are true/false settings. Others
+
+ Insert the following macro's to set the pages you want to use
+ and the order of the pages. You can insert custom Page commmands between
+ the macro's to add custom pages.
+ More info about custom pages...
+ You can use defines to configure the Modern UI.
+ Most defines (i.e. MUI_COMPONENTSPAGE_SMALLDESC)
+ don't need a value, they are true/false settings. Others
(i.e. MUI_FINISHPAGE_RUN) can be used to define a specific
- value.
- Parameters are specified in this format:
+ value.
+ All defines are optional.
-
-
+
If you did not disable the 'Do not create shortcuts' checkbox,
put the script code to write the shortcuts between these macro's,
because the creation can be disabled by the user:
@@ -195,7 +218,6 @@ follow these steps:
...create the shortcuts...
!insertmacro MUI_STARTMENU_WRITE_END
-
MUI_STARTMENUPAGE_VARIABLE variable
Variable to store the current Start Menu Folder. Default is $9.
You cannot use this variable in your script (or you should Push/Pop it).
@@ -218,11 +240,7 @@ follow these steps:
!insertmacro MUI_STARTMENU_DELETE_END
-
MUI_FINISHPAGE
- Show the finish page. The finish page tells that the installation is succesful.
- You can also add options to run the application or show the Readme file.
- If the reboot flag is set, a page that allows the user to reboot the system
- will be displayed (this option can be disabled).
+
MUI_FINISHPAGE_RUN exe_file
Application which the user can select to run (using a checkbox).
@@ -250,22 +268,13 @@ follow these steps:
Define this option to save some space if you are not using the /REBOOTOK
flag or SetRebootFlag.
+
+
MUI_ABORTWARNING
Show a message box with a warning (are you sure?) when the user closes
the installation.
-
MUI_CUSTOMPAGECOMMANDS
- Don't insert Page commands. Use this if you are using custom Page
- commands to add your own pages.
-
MUI_UNINSTALLER
- Define if you are using an uninstaller.
-
-
MUI_UNCONFIRMPAGE
- Show the uninstall confirm page.
-
MUI_UNCUSTOMPAGECOMMANDS
- Don't insert UninstPage commands. Use this if you are using custom
- UninstPage commands to add your own pages.
-
+
For UI elements that are enabled by default, the default value will be used when a setting
has not been defined.
MUI_UI ui_file
@@ -283,12 +292,14 @@ follow these steps:
The icon of the installer.
Default: ${NSISDIR}\Contrib\Icons\modern-install.ico
MUI_UNICON icon_file
The icon of the uninstaller.
Default: ${NSISDIR}\Contrib\Icons\modern-uninstall.ico
+
MUI_LICENSEBKCOLOR color: RRGGBB
+ The background color for the license textbox.
Default: /windows
MUI_CHECKBITMAP bitmap_file
The bitmap with images for the checks of the component select treeview.
Default: ${NSISDIR}\Contrib\Icons\modern.bmp
-
MUI_INSTALLCOLORS (/windows | (foreground color: RRBBGG)
- (background color: RRGGBB))
-
The colors of the details screen. Use /windows instead of the colors to use the Windows
+
MUI_INSTALLCOLORS (/windows | (foreground color: RRGGBB)
+ (background color: RRGGBB))
+ The colors of the details screen. Use /windows instead of the colors to use the Windows
colors (the default).
Default: /windows
MUI_PROGRESSBAR ("" | colored | smooth)
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.
Default: smooth
@@ -301,7 +312,7 @@ follow these steps:
Display the header image on the right side instead of the left side.
MUI_SPECIALINI ini_file
- Install Options INI File for the Welcome and Finish page.
+ InstallOptions INI file for the Welcome and Finish page.
Default: ${NSISDIR}\Contrib\Modern UI\ioSpecial.ini
MUI_SPECIALBITMAP bmp_file
Bitmap for the Welcome and Finish page.
Default: ${NSISDIR}\Contrib\Icons\modern-wizard.bmp
@@ -309,15 +320,11 @@ follow these steps:
Background color for the header, Welcome page and Finish page.
Default: 0xFFFFFF
MUI_RTL_UI
Right-to-left interface.
-
+
If you want add your own code to functions inserted by the
- Modern UI, such as the .onGUIInit function and the Page function, create your
+ Modern UI (i.e. the .onGUIInit function and the page functions), create your
own function and let the Modern UI functions call them..
More info...
-
-
If you want to use custom pages (define MUI_CUSTOMPAGECOMMANDS
- or MUI_UNCUSTOMPAGECOMMANDS), insert them before inserting the language files.
-
More info...
Insert the Modern UI language files for the languages you are using:
!insertmacro MUI_LANGUAGE "English"
@@ -334,14 +341,19 @@ follow these steps:
You can customize texts that can be set in the Classic UI using the LicenseText,
ComponentText, DirText and MiscButtonText commands but are not being changed by the Modern UI using
these defines:
-
-MUI_BUTTONTEXT_LICENSE, MUI_BUTTONTEXT_BACK, MUI_BUTTONTEXT_NEXT,
-MUI_BUTTONTEXT_CANCEL
-
-MUI_INNERTEXT_COMPONENTS_SUB1, MUI_INNERTEXT_COMPONENTS_SUB2
-
-MUI_TEXT_DIRECTORY_BROWSE
-
+
+ MUI_BUTTONTEXT_LICENSE text
+ MUI_BUTTONTEXT_BACK text
+ MUI_BUTTONTEXT_NEXT text
+ MUI_BUTTONTEXT_CANCEL text
+
+
+ MUI_INNERTEXT_COMPONENTS_SUB1 text
+ MUI_INNERTEXT_COMPONENTS_SUB2 text
+
+
+ MUI_TEXT_DIRECTORY_BROWSE text
+
You can also customize the fonts for a language using the following defines:
MUI_FONT_HEADER font_name
MUI_FONTSIZE_HEADER font_size
@@ -351,7 +363,7 @@ MUI_TEXT_DIRECTORY_BROWSE
MUI_FONTSIZE_TITLE font_size
MUI_FONTSTYLE_TITLE weight [/ITALIC] [/UNDERLINE] [/STRIKE]
The font for the title on the Welcome and Finish page.
-
Language selection dialog
+
If you want the installer to display a language selection dialog
(have a look at the
MultiLanguage.nsi example), insert the MUI_LANGDLL_DISPLAY macro in .onInit:
@@ -409,29 +421,23 @@ insert ReserveFile commands.
More info...
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.
-For the normal Modern UI pages, insert one of the PAGECOMMAND macro's:
+own page commands between the page macro's:
-!insertmacro MUI_PAGECOMMAND_WELCOME
-!insertmacro MUI_PAGECOMMAND_LICENSE
-!insertmacro MUI_PAGECOMMAND_COMPONENTS
-!insertmacro MUI_PAGECOMMAND_DIRECTORY
+!insertmacro MUI_PAGE_WELCOME
Page custom FunctionName ;Custom page
-!insertmacro MUI_PAGECOMMAND_INSTFILES
-!insertmacro MUI_PAGECOMMAND_FINISH
+!insertmacro MUI_COMPONENTS
For the uninstaller:
-!insertmacro MUI_UNPAGECOMMAND_CONFIRM
+!insertmacro MUI_UNPAGE_CONFIRM
UninstPage custom un.FunctionName ;Custom page
-!insertmacro MUI_UNPAGECOMMAND_INSTFILES
+!insertmacro MUI_UNPAGE_INSTFILES
-
Don't forget to define MUI_CUSTOMPAGECOMMANDS or
-MUI_UNCUSTOMPAGECOMMANDS and to insert the Page commands on the
-right position.
-
+
+
InstallOptions is a plug-in that displays custom pages that you can create
+using INI files.
Have a look at the
-Install Options documentation for info about creating Install Options INI Files.
+InstallOptions documentation for info about creating InstallOptions INI files.
First, you need to extract your InstallOptions INI
File in the .onInit function (un.onInit for the uninstaller) using
the MUI_INSTALLOPTIONS_EXTRACT macro:
@@ -449,9 +455,9 @@ Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "..\ioFile.ini" "ioFile.ini"
FunctionEnd
-
You can call Install Options in the function defined with the Page
-or UninstPage command. Use the MUI_HEADER_TEXT macro to set the text in the
-white box:
+
You can call Instal Options in the function defined with the Page
+or UninstPage command using the MUI_INSTALLOPTIONS_DISPLAY macro.
+Use the MUI_HEADER_TEXT macro to set the text in the white box:
LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page Title"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "A subtitle"
@@ -476,7 +482,7 @@ Function FunctionName ;FunctionName defined with Page command
Push $R2
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioFile.ini"
- Pop $R0
+ Pop $R0 ;HWND of dialog
GetDlgItem $R1 $R0 1200 ;1200 + Field number - 1
@@ -486,22 +492,27 @@ Function FunctionName ;FunctionName defined with Page command
!insertmacro MUI_INSTALLOPTIONS_SHOW
- Pop $R1
+ Pop $R2
Pop $R1
Pop $R0
FunctionEnd
-
-
To read or write values to the INI Files on runtime, use these macro's:
+
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.
+
To read or write INI file values 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.
+
For example, you can use the MUI_INSTALLOPTIONS_READ macro in a section
+to get the user input:
+
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "ioFile.ini" "Field 1" "State"
+
For more details about InstallOptions, validation of user input etc., check the
+InstallOptions documentation.
+
If you are using BZIP2 compression, it's important that
files which are being extracted in the .onInit function or in Page
functions are first in the data block, because this will make your installer
@@ -614,6 +625,16 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
+- 1.65 - May 25, 2003
+
+ - New page configuration system, no different system for installers
+ with custom pages
+ - Default windows color for the license text background
+ - New format for example scripts
+
+
+
+
- 1.64 - April 27, 2003
- Support for license page with checkbox or radiobuttons to
@@ -650,7 +671,6 @@ MUI_UNCUSTOMFUNCTION_INSTFILES_LEAVE
- RTL support
- Documentation updates
- Minor fixes
- - No changed language strings
Complete version history
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 82ba7571..19d865a9 100644
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -1,12 +1,16 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;Macro System
;Written by Joost Verburg
-;Have a look the scripts in the 'Examples\Modern UI' directory for examples of usage.
+;Copyright © 2002-2003 Joost Verburg
+
+;Documentation: Readme.html
+;License: License.txt
+;Examples: Examples\Modern UI
;--------------------------------
-!echo "NSIS Modern User Interface version 1.64 - © 2002-2003 Joost Verburg"
+!echo "NSIS Modern User Interface version 1.65 - © 2002-2003 Joost Verburg"
!ifndef MUI_MANUALVERBOSE
!verbose 3
@@ -25,10 +29,6 @@
!macro MUI_INTERFACE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
;User interface
!ifndef MUI_UI
@@ -67,6 +67,10 @@
!error "Use SetFont to change the dialog font"
!endif
+ !ifndef MUI_LICENSEBKCOLOR
+ !define MUI_LICENSEBKCOLOR "/windows"
+ !endif
+
!ifndef MUI_INSTALLCOLORS
!define MUI_INSTALLCOLORS "/windows"
!endif
@@ -138,18 +142,15 @@
!endif
CheckBitmap "${MUI_CHECKBITMAP}"
+ LicenseBkColor "${MUI_LICENSEBKCOLOR}"
InstallColors ${MUI_INSTALLCOLORS}
InstProgressFlags ${MUI_PROGRESSBAR}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_INNERDIALOG_TEXT CONTROL TEXT
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -162,7 +163,7 @@
Pop ${MUI_TEMP1}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -170,7 +171,7 @@
!macro MUI_HEADER_TEXT TEXT SUBTEXT
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -184,7 +185,7 @@
Pop ${MUI_TEMP1}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -192,10 +193,6 @@
!macro MUI_DESCRIPTION_BEGIN
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Push ${MUI_TEMP1}
FindWindow ${MUI_TEMP1} "#32770" "" $HWNDPARENT
@@ -205,15 +202,11 @@
SendMessage ${MUI_TEMP1} ${WM_SETTEXT} 0 "STR:"
Goto mui.description_done
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_DESCRIPTION_TEXT VAR TEXT
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -223,7 +216,7 @@
SendMessage ${MUI_TEMP1} ${WM_SETTEXT} 0 "STR:${TEXT}"
Goto mui.description_done
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -231,14 +224,14 @@
!macro MUI_DESCRIPTION_END
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
mui.description_done:
Pop ${MUI_TEMP1}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -284,20 +277,12 @@
!macro MUI_ABORTWARNING
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
;Warning when Cancel button is pressed
MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(MUI_TEXT_ABORTWARNING)" IDYES quit
Abort
quit:
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_GUIINIT
@@ -424,17 +409,11 @@
!macroend
-!macro MUI_LANGDLL_PUSH LANGUAGE
-
- ;1.62 compatibility
-
- !error "To use the language selection dialog, you only have to add '!insertmacro MUI_LANGDLL_DISPLAY' to .onInit now. You should remove all the other code and Push commands."
-
-!macroend
-
!macro MUI_STARTMENU_WRITE_BEGIN
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
Push ${MUI_TEMP1}
@@ -443,13 +422,17 @@
Pop ${MUI_TEMP1}
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
!macroend
!macro MUI_STARTMENU_WRITE_END
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
WriteRegStr "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}" "${MUI_STARTMENUPAGE_VARIABLE}"
@@ -457,28 +440,38 @@
mui.startmenu_write_done:
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
!macroend
!macro MUI_STARTMENU_DELETE_BEGIN VAR
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
ReadRegStr "${VAR}" "${MUI_STARTMENUPAGE_REGISTRY_ROOT}" "${MUI_STARTMENUPAGE_REGISTRY_KEY}" "${MUI_STARTMENUPAGE_REGISTRY_VALUENAME}"
StrCmp "${VAR}" "" mui.startmenu_delete_done
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
!macroend
!macro MUI_STARTMENU_DELETE_END
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
mui.startmenu_delete_done:
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
!macroend
@@ -562,172 +555,122 @@
;--------------------------------
;PAGE COMMANDS
-!macro MUI_PAGECOMMANDS
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+!macro MUI_PAGE_WELCOME
+
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
-
- !ifndef MUI_CUSTOMPAGECOMMANDS
- !insertmacro MUI_PAGECOMMAND_WELCOME
- !insertmacro MUI_PAGECOMMAND_LICENSE
- !insertmacro MUI_PAGECOMMAND_COMPONENTS
- !insertmacro MUI_PAGECOMMAND_DIRECTORY
- !insertmacro MUI_PAGECOMMAND_STARTMENU
- !insertmacro MUI_PAGECOMMAND_INSTFILES
- !insertmacro MUI_PAGECOMMAND_FINISH
+ !define MUI_WELCOMEPAGE
+ Page custom mui.Welcome "" "" "MUI_INSTALLBUTTON_WELCOME"
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
!endif
+!macroend
+
+!macro MUI_PAGE_LICENSE
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+
+ !define MUI_LICENSEPAGE
+ Page license mui.LicensePre mui.LicenseShow mui.LicenseLeave "MUI_INSTALLBUTTON_LICENSE"
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
+
+!macroend
+
+!macro MUI_PAGE_COMPONENTS
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+
+ !define MUI_COMPONENTSPAGE
+ Page components mui.ComponentsPre mui.ComponentsShow mui.ComponentsLeave "MUI_INSTALLBUTTON_COMPONENTS"
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
+
+!macroend
+
+!macro MUI_PAGE_DIRECTORY
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+
+ !define MUI_DIRECTORYPAGE
+ Page directory mui.DirectoryPre mui.DirectoryShow mui.DirectoryLeave "MUI_INSTALLBUTTON_DIRECTORY"
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
+
+!macroend
+
+!macro MUI_PAGE_STARTMENU
+
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
+
+ !define MUI_STARTMENUPAGE
+ Page custom mui.Startmenu "" "" "MUI_INSTALLBUTTON_STARTMENU"
+
!ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend
-!macro MUI_PAGECOMMAND_WELCOME
+!macro MUI_PAGE_INSTFILES
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
-
- !ifdef MUI_WELCOMEPAGE
- Page custom mui.Welcome "" "" "MUI_INSTALLBUTTON_WELCOME"
- !endif
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_PAGECOMMAND_LICENSE
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !ifdef MUI_LICENSEPAGE
- Page license mui.LicensePre mui.LicenseShow mui.LicenseLeave "MUI_INSTALLBUTTON_LICENSE"
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_PAGECOMMAND_COMPONENTS
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !ifdef MUI_COMPONENTSPAGE
- Page components mui.ComponentsPre mui.ComponentsShow mui.ComponentsLeave "MUI_INSTALLBUTTON_COMPONENTS"
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_PAGECOMMAND_DIRECTORY
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !ifdef MUI_DIRECTORYPAGE
- Page directory mui.DirectoryPre mui.DirectoryShow mui.DirectoryLeave "MUI_INSTALLBUTTON_DIRECTORY"
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_PAGECOMMAND_STARTMENU
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !ifdef MUI_STARTMENUPAGE
- Page custom mui.Startmenu "" "" "MUI_INSTALLBUTTON_STARTMENU"
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_PAGECOMMAND_INSTFILES
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Page instfiles mui.InstFilesPre mui.InstFilesShow mui.InstFilesLeave
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend
-!macro MUI_PAGECOMMAND_FINISH
+!macro MUI_PAGE_FINISH
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
-
- !ifdef MUI_FINISHPAGE
- !ifdef MUI_FINISHPAGE_RUN | MUI_FINISHPAGE_SHOWREADME)
- Page custom mui.Finish /ENABLECANCEL
- !else
- Page custom mui.Finish
- !endif
- !endif
-
- !endif
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !define MUI_FINISHPAGE
+ Page custom mui.Finish
+
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend
-!macro MUI_UNPAGECOMMANDS
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !ifndef MUI_UNCUSTOMPAGECOMMANDS
- !insertmacro MUI_UNPAGECOMMAND_CONFIRM
- !insertmacro MUI_UNPAGECOMMAND_INSTFILES
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
+!macro MUI_UNPAGE_CONFIRM
-!macro MUI_UNPAGECOMMAND_CONFIRM
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
- !ifdef MUI_UNCONFIRMPAGE
- UninstPage uninstConfirm un.mui.ConfirmPre un.mui.ConfirmShow un.mui.ConfirmLeave "MUI_UNINSTALLBUTTON_CONFIRM"
+ !ifndef MUI_UNINSTALLER
+ !define MUI_UNINSTALLER
!endif
+
+ !define MUI_UNCONFIRMPAGE
+ UninstPage uninstConfirm un.mui.ConfirmPre un.mui.ConfirmShow un.mui.ConfirmLeave "MUI_UNINSTALLBUTTON_CONFIRM"
!ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
!verbose 4
@@ -735,15 +678,19 @@
!macroend
-!macro MUI_UNPAGECOMMAND_INSTFILES
+!macro MUI_UNPAGE_INSTFILES
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
+ !ifndef MUI_UNINSTALLER
+ !define MUI_UNINSTALLER
+ !endif
+
UninstPage instfiles un.mui.InstFilesPre un.mui.InstFilesShow un.mui.InstFilesLeave
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -754,7 +701,7 @@
!macro MUI_INSTALLOPTIONS_EXTRACT FILE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -763,7 +710,7 @@
File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -771,7 +718,7 @@
!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -780,7 +727,7 @@
File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -788,7 +735,7 @@
!macro MUI_INSTALLOPTIONS_DISPLAY FILE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -799,7 +746,7 @@
Pop ${MUI_TEMP1}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -807,13 +754,13 @@
!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
InstallOptions::dialog "$PLUGINSDIR\${FILE}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -821,13 +768,13 @@
!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -835,7 +782,7 @@
!macro MUI_INSTALLOPTIONS_SHOW
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
@@ -846,7 +793,7 @@
Pop ${MUI_TEMP1}
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -854,13 +801,13 @@
!macro MUI_INSTALLOPTIONS_SHOW_RETURN
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
InstallOptions::show
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -868,13 +815,13 @@
!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -882,38 +829,23 @@
!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
!macroend
-;--------------------------------
-;SECTIONS
-
-!macro MUI_SECTIONS_FINISHHEADER
-
- ;1.63 compatibility
-
- !error "Remove '!insertmacro MUI_SECTIONS_FINISHHEADER' and '!insertmacro MUI_UNFINISHHEADER from your script. These macro's are being inserted automatically now."
-
-!macroend
-
;--------------------------------
;FUNCTIONS
!macro MUI_FUNCTIONS_GUIINIT
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function .onGUIInit
!insertmacro MUI_GUIINIT
@@ -924,18 +856,10 @@
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_PAGES
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
!ifdef MUI_WELCOMEPAGE
!insertmacro MUI_FUNCTIONS_WELCOMEPAGE mui.Welcome
!endif
@@ -962,18 +886,10 @@
!insertmacro MUI_FUNCTIONS_FINISHPAGE mui.Finish
!endif
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_WELCOMEPAGE FUNCTION
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${FUNCTION}"
Push ${MUI_TEMP1}
@@ -1034,18 +950,10 @@
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_LICENSEPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${PRE}"
!ifdef MUI_CUSTOMFUNCTION_LICENSE_PRE
Call "${MUI_CUSTOMFUNCTION_LICENSE_PRE}"
@@ -1066,18 +974,10 @@
!endif
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_COMPONENTSPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${PRE}"
!ifdef MUI_CUSTOMFUNCTION_COMPONENTS_PRE
Call "${MUI_CUSTOMFUNCTION_COMPONENTS_PRE}"
@@ -1098,19 +998,11 @@
Call "${MUI_CUSTOMFUNCTION_COMPONENTS_LEAVE}"
!endif
FunctionEnd
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
!macroend
!macro MUI_FUNCTIONS_DIRECTORYPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${PRE}"
!ifdef MUI_CUSTOMFUNCTION_DIRECTORY_PRE
Call "${MUI_CUSTOMFUNCTION_DIRECTORY_PRE}"
@@ -1131,17 +1023,9 @@
!endif
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_STARTMENUPAGE FUNCTION
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
;Check defines
!ifndef MUI_STARTMENUPAGE_VARIABLE
@@ -1190,18 +1074,10 @@
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_INSTFILESPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${PRE}"
!ifdef MUI_CUSTOMFUNCTION_INSTFILES_PRE
Call "${MUI_CUSTOMFUNCTION_INSTFILES_PRE}"
@@ -1224,19 +1100,11 @@
!insertmacro MUI_LANGDLL_SAVELANGUAGE
FunctionEnd
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
!macroend
!macro MUI_FUNCTIONS_FINISHPAGE FUNCTION
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${FUNCTION}"
Push ${MUI_TEMP1}
@@ -1481,10 +1349,6 @@
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_FUNCTIONS_DESCRIPTION_BEGIN
@@ -1523,10 +1387,6 @@
!macro MUI_FUNCTIONS_ABORTWARNING
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
!ifdef MUI_ABORTWARNING
Function .onUserAbort
!insertmacro MUI_ABORTWARNING
@@ -1536,29 +1396,13 @@
FunctionEnd
!endif
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_UNFUNCTION_GUIINIT
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
Function un.onGUIInit
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !insertmacro MUI_UNGUIINIT
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
+ !insertmacro MUI_UNGUIINIT
!ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
@@ -1566,10 +1410,6 @@
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_UNFUNCTION_PAGES
@@ -1584,10 +1424,6 @@
!macro MUI_UNFUNCTION_CONFIRMPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function "${PRE}"
!ifdef MUI_UNCUSTOMFUNCTION_CONFIRM_PRE
Call "${MUI_UNCUSTOMFUNCTION_CONFIRM_PRE}"
@@ -1607,18 +1443,10 @@
!endif
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
!macro MUI_UNFUNCTION_INSTFILESPAGE PRE SHOW LEAVE
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
Function ${PRE}
!ifdef MUI_UNCUSTOMFUNCTION_INSTFILES_PRE
Call "${MUI_UNCUSTOMFUNCTION_INSTFILES_PRE}"
@@ -1639,10 +1467,6 @@
!insertmacro MUI_UNFINISHHEADER
FunctionEnd
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
!macroend
;--------------------------------
@@ -1650,7 +1474,9 @@
!macro MUI_RESERVEFILE_WELCOMEFINISHPAGE
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
!define MUI_NOVERBOSE
@@ -1660,19 +1486,21 @@
!undef MUI_NOVERBOSE
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
!macroend
!macro MUI_RESERVEFILE_INSTALLOPTIONS
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -1680,13 +1508,13 @@
!macro MUI_RESERVEFILE_SPECIALINI
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
ReserveFile "${NSISDIR}\Contrib\Modern UI\ioSpecial.ini"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -1694,13 +1522,13 @@
!macro MUI_RESERVEFILE_SPECIALBITMAP
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 3
!endif
ReserveFile "${NSISDIR}\Contrib\Icons\modern-wizard.bmp"
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
+ !ifndef MUI_MANUALVERBOSE
!verbose 4
!endif
@@ -1708,84 +1536,43 @@
!macro MUI_RESERVEFILE_LANGDLL
- !verbose 3
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 3
+ !endif
ReserveFile "${NSISDIR}\Plugins\LangDLL.dll"
- !verbose 4
+ !ifndef MUI_MANUALVERBOSE
+ !verbose 4
+ !endif
!macroend
;--------------------------------
-;BASIC MACRO'S
+;INSERT ALL CODE
-!macro MUI_SYSTEM
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
+!macro MUI_INSERT
+
+ !ifndef MUI_MANUALVERBOSE
+ !define MUI_MANUALVERBOSE_SET
+ !define MUI_MANUALVERBOSE
!endif
- !ifndef MUI_SYSTEM_INSERTED
-
- !define MUI_SYSTEM_INSERTED
-
- ;1.62 compatibility
- !ifdef MUI_STARTMENU_VARIABLE | MUI_STARTMENU_DEFAULTFOLDER | MUI_STARTMENU_REGISTRY_ROOT
- !error "The Start Menu Folder page defines have been renamed from MUI_STARTMENU_??? to MUI_STARTMENUPAGE_???. Please rename these defines in your script."
- !endif
-
- !insertmacro MUI_INTERFACE
- !insertmacro MUI_BASIC
- !insertmacro MUI_UNBASIC
-
- !else
-
- ;1.62 compatibility
- !warning "The MUI_SYSTEM macro is now being inserted automatically. You can remove '!insertmacro MUI_SYSTEM' from your script."
-
- !endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_BASIC
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
- !insertmacro MUI_PAGECOMMANDS
+ !insertmacro MUI_INTERFACE
+
!insertmacro MUI_FUNCTIONS_PAGES
!insertmacro MUI_FUNCTIONS_GUIINIT
!insertmacro MUI_FUNCTIONS_ABORTWARNING
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
-!macroend
-
-!macro MUI_UNBASIC
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 3
- !endif
-
!ifdef MUI_UNINSTALLER
-
- !insertmacro MUI_UNPAGECOMMANDS
!insertmacro MUI_UNFUNCTION_PAGES
!insertmacro MUI_UNFUNCTION_GUIINIT
+ !endif
+ !ifdef MUI_MANUALVERBOSE_SET
+ !undef MUI_MANUALVERBOSE
!endif
-
- !ifndef MUI_NOVERBOSE & MUI_MANUALVERBOSE
- !verbose 4
- !endif
-
+
!macroend
;--------------------------------
@@ -1793,14 +1580,9 @@
!macro MUI_LANGUAGEFILE_BEGIN LANGUAGE
- !ifndef MUI_SYSTEM_INSERT
-
- !define MUI_SYSTEM_INSERT
-
- !define MUI_NOVERBOSE
- !insertmacro MUI_SYSTEM
- !undef MUI_NOVERBOSE
-
+ !ifndef MUI_INSERT
+ !define MUI_INSERT
+ !insertmacro MUI_INSERT
!endif
!ifndef "MUI_LANGUAGEFILE_${LANGUAGE}_USED"
diff --git a/Examples/Modern UI/Basic.nsi b/Examples/Modern UI/Basic.nsi
index 8e17d743..85321007 100644
--- a/Examples/Modern UI/Basic.nsi
+++ b/Examples/Modern UI/Basic.nsi
@@ -1,12 +1,18 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;Basic Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
+
;--------------------------------
;Configuration
@@ -19,28 +25,26 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
;--------------------------------
;Modern UI Configuration
- !define MUI_LICENSEPAGE
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
-
!define MUI_ABORTWARNING
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
-
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;--------------------------------
;Data
@@ -50,7 +54,7 @@
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
;ADD YOUR OWN STUFF HERE!
@@ -68,6 +72,8 @@ SectionEnd
;--------------------------------
;Descriptions
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy modern.exe to the application folder."
+
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
diff --git a/Examples/Modern UI/HeaderBitmap.nsi b/Examples/Modern UI/HeaderBitmap.nsi
index 82adbf48..f97dc8b0 100644
--- a/Examples/Modern UI/HeaderBitmap.nsi
+++ b/Examples/Modern UI/HeaderBitmap.nsi
@@ -1,12 +1,18 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;Header Bitmap Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
+
;--------------------------------
;Configuration
@@ -19,30 +25,27 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
;--------------------------------
;Modern UI Configuration
- !define MUI_LICENSEPAGE
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
-
- !define MUI_ABORTWARNING
-
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
-
!define MUI_HEADERBITMAP "${NSISDIR}\Contrib\Icons\modern-header.bmp"
-
+ !define MUI_ABORTWARNING
+
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;--------------------------------
;Data
@@ -53,14 +56,14 @@
;Reserve Files
;Things that need to be extracted on first (keep these lines before any File command!)
- ;Only useful for BZIP2 compression
+ ;Only for BZIP2 compression
ReserveFile "${NSISDIR}\Contrib\Icons\modern-header.bmp"
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
;ADD YOUR OWN STUFF HERE!
@@ -78,6 +81,8 @@ SectionEnd
;--------------------------------
;Descriptions
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy modern.exe to the application folder."
+
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
diff --git a/Examples/Modern UI/InstallOptions.nsi b/Examples/Modern UI/InstallOptions.nsi
index 6fe123d6..46f4abc5 100644
--- a/Examples/Modern UI/InstallOptions.nsi
+++ b/Examples/Modern UI/InstallOptions.nsi
@@ -1,13 +1,19 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;InstallOptions Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+!define TEMP $R0
+
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
-!define TEMP $R0
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
;--------------------------------
;Configuration
@@ -21,45 +27,29 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE
+ Page custom CustomPageA
+ !insertmacro MUI_PAGE_COMPONENTS
+ Page custom CustomPageB
+ !insertmacro MUI_PAGE_DIRECTORY
+ Page custom CustomPageC
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
;--------------------------------
;Modern UI Configuration
- !define MUI_CUSTOMPAGECOMMANDS
-
- !define MUI_LICENSEPAGE
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
-
!define MUI_ABORTWARNING
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
-
-;--------------------------------
-;Pages
-
- !insertmacro MUI_PAGECOMMAND_LICENSE
- Page custom SetCustomA
- Page custom SetCustomB
- !insertmacro MUI_PAGECOMMAND_COMPONENTS
- !insertmacro MUI_PAGECOMMAND_DIRECTORY
- Page custom SetCustomC
- !insertmacro MUI_PAGECOMMAND_INSTFILES
-
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
-
- ;Header
- LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions Page"
- LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
;--------------------------------
;Data
@@ -70,7 +60,7 @@
;Reserve Files
;Things that need to be extracted on first (keep these lines before any File command!)
- ;Only useful for BZIP2 compression
+ ;Only for BZIP2 compression
ReserveFile "ioA.ini"
ReserveFile "ioB.ini"
@@ -80,9 +70,9 @@
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
- ;Add your stuff here
+ ;ADD YOUR OWN STUFF HERE!
SetOutPath "$INSTDIR"
File "${NSISDIR}\Contrib\UIs\modern.exe"
@@ -90,57 +80,69 @@ Section "modern.exe" SecCopyUI
;Store install folder
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
- ;Read a value from an InstallOptions INI File
- !insertmacro MUI_INSTALLOPTIONS_READ ${TEMP} "ioC.ini" "Field 2" "State"
- StrCmp ${TEMP} "1" "" +2
- ;Checked
- MessageBox MB_OK "A MessageBox..."
-
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ ;Read a value from an InstallOptions INI file
+ !insertmacro MUI_INSTALLOPTIONS_READ ${TEMP} "ioC.ini" "Field 2" "State"
+
+ ;Display a messagebox if check box was checked
+ StrCmp ${TEMP} "1" "" +2
+ MessageBox MB_OK "You checked the check box, here is the MessageBox..."
SectionEnd
-;--------------------------------
-;Descriptions
-
-!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
-!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
-
;--------------------------------
;Installer Functions
Function .onInit
- ;Extract InstallOptions INI Files
+ ;Extract InstallOptions INI files
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioA.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioB.ini"
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioC.ini"
FunctionEnd
-Function SetCustomA
+LangString TEXT_IO_TITLE ${LANG_ENGLISH} "InstallOptions page"
+LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "This is a page created using the InstallOptions plug-in."
+
+Function CustomPageA
+
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"
+
FunctionEnd
-Function SetCustomB
+Function CustomPageB
+
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioB.ini"
+
FunctionEnd
-Function SetCustomC
+Function CustomPageC
+
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioC.ini"
+
FunctionEnd
+;--------------------------------
+;Descriptions
+
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy modern.exe to the application folder."
+
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
+!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
+
;--------------------------------
;Uninstaller Section
Section "Uninstall"
- ;Add your stuff here
+ ;ADD YOUR OWN STUFF HERE!
Delete "$INSTDIR\modern.exe"
Delete "$INSTDIR\Uninstall.exe"
@@ -148,5 +150,5 @@ Section "Uninstall"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
-
+
SectionEnd
\ No newline at end of file
diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi
index afb5d5c7..7d94cc17 100644
--- a/Examples/Modern UI/MultiLanguage.nsi
+++ b/Examples/Modern UI/MultiLanguage.nsi
@@ -1,12 +1,18 @@
-;NSIS Modern User Interface version 1.64
-;MultiLanguage Example Script
+;NSIS Modern User Interface version 1.65
+;Multilingual Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
+
;--------------------------------
;Configuration
@@ -19,21 +25,25 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Modern UI Configuration
+
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${MUI_PRODUCT}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
-;--------------------------------
-;Modern UI Configuration
-
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
-
!define MUI_ABORTWARNING
-
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
;--------------------------------
;Languages
@@ -52,6 +62,7 @@
!insertmacro MUI_LANGUAGE "Swedish"
!insertmacro MUI_LANGUAGE "Greek"
!insertmacro MUI_LANGUAGE "Russian"
+ !insertmacro MUI_LANGUAGE "Portuguese"
!insertmacro MUI_LANGUAGE "PortugueseBR"
!insertmacro MUI_LANGUAGE "Polish"
!insertmacro MUI_LANGUAGE "Ukrainian"
@@ -66,51 +77,18 @@
!insertmacro MUI_LANGUAGE "Turkish"
!insertmacro MUI_LANGUAGE "Lithuanian"
!insertmacro MUI_LANGUAGE "Catalan"
-
-;--------------------------------
-;Language Strings
-
- ;Descriptions
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "modern.exe: English description"
- LangString DESC_SecCopyUI ${LANG_FRENCH} "modern.exe: French description"
- LangString DESC_SecCopyUI ${LANG_GERMAN} "modern.exe: German description"
- LangString DESC_SecCopyUI ${LANG_SPANISH} "modern.exe: Spanish description"
- LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "modern.exe: Simplified Chinese description"
- LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "modern.exe: Traditional Chinese description"
- LangString DESC_SecCopyUI ${LANG_JAPANESE} "modern.exe: Japanese description"
- LangString DESC_SecCopyUI ${LANG_KOREAN} "modern.exe: Korean description"
- LangString DESC_SecCopyUI ${LANG_ITALIAN} "modern.exe: Italian description"
- LangString DESC_SecCopyUI ${LANG_DUTCH} "modern.exe: Dutch description"
- LangString DESC_SecCopyUI ${LANG_DANISH} "modern.exe: Danish description"
- LangString DESC_SecCopyUI ${LANG_SWEDISH} "modern.exe: Swedish description"
- LangString DESC_SecCopyUI ${LANG_GREEK} "modern.exe: Greek description"
- LangString DESC_SecCopyUI ${LANG_RUSSIAN} "modern.exe: Russian description"
- LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "modern.exe: Portuguese (Brasil) description"
- LangString DESC_SecCopyUI ${LANG_POLISH} "modern.exe: Polish description"
- LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "modern.exe: Ukrainian description"
- LangString DESC_SecCopyUI ${LANG_CZECH} "modern.exe: Czechian description"
- LangString DESC_SecCopyUI ${LANG_SLOVAK} "modern.exe: Slovakian description"
- LangString DESC_SecCopyUI ${LANG_CROATIAN} "modern.exe: Slovakian description"
- LangString DESC_SecCopyUI ${LANG_BULGARIAN} "modern.exe: Bulgarian description"
- LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "modern.exe: Hungarian description"
- LangString DESC_SecCopyUI ${LANG_THAI} "modern.exe: Thai description"
- LangString DESC_SecCopyUI ${LANG_ROMANIAN} "modern.exe: Romanian description"
- LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "modern.exe: Macedonian description"
- LangString DESC_SecCopyUI ${LANG_TURKISH} "modern.exe: Turkish description"
- LangString DESC_SecCopyUI ${LANG_LITHUANIAN} "modern.exe: Lithuanian description"
- LangString DESC_SecCopyUI ${LANG_CATALAN} "modern.exe: Catalan description"
;--------------------------------
;Reserve Files
;Things that need to be extracted on first (keep these lines before any File command!)
- ;Only useful for BZIP2 compression
+ ;Only for BZIP2 compression
!insertmacro MUI_RESERVEFILE_LANGDLL
-
+
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
;ADD YOUR OWN STUFF HERE!
@@ -120,8 +98,9 @@ Section "modern.exe" SecCopyUI
;Store install folder
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
+ ;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
-
+
SectionEnd
;--------------------------------
@@ -136,6 +115,36 @@ FunctionEnd
;--------------------------------
;Descriptions
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "modern.exe: English description"
+LangString DESC_SecCopyUI ${LANG_FRENCH} "modern.exe: French description"
+LangString DESC_SecCopyUI ${LANG_GERMAN} "modern.exe: German description"
+LangString DESC_SecCopyUI ${LANG_SPANISH} "modern.exe: Spanish description"
+LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "modern.exe: Simplified Chinese description"
+LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "modern.exe: Traditional Chinese description"
+LangString DESC_SecCopyUI ${LANG_JAPANESE} "modern.exe: Japanese description"
+LangString DESC_SecCopyUI ${LANG_KOREAN} "modern.exe: Korean description"
+LangString DESC_SecCopyUI ${LANG_ITALIAN} "modern.exe: Italian description"
+LangString DESC_SecCopyUI ${LANG_DUTCH} "modern.exe: Dutch description"
+LangString DESC_SecCopyUI ${LANG_DANISH} "modern.exe: Danish description"
+LangString DESC_SecCopyUI ${LANG_SWEDISH} "modern.exe: Swedish description"
+LangString DESC_SecCopyUI ${LANG_GREEK} "modern.exe: Greek description"
+LangString DESC_SecCopyUI ${LANG_RUSSIAN} "modern.exe: Russian description"
+LangString DESC_SecCopyUI ${LANG_PORTUGUESE} "modern.exe: Portuguese description"
+LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "modern.exe: Portuguese (Brasil) description"
+LangString DESC_SecCopyUI ${LANG_POLISH} "modern.exe: Polish description"
+LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "modern.exe: Ukrainian description"
+LangString DESC_SecCopyUI ${LANG_CZECH} "modern.exe: Czechian description"
+LangString DESC_SecCopyUI ${LANG_SLOVAK} "modern.exe: Slovakian description"
+LangString DESC_SecCopyUI ${LANG_CROATIAN} "modern.exe: Slovakian description"
+LangString DESC_SecCopyUI ${LANG_BULGARIAN} "modern.exe: Bulgarian description"
+LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "modern.exe: Hungarian description"
+LangString DESC_SecCopyUI ${LANG_THAI} "modern.exe: Thai description"
+LangString DESC_SecCopyUI ${LANG_ROMANIAN} "modern.exe: Romanian description"
+LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "modern.exe: Macedonian description"
+LangString DESC_SecCopyUI ${LANG_TURKISH} "modern.exe: Turkish description"
+LangString DESC_SecCopyUI ${LANG_LITHUANIAN} "modern.exe: Lithuanian description"
+LangString DESC_SecCopyUI ${LANG_CATALAN} "modern.exe: Catalan description"
+
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
diff --git a/Examples/Modern UI/StartMenu.nsi b/Examples/Modern UI/StartMenu.nsi
index cfa2b4e5..5170a5ce 100644
--- a/Examples/Modern UI/StartMenu.nsi
+++ b/Examples/Modern UI/StartMenu.nsi
@@ -1,12 +1,20 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;Start Menu Folder Selection Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+!define TEMP $R0
+
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
+
;--------------------------------
;Configuration
@@ -18,9 +26,26 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_LICENSE
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_STARTMENU
+ !insertmacro MUI_PAGE_INSTFILES
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
+;--------------------------------
+;Modern UI Configuration
+
+ !define MUI_ABORTWARNING
;$9 is being used to store the Start Menu Folder.
- ;Do not use this variable in your script (or Push/Pop it)!
+ ;Do not use this variable in your script!
;To change this variable, use MUI_STARTMENUPAGE_VARIABLE.
;Have a look at the Readme for info about other options (default folder,
@@ -31,31 +56,10 @@
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${MUI_PRODUCT}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
- !define TEMP $R0
-
-;--------------------------------
-;Modern UI Configuration
-
- !define MUI_LICENSEPAGE
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
- !define MUI_STARTMENUPAGE
-
- !define MUI_ABORTWARNING
-
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
-
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;--------------------------------
;Data
@@ -65,7 +69,7 @@
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
;ADD YOUR OWN STUFF HERE!
@@ -75,6 +79,9 @@ Section "modern.exe" SecCopyUI
;Store install folder
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
!insertmacro MUI_STARTMENU_WRITE_BEGIN
;Create shortcuts
@@ -83,15 +90,14 @@ Section "modern.exe" SecCopyUI
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENUPAGE_VARIABLE}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_END
-
- ;Create uninstaller
- WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Descriptions
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy modern.exe to the application folder."
+
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
@@ -105,6 +111,10 @@ Section "Uninstall"
Delete "$INSTDIR\modern.exe"
Delete "$INSTDIR\Uninstall.exe"
+
+ RMDir "$INSTDIR"
+
+ DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
!insertmacro MUI_STARTMENU_DELETE_BEGIN ${TEMP}
@@ -114,8 +124,4 @@ Section "Uninstall"
!insertmacro MUI_STARTMENU_DELETE_END
- RMDir "$INSTDIR"
-
- DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
-
SectionEnd
\ No newline at end of file
diff --git a/Examples/Modern UI/WelcomeFinish.nsi b/Examples/Modern UI/WelcomeFinish.nsi
index ab67828d..b68f5b22 100644
--- a/Examples/Modern UI/WelcomeFinish.nsi
+++ b/Examples/Modern UI/WelcomeFinish.nsi
@@ -1,12 +1,18 @@
-;NSIS Modern User Interface version 1.64
+;NSIS Modern User Interface version 1.65
;Welcome/Finish Page Example Script
;Written by Joost Verburg
-!define MUI_PRODUCT "Modern UI Test" ;Define your own software name here
-!define MUI_VERSION "1.0" ;Define your own software version here
+;--------------------------------
+;Include Modern UI
!include "MUI.nsh"
-
+
+;--------------------------------
+;Product Info
+
+!define MUI_PRODUCT "Modern UI Test"
+!define MUI_VERSION "1.65"
+
;--------------------------------
;Configuration
@@ -19,57 +25,48 @@
;Get install folder from registry if available
InstallDirRegKey HKCU "Software\${MUI_PRODUCT}" ""
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_WELCOME
+ !insertmacro MUI_PAGE_LICENSE
+ !insertmacro MUI_PAGE_COMPONENTS
+ !insertmacro MUI_PAGE_DIRECTORY
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+
;--------------------------------
;Modern UI Configuration
- !define MUI_WELCOMEPAGE
- !define MUI_LICENSEPAGE
- !define MUI_COMPONENTSPAGE
- !define MUI_DIRECTORYPAGE
- !define MUI_FINISHPAGE
- !define MUI_FINISHPAGE_RUN "$INSTDIR\modern.exe"
-
!define MUI_ABORTWARNING
-
- !define MUI_UNINSTALLER
- !define MUI_UNCONFIRMPAGE
-
+ !define MUI_FINISHPAGE_RUN "$INSTDIR\modern.exe"
+
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
-
-;--------------------------------
-;Language Strings
-
- ;Description
- LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;--------------------------------
;Data
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
-
-;--------------------------------
-;Reserve Files
-
- ;Things that need to be extracted on first (keep these lines before any File command!)
- ;Only useful for BZIP2 compression
- !insertmacro MUI_RESERVEFILE_WELCOMEFINISHPAGE
;--------------------------------
;Installer Sections
-Section "modern.exe" SecCopyUI
+Section "Dummy Test File" SecCopyUI
- ;Add your stuff here
+ ;ADD YOUR OWN STUFF HERE!
SetOutPath "$INSTDIR"
File "${NSISDIR}\Contrib\UIs\modern.exe"
;Store install folder
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "" $INSTDIR
-
+
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -78,16 +75,18 @@ SectionEnd
;--------------------------------
;Descriptions
+LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy modern.exe to the application folder."
+
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
-
+
;--------------------------------
;Uninstaller Section
Section "Uninstall"
- ;Add your stuff here
+ ;ADD YOUR OWN STUFF HERE!
Delete "$INSTDIR\modern.exe"
Delete "$INSTDIR\Uninstall.exe"
@@ -96,4 +95,4 @@ Section "Uninstall"
DeleteRegKey /ifempty HKCU "Software\${MUI_PRODUCT}"
-SectionEnd
\ No newline at end of file
+SectionEnd
\ No newline at end of file