added mui_finishpage_run_parameters, updated documentation

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1906 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-12-06 16:13:20 +00:00
parent 2887407beb
commit b2b64183b2
3 changed files with 83 additions and 53 deletions

View file

@ -4,6 +4,7 @@ NSIS Modern User Interface - VERSION HISTORY
* Final version for NSIS 2 beta 0
* modern3.exe UI without description area
* Different translation for finish page title
* Define for parameters for the application to run on the finishpage
* Bugfixes
1.6 - November 18, 2002

View file

@ -134,44 +134,68 @@ you should always escape it ($\"), because the Modern UI macro's use "
!define MUI_VERSION "1.0" ;Define your own software version here
</pre>
<p class="subheader">3. Define settings</p>
<p class="text">The Modern UI should know which things it should insert. Use the following defines:</p>
<p class="text">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):</p>
<pre class="margin">
!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
</pre>
<p class="text">You can also use a LangString for the Readme and Run filenames,
if you have different files for different languages:</p>
<pre class="margin">
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"
</pre>
<p class="text">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.</p>
<p class="text"><span class="bold">MUI_WELCOMEPAGE</span><br>
Show the welcome page.</p>
<p class="text"><span class="bold">MUI_LICENSEPAGE</span><br>
Show the license page.</p>
<p class="text"><span class="bold">MUI_COMPONENTSPAGE</span><br>
Show the component selection page.</p>
<p class="text"><span class="bold">MUI_DIRECTORYPAGE</span><br>
Show the directory selection page.</p>
<p class="text"><span class="bold">MUI_STARTMENUPAGE</span><br>
Show the Start Menu Folder selection page page.</p>
<p class="text"><span class="bold">MUI_STARTMENU_VARIABLE</span><br>
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.</p>
<p class="text"><span class="bold">MUI_STARTMENU_DEFAULTFOLDER</span><br>
The default start menu Folder. Define $(LANGSTRINGNAME) is you want
to use a language string.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE</span><br>
Show the Finish page.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN</span><br>
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.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_RUN_PARAMETERS</span><br>
Parameters for the application to run. Don't forget to escape double
quotes ($\") in the value.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_SHOWREADME</span><br>
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.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_NOAUTOCLOSE</span><br>
Do not automatically jump to the finish page, to allow the user to
check the log.</p>
<p class="text"><span class="bold">MUI_FINISHPAGE_NOREBOOTSUPPORT</span><br>
Disables support for a reboot option. Use this to save some space if
you are not using /REBOOTOK or SetRebootFlag.</p>
<p class="text"><span class="bold">MUI_ABORTWARNING</span><br>
Show a message box with a warning (are you sure?) when the user closes
the installation.</p>
<p class="text"><span class="bold">MUI_CUSTOMPAGECOMMANDS</span><br>
Don't insert Page commands. Use this if you are using custom Page
commands to add your own pages.</p>
<p class="text"><span class="bold">MUI_CUSTOMGUIINIT</span><br>
Don't insert the .onGUIInit function. Use this if you want to add
custom code to the function. <a href="#customGUIInit">More info...</a></p>
<p class="text"><span class="bold">MUI_UNINSTALLER</span><br>
Define if you are using an uninstaller.</p>
<p class="text"><span class="bold">MUI_UNCUSTOMPAGECOMMANDS</span><br>
Don't insert UninstPage commands. Use this if you are using custom
UninstPage commands to add your own pages.</p>
<p class="text"><span class="bold">MUI_UNCUSTOMGUIINIT</span><br>
Don't insert the un.onGUIInit function. Use this if you want to add
custom code to the function. <a href="#customGUIInit">More info...</a></p>
<p class="subheader">4. Insert language files</p>
<p class="text">Insert the Modern UI language files for the languages you are using:</p>
<pre class="margin">!insertmacro MUI_LANGUAGE "English"</pre>
@ -185,10 +209,10 @@ LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
</pre>
<p class="text">Have a look at the language files for a complete list of all the
names.
<p class="text"><span class="bold">NOTE:</span> Not all language files contain strings for the
<p class="text"><span class="bold">Note:</span> 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.<br>
Please help to translate the new strings and post them at the
Please help to translate the new strings and post them at the
<a href="http://forums.winamp.com/forumdisplay.php?forumid=65">NSIS Forum</a>.</p>
<p class="subheader">5. Define interface settings (optional)</p>
<p class="text">You can also change the settings of the interface by usings defines:</p>
@ -196,15 +220,15 @@ LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
<p class="text">If you don't define a setting, the default will be used.</p>
<p class="text">The following settings are available: <i>(default values)</i></p>
<p class="text"><span class="bold">MUI_UI</span> <i>(${NSISDIR}\Contrib\UIs\modern.exe)</i><br>
The interface file with the dialog resources</p>
The interface file with the dialog resources.</p>
<p class="text"><span class="bold">MUI_ICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-install.ico)</i><br>
The icon of the instaleller</p>
The icon of the instaleller.</p>
<p class="text"><span class="bold">MUI_UNICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-uninstall.ico)</i><br>
The icon of the uninstaleller</p>
The icon of the uninstaleller.</p>
<p class="text"><span class="bold">MUI_CHECKBITMAP</span> <i>(${NSISDIR}\Contrib\Icons\modern.bmp)</i><br>
The bitmap with images for the checks of the component select treeview</p>
The bitmap with images for the checks of the component select treeview.</p>
<p class="text"><span class="bold">MUI_BRANDINGTEXT</span> <i>(Nullsoft Install System ?.??)</i><br>
The text at the bottom left corner of the window</p>
The text at the bottom left corner of the window.</p>
<p class="text"><span class="bold">MUI_FONT, MUI_FONTSIZE</span> <i>(MS Shell Dlg, 8)</i><br>
The font for the normal texts.</p>
<p class="text"><span class="bold">MUI_FONT_HEADER, MUI_FONTSIZE_HEADER, MUI_FONTSTYLE_HEADER</span>
@ -214,13 +238,13 @@ LangString FILE_README ${LANG_ENGLISH} "$INSTDIR\Readme-English.txt"
<i>(Verdana, 12, 700)</i><br>
The font for the title on the Welcome and Finish pages. Fontstyle: [weight] [/ITALIC] [/UNDERLINE] [/STRIKE]</p>
<p class="text"><span class="bold">MUI_INSTALLCOLORS</span> <i>(/windows)</i><br>
The hexadecimal colors of the details screen (&quot;foreground&quot; &quot;background&quot;)
The hexadecimal colors of the details screen (&quot;foreground&quot; &quot;background&quot;).
<p class="text"><span class="bold">MUI_PROGRESSBAR</span> <i>(smooth)</i><br>
The style of the progress bar (&quot;colored&quot; to use the MUI_INSTALLCOLORS or &quot;&quot; for a old-school windows look)</p>
The style of the progress bar (&quot;colored&quot; to use the MUI_INSTALLCOLORS or &quot;&quot; for a old-school windows look).</p>
<p class="text"><span class="bold">MUI_SPECIALINI</span> <i>(${NSISDIR}\Contrib\Modern UI\ioSpecial.ini)</i><br>
Install Options INI File for the Welcome and Finish pages</p>
Install Options INI File for the Welcome and Finish pages.</p>
<p class="text"><span class="bold">MUI_SPECIALBITMAP</span> <i>(${NSISDIR}\Contrib\Icons\modern-wizard.bmp)</i><br>
Bitmap for the Welcome and Finish pages</p>
Bitmap for the Welcome and Finish pages.</p>
<p class="subheader">6. Insert the MUI_SYSTEM macro</p>
<pre class="margin">!insertmacro MUI_SYSTEM</pre>
<p class="subheader">7. Insert the MUI_SECTIONS_FINISHHEADER macro
@ -337,7 +361,7 @@ FunctionEnd
To change them, you need to edit this file and recompile NSIS.</p>
<p class="text">To modify the Welcome and Finish dialog, edit the Install
Options INI File ioWizard.ini in the 'Contrib\Modern UI' directory.
<p class="subheader">Customize the GUIInit function</p>
<p class="subheader"><a name="customGUIInit">Customize the GUIInit function</a></p>
<p class="text">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
<li>Final version for NSIS 2 beta 0
<li>modern3.exe UI without description area
<li>Different translation for finish page title
<li>Define for parameters for the application to run on the finishpage
<li>Bugfixes
</ul>
<p class="text"></p>

View file

@ -8,7 +8,7 @@
;--------------------------------
!ifndef NSIS_CONFIG_ENHANCEDUI_SUPPORT
!error "To use Modern UI you must have a NSIS version compiled with NSIS_CONFIG_ENHANCEDUI_SUPPORT (in Source/exehead/config.h)!"
!error "To use the Modern UI you must have a NSIS version compiled with NSIS_CONFIG_ENHANCEDUI_SUPPORT (in Source/exehead/config.h)!"
!endif
!verbose 3
@ -1143,16 +1143,20 @@
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 4" "State"
StrCmp ${MUI_TEMP1} "1" "" +3
StrCpy ${MUI_TEMP1} "${MUI_FINISHPAGE_RUN}"
Exec "$\"${MUI_TEMP1}$\""
!ifndef MUI_FINISHPAGE_RUN_PARAMETERS
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\""
!else
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_RUN}$\" ${MUI_FINISHPAGE_RUN_PARAMETERS}"
!endif
Exec "${MUI_TEMP1}"
!ifdef MUI_FINISHPAGE_SHOWREADME
!insertmacro MUI_INSTALLOPTIONS_READ ${MUI_TEMP1} "ioSpecial.ini" "Field 5" "State"
StrCmp ${MUI_TEMP1} "1" "" +3
StrCpy ${MUI_TEMP1} ${MUI_FINISHPAGE_SHOWREADME}
ExecShell "open" "$\"${MUI_TEMP1}$\""
StrCpy ${MUI_TEMP1} "$\"${MUI_FINISHPAGE_SHOWREADME}$\""
ExecShell "open" "{MUI_TEMP1}"
!endif