Readme.html 75 KB

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