Salome HOME
Improvement: support <button> tag to customize the buttons (to perform specific actio...
authorvsr <vsr@opencascade.com>
Mon, 30 Oct 2006 17:22:24 +0000 (17:22 +0000)
committervsr <vsr@opencascade.com>
Mon, 30 Oct 2006 17:22:24 +0000 (17:22 +0000)
doc/readme.html

index 5a145755c29686ddad47c7520c646c6fdee319ef..c7994efd353373bd2197f8ab2beb78a37bfd7667 100755 (executable)
@@ -54,6 +54,7 @@ procedure</a></li>
   <li> <a href="#xml_files">Modifying XML configuration file</a></li>
   <li> <a href="#new_products">Implementing installation scripts for
 the new products</a></li>
+  <li> <a href="#finish_buttons">Customizing Readme page buttons</a></li>
 </ul>
 <h3>
 <hr></h3>
@@ -810,6 +811,26 @@ license=&lt;install_wizard_license_info&gt; ]</font> <br>
  color="#000099"><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt; </font></b><font color="#000000"><br>
 &nbsp;&nbsp;&nbsp; ]</font> <br>
+<font color="#000000"><b>&nbsp;&nbsp;&nbsp; </b>[ </font><b><font
+ color="#000099">&lt;button</font></b><font color="#000000">
+&nbsp;  label=&lt;button_label&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font> <br>
+<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;
+[ tooltip=&lt;button_tooltip&gt; ]</font> <br>
+<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;  script=&lt;button_script&gt;&nbsp;&nbsp;&nbsp;</font> <br>
+<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+[ disable=&lt;disable_flag&gt;&nbsp;&nbsp;&nbsp;]</font><b><font
+ color="#000099"><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /&gt; </font></b><font color="#000000"><br>
+&nbsp;&nbsp;&nbsp; ]</font> <br>
+ <font color="#000000">
+&nbsp;&nbsp;&nbsp; [</font><b><font color="#000099"> &lt;button</font></b><font
+ color="#000000"> ... </font><font color="#000099"><br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /<b>&gt;</b></font><br><font color="#000000">
+&nbsp;&nbsp;&nbsp; ]</font> <br>
 <font color="#000000">&nbsp;&nbsp;&nbsp; [</font><b><font
  color="#000099"> &lt;product</font></b><font color="#000000">&nbsp;
 name=&lt;product_name&gt;</font> <br>
@@ -828,7 +849,8 @@ install=&lt;installation_mode&gt;</font> <br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 supported=&lt;supported_installation_modes&gt;</font> <br>
 <font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; disable=&lt;disable_flag&gt;<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  [ disable=&lt;disable_flag&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; [
 pickupenv=&lt;pickup_env_flag&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]</font><font
  color="#000000"><br>
@@ -852,14 +874,14 @@ dependancies=&lt;list_of_prerequisites&gt;</font>&nbsp;<font
  color="#000000"> ... </font><font color="#000099"><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /<b>&gt;</b></font><font color="#000000">
 <br>
-&nbsp;&nbsp;&nbsp; ]</font> <font color="#000000"><br>
-&nbsp;&nbsp;&nbsp;<b> .</b></font><b><font color="#000099">..</font></b>
-<b><font color="#000099"><br>
+&nbsp;&nbsp;&nbsp; ]</font><br><font color="#000000">
+&nbsp;&nbsp;&nbsp; ...</font><br>
+<b><font color="#000099">
 &lt;/document&gt;</font></b> </p>
 </font>
 <h4><font color="#000000">&lt;config&gt; section</font></h4>
 <font color="#000000">This is optional section; it provides general
-information Installation Wizard itself.<br>
+information about Installation Wizard itself.<br>
 <br>
 Attributes:<br>
 </font>
@@ -956,7 +978,7 @@ installation mode.</font>
 <ul>
   <li> <font color="#000000"><b>disable</b></font></li>
 </ul>
-<font color="#000000">If this flag has 'true'
+<font color="#000000">If this optional flag has 'true'
 value, the corresponding product will not appear in the list of
 products and will not be installed.</font>
 <ul>
@@ -999,11 +1021,39 @@ automatically by the Installation Wizard when necessary from the main
 program. See the <a href="#new_products">next
 section</a> for
 more information.</font><br>
-<b><br>
-Note:</b> If you add new products to be installed with Installation
+<h4> <b>&lt;button&gt; section</b></h4>
+This is optional section. It allows customing of the last "Finish" 
+page of the Installation Wizard by adding one or more buttons in the 
+lower part of the wizard's window. The script which is attached to each 
+such button, can perform some specific action, for example, launch 
+the application or show the Release Notes file by using external
+program.
+See <a href="#finish_buttons">here</a> for more details about
+writing scripts.<br>
+<font color="#000000"><br>
+Attributes:</font><br>
+<ul>
+  <li> <font color="#000000"><b>label</b></font></li>
+</ul>
+<font color="#000000">This is the button text.</font>
+<ul>
+  <li> <font color="#000000"><b>tooltip</b></font></li>
+</ul>
+<font color="#000000">The button's tooltip (optional).</font>
+<ul>
+  <li> <font color="#000000"><b>script</b></font></li>
+</ul>
+<font color="#000000">The script attached to the button.</font>
+<ul>
+  <li> <font color="#000000"><b>disable</b></font></li>
+</ul>
+<font color="#000000">If this optional flag has 'true'
+value, the corresponding button will not appear in the "Finish" 
+page - the section of XML file is silently ignored.</font><br>
+<br><b>Note:</b> If you add new products to be installed with Installation
 Wizard, you should also provide installation script for this product.
 See
-the next section for more details.
+the next section for more details.<p><br></p>
 <hr>
 <h3><a name="new_products"></a>Implementing <font color="#ff0000">installation
 scripts</font> for the new products</h3>
@@ -1107,7 +1157,7 @@ of the configuration xml file (see previous section). It should call <b>make_env
 procedure to perform pick-up environment procedure for the product.<br>
 <br>
 <font color="#000000">The calling signature of the product installation
-script is following:</font> <br>
+script is the following:</font> <br>
 <b><font color="#000000">&lt;product_script_name&gt;
 &lt;function_name&gt; &lt;temp_folder&gt; &lt;products_directory&gt;
 &lt;target_directory&gt;
@@ -1146,6 +1196,58 @@ will automatically search and call your script during the installation
 procedure.</font>
 </p>
 <hr> <br>
+<h3><a name="finish_buttons"></a>Customizing <font color="#ff0000">Readme
+page</font> buttons</h3>
+The Installation Wizard allows customizing the look-n-feel of the last
+"Finish" page. If you want to add one or more buttons to this page in
+order to perform some specific actions at the end of the installation
+(for example, show Release Notes file by using Open Office) you can
+put an additional section to the XML configuration file.
+This is the <b>&lt;button&gt;</b> section
+(see <a href="#xml_files">here</a> for more details).
+<p><br></p>
+To implement the action which will be performed when the user click on
+the button, you need to create a script and put it to the
+<i>&lt;Install_Wizard_root_directory&gt;/config_files</i> directory.<br>
+There are some obligatory functions which should be implemented in this
+script. These functions are automatically called by the Installation
+Wizard GUI.
+<ul>
+  <li><b>check_enabled()</b></li>
+</ul>
+This procedure is called by the Installation Wizard when the "Finish"
+page is displayed and the status of the buttons should be modified
+according to the installation options. This procedure should return <b>0</b>
+if the corresponding action can be performed and, thus, the button
+should become enabled. Otherwise, it should return <b>1</b> - in this case
+the button will be disabled.
+<ul>
+  <li><b>execute()</b></li>
+</ul>
+This procedure is invoked when the user clicks the button. This
+procedure should return <b>0</b> if the corresponding action is done
+successfully and <b>1</b> if any error occurs.<br><br>
+The calling signature of the script is the following:<br>
+<b><font color="#000000">&lt;product_script_name&gt;
+&lt;function_name&gt; &lt;target_directory&gt; &lt;temp_folder&gt;</font></b>
+<p><font color="#000000">where</font> <br>
+</p>
+<p><font color="#000000"><b>&lt;product_script_name&gt;</b> -
+the script name itself (retrieved from the XML configuration xml
+file);</font> <br> <font color="#000000"><b>&lt;function_name&gt;</b>
+- the name of function;</font> <br><font color="#000000"><b>
+&lt;target_directory&gt;</b> - root target directory where product are
+installed to;</font> <br> <font color="#000000"><b>&lt;temp_folder&gt;
+</b> - temporary files directory;</font> <br>
+<br><b>Note:</b> The standard Installation Wizard buttons "Launch
+SALOME" and "Release Notes" are implemented with this
+feature. Refer to the scripts <b>start_salome.sh</b> and
+<b>release_notes.sh</b> for sample implementation.<br>
+<br><b>Note:</b> Any button (even standard) can be ignored by the
+Installation Wizard if the attribute <b>&lt;disable&gt;</b> in the XML
+configuration file is set to the "true" value.<p><br></p>
+<p><br></p>
+<hr>
 <br>
 </body>
 </html>