Docs/ExperienceUI/pages/io.htm
changeset 0 d5ce4c64ef88
equal deleted inserted replaced
-1:000000000000 0:d5ce4c64ef88
       
     1 <html>
       
     2   <head>
       
     3     <title>ExperienceUI Documentation Content Frame</title>
       
     4     <link rel=stylesheet href=style.css type=text/css>
       
     5     
       
     6     <script type=text/javascript>
       
     7     
       
     8       function expand(sec) {
       
     9       
       
    10         if(document.getElementById(sec+"_d").style.display=="none") {
       
    11 	  document.getElementById(sec+"_d").style.display="block";
       
    12 	  document.getElementById(sec+"_i").src="../Images/minus.gif";
       
    13 	} else {
       
    14 	  document.getElementById(sec+"_d").style.display="none";
       
    15 	  document.getElementById(sec+"_i").src="../Images/plus.gif";
       
    16 	}
       
    17       
       
    18       }
       
    19       
       
    20       var parentparams=new Object();
       
    21       var aParams=parent.window.location.search.substr(1).split('&');
       
    22       for (i=0;i<aParams.length;i++) {
       
    23         var aParam=aParams[i].split('=');
       
    24         var sParamName=aParam[0];
       
    25         var sParamValue=aParam[1];
       
    26         parentparams[sParamName]=sParamValue;
       
    27       }
       
    28       
       
    29       function goioDocs() {
       
    30         if(parentparams['banner']) {
       
    31           parent.window.location="browser.htm?return=io.htm&url=%2E%2E%2F%2E%2E%2FInstallOptions/Readme.html&banner="+parentparams['banner'];
       
    32         } else {
       
    33           parent.window.location="browser.htm?return=io.htm&url=%2E%2E%2F%2E%2E%2FInstallOptions/Readme.html";
       
    34         }
       
    35       }
       
    36     
       
    37     </script>
       
    38     
       
    39   </head>
       
    40   
       
    41   <body bgcolor="#FFFFFF" style="background-color:#FFFFFF;margin:0px;padding:0px">
       
    42   
       
    43     <table border=0 width=100% height=100%>
       
    44     
       
    45       <tr>
       
    46       
       
    47         <td valign=top style=margin:10px;padding:10px>
       
    48     
       
    49           <h1>Create custom pages</h1>
       
    50 	  
       
    51 	  <p style="margin-left:0.2in">
       
    52 	  
       
    53 	    <font face=Verdana style=font-size:8pt>
       
    54 	    
       
    55 	      <b>You can create custom pages with the ExperienceUI.</b>  The new plugin system, introduced in NSIS 2.0, allows insertion of
       
    56 	      custom pages at any point in the installer.  If you can't find a page that does what you need it to do, you can write a
       
    57 	      custom page using <a href="javascript:goioDocs();">InstallOptions</a> and use the ExperienceUI to extract and call it.<br>
       
    58 	      <br>
       
    59 	      Creating a custom ExperienceUI page takes even less effort than writing the NSIS code to display it yourself.  See the macros
       
    60 	      below for more information.
       
    61 	      
       
    62 	    </font>
       
    63 	      
       
    64 	  </p>
       
    65 	  
       
    66 	  <h1>InstallOptions Macros</h1>
       
    67 	  
       
    68 	  <p style=margin-left:0.2in>
       
    69 	  
       
    70 	    <font face=Verdana style=font-size:8pt>
       
    71 	    
       
    72 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_EXTRACT</b> <font color=#294F75><i>ini_file</i></font><p style=margin-left:0.4in>Extracts the INI file "ini_file" to the plugins directory.  This enables the file to be initialized by the ExperienceUI.</p>
       
    73 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_EXTRACT_AS</b> <font color=#294F75><i>old_ini new_ini</i></font><p style=margin-left:0.4in>Extracts "old_ini" to the plugins directory as "new_ini".</p>
       
    74 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_DISPLAY</b> <font color=#294F75><i>ini_file</i></font><p style=margin-left:0.4in>Shows the custom InstallOptions page in "ini_file" in the installer window.  If you need a handle for the dialog, it is stored in $XPUI_HWND.  When you call this, all of the dialog controls are automatically skinned.</p>
       
    75 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_INITDIALOG</b> <font color=#294F75><i>ini_file</i></font><p style=margin-left:0.4in>Initializes InstallOptions by creating the dialog in "ini_file", but does not show the window.  When you call this, all of the dialog controls are automatically skinned.  Just like a regular InstallOptions call, either the window handle or an error string will be returned on the top of the stack.</p>
       
    76 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_SHOW</b> <font color=#294F75><i></i></font><p style=margin-left:0.4in>Shows the dialog initialized with XPUI_INSTALLOPTIONS_INITDIALOG.  Not anything more than a glorified "InstallOptions::show".</p>
       
    77 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_READ</b> <font color=#294F75><i>$VAR "ini.file" "INI Section" Value</i></font><p style=margin-left:0.4in>Reads value "Value" from section "INI Section" in INI file "ini.file" into $VAR.</p>
       
    78 	      <p style=margin-left:0.2in><b>XPUI_INSTALLOPTIONS_WRITE</b> <font color=#294F75><i>"ini.file" "INI Section" ValueName String</i></font><p style=margin-left:0.4in>Sets value "ValueName" from section "INI Section" in file "ini.file" to "String".</p>
       
    79 	    
       
    80 	    </font>
       
    81 	  
       
    82 	  </p>
       
    83 	      
       
    84 	      
       
    85 	      <a href="javascript:expand('example');"><img src=../Images/plus.gif id=example_i border=0 width=9 height=9><font face=Verdana style=font-size:8pt>  Example Custom Page</font></a>
       
    86 	      
       
    87 	      <div id=example_d style=display:none;margin-left:0.2in>
       
    88 	       
       
    89 	        <h2 style=margin-left:0.2in>Example InstallOptions Page</h2>
       
    90 		
       
    91 
       
    92 <div style=margin-left:0.4in>
       
    93 <pre>
       
    94 <code><span style="font: 10pt Courier New;"><span class="nsis1-reservedword">Page</span><span class="nsis1-space"> </span><span class="nsis1-parameter">custom</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;init&quot;</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;verify&quot;
       
    95 
       
    96 </span><span class="nsis1-reservedword">Function</span><span class="nsis1-space"> init
       
    97 
       
    98   </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_INSTALLOPTIONS_EXTRACT </span><span class="nsis1-string">&quot;Custom.ini&quot;
       
    99 </span><span class="nsis1-space">  </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_INSTALLOPTIONS_DISPLAY </span><span class="nsis1-string">&quot;Custom.ini&quot;
       
   100 </span><span class="nsis1-space">  
       
   101 </span><span class="nsis1-reservedword">FunctionEnd
       
   102 
       
   103 Function</span><span class="nsis1-space"> Verify
       
   104 
       
   105   </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_INSTALLOPTIONS_READ </span><span class="nsis1-variable">$0</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;Custom.ini&quot;</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;Field 1&quot;</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;State&quot;
       
   106 </span><span class="nsis1-space">  </span><span class="nsis1-function">StrCmp</span><span class="nsis1-space"> </span><span class="nsis1-variable">$0</span><span class="nsis1-space"> </span><span class="nsis1-number">1</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;&quot;</span><span class="nsis1-space"> +</span><span class="nsis1-number">3
       
   107 </span><span class="nsis1-space">    </span><span class="nsis1-function">MessageBox</span><span class="nsis1-space"> </span><span class="nsis1-parameter">MB_OK</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;Please uncheck the check box.&quot;
       
   108 </span><span class="nsis1-space">    </span><span class="nsis1-function">Abort
       
   109 
       
   110 FunctionEnd
       
   111 </span>
       
   112 <span class="nsis1-comment">; This is the InstallOptions INI
       
   113 </span>
       
   114 <span class="ini1-directive">[Settings]
       
   115 </span><span class="ini1-reservedword">NumFields</span><span class="ini1-parameter">=</span><span class="ini1-string">1
       
   116 
       
   117 </span><span class="ini1-directive">[Field 1]
       
   118 </span><span class="ini1-reservedword">Type</span><span class="ini1-parameter">=</span><span class="ini1-string">CheckBox
       
   119 </span><span class="ini1-reservedword">Text</span><span class="ini1-parameter">=</span><span class="ini1-string">Don't you dare check me...
       
   120 </span><span class="ini1-reservedword">Top</span><span class="ini1-parameter">=</span><span class="ini1-string">0
       
   121 </span><span class="ini1-reservedword">Left</span><span class="ini1-parameter">=</span><span class="ini1-string">0
       
   122 </span><span class="ini1-reservedword">Right</span><span class="ini1-parameter">=</span><span class="ini1-string">-1
       
   123 </span><span class="ini1-reservedword">Bottom</span><span class="ini1-parameter">=</span><span class="ini1-string">12
       
   124 </span></span>
       
   125 </code></pre>
       
   126 
       
   127 
       
   128 </div>
       
   129 
       
   130 	      
       
   131 	      </div>
       
   132 	      
       
   133 	    </font>
       
   134 	  
       
   135 	  </p>
       
   136           
       
   137         </td>
       
   138         
       
   139       </tr>
       
   140       
       
   141       <tr>
       
   142       
       
   143         <td valign=bottom style=margin:0px;padding:0px>
       
   144     
       
   145           <p class=footer>Copyright &copy; 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>
       
   146   
       
   147         </td>
       
   148         
       
   149       </tr>
       
   150       
       
   151     </table>
       
   152   
       
   153   </body>
       
   154   
       
   155 </html>