Debian Codegraph @

Contrib/Modern UI 2/Readme.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <title>NSIS Modern User Interface - Documentation</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7 <meta name="viewport" content="width=device-width, initial-scale=1" />
8 <style type="text/css">
9 /*<![CDATA[*/
10 html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; }
11 html { font-size: 0.80em; }
12 body { font-size: 1em; font-size: 1rem; }
13 pre, code { font-family: Courier New, Courier, monospace,serif; font-size: 100%; }
14 body
15 {
16 padding:1.5em 0; margin:0;
17 background-color: #F0F0F0;
18 font-family: Verdana, Arial, Helvetica, sans-serif;
19 font-weight: normal;
20 text-align: justify;
21 }
22 p, li
23 {
24 font-size: 100%;
25 }
26 table
27 {
28 margin: auto;
29 background-color: #FFFFFF;
30 }
31 .maintable
32 {
33 border: 2px solid #376EAB;
34 width: 90%;
35 }
36 .parameter
37 {
38 font-weight: bold;
39 color: #6586AC;
40 }
41 h1
42 {
43 font-size: 140%;
44 color: #7A7272;
45 font-weight: normal;
46 }
47 h2
48 {
49 font-size: 130%;
50 font-weight: bold;
51 color: #303030;
52 }
53 h3
54 {
55 font-size: 120%;
56 font-weight: bold;
57 color: #2B5885;
58 }
59 div
60 {
61 margin: 1.1em;
62 }
63 div.settings
64 {
65 margin-right: 0;
66 }
67 a:link, a:visited, a:active
68 {
69 color: #294F75;
70 text-decoration: none;
71 }
72 a:hover
73 {
74 color: #182634;
75 text-decoration: underline;
76 }
77 .trigger
78 {
79 cursor: pointer;
80 cursor: hand;
81 height: 14px;
82 }
83 .toggle
84 {
85 display: block;
86 }
87 .options
88 {
89 text-align: center;
90 cursor: pointer;
91 cursor: hand;
92 color: #294F75;
93 }
94 /*]]>*/</style>
95
96 <script type="text/javascript">
97 //<![CDATA[
98
99 var image_open = new Image();
100 image_open.src = "images/open.gif";
101 var image_closed = new Image();
102 image_closed.src = "images/closed.gif";
103
104 function GEBY(d, i) { return d.getElementById ? d.getElementById(i) : document.all ? document.all[i] : 0 }
105
106 function toggle(image, section) {
107
108 if (section = GEBY(document, section))
109 {
110 image = GEBY(document, image);
111 if (section.style.display != "none")
112 {
113 section.style.display = "none";
114 image.src = image_closed.src;
115 }
116 else
117 {
118 section.style.display = "block";
119 image.src = image_open.src;
120 }
121 }
122 }
123
124 function expandall() {
125
126 var divNodeList = document.getElementsByTagName('div');
127 for (i = 0; i < divNodeList.length; i++) {
128 if(divNodeList[i].id) {
129 divNodeList[i].style.display = "block";
130 document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
131 }
132 }
133
134 }
135
136 function collapseall() {
137
138 var divNodeList = document.getElementsByTagName('div');
139 for (i = 0; i < divNodeList.length; i++) {
140 if(divNodeList[i].id) {
141 divNodeList[i].style.display = "none";
142 document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
143 }
144 }
145
146 }
147
148 function onDocLoad() {
149
150 toggle('trigger_scr', 'toggle_scr');
151 toggle('trigger_lic', 'toggle_lic');
152 }
153
154 //]]>
155 </script>
156
157 </head>
158 <body onLoad="onDocLoad()">
159 <table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
160 <tr>
161 <td>
162 <img src="images/header.gif" width="750" height="80" alt="" />
163 <p class="options">
164 <a onclick="expandall()">[Expand all]</a>&nbsp; &nbsp;<a onclick="collapseall()">[Collapse
165 all]</a></p>
166 <div>
167 <h1>
168 Introduction</h1>
169 <div>
170 <p>
171 The Modern UI provides a user interface for NSIS installers with a modern wizard
172 style, similar to the wizards of recent Windows versions. It is based on the basic
173 user interface that is provided by the NSIS compiler itself and extends it with
174 more interface features and pages.</p>
175 <p>
176 All standard NSIS pages (such as the pages to select components and the installation
177 folder) are supported as well as a number of additional pages. The welcome page
178 allows you to provide an introduction to the installation process, while the finish
179 page provides a way to let the user decide what steps should be performed after
180 the setup wizard is closed (for example, whether the application should be started
181 immediately). A finish page can also be used to ask for a system restart is necessary.</p>
182 <h3>
183 <img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/open.gif"
184 onclick="toggle('trigger_scr', 'toggle_scr');" />
185 Screenshots</h3>
186 <div class="toggle" id="toggle_scr">
187 <p><img src="images/screen1.png" width="503" height="393" alt="" /></p>
188 <p><img src="images/screen2.png" width="503" height="393" alt="" /></p>
189 </div>
190 </div>
191 <h1>
192 Modern UI 2.1</h1>
193 <div>
194 <p>
195 This new version makes it easier to customize pages, because the same method can
196 be used to&nbsp; change standard NSIS pages as well as additional pages provided
197 by the Modern UI. It is now also possible for other NSIS plug-ins to add new pages
198 to the Modern UI. You can expect to see examples of this soon.</p>
199 <p>
200 The welcome and finish page are no longer implemented using InstallOptions. Instead,
201 the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or
202 customize existing pages directly from the script.</p>
203 <p>
204 To upgrade a Modern UI 1.8 script, you should:</p>
205 <ul>
206 <li>Insert the MUI2.nsh header file instead of MUI.nsh.</li>
207 <li>The macros for InstallOptions have been moved to a separate header file unrelated
208 to the Modern UI. If you are still using InstallOptions for custom pages, insert
209 InstallOptions.nsh and use the INSTALLOPTIONS_* macros instead of the MUI_INSTALLOPTIONS_*
210 macros. The macros themselves have remained the same.</li>
211 <li>Rewrite customization code for the Modern UI 1.8 welcome and finish pages in which
212 the InstallOptions INI file is used. nsDialogs commands should be used instead.</li>
213 <li>Use the standard NSIS method to escape special characters in all texts. For example,
214 $\r$\n creates newline.</li>
215 </ul>
216 </div>
217 <h1>
218 Script header</h1>
219 <div>
220 <p>
221 The settings for the Modern UI should be inserted in the header of the script file.
222 It&#39;s important to follow the same order as the items below.&nbsp;For example,
223 interface settings should be defined before you insert pages, because the pages
224 depend on the interface configuration. It may be useful to look at the <a href="#examples">
225 example scripts</a> too see how this is done in actual script files.</p>
226 <p>
227 Parameters are given in this format: <span class="parameter">required (option1 | option2)
228 [optional]</span></p>
229 </div>
230 <h2>
231 1. Header file</h2>
232 <div>
233 <p>
234 First of all, add this line to the top of script to include the Modern UI:</p>
235 <pre>
236 !include MUI2.nsh
237 </pre>
238 </div>
239 <h2>
240 2. Interface configuration</h2>
241 <div>
242 <p>
243 Then, you may want to use interface settings to change the look and feel of the
244 installer. These settings apply to all pages.<p>
245 The interface settings provided by the NSIS compiler itself (such as LicenseText,
246 Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
247 UI provides equalivent or extended versions of these settings.<p>
248 Examples:</p>
249 <pre>
250 !define MUI_COMPONENTSPAGE_SMALLDESC ;No value
251 !define MUI_UI &quot;myUI.exe&quot; ;Value
252 !define MUI_INSTFILESPAGE_COLORS &quot;FFFFFF 000000&quot; ;Two colors
253 </pre>
254 <h3>
255 <img class="trigger" alt="Open/Close section" id="trigger_in" src="images/open.gif"
256 onclick="toggle('trigger_in', 'toggle_in');" />
257 Interface settings</h3>
258 <div class="toggle" id="toggle_in">
259 <h3>
260 <img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/open.gif"
261 onclick="toggle('trigger_ingen', 'toggle_ingen');" />
262 Page header</h3>
263 <div class="toggle" id="toggle_ingen">
264 <p>
265 <strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
266 The icon for the installer.<br />
267 <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
268 <p>
269 <strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
270 The icon for the uninstaller.<br />
271 <em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
272 <p>
273 <strong>MUI_HEADERIMAGE</strong><br />
274 Display an image on the header of the page.</p>
275 <div class="settings">
276 <p>
277 <strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
278 Bitmap image to display on the header of installers pages (recommended size: 150x57
279 pixels).<br />
280 <em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
281 <div class="settings">
282 <p>
283 <strong>MUI_HEADERIMAGE_BITMAP_STRETCH</strong> <span class="parameter">mode</span><br />
284 <ul>
285 <li><p><strong>FitControl</strong> (Default)<br />
286 Stretch the image to fit the image control.</p>
287 <li><p><strong>NoStretchNoCropNoAlign</strong><br />
288 Do not stretch the image to fit the size of the image control.
289 You should not use this option if you have a full size bitmap that fits exactly because
290 the size of the field will be different if the user has a custom DPI setting or
291 if the installer is using a CJK language.</p>
292 <li><p><strong>NoStretchNoCrop</strong><br />
293 This is similar to NoStretchNoCropNoAlign but will align the image to the right edge when
294 using a RTL language or if MUI_HEADERIMAGE_RIGHT is defined.</p>
295 <li><p><strong>AspectFitHeight</strong><br />
296 Scale the image up or down until it is the same height as the image control while
297 maintaining the image aspect ratio.</p>
298 </ul>
299 </p>
300 <p>
301 <strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
302 Bitmap image to display on the header of installers pages when using a RTL language
303 (recommended size: 150x57 pixels).<br />
304 <em>Default: Non-RTL bitmap</em></p>
305 <div class="settings">
306 <p>
307 <strong>MUI_HEADERIMAGE_BITMAP_RTL_STRETCH</strong> <span class="parameter">mode</span><br />
308 See MUI_HEADERIMAGE_BITMAP_STRETCH for a list of the available stretch modes.</p>
309 </div>
310 </div>
311 <p>
312 <strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
313 Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
314 pixels).<br />
315 <em>Default: Installer header bitmap</em></p>
316 <div class="settings">
317 <p>
318 <strong>MUI_HEADERIMAGE_UNBITMAP_STRETCH</strong> <span class="parameter">mode</span><br />
319 See MUI_HEADERIMAGE_BITMAP_STRETCH for a list of the available stretch modes.</p>
320 <p>
321 <strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
322 Bitmap image to display on the header of uninstallers pages when using a RTL language
323 (recommended size: 150x57 pixels).<br />
324 <em>Default: Installer RTL header bitmap</em></p>
325 <div class="settings">
326 <p>
327 <strong>MUI_HEADERIMAGE_UNBITMAP_RTL_STRETCH</strong> <span class="parameter">mode</span><br />
328 See MUI_HEADERIMAGE_BITMAP_STRETCH for a list of the available stretch modes.</p>
329 </div>
330 </div>
331 <p>
332 <strong>MUI_HEADERIMAGE_RIGHT</strong><br />
333 Display the header image on the right side instead of the left side (when using
334 a RTL language it will be displayed on the left side instead of the right side).</p>
335 </div>
336 <p>
337 <strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
338 Background color for the header, the Welcome page and the Finish page.<br />
339 <em>Default: FFFFFF</em></p>
340 <p>
341 <strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
342 Set a transparent background for the header's label controls. Useful for custom
343 user interfaces that set a bigger header image.</p>
344 <p>
345 <strong>MUI_TEXTCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
346 Text color for the header, the Welcome page and the Finish page.<br />
347 <em>Default: 000000</em></p>
348 </div>
349 <h3>
350 <img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/open.gif"
351 onclick="toggle('trigger_inres', 'toggle_inres');" />
352 Interface resources</h3>
353 <div class="toggle" id="toggle_inres">
354 <p>
355 <strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
356 The interface file with the dialog resources. Change this if you have made your
357 own customized UI.<br />
358 <em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
359 <p>
360 <strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
361 The interface files with the dialog resource IDD_INST that contains a bitmap control
362 and space for the header bitmap.<br />
363 <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
364 <p>
365 <strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
366 The interface files with the dialog resource IDD_INST that contains a bitmap control
367 and space for the header bitmap on the right side.<br />
368 <em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
369 <p>
370 <strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
371 The interface files with a customized dialog resource IDD_SELCOM with a small description
372 area.<br />
373 <em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
374 <p>
375 <strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
376 The interface files with a customized dialog resource IDD_SELCOM without a description
377 area.<br />
378 <em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
379 </div>
380 <h3>
381 <img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/open.gif"
382 onclick="toggle('trigger_inwf', 'toggle_inwf');" />
383 Installer welcome/finish page</h3>
384 <div class="toggle" id="toggle_inwf">
385 <p>
386 <strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
387 Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
388 <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
389 <div class="settings">
390 <p>
391 <strong>MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH</strong> <span class="parameter">mode</span><br />
392 See MUI_HEADERIMAGE_BITMAP_STRETCH for a list of the available stretch modes.</p>
393 </div>
394 </div>
395 <h3>
396 <img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/open.gif"
397 onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
398 Uninstaller welcome/finish page</h3>
399 <div class="toggle" id="toggle_inuwf">
400 <p>
401 <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
402 Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
403 <em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
404 <div class="settings">
405 <p>
406 <strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH</strong> <span class="parameter">mode</span><br />
407 See MUI_HEADERIMAGE_BITMAP_STRETCH for a list of the available stretch modes.</p>
408 </div>
409 </div>
410 <h3>
411 <img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/open.gif"
412 onclick="toggle('trigger_inl', 'toggle_inl');" />
413 License page</h3>
414 <div class="toggle" id="toggle_inl">
415 <p>
416 <strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
417 (color: RRGGBB hexadecimal))</span><br />
418 The background color for the license textbox. Use /windows for the Windows text
419 background color (usually white). Use the /grey for the window background color
420 (usually grey).<br />
421 <em>Default: /windows</em></p>
422 </div>
423 <h3>
424 <img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/open.gif"
425 onclick="toggle('trigger_inc', 'toggle_inc');" />
426 Components page</h3>
427 <div class="toggle" id="toggle_inc">
428 <p>
429 <strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
430 The bitmap with images for the checks of the component select treeview.<br />
431 <em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
432 <p>
433 <strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
434 A small description area on the bottom of the page. Use this layout if you have
435 a lot of sections and don't need large descriptions.</p>
436 <p>
437 <strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
438 No description area.</p>
439 </div>
440 <h3>
441 <img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/open.gif"
442 onclick="toggle('trigger_ind', 'toggle_ind');" />
443 Directory page</h3>
444 <div class="toggle" id="toggle_ind">
445 <p>
446 <strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
447 The background color for the directory textbox.</p>
448 </div>
449 <h3>
450 <img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/open.gif"
451 onclick="toggle('trigger_ins', 'toggle_ins');" />
452 Start Menu folder page</h3>
453 <div class="toggle" id="toggle_ins">
454 <p>
455 <strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
456 The background color for the startmenu directory list and textbox.</p>
457 </div>
458 <h3>
459 <img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/open.gif"
460 onclick="toggle('trigger_ini', 'toggle_ini');" />
461 Installation page</h3>
462 <div class="toggle" id="toggle_ini">
463 <p>
464 <strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | &quot;(foreground
465 color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)&quot;)</span><br />
466 The colors of the details screen. Use /windows for the default Windows colors.<br />
467 <em>Default: /windows</em></p>
468 <p>
469 <strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(&quot;&quot;
470 | colored | smooth)</span><br />
471 The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
472 <em>Default: smooth</em></p>
473 </div>
474 <h3>
475 <img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/open.gif"
476 onclick="toggle('trigger_inf', 'toggle_inf');" />
477 Installer finish page</h3>
478 <div class="toggle" id="toggle_inf">
479 <p>
480 <strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
481 Do not automatically jump to the finish page, to allow the user to check the install
482 log.</p>
483 </div>
484 <h3>
485 <img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/open.gif"
486 onclick="toggle('trigger_uinf', 'toggle_uinf');" />
487 Uninstaller finish page</h3>
488 <div class="toggle" id="toggle_uinf">
489 <p>
490 <strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
491 Do not automatically jump to the finish page, to allow the user to check the uninstall
492 log.</p>
493 </div>
494 <h3>
495 <img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/open.gif"
496 onclick="toggle('trigger_inaw', 'toggle_inaw');" />
497 Abort warning</h3>
498 <div class="toggle" id="toggle_inaw">
499 <p>
500 <strong>MUI_ABORTWARNING</strong><br />
501 Show a message box with a warning when the user wants to close the installer.</p>
502 <div class="settings">
503 <p>
504 <strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
505 Text to display on the abort warning message box.</p>
506 <p>
507 <strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
508 Set the Cancel button as the default button on the message box.</p>
509 </div>
510 </div>
511 <h3>
512 <img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/open.gif"
513 onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
514 Uninstaller abort warning</h3>
515 <div class="toggle" id="toggle_inuaw">
516 <p>
517 <strong>MUI_UNABORTWARNING</strong><br />
518 Show a message box with a warning when the user wants to close the uninstaller.</p>
519 <div class="settings">
520 <p>
521 <strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
522 Text to display on the abort warning message box.</p>
523 <p>
524 <strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
525 Set the Cancel button as the default button on the message box.</p>
526 </div>
527 </div>
528 </div>
529 </div>
530 <h2>
531 3. Pages</h2>
532 <div>
533 <p>
534 Insert the following macros to set the pages you want to use. The pages will appear
535 in the order in which you insert them in the script. You can also insert custom
536 Page commands between the macros to add custom pages.</p>
537 <p>
538 You can add multiple pages of certain types (for example, if you want the user to
539 specify multiple folders).</p>
540 <p>
541 Examples:</p>
542 <pre>
543 !insertmacro MUI_PAGE_LICENSE &quot;License.rtf&quot;
544 !insertmacro MUI_PAGE_COMPONENTS
545
546 Var StartMenuFolder
547 !insertmacro MUI_PAGE_STARTMENU &quot;Application&quot; $StartMenuFolder
548 </pre>
549 <p>
550 You will need the page ID for the Start Menu folder page when using the Start Menu
551 folder macros. The folder will be stored in the specified variable.</p>
552 <p>
553 <strong>Installer pages</strong><br />
554 MUI_PAGE_WELCOME<br />
555 MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
556 MUI_PAGE_COMPONENTS<br />
557 MUI_PAGE_DIRECTORY<br />
558 MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
559 MUI_PAGE_INSTFILES<br />
560 MUI_PAGE_FINISH</p>
561 <p>
562 <strong>Uninstaller pages</strong><br />
563 MUI_UNPAGE_WELCOME<br />
564 MUI_UNPAGE_CONFIRM<br />
565 MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
566 MUI_UNPAGE_COMPONENTS<br />
567 MUI_UNPAGE_DIRECTORY<br />
568 MUI_UNPAGE_INSTFILES<br />
569 MUI_UNPAGE_FINISH</p>
570 <h3>
571 <img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/open.gif"
572 onclick="toggle('trigger_pg', 'toggle_pg');" />
573 Page settings</h3>
574 <div class="toggle" id="toggle_pg">
575 <p>
576 Page settings apply to a single page and should be set before inserting a page macro.
577 The same settings can be used for installer and uninstaller pages. You have to repeat
578 the setting if you want it to apply to multiple pages. Example:</p>
579 <pre>
580 ;Add a directory page to let the user specify a plug-ins folder
581 ;Store the folder in $PluginsFolder
582
583 Var PLUGINS_FOLDER
584 !define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
585 !insertmacro MUI_PAGE_DIRECTORY
586 </pre>
587 <p>
588 <p>
589 All standard texts in the user interface are loaded from language files, which are
590 available for all languages supported by NSIS. So you only need to define these
591 texts if you want to change the default.</p>
592 <p>
593 If the parameter is a text that should be different for each language, define a
594 language string using LangString and use $(LangStringName) as value. For a license
595 text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
596 Manual for more information about installers with multiple languages.</p>
597 <p>
598 In all text settings, the doublequote character (&quot;) should be escaped in the
599 following form: $\&quot;</p>
600 <h3>
601 <img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/open.gif"
602 onclick="toggle('trigger_pgg', 'toggle_pgg');" />
603 General page settings</h3>
604 <div class="toggle" id="toggle_pgg">
605 <p>
606 <strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
607 Text to display on the header of the page.</p>
608 <p>
609 <strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
610 Subtext to display on the header of the page.</p>
611 </div>
612 <h3>
613 <img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/open.gif"
614 onclick="toggle('trigger_pgw', 'toggle_pgw');" />
615 Welcome page settings</h3>
616 <div class="toggle" id="toggle_pgw">
617 <p>
618 <strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
619 Title to display on the top of the page.</p>
620 <p>
621 <strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
622 Extra space for the title area.</p>
623 <p>
624 <strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
625 Text to display on the page.</p>
626 </div>
627 <h3>
628 <img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/open.gif"
629 onclick="toggle('trigger_pgl', 'toggle_pgl');" />
630 License page settings</h3>
631 <div class="toggle" id="toggle_pgl">
632 <p>
633 <strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
634 Text to display on the top of the page.</p>
635 <p>
636 <strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
637 Text to display on the bottom of the page.</p>
638 <p>
639 <strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
640 Text to display on the 'I Agree' button.</p>
641 <p>
642 <strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
643 Display a checkbox the user has to check to agree with the license terms.</p>
644 <div class="settings">
645 <p>
646 <strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
647 Text to display next to the checkbox to agree with the license terms.</p>
648 </div>
649 <p>
650 <strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
651 Display two radio buttons to allow the user to choose between accepting the license
652 terms or not.</p>
653 <div class="settings">
654 <p>
655 <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
656 Text to display next to the checkbox to accept the license terms.</p>
657 <p>
658 <strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
659 Text to display next to the checkbox to decline the license terms.</p>
660 </div>
661 </div>
662 <h3>
663 <img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/open.gif"
664 onclick="toggle('trigger_pgc', 'toggle_pgc');" />
665 Components page settings</h3>
666 <div class="toggle" id="toggle_pgc">
667 <p>
668 <strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
669 Text to display on the top of the page.</p>
670 <p>
671 <strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
672 Text to display on next to the components list.</p>
673 <p>
674 <strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
675 Text to display on next to the installation type combo box.</p>
676 <p>
677 <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
678 Text to display on the of the top of the description box.</p>
679 <p>
680 <strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
681 Text to display inside the description box when no section is selected.</p>
682 </div>
683 <h3>
684 <img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/open.gif"
685 onclick="toggle('trigger_pgd', 'toggle_pgd');" />
686 Directory page settings</h3>
687 <div class="toggle" id="toggle_pgd">
688 <p>
689 <strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
690 Text to display on top of the page.</p>
691 <p>
692 <strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
693 Text to display on the destination folder frame.</p>
694 <p>
695 <strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
696 Variable in which to store the selected folder.<br />
697 <em>Default: $INSTDIR</em></p>
698 <p>
699 <strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
700 Does not disable the Next button when a folder is invalid but allows you to use
701 GetInstDirError in the leave function to handle an invalid folder.</p>
702 </div>
703 <h3>
704 <img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/open.gif"
705 onclick="toggle('trigger_pgs', 'toggle_pgs');" />
706 Start Menu folder page settings</h3>
707 <div class="toggle" id="toggle_pgs">
708 <p>
709 <strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
710 Text to display on the top of the page.</p>
711 <p>
712 <strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
713 Text to display next to the checkbox to disable the Start Menu folder creation.</p>
714 <p>
715 <strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
716 The default Start Menu Folder.</p>
717 <p>
718 <strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
719 Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
720 <p>
721 <strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
722 <strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
723 <strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
724 The registry key to store the Start Menu folder. The page will use it to remember
725 the users preference. You should also use for the uninstaller to remove the Start
726 Menu folders. Don't forget to remove this key during uninstallation.</p>
727 <p>
728 For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
729 folder:</p>
730 <pre>
731 !insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
732 Delete &quot;$SMPROGRAMS\$R0\Your Shortcut.lnk&quot;
733 </pre>
734 </div>
735 <h3>
736 <img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/open.gif"
737 onclick="toggle('trigger_pgi', 'toggle_pgi');" />
738 Installation page settings</h3>
739 <div class="toggle" id="toggle_pgi">
740 <p>
741 <strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
742 Text to display on the header of the installation page when the installation has
743 been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
744 <p>
745 <strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
746 Subtext to display on the header of the installation page when the installation
747 has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
748 <p>
749 <strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
750 Text to display on the header of the installation page when the installation has
751 been aborted.</p>
752 <p>
753 <strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
754 Subext to display on the header of the installation page when the installation has
755 been aborted.</p>
756 </div>
757 <h3>
758 <img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/open.gif"
759 onclick="toggle('trigger_pgf', 'toggle_pgf');" />
760 Finish page settings</h3>
761 <div class="toggle" id="toggle_pgf">
762 <p>
763 <strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
764 Title to display on the top of the page.</p>
765 <p>
766 <strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
767 Extra space for the title area.</p>
768 <p>
769 <strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
770 Text to display on the page.</p>
771 <p>
772 <strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
773 Extra space for the text area (if using checkboxes).</p>
774 <p>
775 <strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
776 Text to display on the Finish button.</p>
777 <p>
778 <strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
779 Enable the Cancel button so the user can skip any options displayed on the finish
780 page.</p>
781 <p>
782 <strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
783 Text to display on the finish page when asking for a system reboot.</p>
784 <p>
785 <strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
786 Text to display next to the 'Reboot now' option button.</p>
787 <p>
788 <strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
789 Text to display next to the 'Reboot later' option button.</p>
790 <p>
791 <strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
792 Sets the 'Reboot later' option as the default option.</p>
793 <p>
794 <strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
795 Application which the user can select to run using a checkbox. You don't need to
796 put quotes around the filename when it contains spaces.</p>
797 <div class="settings">
798 <p>
799 <strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
800 Texts to display next to the 'Run program' checkbox.</p>
801 <p>
802 <strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
803 Parameters for the application to run. Don't forget to escape double quotes in the
804 value (use $\&quot;).</p>
805 <p>
806 <strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
807 Do not check the 'Run program' checkbox by default</p>
808 <p>
809 <strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
810 Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
811 parameters). You can use the function to execute multiple applications or you can
812 change the checkbox name and use it for other things.</p>
813 </div>
814 <p>
815 <strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
816 File or website which the user can select to view using a checkbox. You don't need
817 to put quotes around the filename when it contains spaces.</p>
818 <div class="settings">
819 <p>
820 <strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
821 Texts to display next to the 'Show Readme' checkbox.</p>
822 <p>
823 <strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
824 Do not check the 'Show Readme' checkbox by default</p>
825 <p>
826 <strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
827 Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
828 parameters). You can use the function to show multiple files or you can change the
829 checkbox name and use it for other things.</p>
830 </div>
831 <p>
832 <strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
833 Text for a link on the which the user can click to view a website or file.</p>
834 <div class="settings">
835 <p>
836 <strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
837 Website or file which the user can select to view using the link. You don't need
838 to put quotes around the filename when it contains spaces.</p>
839 <p>
840 <strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
841 Text color for the link on the Finish page.<br />
842 <em>Default: 000080</em></p>
843 </div>
844 <p>
845 <strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
846 Disables support for the page that allows the user to reboot the system. Define
847 this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
848 </div>
849 <h3>
850 <img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/open.gif"
851 onclick="toggle('trigger_pgu', 'toggle_pgu');" />
852 Uninstall confirm page settings</h3>
853 <div class="toggle" id="toggle_pgu">
854 <p>
855 <strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
856 Text to display on the top of the page.</p>
857 <p>
858 <strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
859 Text to display next to the uninstall location text box.</p>
860 <p>
861 <strong>MUI_UNCONFIRMPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
862 Variable in which to store the uninstall source folder.<br />
863 <em>Default: $INSTDIR</em></p>
864 </div>
865 </div>
866 </div>
867 <h2>
868 4. Language files</h2>
869 <div>
870 <p>
871 Insert the Modern UI language files for the languages to want to include.</p>
872 <pre>
873 !insertmacro MUI_LANGUAGE &quot;English&quot;
874 </pre>
875 <p>
876 The standard NSIS language files are loaded automatically, there is no need to use
877 LoadLanguageFile.</p>
878 </div>
879 <h2>
880 5. Reserve files</h2>
881 <div>
882 <p>
883 If you are using solid compression, files that are required before the actual installation
884 should be stored first in the data block, because this will make your installer
885 start faster. Include reserve file commands for such files before your sections
886 and functions:</p>
887 <pre>
888 ReserveFile /plugin MyPlugin.dll
889 !insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
890 ...
891 </pre>
892 </div>
893 <h1>
894 Script code for pages</h1>
895 <div>
896 <p>
897 Some pages allow you to show additional information or can be used to get user input.
898 Here you can find the script code to use these features.</p>
899 <h2>
900 Components page descriptions</h2>
901 <div>
902 <p>
903 The Modern UI components page has a text box in which a description can be shown
904 when the user hovers the mouse over a component. If you don't want to use these
905 descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
906 <p>
907 To set a description for a section, an additional parameter needs to be added to
908 Section command with a unique identifier for the section. This name can later be
909 used to set the description for this section.</p>
910 <pre>
911 Section &quot;Section Name 1&quot; Section1
912 ...
913 SectionEnd
914 </pre>
915 <p>
916 After the sections, use these macros to set the descriptions:</p>
917 <pre>
918 LangString DESC_Section1 ${LANG_ENGLISH} &quot;Description of section 1.&quot;
919 LangString DESC_Section2 ${LANG_ENGLISH} &quot;Description of section 2.&quot;
920
921 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
922 !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
923 !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
924 !insertmacro MUI_FUNCTION_DESCRIPTION_END
925 </pre>
926 <p>
927 For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
928 macros.</p>
929 </div>
930 <h2>
931 Start Menu folder</h2>
932 <div>
933 <p>
934 Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
935 and MUI_STARTMENU_WRITE_END macros:</p>
936 <pre>
937 !insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
938 ...create shortcuts...
939 !insertmacro MUI_STARTMENU_WRITE_END
940 </pre>
941 <p>
942 The page ID should be the ID of the page on which the user has selected the folder
943 for the shortcuts you want to write.</p>
944 <p>
945 The variable which contains the folder and the page ID are set as parameters of
946 the page macro.</p>
947 </div>
948 </div>
949 <h1>
950 Language selection dialog</h1>
951 <div>
952 <p>
953 If you want the installer to display a language selection dialog (see the the <a
954 href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
955 insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
956 <pre>
957 Function .onInit
958
959 !insertmacro MUI_LANGDLL_DISPLAY
960
961 FunctionEnd
962 </pre>
963 <p>
964 This macro can also be used in the un.onInit function.</p>
965 <h3>
966 <img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/open.gif"
967 onclick="toggle('trigger_lss', 'toggle_lss');" />
968 Settings for registry storage of selected language</h3>
969 <div class="toggle" id="toggle_lss">
970 <p>
971 To remember the user's preference, you can define a registry key. These defines
972 should be set before inserting the installation page macro.</p>
973 <p>
974 <strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
975 <strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
976 <strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
977 The registry key to store the language. The users preference will be remembered.
978 You can also use it for the uninstaller to display the right language. Don't forget
979 to remove this key in the uninstaller.</p>
980 <p>
981 For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
982 stored language preference:</p>
983 <pre>
984 Function un.onInit
985
986 !insertmacro MUI_UNGETLANGUAGE
987
988 FunctionEnd
989 </pre>
990 </div>
991 <h3>
992 <img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/open.gif"
993 onclick="toggle('trigger_lsin', 'toggle_lsin');" />
994 Interface settings for selection dialog</h3>
995 <div class="toggle" id="toggle_lsin">
996 <p>
997 To customize the language selection dialog interface, use these defines before inserting
998 the MUI_LANGDLL_DISPLAY macro.</p>
999 <p>
1000 <strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
1001 The window title of the language selection dialog.</p>
1002 <p>
1003 <strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
1004 The text to display on the language selection dialog.</p>
1005 <p>
1006 <strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
1007 Always show the language selection dialog, even if a language has been stored in
1008 the registry. The language stored in the registry will be selected by default.</p>
1009 <p>
1010 <strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
1011 Always show all available languages and don't filter according to their codepage.</p>
1012 </div>
1013 </div>
1014 <h1>
1015 Custom pages</h1>
1016 <div>
1017 <p>
1018 If you want add your custom pages to your installer, you can insert your own page
1019 commands between the page macros.</p>
1020 <pre>
1021 !insertmacro MUI_PAGE_WELCOME
1022 Page custom FunctionName ;Custom page
1023 !insertmacro MUI_PAGE_COMPONENTS
1024
1025 ;Uninstaller
1026 !insertmacro MUI_UNPAGE_CONFIRM
1027 UninstPage custom un.FunctionName ;Custom page
1028 !insertmacro MUI_UNPAGE_INSTFILES
1029 </pre>
1030 <p>
1031 Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
1032 <pre>
1033 LangString PAGE_TITLE ${LANG_ENGLISH} &quot;Title&quot;
1034 LangString PAGE_SUBTITLE ${LANG_ENGLISH} &quot;Subtitle&quot;
1035
1036 Function CustomPageFunction
1037 !insertmacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
1038 nsDialogs::...
1039 ...
1040 FunctionEnd
1041 </pre>
1042 </div>
1043 <h1>
1044 Custom functions</h1>
1045 <div>
1046 <p>
1047 Interface functions provided by NSIS, like the .onGUIInit function and the page
1048 functions are automatically included by the Modern UI and filled with code to support
1049 new interface features. If you want to add additional code to these function, create
1050 a function with the custom script code in the script use the Modern UI functions
1051 call them.</p>
1052 <p>
1053 Example:</p>
1054 <pre class="text">
1055 !define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
1056
1057 Function myGUIInit
1058 ...
1059 FunctionEnd</pre>
1060 <p>
1061 Modern UI pages can also customized using custom functions.</p>
1062 <h3>
1063 <img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/open.gif"
1064 onclick="toggle('trigger_cfg', 'toggle_cfg');" />
1065 General Custom Functions</h3>
1066 <div class="toggle" id="toggle_cfg">
1067 <p>
1068 These defines should be set before inserting the language macros.</p>
1069 <p>
1070 <strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
1071 <strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
1072 <strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
1073 <strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
1074 <strong>MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
1075 <strong>MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
1076 <p>
1077 Mouse over functions are only available when the description macros
1078 (MUI_FUNCTION_DESCRIPTION_BEGIN) are used. When component page descriptions are not
1079 used, regular .onMouseOverSection and un.onMouseOverSection must be used.</p>
1080 </div>
1081 <h3>
1082 <img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/open.gif"
1083 onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
1084 Page Custom Functions</h3>
1085 <div class="toggle" id="toggle_cfpg">
1086 <p>
1087 These defines should be set before inserting a page macro.</p>
1088 <p>
1089 <strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
1090 <strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
1091 <strong>MUI_PAGE_CUSTOMFUNCTION_LEAVE</strong> <span class="parameter">function</span><br />
1092 <strong>MUI_PAGE_CUSTOMFUNCTION_DESTROYED</strong> <span class="parameter">function</span><br />
1093 </p>
1094 <p>
1095 The pre function is called first and allows you to initialize variables or decide
1096 whether the page should be skipped. Then, the show function is called, which can
1097 be used to customize the interface. Finally, the user input can be validated in the
1098 leave function. The NSIS Users Manual provides more information about these functions.</p>
1099 <p>
1100 In the show function, the window handles of all controls on the page can be retrieved
1101 from a Modern UI variable. A list of the variables names is not yet available. For
1102 now, refer to the source files of the Modern UI 2. The variable declarations can
1103 be found in the first lines of the header file for a certain page.</p>
1104 <p>
1105 The destroyed function is called after a external/plug-in page has been destroyed.
1106 </div>
1107 </div>
1108 <h1>
1109 <a name="examples" id="examples">Example scripts</a></h1>
1110 <div>
1111 <p>
1112 Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
1113 Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
1114 Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
1115 Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
1116 Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
1117 </div>
1118 <h1>
1119 Credits</h1>
1120 <div>
1121 <p>
1122 Written by Joost Verburg.<br />
1123 Icons designed by Nikos Adamamas, aka adni18.<br />
1124 Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
1125 </div>
1126 <h1>
1127 License</h1>
1128 <div>
1129 <p>
1130 The zlib/libpng license applies to the Modern UI.</p>
1131 <h3>
1132 <img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/open.gif"
1133 onclick="toggle('trigger_lic', 'toggle_lic');" />
1134 License Terms</h3>
1135 <div class="toggle" id="toggle_lic">
1136 <pre>
1137 Copyright &copy; 2002-2026 Joost Verburg
1138
1139 This software is provided 'as-is', without any express or implied
1140 warranty. In no event will the authors be held liable for any damages
1141 arising from the use of this software.
1142
1143 Permission is granted to anyone to use this software for any purpose,
1144 including commercial applications, and to alter it and redistribute
1145 it freely, subject to the following restrictions:
1146
1147 1. The origin of this software must not be misrepresented;
1148 you must not claim that you wrote the original software.
1149 If you use this software in a product, an acknowledgment in the
1150 product documentation would be appreciated but is not required.
1151 2. Altered versions must be plainly marked as such,
1152 and must not be misrepresented as being the original software.
1153 3. This notice may not be removed or altered from any distribution.
1154 </pre>
1155 </div>
1156 </div>
1157 </div>
1158 </td>
1159 </tr>
1160 </table>
1161 </body>
1162 </html>