git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1574 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-11-03 16:30:59 +00:00
parent 43a75c8c20
commit 73a6a80056
3 changed files with 172 additions and 128 deletions

View file

@ -98,134 +98,178 @@ a:hover
<tr><td> <tr><td>
<table border="0" cellpadding="0" cellspacing="0"> <table border="0" cellpadding="0" cellspacing="0">
<tr class="header"> <tr class="header">
<td><img src="Readme.jpg" width="750" height="80" alt=""></td> <td><img src="Readme.jpg" width="750" height="80" alt=""></td>
</tr> </tr>
<tr> <tr>
<td><div class="margin"> <td><div class="margin">
<p class="header">Introduction</p> <p class="header">Introduction</p>
<p class="text">NSIS 2 makes it is possible to create installers <p class="text">NSIS 2 makes it is possible to create installers
with a custom user interface.</p> with a custom user interface.</p>
<p class="text"> I made this interface with a modern wizard style, <p class="text"> I made this interface with a modern wizard style,
like the wizards of recent Windows versions. This new interface like the wizards of recent Windows versions. This new interface
also features new graphics and a description area on the also features new graphics and a description area on the
component-selection page.</p> component-selection page.</p>
<p class="text">To use this new interface for for installer, you need <p class="text">To use this new interface for for installer, you need
to add some code to your NSIS script. Read this document for more info!</p> to add some code to your NSIS script. Read this document for more info!</p>
<p class="header">Requirements</p> <p class="header">Requirements</p>
<p class="text"><a href="http://nsis.sourceforge.net">NSIS 2 beta 0 (or later)</a></p> <p class="text"><a href="http://nsis.sourceforge.net">NSIS 2 beta 0 (or later)</a></p>
<p class="header">Screenshot</p> <p class="header">Screenshot</p>
<p class="text"><img src="Screenshot.png" width="504" height="391" alt=""></p> <p class="text"><img src="Screenshot.png" width="504" height="391" alt=""></p>
<p class="header">How to use</p> <p class="header">How to use</p>
<p class="text">The Modern UI has a macro system, so most of the code <p class="text">The Modern UI has a macro system, so most of the code
has already been written for you!</p> has already been written for you!<br><br>
<p class="text"><span class="subheader">Basic Macro System</span><br> The easiest way to use the Modern UI is to customize one of the <a href="#examples">example</a>
For most scripts, you can use the basic macro system. The basic scripts, but you can also modify an existing script.<br><br>
macro system inserts all code and functions for you. For an example, There are 7 things you need to insert in an existing script to use the
have a look at <a href="../../Examples/Modern UI/Basic.nsi">Basic.nsi</a>.<br><br> Modern UI (in order).<br><br>
To remove certain default NSIS pages (such as the License page), <p class="text"><span class="subheader">1. Insert the header files</span><br><br>
remove a define at the top of the page (for example, remove <pre class="margin">!include "${NSISDIR}\Contrib\Modern UI\System.nsh"</pre></p>
!define MUI_LICENSEPAGE), and remove the other instructions for <p class="text"><span class="subheader">2. Define the name and version of your software</span><br><br>
the page (for example, LicenseData).</p> <pre class="margin">!define NAME "Test Software" ;Define your own software name here
<p class="text"><span class="subheader">Advanced Macro System, Install Options</span><br> !define VERSION "1.0" ;Define your own software version here</pre></p>
If you want put your own code in certain NSIS functions or <p class="text"><span class="subheader">3. Define which elements you are using</span></br><br>
want to use custom installer pages, use the Advanced Macro The Modern UI should know which things it should insert. Use the following defines:<br><br>
System. The code will still be inserted using the macro's, <pre class="margin">!define MUI_LICENSEPAGE ;License page
but you can customize a lot of things, add your own code or !define MUI_COMPONENTSPAGE ;Component-selection page
add new pages.<br><br> !define MUI_DIRECTORYPAGE ;Directory-selection page
Using the Install Options macro's, it's also very easy to use !define MUI_LICENSEPAGE ;License page
custom pages in your installer. Just add a new Page command !define MUI_UNINSTALL ;Uninstaller
between the other page commands: Page [function name] and call !define MUI_ABORTWARNING ;Abort warning messabox</pre></p>
Install Options in [function name] using the <p class="text"><span class="subheader">4. Insert language files</span><br><br>
MUI_INSTALLOPTIONS_SHOW macro.<br><br> Insert the Modern UI language files for the languages you are using:<br>
Have a look at <a href="../../Examples/Modern UI/InstallOptions.nsi"> <pre class="margin">!include "${NSISDIR}\Contrib\Modern UI\Language files\English.nsh"</pre></p>
InstallOptions.nsi</a> for an example of the Install Options <p class="text"><span class="subheader">5. Interface settings (optional)</span><br><br>
and the Advanced Macro System.</p> You can change the settings of the interface by usings defines:<br>
<p class="text"><span class="subheader">Multilanguage installers</span><br> <pre class="margin">!define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"</pre></p>
The Modern UI has full multilanguage support and also uses <p class="text">If you don't define a setting, the default will be used.<br><br>
language files which can be translated easily. You can find the The following settings are available: <i>(default)</i><br><br>
language files in the Contrib\Modern UI\Language files directory. <span class="bold">MUI_ICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-install.ico)</i>
There are already a lot of translations available, but you can - The icon of the instaleller<br>
also make your own translation.<br> <span class="bold">MUI_UNICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-uninstall.ico)</i>
See <a href="../../Examples/Modern UI/MultiLanguage.nsi">MultiLanguage.nsi</a> - The icon of the uninstaleller<br>
for a multilanguage example using the Basic Macro System. <span class="bold">MUI_CHECKBITMAP</span> <i>(${NSISDIR}\Contrib\Icons\modern.bmp)</i>
<p class="header">The interface</p> - The bitmap with images for the checks of the
<p class="text"><span class="subheader">Modern.exe and modern2.exe</span><br> component select treeview.<br>
There are two different versions of the interface. <span class="bold">MUI_UI</span> <i>(${NSISDIR}\Contrib\UIs\modern.exe)</i>
Modern.exe contains the dialogs of the standard interface. - The interface file with the dialog resources<br>
If you have an installer with a lot of subsections <span class="bold">MUI_FONT</span> <i>(Tahoma)</i>
or long section names, use modern2.exe, which has a different - The font of the installer and uninstaller<br>
component-selection page.</p> <span class="bold">MUI_INSTALLCOLORS</span> <i>(/windows)</i>
<p class="text"><span class="subheader">Change interface settings</span><br> - The hexadecimal colors of the details screen ("foreground" "background")<br>
You can change the settings of the interface <span class="bold">MUI_PROGRESSBAR</span> <i>(smooth)</i>
by usings defines before you insert the MUI_INTERFACE macro.<br> - The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or ""
Example: !define MUI_UI "${NSISDIR}\Contrib\UIs\modern2.exe"<br> for a old-school windows look)</p>
If you don't define a setting, the default will be used.<br><br> <p class="text"><span class="subheader">6. Insert the MUI_SYSTEM macro</span><br><br>
The following settings are available: <i>(default)</i><br> <pre class="margin">!insertmacro MUI_SYSTEM</pre></p>
<span class="bold">MUI_ICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-install.ico)</i> <p class="text"><span class="subheader">7. Set the descriptions for the sections</span><br><br>
- The icon of the instaleller<br> <pre class="margin">
<span class="bold">MUI_UNICON</span> <i>(${NSISDIR}\Contrib\Icons\modern-uninstall.ico)</i> LangString DESC_SectionName1 ${LANG_ENGLISH} "Description of section 1."
- The icon of the uninstaleller<br> LangString DESC_SectionName2 ${LANG_ENGLISH} "Description of section 2."
<span class="bold">MUI_CHECKBITMAP</span> <i>(${NSISDIR}\Contrib\Icons\modern.bmp)</i>
- The bitmap with images for the checks of the !insertmacro MUI_FUNCTIONS_DESCRIPTION_START
component select treeview.<br> !insertmacro MUI_DESCRIPTION_TEXT ${SectionName1} $(DESC_SectionName1)
<span class="bold">MUI_UI</span> <i>(${NSISDIR}\Contrib\UIs\modern.exe)</i> !insertmacro MUI_DESCRIPTION_TEXT ${SectionName2} $(DESC_SectionName2)
- The interface file with the dialog resources<br> !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
<span class="bold">MUI_FONT</span> <i>(Tahoma)</i> </pre></p>
- The font of the installer and uninstaller<br> <p class="text">Note: Always set a name for a section:<br><br>
<span class="bold">MUI_INSTALLCOLORS</span> <i>(/windows)</i> <pre class="margin">
- The hexadecimal colors of the details screen ("foreground" "background")<br> Section "Section Name 1" SectionName1
<span class="bold">MUI_PROGRESSBAR</span> <i>(smooth)</i> ...
- The style of the progress bar ("colored" to use the MUI_INSTALLCOLORS or "" SectionEnd
for a old-school windows look)</p>
<p class="text"><span class="subheader">Customize the dialogs</span><br> Section "Section Name 2" SectionName2
To change elements on the dialogs, modify modern.exe or modern2.exe in the ...
Contrib\UIs directory using a resource editor such as SectionEnd
<a href="http://www.users.on.net/johnson/resourcehacker/">Resource Hacker</a>.<br><br> </pre></p>
The 'Loading Setup' text on the splash screen which <p class="text"><span class="subheader">Custom pages</span><br><br>
is being displayed when the installer is starting (Verifying If you want add custom pages to your installer using Install Options,
installer, Unpacking data when using COMPRESS_WHOLE) cannot you can customize the page commands:<br><br>
be changed by the script, because the installer is not started <pre class="margin">
yet when this dialog is being displayed. If you want to change !define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
this text, modify dialog 111 of modern(2).exe.<br>
The 'verifying installer' and 'unpacking data' texts are defined in !insertmacro MUI_PAGECOMMAND_LICENSE
the language header file of the NSIS exehead (Source\exehead\lang.h). Page custom [function name]
To change them, you need to edit this file and recompile NSIS.</p> Page custom [function name]
<p class="header">Version history</p> !insertmacro MUI_PAGECOMMAND_COMPONENTS
<ul> !insertmacro MUI_PAGECOMMAND_DIRECTORY
<li class="changelog">1.4 - October 30, 2002 Page custom [function name]
<ul> !insertmacro MUI_PAGECOMMAND_INSTFILES
<li>Uses new NSIS Page command </pre>
<li>Macro system way smaller <p class="text">You can call Install Options in [function name]:</p>
<li>Advanced Macro System a lot easier <pre class="margin">
<li>Renamed some defines LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Install Options Page"
</ul> LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
</ul>
<p class="text"><a href="Changelog.txt">Complete version history</a></p> Function [function name]
<p class="header">Credits</p> !insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
<p class="text">Made by Joost Verburg.<br> !insertmacro MUI_INSTALLOPTIONS_SHOW "iniFile.ini"
Icons designed by Nikos Adamamas, aka adni18.<br> FunctionEnd
Thanks to Amir Szekely, aka KiCHiK for his work on NSIS </pre>
to make this possible.</p> <p class="text"><a name="examples"><span class="subheader">Examples</span></a><br><br>
<p class="header">Help</p> Basic: <a href="../../Examples/Modern UI/Basic.nsi">Basic.nsi</a><br>
<p class="text">Please post questions at the <a href="http://forums.winamp.com/forumdisplay.php?forumid=65">NSIS Multilanguage: <a href="../../Examples/Modern UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br>
Forum</a>.</p> Cutom pages: <a href="../../Examples/Modern UI/InstallOptions.nsi">
<p class="header">License</p> InstallOptions.nsi</a><br>
<p class="text">Copyright &copy; 2002 Joost Verburg</p> <p class="header">The interface</p>
<p class="text"> This software is provided 'as-is', without any <p class="text"><span class="subheader">Modern.exe and modern2.exe</span><br><br>
express or implied warranty. In no event will the authors be There are two different versions of the interface.
held liable for any damages arising from the use of this software.</p> Modern.exe contains the dialogs of the standard interface.
<p class="text"> Permission is granted to anyone to use this software for any If you have an installer with a lot of subsections
purpose, including commercial applications, and to alter it or long section names, use modern2.exe, which has a different
and redistribute it freely, subject to the following restrictions:</p> component-selection page.</p>
<p class="text"> 1. The origin of this software must not be misrepresented; <p class="text"><span class="subheader">Customize the dialogs</span><br><br>
you must not claim that you wrote the original software. If To change elements on the dialogs, modify modern.exe or modern2.exe in the
you use this software in a product, an acknowledgment in the Contrib\UIs directory using a resource editor such as
product documentation would be appreciated but is not required.<br> <a href="http://www.users.on.net/johnson/resourcehacker/">Resource Hacker</a>.<br><br>
2. Altered versions must be plainly marked as such, and The 'Loading Setup' text on the splash screen which
must not be misrepresented as being the original software.<br> is being displayed when the installer is starting (Verifying
3. This notice may not be removed or altered from any distribution.</p> installer, Unpacking data when using COMPRESS_WHOLE) cannot
</div></td> be changed by the script, because the installer is not started
yet when this dialog is being displayed. If you want to change
this text, modify dialog 111 of modern(2).exe.<br>
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 need to edit this file and recompile NSIS.</p>
<p class="header">Version history</p>
<ul>
<li class="changelog">1.4 - November 3, 2002
<ul>
<li>Uses new NSIS Page command
<li>Macro system way smaller
<li>Advanced Macro System a lot easier
<li>Renamed some defines
</ul>
</ul>
<p class="text"><a href="Changelog.txt">Complete version history</a></p>
<p class="header">Credits</p>
<p class="text">Made by Joost Verburg.<br>
Icons designed by Nikos Adamamas, aka adni18.<br>
Thanks to Amir Szekely, aka KiCHiK for his work on NSIS
to make this possible.</p>
<p class="header">Help</p>
<p class="text">Please post questions at the <a href="http://forums.winamp.com/forumdisplay.php?forumid=65">NSIS
Forum</a>.</p>
<p class="header">License</p>
<pre class="margin">Copyright &copy; 2002 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
arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it
and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software. If
you use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not required.
2. Altered versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any distribution.
</pre>
</div></td>
</tr> </tr>
<tr> <tr>
<td><div class="footer">&copy;2002 Joost Verburg</div></td> <td><div class="footer">&copy;2002 Joost Verburg</div></td>

View file

@ -65,7 +65,6 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
;-------------------------------- ;--------------------------------
;Uninstaller Section ;Uninstaller Section

View file

@ -30,7 +30,8 @@
Name "${NAME} ${VERSION}" Name "${NAME} ${VERSION}"
;Page order ;Page order
!define MUI_CUSTOMPAGECOMMANDS !define MUI_CUSTOMPAGECOMMANDS ;Use customized pages
!insertmacro MUI_PAGECOMMAND_LICENSE !insertmacro MUI_PAGECOMMAND_LICENSE
Page custom SetCustomA Page custom SetCustomA
Page custom SetCustomB Page custom SetCustomB