From b2b64183b2b8bd9eabac75ca802adbb55fc4e194 Mon Sep 17 00:00:00 2001
From: joostverburg 3. Define settings The Modern UI should know which things it should insert. Use the following defines: Use defines to let the Modern UI know what it
+ should insert. Most defines (i.e. MUI_WELCOMEPAGE) don't need
+ a value, but others should be used to define a value for the
+ Modern UI (i.e. MUI_FINISHPAGE_RUN): You can also use a LangString for the Readme and Run filenames,
- if you have different files for different languages: All defines are optional, if you don't define
+ a page, the page won't be shown. If you don't define a value,
+ the Modern UI won't use that option. MUI_WELCOMEPAGE MUI_LICENSEPAGE MUI_COMPONENTSPAGE MUI_DIRECTORYPAGE MUI_STARTMENUPAGE MUI_STARTMENU_VARIABLE MUI_STARTMENU_DEFAULTFOLDER MUI_FINISHPAGE MUI_FINISHPAGE_RUN MUI_FINISHPAGE_RUN_PARAMETERS MUI_FINISHPAGE_SHOWREADME MUI_FINISHPAGE_NOAUTOCLOSE MUI_FINISHPAGE_NOREBOOTSUPPORT MUI_ABORTWARNING MUI_CUSTOMPAGECOMMANDS MUI_CUSTOMGUIINIT MUI_UNINSTALLER MUI_UNCUSTOMPAGECOMMANDS MUI_UNCUSTOMGUIINIT 4. Insert language files Insert the Modern UI language files for the languages you are using: Have a look at the language files for a complete list of all the
names.
- NOTE: Not all language files contain strings for the
+ Note: Not all language files contain strings for the
new Start Menu Folder selection, Welcome and Finish pages yet. If you are using one of these
pages and the language file does not contain these strings, you should always define them. 5. Define interface settings (optional) You can also change the settings of the interface by usings defines: If you don't define a setting, the default will be used. The following settings are available: (default values) MUI_UI (${NSISDIR}\Contrib\UIs\modern.exe)
-!define MUI_WELCOMEPAGE ;Welcome page
-!define MUI_LICENSEPAGE ;License page
-!define MUI_COMPONENTSPAGE ;Component-selection page
-!define MUI_DIRECTORYPAGE ;Directory-selection page
-
-!define MUI_STARTMENUPAGE ;Start Menu Folder selection page
- !define MUI_STARTMENU_VARIABLE "$VARNAME" ;The variable to store the current
- ;Start Menu Folder
- !define MUI_STARTMENU_DEFAULTFOLDER "Folder Name" ;The default Start Menu Folder
-
-!define MUI_FINISHPAGE ;Finish page with options to run the program or reboot
- !define MUI_FINISHPAGE_RUN "$INSTDIR\File.exe" ;Option to run a file
- !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Readme.txt" ;Option to show a Readme
- !define MUI_FINISHPAGE_NOAUTOCLOSE ;Do not automatically jump to the finish page,
- ;to allow the user to check the log
- !define MUI_FINISHPAGE_NOREBOOTSUPPORT ;Disables support for a reboot option.
- ;Use this if you are not using /REBOOTOK
- ;or SetRebootFlag.
-
-!define MUI_ABORTWARNING ;Abort warning messagebox
-
-!define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
-!define MUI_CUSTOMGUIINIT ;Use customized .onGUIInit function
-
-!define MUI_UNINSTALLER ;Uninstaller
-
-!define MUI_UNCUSTOMPAGECOMMANDS ;Use customized uninstaller pages
-!define MUI_UNCUSTOMGUIINIT ;Use customized un.onGUIInit function
-
-
-LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
-
-!define MUI_FINISHPAGE_SHOWREADME "$(FILE_README)"
+!define MUI_WELCOMEPAGE
+!define MUI_FINISHPAGE_RUN "$INSTDIR\Application.exe"
+
+ Show the welcome page.
+ Show the license page.
+ Show the component selection page.
+ Show the directory selection page.
+ Show the Start Menu Folder selection page page.
+ 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)
+ if you are using the Start Menu Folder selection page.
+ The default start menu Folder. Define $(LANGSTRINGNAME) is you want
+ to use a language string.
+ Show the Finish page.
+ Applcation which the user can select to run (using a checkbox).
+ You don't need to put quotes around the value when it contains spaces.
+ Parameters for the application to run. Don't forget to escape double
+ quotes ($\") in the value.
+ File which the user can select to view (using a checkbox).
+ You don't need to put quotes around the value when it contains spaces.
+ Do not automatically jump to the finish page, to allow the user to
+ check the log.
+ Disables support for a reboot option. Use this to save some space if
+ you are not using /REBOOTOK or SetRebootFlag.
+ Show a message box with a warning (are you sure?) when the user closes
+ the installation.
+ Don't insert Page commands. Use this if you are using custom Page
+ commands to add your own pages.
+ Don't insert the .onGUIInit function. Use this if you want to add
+ custom code to the function. More info...
+ Define if you are using an uninstaller.
+ Don't insert UninstPage commands. Use this if you are using custom
+ UninstPage commands to add your own pages.
+ Don't insert the un.onGUIInit function. Use this if you want to add
+ custom code to the function. More info...!insertmacro MUI_LANGUAGE "English"
@@ -185,10 +209,10 @@ LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
- Please help to translate the new strings and post them at the
+ Please help to translate the new strings and post them at the
NSIS Forum.
- The interface file with the dialog resources
MUI_ICON (${NSISDIR}\Contrib\Icons\modern-install.ico)
- The icon of the instaleller
MUI_UNICON (${NSISDIR}\Contrib\Icons\modern-uninstall.ico)
- The icon of the uninstaleller
MUI_CHECKBITMAP (${NSISDIR}\Contrib\Icons\modern.bmp)
- The bitmap with images for the checks of the component select treeview
MUI_BRANDINGTEXT (Nullsoft Install System ?.??)
- The text at the bottom left corner of the window
MUI_FONT, MUI_FONTSIZE (MS Shell Dlg, 8)
The font for the normal texts.
MUI_FONT_HEADER, MUI_FONTSIZE_HEADER, MUI_FONTSTYLE_HEADER
@@ -214,13 +238,13 @@ LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
(Verdana, 12, 700)
The font for the title on the Welcome and Finish pages. Fontstyle: [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]
MUI_INSTALLCOLORS (/windows)
- The hexadecimal colors of the details screen ("foreground" "background")
+ The hexadecimal colors of the details screen ("foreground" "background").
MUI_PROGRESSBAR (smooth)
- The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or "" for a old-school windows look)
MUI_SPECIALINI (${NSISDIR}\Contrib\Modern UI\ioSpecial.ini)
- Install Options INI File for the Welcome and Finish pages
MUI_SPECIALBITMAP (${NSISDIR}\Contrib\Icons\modern-wizard.bmp)
- Bitmap for the Welcome and Finish pages
6. Insert the MUI_SYSTEM macro
!insertmacro MUI_SYSTEM
7. Insert the MUI_SECTIONS_FINISHHEADER macro @@ -337,7 +361,7 @@ FunctionEnd To change them, you need to edit this file and recompile NSIS.
To modify the Welcome and Finish dialog, edit the Install Options INI File ioWizard.ini in the 'Contrib\Modern UI' directory. -
Customize the GUIInit function
+Customize the GUIInit function
If you want to insert your own code in the .onGUIInit function, define MUI_CUSTOMGUIINIT (MUI_UNCUSTOMGUIINIT for the uninstaller) before inserting MUI_SYSTEM and insert the MUI_GUIINIT (MUI_UNGUIINIT for the uninstaller) macro @@ -357,6 +381,7 @@ FunctionEnd