|
1 <html> |
|
2 <head> |
|
3 <title>ExperienceUI Documentation Content Frame</title> |
|
4 <link rel=stylesheet href=style.css type=text/css> |
|
5 <script type="text/javascript" src="cmd.js"></script> |
|
6 </head> |
|
7 |
|
8 <body bgcolor="#FFFFFF" style="background-color:#FFFFFF;margin:0px;padding:0px"> |
|
9 |
|
10 <table border=0 width=100% height=100%> |
|
11 |
|
12 <tr> |
|
13 |
|
14 <td valign=top style=margin:10px;padding:10px> |
|
15 |
|
16 <h1>Using the ExperienceUI</h1> |
|
17 |
|
18 <font face=Verdana style=font-size:8pt> |
|
19 Implementing the ExperienceUI into your NSIS script is very easy. Many people that use the ExperienceUI will be creating new script files, |
|
20 but for those who are upgrading a Modern UI, UltraModernUI, or InstallSpider UI script to the ExperienceUI, all you'll need to do is change |
|
21 the include to the ExperienceUI header file.<br> |
|
22 <br> |
|
23 The ExperienceUI uses a define/macro system. This allows you to define custom colors, bitmaps, and user interface files, but the defaults |
|
24 will be used if you don't define anything. You don't need to know that much about NSIS to use the ExperienceUI, because all of the code |
|
25 that controls the user interface has been written for you. |
|
26 You shouldn't use settings like Icon, CheckBitmap, or ChangeUI, because the ExperienceUI uses its own GUI settings.<br> |
|
27 <br> |
|
28 If you haven't done so, I recommend that you read the <a href=syntax.htm><b>syntax</b> page</a> before diving into this. |
|
29 <br> |
|
30 <p style=margin-left:0.20in> |
|
31 <b>If you are creating a new script</b> or upgrading a script from the standard UI<br> |
|
32 <br> |
|
33 <ul type=1 style=margin-left:0.40in> |
|
34 <li><b>Include the header file.</b><br> |
|
35 <br> |
|
36 Include the header file with:<br><br> |
|
37 <font face="Courier New"><font color=#008000>!include </font>XPUI.nsh</font>.<br><br> |
|
38 This notifies NSIS that you want to use the ExperienceUI. The XPUI.nsh file is in <NSIS Folder>\Include, so you don't need |
|
39 to specify a path.<br> |
|
40 <br></li> |
|
41 <li><b>GUI Settings</b><br> |
|
42 <br> |
|
43 Next, define any settings that apply to the entire installer, like XPUI_ICON, XPUI_TEXT_COLOR and such. Actually, while this is the best |
|
44 place to define visual settings, you can really define settings like these anywhere before you insert the first language file.<br> |
|
45 <br></li> |
|
46 <li><b>Installer Pages</b><br> |
|
47 <br> |
|
48 Insert <a href=page_macros.htm>pages</a> into the script. |
|
49 <a href=page_settings.htm>Read about page settings...</a><br> |
|
50 <br></li> |
|
51 |
|
52 <li><b>Your own sections and functions</b><br> |
|
53 <br> |
|
54 Now, insert your own code into the script. This is usually your own sections, functions, and such. For more information about |
|
55 sections and functions, please refer to the NSIS users manual.<br> |
|
56 <br></li> |
|
57 <li><b>Custom code for ExperienceUI pages</b><br> |
|
58 <br> |
|
59 You can add your own code to the ExperienceUI page macros. For each page in the installer, you can insert three functions, one |
|
60 before the page is initialized, one when the page is about to be shown, and one after the page is finished. <a href=custfunc.htm>More about custom functions...</a><br> |
|
61 <br></li> |
|
62 <li><b>Your own pages</b><br> |
|
63 <br> |
|
64 NSIS 2 features a plugin system that allows you to insert your own pages. Refer to the NSIS users' guide for information on how |
|
65 to use <b>InstallOptions</b> to create custom pages.<br> |
|
66 <br> |
|
67 To insert a custom page, use the Page command between ExperienceUI page macros at the point where you want your page to appear. |
|
68 Then, use the ExperienceUI's <a href=io.htm>InstallOptions Macros</a> to display the page.<br> |
|
69 <br> |
|
70 Here is an example custom page:<br> |
|
71 <br> |
|
72 <font face="Courier New"> |
|
73 <font color=#008000>!insertmacro </font>XPUI_PAGE_WELCOME<br> |
|
74 <font color=#008000>!insertmacro </font>XPUI_PAGE_COMPONENTS<br> |
|
75 <font color=#000080><b>; this page will be in between the Components and Install Confirm pages</b></font><br> |
|
76 <font color=#0000FF><b>Page </b></font><font color=#FF8040>custom </font>CstmPage <font color=#008080>"" " - Custom Page!" </font><br> |
|
77 <font color=#008000>!insertmacro </font>XPUI_PAGE_INSTCONFIRM<br> |
|
78 <br> |
|
79 <font color=#0000FF><b>Function </b></font>CstmPage<br> |
|
80 <font color=#008000>!insertmacro </font>XPUI_INSTALLOPTIONS_EXTRACT MyPage.ini<br> |
|
81 <font color=#008000>!insertmacro </font>XPUI_INSTALLOPTIONS_SHOW <font color=#008080>"MyPage.ini"</font><br> |
|
82 <font color=#0000FF><b>FunctionEnd</b></font> |
|
83 </font> |
|
84 |
|
85 <br> |
|
86 <br></li> |
|
87 <li><b>Section Descriptions</b><br> |
|
88 <br> |
|
89 Now, you can insert section descriptions. If you are using a components page, you can set a description of each component to appear when the |
|
90 user positions the mouse over an item in the list. <a href=secdesc.htm>Read more...</a><br> |
|
91 <br></li> |
|
92 |
|
93 <li><b>Language Files</b><br> |
|
94 <br> |
|
95 Insert languages into your installer. |
|
96 The languages included with the ExperienceUI are English, French, German, PortugueseBR (Brazilian Portuguese), and Spanish.<br> |
|
97 <br> |
|
98 You must insert at least one language into your installer in order for the ExperienceUI to work properly.<br> |
|
99 <br> |
|
100 <font face="Courier New"><font color=#008000>!insertmacro </font>XPUI_LANGUAGE <font color=#008080>"English"</font><br> |
|
101 <font face="Courier New"><font color=#008000>!insertmacro </font>XPUI_LANGUAGE <font color=#008080>"PortugueseBR"</font></font></font><br> |
|
102 <br> |
|
103 You don't need to insert XPUI_FUNCTION_GUIINIT anymore, because it is now inserted the first time you insert a language.<br> |
|
104 <br></li> |
|
105 </ul> |
|
106 </p> |
|
107 <p style=margin-left:0.20in><b>Converting a Modern UI, UltraModern UI, or InstallSpider UI script</b></p> |
|
108 <p style=margin-left:0.40in> |
|
109 You can use an existing script that uses the Modern UI, UltraModern UI, or InstallSpider UI with the ExperienceUI. The ExperienceUI |
|
110 includes special code that converts all known Modern UI defines to ExperienceUI-compatible settings. This is much like WINE for Linux. |
|
111 WINE is not Windows, it just can look that way because of special code. The ExperienceUI works the same way. While the ExperienceUI |
|
112 can understand Modern UI-compatible scripts, its underlying architecture is completely different.<br> |
|
113 <br> |
|
114 I can do this using a feature known as dummy macros. If you insert, for example, MUI_PAGE_WELCOME, the ExperienceUI will automatically |
|
115 substitute XPUI_PAGE_WELCOME (or XPUI_PAGE_WELCOME2 if UMUI_USE_ALTERNATE_PAGE is defined)<br> |
|
116 <br> |
|
117 To use the ExperienceUI in a Modern UI, UltraModern UI, or InstallSpider UI script, just change the include. Example:<br> |
|
118 <br> |
|
119 Old:<br> |
|
120 <font face="Courier New"><font color=#008000>!include </font><font color=#008080>"MUI.nsh"</font> <font color=#000080><b>; or UMUI.nsh or ISUI.nsh...</b></font> |
|
121 </font><br> |
|
122 <br> |
|
123 New:<br> |
|
124 <font face="Courier New"><font color=#008000>!include </font><font color=#008080>"XPUI.nsh"</font> |
|
125 </font><br> |
|
126 <br> |
|
127 </p> |
|
128 </font> |
|
129 |
|
130 |
|
131 </td> |
|
132 |
|
133 </tr> |
|
134 |
|
135 <tr> |
|
136 |
|
137 <td valign=bottom style=margin:0px;padding:0px> |
|
138 |
|
139 <p class=footer>Copyright © 2004-2006 Dan Fuhry. All rights except those explicitly given in the <a href=license_agreement.htm style=color:#A0A0D0 onmouseover="this.style.color='#A0A0A0'" onmouseout="this.style.color='#A0A0D0'">license agreement</a> reserved.</p> |
|
140 |
|
141 </td> |
|
142 |
|
143 </tr> |
|
144 |
|
145 </table> |
|
146 |
|
147 </body> |
|
148 |
|
149 </html> |