diff --git a/Contrib/Modern UI/Changelog.txt b/Contrib/Modern UI/Changelog.txt
index 4cde9361..e7a2784e 100644
--- a/Contrib/Modern UI/Changelog.txt
+++ b/Contrib/Modern UI/Changelog.txt
@@ -1,10 +1,12 @@
NSIS Modern User Interface - VERSION HISTORY
-1.5 - Novermber 8, 2002
+1.5 - Novermber 9, 2002
* New language file format
* Language strings can be changed in the script without editing language files
* Install Options macro's updated. MUI_INSTALLOPTIONS_DISPLAY is the standard macro now.
Use MUI_INSTALLOPTIONS_INITDIALOG and MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls.
+* Start Menu Folder selection page
+* Compatible with new paging system
* Renamed macro's and defines
* Some small fixes
diff --git a/Contrib/Modern UI/Language files/English.nsh b/Contrib/Modern UI/Language files/English.nsh
index 61cc24e7..ddff5dff 100644
--- a/Contrib/Modern UI/Language files/English.nsh
+++ b/Contrib/Modern UI/Language files/English.nsh
@@ -34,6 +34,11 @@
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISHED_TITLE "Finished"
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISHED_SUBTITLE "Setup was completed successfully."
+ !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_WINDOWTITLE "Start Menu Folder"
+ !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_TITLE "Choose Start Menu Folder"
+ !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_STARTMENU_SUBTITLE "Choose a Start Menu folder for the program's shortcuts."
+ !insertmacro MUI_LANGUAGEFILE_STRING MUI_INNERTEXT_STARTMENU "Select the Start Menu folder in which you would like to create the program's shotcuts. You can also enter a name to create a new folder. Click Install to start the installation."
+
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_ABORTWARNING "Are you sure you want to quit ${MUI_PRODUCT} Setup?"
!insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_WINDOWTITLE "${MUI_NAME} Setup"
diff --git a/Contrib/Modern UI/Readme.html b/Contrib/Modern UI/Readme.html
index 5f203fe1..d2e44093 100644
--- a/Contrib/Modern UI/Readme.html
+++ b/Contrib/Modern UI/Readme.html
@@ -137,14 +137,17 @@ with a custom user interface.
!define MUI_COMPONENTSPAGE ;Component-selection page
!define MUI_DIRECTORYPAGE ;Directory-selection page
!define MUI_LICENSEPAGE ;License page
+!define MUI_STARTMENUPAGE ;Start Menu-selection page
+
!define MUI_ABORTWARNING ;Abort warning messagebox
-!define MUI_INSTALLOPTIONS ;Install Options
+
!define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
+!define MUI_WINDOWTITLE ;Insert string for the window title
!define MUI_UNINSTALLER ;Uninstaller
-!define MUI_UNINSTALLOPTIONS ;Install Options in Uninstaller
-!define MUI_CUSTOMPAGECOMMANDS ;Use customized uninstaller pages
+!define MUI_UNCUSTOMPAGECOMMANDS ;Use customized uninstaller pages
+ MUI_WINDOWTITLE is required by MUI_(UN)INSTALLOPTIONS_WRITETITLE.
Insert the Modern UI language files for the languages you are using:
!insertmacro MUI_LANGUAGE "English"
@@ -158,6 +161,11 @@ with a custom user interface.
Have a look at the language files for a complete list of all the
names.
+
NOTE: Not all language files contain strings for the
+ new Start Menu-selection page yet. If you are using a language file which does not contain
+ these strings, you should always define them.
Please help to translate the new strings and
+ post them at the NSIS
+ Forum.
You can change the settings of the interface by usings defines:
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"
@@ -217,9 +225,8 @@ SectionEnd
Have a look at the
Install Options documentation for info about creating Install Options INI Files.
-If you want add custom pages to your installer using Install Options,
-you should insert you own page commands to set the order of the pages and the names
-of the page functions.
+If you want add custom pages to your installer, you should insert you
+own page commands to set the order of the pages and the names of the page functions.
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_COMPONENTS
@@ -242,19 +249,23 @@ LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page"
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
Function [function name]
- !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioFile.ini"
FunctionEnd
-
+
Use these macro's in .onInit to write the page
-title and abortwarning to an INI File.
+title to an Install Options INI File.
LangString TEXT_IO_PAGETITLE ${LANG_ENGLISH} "Page Title"
!insertmacro MUI_INSTALLOPTIONS_WRITETITLE "ioFile.ini" "$(TEXT_IO_PAGETITLE)"
-!insertmacro MUI_INSTALLOPTIONS_WRITEABORTWARNING "ioFile.ini" \
-"$(TEXT_IO_PAGETITLE)"
+
+For the uninstaller, use:
+
+LangString UNTEXT_IO_PAGETITLE ${LANG_ENGLISH} "Uninstaller Page Title"
+
+!insertmacro MUI_UNINSTALLOPTIONS_WRITETITLE "ioFile.ini" "$(UNTEXT_IO_PAGETITLE)"
Basic: Basic.nsi
@@ -283,7 +294,7 @@ The 'verifying installer' and 'unpacking data' texts are defined in
To change them, you need to edit this file and recompile NSIS.
-- 1.5 - November 8, 2002
+
- 1.5 - November 9, 2002
- New language file format
- Language strings can be changed in the script without editing
@@ -291,6 +302,8 @@ The 'verifying installer' and 'unpacking data' texts are defined in
- Install Options macro's updated. MUI_INSTALLOPTIONS_DISPLAY is
the standard macro now. Use MUI_INSTALLOPTIONS_INITDIALOG and
MUI_INSTALLOPTIONS_SHOW if you want to customize dialog controls.
+
- Start Menu Folder selection page
+
- Compatible with new paging system
- Renamed macro's and defines
- Some small fixes
diff --git a/Contrib/Modern UI/System.nsh b/Contrib/Modern UI/System.nsh
index 959fb364..2f1a01e9 100644
--- a/Contrib/Modern UI/System.nsh
+++ b/Contrib/Modern UI/System.nsh
@@ -228,6 +228,7 @@
!insertmacro MUI_PAGECOMMAND_LICENSE
!insertmacro MUI_PAGECOMMAND_COMPONENTS
!insertmacro MUI_PAGECOMMAND_DIRECTORY
+ !insertmacro MUI_PAGECOMMAND_STARTMENU
!insertmacro MUI_PAGECOMMAND_INSTFILES
!endif
@@ -272,6 +273,18 @@
!macroend
+!macro MUI_PAGECOMMAND_STARTMENU
+
+ !verbose 3
+
+ !ifdef MUI_STARTMENUPAGE
+ Page custom SetStartmenu
+ !endif
+
+ !verbose 4
+
+!macroend
+
!macro MUI_PAGECOMMAND_INSTFILES
!verbose 3
@@ -337,8 +350,7 @@
;Init plugin system
!ifndef MUI_INSTALLOPTIONS_INITPLUGINS
!define MUI_INSTALLOPTIONS_INITPLUGINS
- Call Initialize_____Plugins
- SetDetailsPrint both
+ InitPluginsDir
!endif
File "/oname=$PLUGINSDIR\${FILE}" "${FILE}"
@@ -354,8 +366,7 @@
;Init plugin system
!ifndef MUI_INSTALLOPTIONS_UNINITPLUGINS
!define MUI_INSTALLOPTIONS_UNINITPLUGINS
- Call un.Initialize_____Plugins
- SetDetailsPrint both
+ InitPluginsDir
!endif
File /oname=$PLUGINSDIR\${FILE} "${FILE}"
@@ -367,21 +378,10 @@
!macro MUI_INSTALLOPTIONS_DISPLAY FILE
!verbose 3
-
- Push ${MUI_TEMP1}
-
+
InstallOptions::dialog "$PLUGINSDIR\${FILE}"
Pop ${MUI_TEMP1}
- StrCmp ${MUI_TEMP1} "cancel" "" +2
- Quit
-
- StrCmp ${MUI_TEMP1} "back" "" +3
- Pop ${MUI_TEMP1}
- Abort
-
- Pop ${MUI_TEMP1}
-
!verbose 4
!macroend
@@ -455,18 +455,18 @@
!macroend
-!macro MUI_INSTALLOPTIONS_WRITEABORTWARNING FILE
-
+!macro MUI_UNINSTALLOPTIONS_WRITETITLE FILE TITLE
+
!verbose 3
- !ifdef MUI_ABORTWARNING
+ Push ${MUI_TEMP1}
- !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILE}" "Settings" "CancelConfirm" "$(MUI_TEXT_ABORTWARNING)"
- !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILE}" "Settings" "CancelConfirmCaption" "$(MUI_TEXT_WINDOWTITLE)"
+ StrCpy ${MUI_TEMP1} "$(MUI_UNTEXT_WINDOWTITLE)"
+ StrCpy ${MUI_TEMP2} "${MUI_TEMP1}: ${TITLE}"
+
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "${FILE}" "Settings" "Title" "${MUI_TEMP1}"
- !endif
-
- !verbose 4
+ Pop ${MUI_TEMP1}
!macroend
@@ -519,6 +519,10 @@
!insertmacro MUI_FUNCTIONS_DIRECTORYPAGE SetDirectory SetDirectoryDialog
!endif
+ !ifdef MUI_STARTMENUPAGE
+ !insertmacro MUI_FUNCTIONS_STARTMENUPAGE SetStartmenu
+ !endif
+
!insertmacro MUI_FUNCTIONS_INSTFILESPAGE SetInstFiles
!verbose 4
@@ -558,15 +562,15 @@
!macroend
-!macro MUI_FUNCTIONS_DIRECTORYPAGE SETDIRECTORYPAGE SETDIRECTORYDIALOGPAGE
+!macro MUI_FUNCTIONS_DIRECTORYPAGE SETDIRECTORY SETDIRECTORYDIALOG
!verbose 3
- Function "${SETDIRECTORYPAGE}"
+ Function "${SETDIRECTORY}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_DIRECTORY_TITLE) $(MUI_TEXT_DIRECTORY_SUBTITLE)
FunctionEnd
- Function "${SETDIRECTORYDIALOGPAGE}"
+ Function "${SETDIRECTORYDIALOG}"
!insertmacro MUI_INNERDIALOG_TEXT 1041 $(MUI_INNERTEXT_DIRECTORY_DESTINATION)
FunctionEnd
@@ -574,6 +578,42 @@
!macroend
+!macro MUI_FUNCTIONS_STARTMENUPAGE SETSTARTMENU
+
+ !verbose 3
+
+ ;Check defines
+ !ifndef MUI_STARTMENU_VARIABLE
+ !define MUI_STARTMENU_VARIABLE "$9"
+ !endif
+ !ifndef MUI_STARTMENU_DEFAULTFOLDER
+ !define MUI_STARTMENU_DEFAULTFOLDER "${MUI_PRODUCT}"
+ !endif
+
+ Function "${SETSTARTMENU}"
+
+ !insertmacro MUI_HEADER_TEXT $(MUI_TEXT_STARTMENU_TITLE) $(MUI_TEXT_STARTMENU_SUBTITLE)
+
+ Push ${MUI_TEMP1}
+ Push ${MUI_TEMP2}
+
+ StrCpy ${MUI_TEMP1} "$(MUI_TEXT_WINDOWTITLE)"
+ StrCpy ${MUI_TEMP2} "$(MUI_TEXT_STARTMENU_WINDOWTITLE)"
+
+ SendMessage $HWNDPARENT ${WM_SETTEXT} 0 "STR:${MUI_TEMP1}: ${MUI_TEMP2}"
+
+ StartMenu::Select /noicon /autoadd /text "$(MUI_INNERTEXT_STARTMENU)" /lastused "${MUI_STARTMENU_VARIABLE}" "${MUI_STARTMENU_DEFAULTFOLDER}"
+ Pop "${MUI_STARTMENU_VARIABLE}"
+
+ Pop ${MUI_TEMP1}
+ Pop ${MUI_TEMP2}
+
+ FunctionEnd
+
+ !verbose 4
+
+!macroend
+
!macro MUI_FUNCTIONS_INSTFILESPAGE SETINSTFILES
!verbose 3
@@ -766,6 +806,12 @@
!macro MUI_LANGUAGEFILE_END
+ !ifdef MUI_STARTMENUPAGE
+ !ifndef MUI_WINDOWTITLE
+ !define MUI_WINDOWTITLE
+ !endif
+ !endif
+
!insertmacro MUI_LANGUAGEFILE_DEFINE "MUI_${LANGUAGE}_LANGNAME" "MUI_LANGNAME" "${MUI_LANGNAME}"
!insertmacro MUI_LANGUAGEFILE_NSISCOMMAND Name MUI_NAME "${MUI_NAME}"
@@ -792,6 +838,13 @@
!insertmacro MUI_LANGUAGEFILE_LANGSTRING MUI_INNERTEXT_DIRECTORY_DESTINATION "${MUI_INNERTEXT_DIRECTORY_DESTINATION}"
!endif
+ !ifdef MUI_STARTMENUPAGE
+ !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_STARTMENU_WINDOWTITLE" "${MUI_TEXT_STARTMENU_WINDOWTITLE}"
+ !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_STARTMENU_TITLE" "${MUI_TEXT_STARTMENU_TITLE}"
+ !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_STARTMENU_SUBTITLE" "${MUI_TEXT_STARTMENU_SUBTITLE}"
+ !insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_INNERTEXT_STARTMENU" "${MUI_INNERTEXT_STARTMENU}"
+ !endif
+
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_TITLE" "${MUI_TEXT_INSTALLING_TITLE}"
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_INSTALLING_SUBTITLE" "${MUI_TEXT_INSTALLING_SUBTITLE}"
@@ -802,7 +855,7 @@
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_ABORTWARNING" "${MUI_TEXT_ABORTWARNING}"
!endif
- !ifdef MUI_INSTALLOPTIONS
+ !ifdef MUI_WINDOWTITLE
!insertmacro MUI_LANGUAGEFILE_LANGSTRING "MUI_TEXT_WINDOWTITLE" "${MUI_TEXT_WINDOWTITLE}"
!endif
@@ -818,7 +871,7 @@
!insertmacro MUI_LANGUAGEFILE_UNLANGSTRING "MUI_UNTEXT_FINISHED_TITLE" "${MUI_UNTEXT_FINISHED_TITLE}"
!insertmacro MUI_LANGUAGEFILE_UNLANGSTRING "MUI_UNTEXT_FINISHED_SUBTITLE" "${MUI_UNTEXT_FINISHED_SUBTITLE}"
- !ifdef MUI_UNINSTALLOPTIONS
+ !ifdef MUI_UNWINDOWTITLE
!insertmacro MUI_LANGUAGEFILE_UNLANGSTRING "MUI_UNTEXT_WINDOWTITLE" "${MUI_UNTEXT_WINDOWTITLE}"
!endif
!endif
diff --git a/Examples/Modern UI/InstallOptions.nsi b/Examples/Modern UI/InstallOptions.nsi
index 51b0352b..ed14baa8 100644
--- a/Examples/Modern UI/InstallOptions.nsi
+++ b/Examples/Modern UI/InstallOptions.nsi
@@ -10,13 +10,13 @@
;--------------------------------
;Configuration
- !define MUI_INSTALLOPTIONS
-
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
!define MUI_DIRECTORYPAGE
!define MUI_ABORTWARNING
!define MUI_UNINSTALLER
+
+ !define MUI_WINDOWTITLE
!define TEMP1 $R0
!define TEMP2 $R1
@@ -114,25 +114,20 @@ Function .onInit
!insertmacro MUI_INSTALLOPTIONS_WRITETITLE "ioB.ini" "$(TEXT_IO_PAGETITLE_B)"
!insertmacro MUI_INSTALLOPTIONS_WRITETITLE "ioC.ini" "$(TEXT_IO_PAGETITLE_C)"
- ;Abort warnings for Install Options dialogs
- !insertmacro MUI_INSTALLOPTIONS_WRITEABORTWARNING "ioA.ini"
- !insertmacro MUI_INSTALLOPTIONS_WRITEABORTWARNING "ioB.ini"
- !insertmacro MUI_INSTALLOPTIONS_WRITEABORTWARNING "ioC.ini"
-
FunctionEnd
Function SetCustomA
- !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioA.ini"
FunctionEnd
Function SetCustomB
- !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioB.ini"
FunctionEnd
Function SetCustomC
- !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
+ !insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioC.ini"
FunctionEnd
diff --git a/Examples/Modern UI/MultiLanguage.nsi b/Examples/Modern UI/MultiLanguage.nsi
index 2e363aa0..4a7b2981 100644
--- a/Examples/Modern UI/MultiLanguage.nsi
+++ b/Examples/Modern UI/MultiLanguage.nsi
@@ -101,15 +101,11 @@ Section $(TITLE_SecCopyUI) SecCopyUI
SetOutPath "$INSTDIR"
File "${NSISDIR}\Contrib\UIs\modern.exe"
- WriteUninstaller "$INSTDIR\Uninstall.exe"
-
-SectionEnd
-
-Section ""
-
- ;Invisible section to write the language to the registry
+ ;Write language to the registry (for the uninstaller)
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "Installer Language" $LANGUAGE
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
SectionEnd
!insertmacro MUI_SECTIONS_FINISHHEADER ;Insert this macro after the sections