Docs/ExperienceUI/pages/startmenu.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     <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>Start Menu Page</h1>
       
    17           
       
    18           <p style=margin-left:0.2in>
       
    19           
       
    20             <font face=Verdana style=font-size:8pt>
       
    21             
       
    22               The Start Menu page was redesigned in ExperienceUI 1.1 to work like the Modern UI system.  The new Start Menu page was largely
       
    23               based on the Modern UI, so it works the same way.
       
    24             
       
    25             </font>
       
    26           
       
    27           </p>
       
    28           
       
    29           <font face=Verdana style=font-size:8pt>
       
    30           
       
    31             <script type=text/javascript>
       
    32             
       
    33               define('XPUI_STARTMENUPAGE_TITLE', '"Header Top"', 'The top layer of text on the header.', '"Select Start Menu Folder"');
       
    34               define('XPUI_STARTMENUPAGE_SUBTITLE', '"Header Bottom"', 'The bottom layer of text on the header.', '"Select the folder in which to create shortcuts to &lt;NAME&gt;"');
       
    35               define('XPUI_STARTMENUPAGE_CAPTION', '": Text"', 'The text added to the window caption.', '": Start Menu Folder"');
       
    36               define('XPUI_STARTMENUPAGE_TEXT', '"Page Top"', 'The text at the top  of the page.', '"Select the Start Menu folder in which to create shortcuts to &lt;NAME&gt;:"');
       
    37               define('XPUI_STARTMENUPAGE_CHECKBOX', '"Check Box"', 'The text at on the check box that indicates not to create a Start Menu folder.', '"Don\'t create a Start Menu folder"');
       
    38               define('XPUI_STARTMENUPAGE_FOLDER', '"Folder Name"', 'The default name of the folder to create Start Menu shortcuts in.', '"&lt;NAME&gt;"');
       
    39               // define('', '', '', '');
       
    40               
       
    41               var parentparams=new Object();
       
    42               var aParams=parent.window.location.search.substr(1).split('&');
       
    43               for (i=0;i<aParams.length;i++) {
       
    44                 var aParam=aParams[i].split('=');
       
    45                 var sParamName=aParam[0];
       
    46                 var sParamValue=aParam[1];
       
    47                 parentparams[sParamName]=sParamValue;
       
    48               }
       
    49             
       
    50             </script>
       
    51           
       
    52           </font>
       
    53           
       
    54           <h1>Get the return</h1>
       
    55           
       
    56           <p style=margin-left:0.2in>
       
    57           
       
    58             <font face=Verdana style=font-size:8pt>
       
    59             
       
    60               Of course, you need to have a way to read which folder the user selected, or if the user decided not to create shortcuts.  Reading the
       
    61               return from the Start Menu page is now automated.
       
    62             
       
    63             </font>
       
    64           
       
    65           </p>
       
    66           
       
    67           <h2>Macros</h2>
       
    68           
       
    69           <font face=Verdana style=font-size:8pt>
       
    70             
       
    71             <script type=text/javascript>
       
    72             
       
    73               macro('XPUI_STARTMENU_WRITE_BEGIN', 'page_id', 'Insert this macro to have the ExperienceUI read the user\'s Start Menu folder selection.  After you insert this macro, you should create any shortcuts (or do any other related operations) and then insert XPUI_STARTMENU_WRITE_END.  page_id should be the text you specified when you inserted XPUI_PAGE_STARTMENU.  After you insert this macro, the variable you specified when you inserted XPUI_PAGE_STARTMENU will contain the user\'s folder selection (if any).');
       
    74               macro('XPUI_STARTMENU_WRITE_END', '', 'Finishes a block started with XPUI_STARTMENU_WRITE_BEGIN.  If you fail to include this in the same section or function where you started the block, MakeNSIS will halt.');
       
    75             
       
    76             </script>
       
    77           
       
    78           </font>
       
    79           
       
    80           <h1>Component Manager Compatibility</h1>
       
    81           
       
    82             <p style="margin-left:0.2in">
       
    83               <font face=Verdana style=font-size:8pt>
       
    84                 If you use <a href="javascript:if(parentparams['banner']){parent.window.location='browser.htm?url=http://xpui.sourceforge.net/compmgr/&return=startmenu.htm&banner=no'}else{parent.window.location='browser.htm?url=http://xpui.sourceforge.net/compmgr/&return=startmenu.htm'};">Component Manager</a> in your installer, and you use the Start Menu shortcut feature, the Start Menu page can be a little tricky.
       
    85                 For Component Manager versions 0.2 and earlier, this is rather complex.  CM versions 0.3 and later are more automated.
       
    86               </font>
       
    87             </p>
       
    88             
       
    89             <h2>Versions 0.3 and later</h2>
       
    90             <ol>
       
    91               <li><b>Include the ExperienceUI and Component Manager.</b><br />
       
    92                   <br />
       
    93                   This one should be pretty self-explanatory.  Include XPUI.nsh and CM.nsh.  See the appropriate documentation for more
       
    94                   information on including the header files.<br /><br /></li>
       
    95               <li><b>Component Manager Languages</b><br />
       
    96                   <br />
       
    97                   Insert Component Manager language files now.<br />
       
    98                   <br />
       
    99                   <pre>
       
   100 <code><span style="font: 10pt Courier New;"><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> CM_LANGUAGE </span><span class="nsis1-string">&quot;English&quot;</span></span></code></pre>
       
   101                   </li>
       
   102               <li><b>Maintenance Pages</b><br />
       
   103                   <br />
       
   104                   Now, add in Component Manager's page suite.<br />
       
   105                   <br />
       
   106 <pre>
       
   107 <code><span style="font: 10pt Courier New;"><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> CM_PAGES</span></span></code></pre>
       
   108                   </li>
       
   109               <li><b>ExperienceUI Pages</b><br />
       
   110                   <br />
       
   111                   Here you should insert any other pages, including the Start Menu page, as normal.<br />
       
   112                   <br />
       
   113 <pre>
       
   114 <code><span style="font: 10pt Courier New;"><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> Welcome
       
   115 </span><span class="nsis1-variable">${LicensePage}</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;License_pro.rtf&quot;
       
   116 </span><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> </span><span class="nsis1-parameter">Components
       
   117 </span><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> </span><span class="nsis1-parameter">Directory
       
   118 </span><span class="nsis1-variable">${StartMenuPage}</span><span class="nsis1-space"> App </span><span class="nsis1-variable">$R9
       
   119 ${Page}</span><span class="nsis1-space"> InstConfirm
       
   120 </span><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> </span><span class="nsis1-parameter">InstFiles
       
   121 </span><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> Finish
       
   122 </span><span class="nsis1-variable">${Page}</span><span class="nsis1-space"> Abort</span></span></code></pre>
       
   123                   </li>
       
   124               <li><b>Sections</b><br />
       
   125                   <br />
       
   126                   Insert Component Manager-enhanced sections into the script.<br />
       
   127                   <br />
       
   128 <pre>
       
   129 <code><span style="font: 10pt Courier New;"><span class="nsis1-variable">${Section}</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;My Program&quot;</span><span class="nsis1-space"> SecProgram </span><span class="nsis1-string">&quot;Description&quot;
       
   130 </span><span class="nsis1-space">  </span><span class="nsis1-variable">${SetOutPath}</span><span class="nsis1-space"> </span><span class="nsis1-variable">$INSTDIR
       
   131 </span><span class="nsis1-space">  </span><span class="nsis1-variable">${File}</span><span class="nsis1-space"> reg.dat </span><span class="nsis1-string">&quot;regversion\reg.dat&quot;
       
   132 </span><span class="nsis1-space">  </span><span class="nsis1-variable">${Directory}</span><span class="nsis1-space"> </span><span class="nsis1-string">`</span><span class="nsis1-variable">$</span><span class="nsis1-string">%PROGRAMFILES%\My Program`
       
   133 </span><span class="nsis1-variable">${Section}</span></span></code></pre>
       
   134                   </li>
       
   135                   <li><b>CM File Functions</b><br />
       
   136                       <br />
       
   137                       Finally, insert Component Manager's CM_FILES macro.  This defines all the functions used in CM_PAGES.<br />
       
   138                       <br />
       
   139 <pre>
       
   140 <code><span style="font: 10pt Courier New;"><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> CM_FILES</span></span></code></pre>
       
   141                       </li>
       
   142                   <li><b>ExperienceUI Language Files</b><br />
       
   143                       <br />
       
   144                       Last, list all the languages you want your installer to support here.  Note that both the ExperienceUI and Component
       
   145                       Manager must support the languages you are using.<br />
       
   146                       <br />
       
   147 <pre>
       
   148 <code><span style="font: 10pt Courier New;"><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;English&quot;
       
   149 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;Spanish&quot;
       
   150 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;German&quot;
       
   151 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;French&quot;
       
   152 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;PortugueseBR&quot;</span></span></code></pre>
       
   153 
       
   154                       </li>
       
   155                 </ol>
       
   156                 
       
   157                 <h2>Versions 0.2 and earlier</h2>
       
   158                 
       
   159                 <p style="margin-left: 0.2in"><b>Note:</b> these directions are based on an old version of Component Manager.  They have not
       
   160                 been tested, but they should still work.<br />
       
   161                 <br />
       
   162                 In a related note, Component Manager 0.3 has not been tested with ExperienceUI 1.1.051202 (the final version of the ExperienceUI SDK version 1.1).<br />
       
   163                 <br />
       
   164                 With Component Manager 0.2, the Start Menu shortcut
       
   165                 feature needs to know the appropriate page ID and variable, and it needs to call the ExperienceUI start menu creation macro.
       
   166                 The problem is, the Start Menu page has to be inserted <i>before</i> Component Manager calls XPUI_STARTMENU_WRITE_BEGIN.
       
   167                 Inserting XPUI_PAGE_STARTMENU and then CM_SYSTEM would work, but the Component Manager maintenance pages would be after the
       
   168                 Start Menu page.  These macros allow you to define any necessary settings for the Start Menu page, but delay calling it
       
   169                 until where it would normally appear. 
       
   170                 </p>
       
   171                 
       
   172             <script type=text/javascript>
       
   173             
       
   174               macro('XPUI_PAGE_STARTMENU_INIT', 'page_id var', 'Inserts a new start menu page into the installer and creates any related functions, but does not actually call the page.  This macro has to be used before inserting ${StartMenu} commands in Component Manager and before inserting CM_SYSTEM.  Inserting XPUI_PAGE_STARTMENU and then CM_SYSTEM would work, but the maintenance page system would be after the Start Menu page.');
       
   175               macro('XPUI_PAGE_STARTMENU_SHOW', 'page_id', 'Shows a Start Menu page created with XPUI_PAGE_STARTMENU_INIT.  Use this where you would normally insert XPUI_PAGE_STARTMENU.');
       
   176               
       
   177             </script>
       
   178 
       
   179 <div style="margin-left: 0.2in">
       
   180 <font face=Verdana style=font-size:8pt>
       
   181 <b>Example:</b>
       
   182 </font>
       
   183 </div>
       
   184 <div style="margin-left: 0.4in">
       
   185 <pre>
       
   186 <code><span style="font: 10pt Courier New;"><span class="nsis1-directive">!include</span><span class="nsis1-space"> CM.nsh
       
   187 </span><span class="nsis1-directive">!include</span><span class="nsis1-space"> XPUI.nsh
       
   188 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_PAGE_STARTMENU_INIT MyApp </span><span class="nsis1-variable">$R0
       
   189 
       
   190 </span><span class="nsis1-space"> </span><span class="nsis1-comment"># ...
       
   191 
       
   192 </span><span class="nsis1-variable">${Section}</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;Start Menu Shortcuts&quot;</span><span class="nsis1-space"> SecSM </span><span class="nsis1-string">&quot;Creates Start Menu Shortcuts&quot;
       
   193 </span><span class="nsis1-space">  </span><span class="nsis1-variable">${StartMenu}</span><span class="nsis1-space"> MyApp </span><span class="nsis1-variable">$R0
       
   194 </span><span class="nsis1-space">    </span><span class="nsis1-variable">${CreateShortcut}</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;Start the Program&quot;</span><span class="nsis1-space"> </span><span class="nsis1-string">&quot;</span><span class="nsis1-variable">$INSTDIR</span><span class="nsis1-string">\MyApp.exe&quot;
       
   195 </span><span class="nsis1-space">  </span><span class="nsis1-variable">${StartMenuEnd}
       
   196 ${SectionEnd}
       
   197 
       
   198 </span><span class="nsis1-space"> </span><span class="nsis1-comment"># ...
       
   199 
       
   200 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> CM_PAGES
       
   201  </span><span class="nsis1-comment"># ...
       
   202 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_PAGE_STARTMENU_SHOW MyApp
       
   203 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> XPUI_LANGUAGE </span><span class="nsis1-string">&quot;English&quot;
       
   204 </span><span class="nsis1-directive">!insertmacro</span><span class="nsis1-space"> CM_FILES
       
   205 </span></span>
       
   206 </code></pre>
       
   207 </div>
       
   208         </td>
       
   209         
       
   210       </tr>
       
   211       
       
   212       <tr>
       
   213       
       
   214         <td valign=bottom style=margin:0px;padding:0px>
       
   215     
       
   216           <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>
       
   217   
       
   218         </td>
       
   219         
       
   220       </tr>
       
   221       
       
   222     </table>
       
   223   
       
   224   </body>
       
   225   
       
   226 </html>