Readme.html 78 KB

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