+Have a look at the
InstallOptions documentation for info about creating InstallOptions INI files.
-First, you have to extract your InstallOptions INI File in the .onInit function
+
First, you have to extract your InstallOptions INI File in the .onInit function
(un.onInit for the uninstaller) using the MUI_INSTALLOPTIONS_EXTRACT macro.
-
+
Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioFile.ini"
FunctionEnd
-If your INI File is located in another directory, use MUI_INSTALLOPTIONS_EXTRACT_AS.
+
If your INI File is located in another directory, use MUI_INSTALLOPTIONS_EXTRACT_AS.
The second parameter is the filename for the temporary plug-ins directory, use this filename as
parameter for the other InstallOptions macros.
-
+
Function .onInit
!insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "..\ioFile.ini" "ioFile.ini"
FunctionEnd
-You can call Instal Options in the function defined with the Page
+
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"
@@ -677,9 +680,9 @@ Function FunctionName ;FunctionName defined with Page command
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioFile.ini"
FunctionEnd
-For custom fonts and colors, macros for the initDialog and show
+
For custom fonts and colors, macros for the initDialog and show
functions of InstallOptions are also available.
-
+
Var HWND
Var DLGITEM
Var FONT
@@ -704,47 +707,47 @@ Function FunctionName ;FunctionName defined with Page command
FunctionEnd
-If you need the InstallOptions return value (success, back, cancel, error),
+
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.
-Use these macros to read or write INI file values.
-
+Use these macros to read or write INI file values.
+
!insertmacro MUI_INSTALLOPTIONS_READ $VAR "ioFile.ini" "Field #" "Value Name"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioFile.ini" "Field #" "Value Name" "Value"
-For example, you can use the MUI_INSTALLOPTIONS_READ macro in a section
+
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
+
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "ioFile.ini" "Field 1" "State"
+For more details about InstallOptions, validation of user input etc., check the
InstallOptions documentation.
-
-Basic: Basic.nsi
+
+Basic: Basic.nsi
Welcome/Finish page: WelcomeFinish.nsi
Multilanguage: MultiLanguage.nsi
- Header bitmap: HeaderBitmap.nsi
+ Header image: HeaderBitmap.nsi
Custom pages: InstallOptions.nsi
Start Menu Folder page: StartMenu.nsi
-
- To change elements on the dialogs, use customized UI resource files
+
Customize the dialogs
+ To change elements on the dialogs, use customized UI resource files
(see Interface settings). You can change your copies of the original files (in the
Contrib\UIs folder) by using an application such as
Resource Hacker.
- The 'Please wait while Setup is loading...' text on the splash
+
The 'Please wait while Setup is loading...' text on the splash
screen that is being displayed while the installer is starting (Verifying installer,
Unpacking data) can be changed by using a customized UI resource file (MUI_UI setting)
with a modified dialog 111.
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 have to edit this
file and recompile NSIS.
- To modify the Welcome- and Finish dialog, use a custom INI file
+
To modify the Welcome- and Finish dialog, use a custom INI file
(MUI_SPECIALINI setting) or write to the INI file in the custom page functions.
-
- If you want add your own code to functions
+
+ If you want add your own code to functions
inserted by the Modern UI, such as the .onGUIInit function and the Page functions,
create your own function and let the Modern UI functions call them. Use the defines
to define the name of your functions.
- Example:
+ Example:
!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
@@ -752,21 +755,21 @@ Function myGUIInit
...your own code...
FunctionEnd
-
+ General Custom Functions
-
These defines should be set before inserting a the language macros.
-
MUI_CUSTOMFUNCTION_GUIINIT function
- MUI_CUSTOMFUNCTION_UNGUIINIT function
- MUI_CUSTOMFUNCTION_ABORT function
- MUI_CUSTOMFUNCTION_UNABORT function
+
These defines should be set before inserting a the language macros.
+
MUI_CUSTOMFUNCTION_GUIINIT function
+ MUI_CUSTOMFUNCTION_UNGUIINIT function
+ MUI_CUSTOMFUNCTION_ABORT function
+ MUI_CUSTOMFUNCTION_UNABORT function
-
+ Page Custom Functions
-
These defines should be set before inserting a page macro.
-
MUI_PAGE_CUSTOMFUNCTION_PRE function
- MUI_PAGE_CUSTOMFUNCTION_SHOW function
- MUI_PAGE_CUSTOMFUNCTION_LEAVE function
-
Notes:
+
These defines should be set before inserting a page macro.
+
MUI_PAGE_CUSTOMFUNCTION_PRE function
+ MUI_PAGE_CUSTOMFUNCTION_SHOW function
+ MUI_PAGE_CUSTOMFUNCTION_LEAVE function
+
Notes:
- The StartMenu page does not have a Show function
- In the Pre function of the Welcome- and Finish page, you can write to the InstallOptions INI file
@@ -774,9 +777,9 @@ FunctionEnd
- In the Show function of Welcome- and Finish page, $MUI_HWND contains the HWND of the inner dialog
-
+Version history
-- 1.67 - October 27, 2003
+
- 1.67 - November 7, 2003
- Support for uninstaller Welcome- and Finish pages
- Renamed a few settings
@@ -784,6 +787,9 @@ FunctionEnd
- Support for uninstaller abort warning
- Setting for 3 line text on Welcome- and Finish page
- Langauge file backwards compatibility: English for missing strings
+ - Support for different uninstaller header image
+ - Language selection dialog not displayed if installer is silent
+ - Cancel button on Finish page when there are options
@@ -820,7 +826,7 @@ FunctionEnd
when mouse is outside box, disabled style
-
+
- 1.64 - April 27, 2003
@@ -836,17 +842,17 @@ FunctionEnd
- More texts can be customized
- Complete version history
-
- Made by Joost Verburg.
+
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
to make this possible.
-
- Please post questions at the
+
Help
+ Please post questions at the
NSIS Forum.
-
-Copyright © 2002-2003 Joost Verburg
+License
+Copyright © 2002-2003 Joost Verburg
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
diff --git a/Contrib/Modern UI/Readme.jpg b/Contrib/Modern UI/Readme.jpg
deleted file mode 100644
index 62837d14..00000000
Binary files a/Contrib/Modern UI/Readme.jpg and /dev/null differ
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 857f4a42..3d190fa6 100644
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -11,26 +11,54 @@
!echo "NSIS Modern User Interface version 1.67 - © 2002-2003 Joost Verburg"
;--------------------------------
-;DECLARES
-!ifndef MUI_MANUALVERBOSE
- !verbose 3
-!endif
+!verbose 3
!ifndef MUI_INCLUDED
!define MUI_INCLUDED
+;--------------------------------
+;HEADER FILES, DECLARATIONS
+
!include "WinMessages.nsh"
Var MUI_TEMP1
Var MUI_TEMP2
;--------------------------------
-;INTERFACE
+;INSERT CODE
+
+!macro MUI_INSERT
+
+ !ifdef MUI_PRODUCT | MUI_VERSION
+ !warning "The MUI_PRODUCT and MUI_VERSION defines have been removed. Use a normal Name command now."
+ !endif
+
+ !ifndef MUI_INSERT_INTERFACE
+ !insertmacro MUI_INTERFACE
+ !define MUI_INSERT_INTERFACE
+ !endif
+
+ !insertmacro MUI_FUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_ABORTWARNING
+
+ !ifdef MUI_UNINSTALLER
+ !insertmacro MUI_UNFUNCTION_GUIINIT
+ !insertmacro MUI_FUNCTION_UNABORTWARNING
+ !endif
+
+!macroend
+
+;--------------------------------
+;INTERFACE - COMPILE TIME SETTINGS
!macro MUI_INTERFACE
+ !ifdef MUI_INSERT_NSISCONF
+ !insertmacro MUI_NSISCONF
+ !endif
+
!ifndef MUI_UI
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
!endif
@@ -107,6 +135,14 @@ Var MUI_TEMP2
!ifndef MUI_HEADERIMAGE_BITMAP
!define MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"
!endif
+ !ifndef MUI_HEADERIMAGE_UNBITMAP
+ !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
+ !ifdef MUI_HEADERIMAGE_NOSTRETCH
+ !ifndef MUI_HEADERIMAGE_UNNOSTRETCH
+ !define MUI_HEADERIMAGE_UNNOSTRETCH
+ !endif
+ !endif
+ !endif
!endif
XPStyle On
@@ -135,6 +171,9 @@ Var MUI_TEMP2
!macroend
+;--------------------------------
+;INTERFACE - RUN-TIME
+
!macro MUI_INNERDIALOG_TEXT CONTROL TEXT
!verbose push
@@ -288,8 +327,8 @@ Var MUI_TEMP2
!macro MUI_GUIINIT
- !insertmacro MUI_WELCOMEFINISHPAGE_INIT
- !insertmacro MUI_HEADERIMAGE_INIT
+ !insertmacro MUI_WELCOMEFINISHPAGE_INIT ""
+ !insertmacro MUI_HEADERIMAGE_INIT ""
!insertmacro MUI_GUIINIT_BASIC
@@ -297,10 +336,10 @@ Var MUI_TEMP2
!macro MUI_UNGUIINIT
- !insertmacro MUI_UNWELCOMEFINISHPAGE_INIT
- !insertmacro MUI_HEADERIMAGE_INIT
+ !insertmacro MUI_WELCOMEFINISHPAGE_INIT "UN"
+ !insertmacro MUI_HEADERIMAGE_INIT "UN"
- !insertmacro MUI_UNGUIINIT_BASIC
+ !insertmacro MUI_GUIINIT_BASIC
!ifndef MUI_UNFINISHPAGE_NOAUTOCLOSE
SetAutoClose true
@@ -332,44 +371,20 @@ Var MUI_TEMP2
!macroend
-!macro MUI_UNGUIINIT_BASIC
+!macro MUI_WELCOMEFINISHPAGE_INIT UNINSTALLER
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1037
- CreateFont $MUI_TEMP2 "$(MUI_FONT)" "$(MUI_FONTSIZE)" "700"
- SendMessage $MUI_TEMP1 ${WM_SETFONT} $MUI_TEMP2 0
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1038
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1034
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1039
- SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
-
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
- SetCtlColors $MUI_TEMP1 /BRANDING
- GetDlgItem $MUI_TEMP1 $HWNDPARENT 1256
- SetCtlColors $MUI_TEMP1 /BRANDING
- SendMessage $MUI_TEMP1 ${WM_SETTEXT} 0 "STR:$(^Branding) "
-
-!macroend
-
-!macro MUI_WELCOMEFINISHPAGE_INIT
-
- !ifdef MUI_WELCOMEPAGE | MUI_FINISHPAGE
+ !ifdef MUI_${UNINSTALLER}WELCOMEPAGE | MUI_${UNINSTALLER}FINISHPAGE
!ifndef MUI_WELCOMEFINISHPAGE_3LINES
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_WELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
!else
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_WELCOMEFINISHPAGE_INI_3LINES}" "ioSpecial.ini"
+ !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_INI_3LINES}" "ioSpecial.ini"
!endif
- File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_WELCOMEFINISHPAGE_BITMAP}"
+ File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP}"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\modern-wizard.bmp"
- !ifdef MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
+ !ifdef MUI_${UNINSTALLER}WELCOMEFINISHPAGE_BITMAP_NOSTRETCH
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Flags" ""
!endif
@@ -377,53 +392,155 @@ Var MUI_TEMP2
!macroend
-!macro MUI_UNWELCOMEFINISHPAGE_INIT
-
- !ifdef MUI_UNWELCOMEPAGE | UNMUI_FINISHPAGE
-
- !ifndef MUI_UNWELCOMEFINISHPAGE_3LINES
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_UNWELCOMEFINISHPAGE_INI}" "ioSpecial.ini"
- !else
- !insertmacro MUI_INSTALLOPTIONS_EXTRACT_AS "${MUI_UNWELCOMEFINISHPAGE_INI_3LINES}" "ioSpecial.ini"
- !endif
- File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${MUI_UNWELCOMEFINISHPAGE_BITMAP}"
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\modern-wizard.bmp"
-
- !ifdef MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH
- !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Flags" ""
- !endif
-
- !endif
-
-!macroend
-
-
-!macro MUI_HEADERIMAGE_INIT
+!macro MUI_HEADERIMAGE_INIT UNINSTALLER
!ifdef MUI_HEADERIMAGE
+
InitPluginsDir
- File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_BITMAP}"
- !ifndef MUI_HEADERIMAGE_NOSTRETCH
+ File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"
+
+ !ifndef MUI_HEADERIMAGE_${UNINSTALLER}NOSTRETCH
SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
!else
SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
!endif
+
!endif
!macroend
-!macro MUI_LANGUAGE LANGUAGE
+;--------------------------------
+;INTERFACE - FUNCTIONS
+
+!macro MUI_FUNCTION_GUIINIT
+
+ Function .onGUIInit
+
+ !insertmacro MUI_GUIINIT
+
+ !ifdef MUI_CUSTOMFUNCTION_GUIINIT
+ Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_DESCRIPTION_BEGIN
!verbose push
!verbose 3
- !include "${NSISDIR}\Contrib\Modern UI\Language files\${LANGUAGE}.nsh"
+ !ifndef MUI_VAR_TEXT
+ Var MUI_TEXT
+ !define MUI_VAR_TEXT
+ !endif
+
+ Function .onMouseOverSection
+ !insertmacro MUI_DESCRIPTION_BEGIN
!verbose pop
!macroend
+!macro MUI_FUNCTION_DESCRIPTION_END
+
+ !verbose push
+ !verbose 3
+
+ !insertmacro MUI_DESCRIPTION_END
+ FunctionEnd
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
+
+ !verbose push
+ !verbose 3
+
+ Function un.onMouseOverSection
+ !insertmacro MUI_DESCRIPTION_BEGIN
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_UNFUNCTION_DESCRIPTION_END
+
+ !verbose push
+ !verbose 3
+
+ !insertmacro MUI_DESCRIPTION_END
+ FunctionEnd
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_FUNCTION_ABORTWARNING
+
+ Function .onUserAbort
+ !ifdef MUI_ABORTWARNING
+ !insertmacro MUI_ABORTWARNING
+ !endif
+ !ifdef MUI_CUSTOMFUNCTION_ABORT
+ Call "${MUI_CUSTOMFUNCTION_ABORT}"
+ !endif
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTION_UNABORTWARNING
+
+ Function un.onUserAbort
+ !ifdef MUI_UNABORTWARNING
+ !insertmacro MUI_UNABORTWARNING
+ !endif
+ !ifdef MUI_CUSTOMFUNCTION_UNABORT
+ Call "${MUI_CUSTOMFUNCTION_UNABORT}"
+ !endif
+ FunctionEnd
+
+!macroend
+
+!macro MUI_UNFUNCTION_GUIINIT
+
+ Function un.onGUIInit
+
+ !insertmacro MUI_UNGUIINIT
+
+ !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
+ Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
+ !endif
+
+ FunctionEnd
+
+!macroend
+
+!macro MUI_FUNCTIONS_DESCRIPTION_BEGIN
+
+ ;1.65 compatibility
+
+ !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_BEGIN to MUI_FUNCTION_DESCRIPTION_BEGIN."
+
+ !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+
+!macroend
+
+!macro MUI_FUNCTIONS_DESCRIPTION_END
+
+ ;1.65 compatibility
+
+ !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_END to MUI_FUNCTION_DESCRIPTION_END."
+
+ !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
+!macroend
+
+;--------------------------------
+;START MENU FOLDER
!macro MUI_STARTMENU_GETFOLDER VAR
@@ -483,89 +600,8 @@ Var MUI_TEMP2
!macroend
-!macro MUI_LANGDLL_DISPLAY
-
- !verbose push
- !verbose 3
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- IfSilent mui.langdll_done
- !endif
-
- !ifndef MUI_LANGDLL_WINDOWTITLE
- !define MUI_LANGDLL_WINDOWTITLE "Installer Language"
- !endif
-
- !ifndef MUI_LANGDLL_INFO
- !define MUI_LANGDLL_INFO "Please select a language."
- !endif
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" mui.langdll_show
- StrCpy $LANGUAGE $MUI_TEMP1
- !ifndef MUI_LANGDLL_ALWAYSSHOW
- Goto mui.langdll_done
- !endif
- mui.langdll_show:
-
- !endif
-
- LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_PUSHLIST} ""
-
- Pop $LANGUAGE
- StrCmp $LANGUAGE "cancel" 0 +2
- Abort
-
- !ifdef NSIS_CONFIG_SILENT_SUPPORT
- mui.langdll_done:
- !else ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- mui.langdll_done:
- !endif
-
- !verbose pop
-
-!macroend
-
-!macro MUI_LANGDLL_SAVELANGUAGE
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
- !endif
-
-!macroend
-
-!macro MUI_UNGETLANGUAGE
-
- !verbose pop
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
- StrCmp $MUI_TEMP1 "" 0 mui.ungetlanguage_setlang
-
- !endif
-
- !insertmacro MUI_LANGDLL_DISPLAY
-
- !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
-
- Goto mui.ungetlanguage_done
-
- mui.ungetlanguage_setlang:
- StrCpy $LANGUAGE $MUI_TEMP1
-
- mui.ungetlanguage_done:
-
- !endif
-
- !verbose pop
-
-!macroend
-
;--------------------------------
-;PAGE COMMANDS
+;PAGES
!macro MUI_PAGE_INIT
@@ -967,121 +1003,9 @@ Var MUI_TEMP2
!macroend
;--------------------------------
-;INSTALL OPTIONS
+;PAGE FUNCTIONS
-!macro MUI_INSTALLOPTIONS_EXTRACT FILE
-
- !verbose push
- !verbose 3
-
- InitPluginsDir
-
- File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILE}" "Settings" "RTL" "$(^RTL)"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
-
- !verbose push
- !verbose 3
-
- InitPluginsDir
-
- File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
-
- !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILENAME}" "Settings" "RTL" "$(^RTL)"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_DISPLAY FILE
-
- !verbose push
- !verbose 3
-
- InstallOptions::dialog "$PLUGINSDIR\${FILE}"
- Pop $MUI_TEMP1
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
-
- !verbose push
- !verbose 3
-
- InstallOptions::dialog "$PLUGINSDIR\${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
-
- !verbose push
- !verbose 3
-
- InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_SHOW
-
- !verbose push
- !verbose 3
-
- InstallOptions::show
- Pop $MUI_TEMP1
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_SHOW_RETURN
-
- !verbose push
- !verbose 3
-
- InstallOptions::show
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
-
- !verbose push
- !verbose 3
-
- ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
-
- !verbose pop
-
-!macroend
-
-!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
-
- !verbose push
- !verbose 3
-
- WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
-
- !verbose pop
-
-!macroend
-
-;--------------------------------
-;FUNCTIONS
-
-!macro MUI_FUNCTION_CUSTOM TYPE
+!macro MUI_PAGE_FUNCTION_CUSTOM TYPE
!ifdef MUI_PAGE_CUSTOMFUNCTION_${TYPE}
Call "${MUI_PAGE_CUSTOMFUNCTION_${TYPE}}"
@@ -1090,20 +1014,6 @@ Var MUI_TEMP2
!macroend
-!macro MUI_FUNCTION_GUIINIT
-
- Function .onGUIInit
-
- !insertmacro MUI_GUIINIT
-
- !ifdef MUI_CUSTOMFUNCTION_GUIINIT
- Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
- !endif
-
- FunctionEnd
-
-!macroend
-
!macro MUI_FUNCTION_WELCOMEPAGE PRE LEAVE
!ifndef MUI_VAR_HWND
@@ -1130,7 +1040,7 @@ Var MUI_TEMP2
!undef MUI_WELCOMEPAGE_TEXT
!endif
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
GetDlgItem $MUI_TEMP1 $HWNDPARENT 1028
ShowWindow $MUI_TEMP1 ${SW_HIDE}
@@ -1166,7 +1076,7 @@ Var MUI_TEMP2
GetDlgItem $MUI_TEMP1 $MUI_HWND 1200
SetCtlColors $MUI_TEMP1 "" "${MUI_BGCOLOR}"
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
!insertmacro MUI_INSTALLOPTIONS_SHOW
@@ -1192,7 +1102,7 @@ Var MUI_TEMP2
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
@@ -1202,7 +1112,7 @@ Var MUI_TEMP2
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_LICENSE_SUBTITLE)
FunctionEnd
@@ -1215,13 +1125,13 @@ Var MUI_TEMP2
!insertmacro MUI_INNERDIALOG_TEXT 1040 "${MUI_LICENSEPAGE_TEXT_TOP}"
!undef MUI_LICENSEPAGE_TEXT_TOP
!endif
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
@@ -1235,7 +1145,7 @@ Var MUI_TEMP2
!endif
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_COMPONENTS_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
@@ -1260,13 +1170,13 @@ Var MUI_TEMP2
!insertmacro MUI_INNERDIALOG_TEXT 1043 "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
StrCpy $MUI_TEXT "$(MUI_INNERTEXT_COMPONENTS_DESCRIPTION_INFO)"
!endif
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
@@ -1275,16 +1185,16 @@ Var MUI_TEMP2
!macro MUI_FUNCTION_DIRECTORYPAGE PRE SHOW LEAVE
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_DIRECTORY_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_DIRECTORY_SUBTITLE)
FunctionEnd
Function "${SHOW}"
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
!macroend
@@ -1302,7 +1212,7 @@ Var MUI_TEMP2
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!ifdef MUI_STARTMENUPAGE_REGISTRY_ROOT & MUI_STARTMENUPAGE_REGISTRY_KEY & MUI_STARTMENUPAGE_REGISTRY_VALUENAME
@@ -1361,7 +1271,7 @@ Var MUI_TEMP2
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
@@ -1371,20 +1281,20 @@ Var MUI_TEMP2
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_${MUI_PAGE_UNINSTALLER}INSTALLING_TITLE) $(MUI_${MUI_PAGE_UNINSTALLER}TEXT_${MUI_PAGE_UNINSTALLER}INSTALLING_SUBTITLE)
FunctionEnd
Function "${SHOW}"
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
!insertmacro MUI_FINISHHEADER
!insertmacro MUI_LANGDLL_SAVELANGUAGE
@@ -1625,7 +1535,7 @@ Var MUI_TEMP2
mui.finish_load:
!endif
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_INSTALLOPTIONS_INITDIALOG "ioSpecial.ini"
Pop $MUI_HWND
@@ -1688,7 +1598,7 @@ Var MUI_TEMP2
mui.finish_show:
!endif
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
!ifdef MUI_FINISHPAGE_ABORTWARNINGCHECK
StrCpy $MUI_NOABORTWARNING "1"
@@ -1722,7 +1632,7 @@ Var MUI_TEMP2
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
!ifndef MUI_FINISHPAGE_NOREBOOTSUPPORT
@@ -1816,115 +1726,115 @@ Var MUI_TEMP2
!macroend
-!macro MUI_FUNCTION_DESCRIPTION_BEGIN
+;--------------------------------
+;INSTALL OPTIONS (CUSTOM PAGES)
- !verbose push
- !verbose 3
-
- !ifndef MUI_VAR_TEXT
- Var MUI_TEXT
- !define MUI_VAR_TEXT
- !endif
-
- Function .onMouseOverSection
- !insertmacro MUI_DESCRIPTION_BEGIN
-
- !verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_DESCRIPTION_END
+!macro MUI_INSTALLOPTIONS_EXTRACT FILE
!verbose push
!verbose 3
- !insertmacro MUI_DESCRIPTION_END
- FunctionEnd
+ InitPluginsDir
+
+ File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILE}" "Settings" "RTL" "$(^RTL)"
!verbose pop
-
+
!macroend
-!macro MUI_FUNCTIONS_DESCRIPTION_BEGIN
-
- ;1.65 compatibility
-
- !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_BEGIN to MUI_FUNCTION_DESCRIPTION_BEGIN."
-
- !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
-
-!macroend
-
-!macro MUI_FUNCTIONS_DESCRIPTION_END
-
- ;1.65 compatibility
-
- !warning "Modern UI macro name has changed. Please change MUI_FUNCTIONS_DESCRIPTION_END to MUI_FUNCTION_DESCRIPTION_END."
-
- !insertmacro MUI_FUNCTION_DESCRIPTION_END
-
-!macroend
-
-!macro MUI_UNFUNCTION_DESCRIPTION_BEGIN
+!macro MUI_INSTALLOPTIONS_EXTRACT_AS FILE FILENAME
!verbose push
!verbose 3
- Function un.onMouseOverSection
- !insertmacro MUI_DESCRIPTION_BEGIN
+ InitPluginsDir
+
+ File "/oname=$PLUGINSDIR\${FILENAME}" "${FILE}"
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILENAME}" "Settings" "RTL" "$(^RTL)"
!verbose pop
-
+
!macroend
-!macro MUI_UNFUNCTION_DESCRIPTION_END
+!macro MUI_INSTALLOPTIONS_DISPLAY FILE
+
+ !verbose push
+ !verbose 3
+
+ InstallOptions::dialog "$PLUGINSDIR\${FILE}"
+ Pop $MUI_TEMP1
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_DISPLAY_RETURN FILE
+
+ !verbose push
+ !verbose 3
+
+ InstallOptions::dialog "$PLUGINSDIR\${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_INITDIALOG FILE
+
+ !verbose push
+ !verbose 3
+
+ InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\${FILE}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_SHOW
!verbose push
!verbose 3
- !insertmacro MUI_DESCRIPTION_END
- FunctionEnd
+ InstallOptions::show
+ Pop $MUI_TEMP1
!verbose pop
-
-!macroend
-
-!macro MUI_FUNCTION_ABORTWARNING
-
- Function .onUserAbort
- !ifdef MUI_ABORTWARNING
- !insertmacro MUI_ABORTWARNING
- !endif
- !ifdef MUI_CUSTOMFUNCTION_ABORT
- Call "${MUI_CUSTOMFUNCTION_ABORT}"
- !endif
- FunctionEnd
!macroend
-!macro MUI_FUNCTION_UNABORTWARNING
+!macro MUI_INSTALLOPTIONS_SHOW_RETURN
- Function un.onUserAbort
- !ifdef MUI_UNABORTWARNING
- !insertmacro MUI_UNABORTWARNING
- !endif
- !ifdef MUI_CUSTOMFUNCTION_UNABORT
- Call "${MUI_CUSTOMFUNCTION_UNABORT}"
- !endif
- FunctionEnd
+ !verbose push
+ !verbose 3
+
+ InstallOptions::show
+
+ !verbose pop
!macroend
-!macro MUI_UNFUNCTION_GUIINIT
-
- Function un.onGUIInit
-
- !insertmacro MUI_UNGUIINIT
-
- !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
- Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
- !endif
-
- FunctionEnd
+
+!macro MUI_INSTALLOPTIONS_READ VAR FILE SECTION KEY
+
+ !verbose push
+ !verbose 3
+
+ ReadIniStr ${VAR} "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}"
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_INSTALLOPTIONS_WRITE FILE SECTION KEY VALUE
+
+ !verbose push
+ !verbose 3
+
+ WriteIniStr "$PLUGINSDIR\${FILE}" "${SECTION}" "${KEY}" "${VALUE}"
+
+ !verbose pop
!macroend
@@ -1932,20 +1842,20 @@ Var MUI_TEMP2
Function "${PRE}"
- !insertmacro MUI_FUNCTION_CUSTOM PRE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
!insertmacro MUI_HEADER_TEXT_PAGE $(MUI_UNTEXT_CONFIRM_TITLE) $(MUI_UNTEXT_CONFIRM_SUBTITLE)
FunctionEnd
Function "${SHOW}"
- !insertmacro MUI_FUNCTION_CUSTOM SHOW
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM SHOW
FunctionEnd
Function "${LEAVE}"
- !insertmacro MUI_FUNCTION_CUSTOM LEAVE
+ !insertmacro MUI_PAGE_FUNCTION_CUSTOM LEAVE
FunctionEnd
@@ -1977,31 +1887,101 @@ Var MUI_TEMP2
!macroend
;--------------------------------
-;INSERT ALL CODE
+;LANGUAGES
-!macro MUI_INSERT
+!macro MUI_LANGUAGE LANGUAGE
+
+ !verbose push
+ !verbose 3
- !ifdef MUI_INSERT_NSISCONF
- !insertmacro MUI_NSISCONF
+ !include "${NSISDIR}\Contrib\Modern UI\Language files\${LANGUAGE}.nsh"
+
+ !verbose pop
+
+!macroend
+
+;--------------------------------
+;LANGUAGE SELECTION DIALOG
+
+!macro MUI_LANGDLL_DISPLAY
+
+ !verbose push
+ !verbose 3
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ IfSilent mui.langdll_done
+ !endif
+
+ !ifndef MUI_LANGDLL_WINDOWTITLE
+ !define MUI_LANGDLL_WINDOWTITLE "Installer Language"
+ !endif
+
+ !ifndef MUI_LANGDLL_INFO
+ !define MUI_LANGDLL_INFO "Please select a language."
!endif
- !ifdef MUI_PRODUCT | MUI_VERSION
- !warning "The MUI_PRODUCT and MUI_VERSION defines have been removed. Use a normal Name command now."
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" mui.langdll_show
+ StrCpy $LANGUAGE $MUI_TEMP1
+ !ifndef MUI_LANGDLL_ALWAYSSHOW
+ Goto mui.langdll_done
+ !endif
+ mui.langdll_show:
+
!endif
- !ifndef MUI_INSERT_INTERFACE
- !insertmacro MUI_INTERFACE
- !define MUI_INSERT_INTERFACE
+ LangDLL::LangDialog "${MUI_LANGDLL_WINDOWTITLE}" "${MUI_LANGDLL_INFO}" A ${MUI_LANGDLL_PUSHLIST} ""
+
+ Pop $LANGUAGE
+ StrCmp $LANGUAGE "cancel" 0 +2
+ Abort
+
+ !ifdef NSIS_CONFIG_SILENT_SUPPORT
+ mui.langdll_done:
+ !else ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ mui.langdll_done:
+ !endif
+
+ !verbose pop
+
+!macroend
+
+!macro MUI_LANGDLL_SAVELANGUAGE
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+ WriteRegStr "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}" $LANGUAGE
!endif
- !insertmacro MUI_FUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_ABORTWARNING
+!macroend
+
+!macro MUI_UNGETLANGUAGE
+
+ !verbose pop
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
- !ifdef MUI_UNINSTALLER
- !insertmacro MUI_UNFUNCTION_GUIINIT
- !insertmacro MUI_FUNCTION_UNABORTWARNING
+ ReadRegStr $MUI_TEMP1 "${MUI_LANGDLL_REGISTRY_ROOT}" "${MUI_LANGDLL_REGISTRY_KEY}" "${MUI_LANGDLL_REGISTRY_VALUENAME}"
+ StrCmp $MUI_TEMP1 "" 0 mui.ungetlanguage_setlang
+
+ !endif
+
+ !insertmacro MUI_LANGDLL_DISPLAY
+
+ !ifdef MUI_LANGDLL_REGISTRY_ROOT & MUI_LANGDLL_REGISTRY_KEY & MUI_LANGDLL_REGISTRY_VALUENAME
+
+ Goto mui.ungetlanguage_done
+
+ mui.ungetlanguage_setlang:
+ StrCpy $LANGUAGE $MUI_TEMP1
+
+ mui.ungetlanguage_done:
+
!endif
+ !verbose pop
+
!macroend
;--------------------------------
@@ -2226,6 +2206,4 @@ Var MUI_TEMP2
!endif
-!ifndef MUI_MANUALVERBOSE
- !verbose 4
-!endif
\ No newline at end of file
+!verbose 4
\ No newline at end of file