From: Olivier S. <ob...@us...> - 2004-02-15 06:18:45
|
Update of /cvsroot/jvcl/dev/JVCL3/help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20955/dev/JVCL3/help Modified Files: package_generator.html Log Message: Added Template Files Format section Index: package_generator.html =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/help/package_generator.html,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** package_generator.html 14 Feb 2004 10:38:11 -0000 1.2 --- package_generator.html 15 Feb 2004 06:11:45 -0000 1.3 *************** *** 19,24 **** Interface (pgEdit.exe) and Command Line (pg.exe). They both work from the same set of XML configuration files, pgEdit having the advantage to ! allow you to safely edit the source XML files. Here is the general ! principle:<br> <br> <div style="text-align: center;"><img --- 19,23 ---- Interface (pgEdit.exe) and Command Line (pg.exe). They both work from the same set of XML configuration files, pgEdit having the advantage to ! allow you to safely edit the source XML files. Here is the flow diagram:<br> <br> <div style="text-align: center;"><img *************** *** 42,47 **** as PFLAGS (Pascal Flags) for C++ Builder. All inclusions and dependencies can be conditionned by a compilation directive.<br> ! A runtime package must have the '-R' suffix, while a design time ! package must have a '-D' suffix. Hence, JvCore-R.xml is a runtime package source file while JvCore-D.xml is a design time package source file.<br> --- 41,46 ---- as PFLAGS (Pascal Flags) for C++ Builder. All inclusions and dependencies can be conditionned by a compilation directive.<br> ! A runtime package should have the '-R' suffix, while a design time ! package should have a '-D' suffix. Hence, JvCore-R.xml is a runtime package source file while JvCore-D.xml is a design time package source file.<br> *************** *** 77,81 **** source files and as such can include conditional compilation directives. However C++ Builder package source files are XML files and ! as such do not support conditions. Hence when modifications are done to an include file that have impact on which files are to be included in a package, you must regenerate the packages for C++ Builder. The --- 76,81 ---- source files and as such can include conditional compilation directives. However C++ Builder package source files are XML files and ! as a result do not support conditions. Hence when modifications are ! done to an include file that have impact on which files are to be included in a package, you must regenerate the packages for C++ Builder. The *************** *** 153,157 **** When reading those files, the package generator doesn't check for the existence of the nodes and properties in the XML file. It assumes they ! exist and if they don't you will most likely end up with an exception. This is why we recommend that you use pgEdit.exe to edit these files, which --- 153,158 ---- When reading those files, the package generator doesn't check for the existence of the nodes and properties in the XML file. It assumes they ! exist and if they don't you will most likely end up with an Access ! Violation exception. This is why we recommend that you use pgEdit.exe to edit these files, which *************** *** 184,188 **** package while Design is 1 when the package is a designtime package, 0 when it is a run time package. The root node doesn't have to be called ! package, but it MUST have those two properties<br> </td> </tr> --- 185,189 ---- package while Design is 1 when the package is a designtime package, 0 when it is a run time package. The root node doesn't have to be called ! package, but it MUST have those two properties.<br> </td> </tr> *************** *** 193,197 **** </td> <td style="vertical-align: top;">This is the description of the ! package as it will be displayed in the IDE<br> </td> </tr> --- 194,198 ---- </td> <td style="vertical-align: top;">This is the description of the ! package as it will be displayed in the IDE.<br> </td> </tr> *************** *** 210,216 **** condition doesn't exist when the file are generated, the option is removed. For instance, if you type -LUCJcl50(USEJVCL) then if USEJVCL ! is not defined in the include file, then -LUCJcl50 will be removed from ! the final string. The final value will be the replacement for ! %C5PFLAGS% in template files<br> </td> </tr> --- 211,218 ---- condition doesn't exist when the file are generated, the option is removed. For instance, if you type -LUCJcl50(USEJVCL) then if USEJVCL ! is not defined in the include file, -LUCJcl50 will be removed from the ! final PFLAGS value. This final value will be the replacement for ! %C5PFLAGS% in ! template files.<br> </td> </tr> *************** *** 252,256 **** </td> <td style="vertical-align: top;">This node is only the parent of ! all the package nodes, those nodes indicating the packages required by the current package.<br> </td> --- 254,259 ---- </td> <td style="vertical-align: top;">This node is only the parent of ! all the 'package' nodes, those nodes indicating the packages required ! by the current package.<br> </td> *************** *** 262,268 **** </td> <td style="vertical-align: top;">This node is only the parent of ! all the file nodes, those nodes indicating the files contained in the ! current package. ! </td> </tr> <tr> --- 265,270 ---- </td> <td style="vertical-align: top;">This node is only the parent of ! all the 'file' nodes, those nodes indicating the files contained in the ! current package. </td> </tr> <tr> *************** *** 294,298 **** </td> <td style="vertical-align: top;">The targets for which the ! package is to be required<br> </td> </tr> --- 296,300 ---- </td> <td style="vertical-align: top;">The targets for which the ! package is to be required.<br> </td> </tr> *************** *** 325,329 **** </td> <td style="vertical-align: top;">The name of the file to ! include. The extension must be indicated<br> </td> </tr> --- 327,331 ---- </td> <td style="vertical-align: top;">The name of the file to ! include. The extension must be indicated.<br> </td> </tr> *************** *** 332,336 **** </td> <td style="vertical-align: top;">The targets for which the ! file is to be included<br> </td> </tr> --- 334,338 ---- </td> <td style="vertical-align: top;">The targets for which the ! file is to be included.<br> </td> </tr> *************** *** 343,347 **** is of type TForm1 then the value must be Form1. Moreover, if the dfm file describes a Frame or a Data Module, the name must be followed by a ! colon, a space and TFrame or TDataModule.<br> </td> </tr> --- 345,349 ---- is of type TForm1 then the value must be Form1. Moreover, if the dfm file describes a Frame or a Data Module, the name must be followed by a ! colon, a space and TFrame or TDataModule (as in 'myFrame: TFrame').<br> </td> </tr> *************** *** 432,437 **** <td style="vertical-align: top;">This is the root node of the XML file. It doesn't have to have any attributes and may be named ! differently, but that would mean that pgEdit needs to be changed to ! cope with the modification. pg wouldn't mind.<br> </td> </tr> --- 434,439 ---- <td style="vertical-align: top;">This is the root node of the XML file. It doesn't have to have any attributes and may be named ! differently, but that would mean that pgEdit.exe needs to be changed to ! cope with the modification. pg.exe wouldn't mind.<br> </td> </tr> *************** *** 442,447 **** </td> <td style="vertical-align: top;">This node contains all the ! subnodes required by pgEdit to save its state when it closed down. The ! state includes the values of various components, the size of the form, its position...<br> </td> --- 444,450 ---- </td> <td style="vertical-align: top;">This node contains all the ! subnodes required by pgEdit to save its state when closed down. The ! state includes the values of various component fields, the size of the ! form, its position...<br> </td> *************** *** 551,555 **** </td> <td style="vertical-align: top;">The name of the include ! file to parse. This has only an impact for C++ Builder targets<br> </td> </tr> --- 554,558 ---- </td> <td style="vertical-align: top;">The name of the include ! file to parse. This only has an impact for C++ Builder targets<br> </td> </tr> *************** *** 618,622 **** above you could use the d7 target alone when specifying a file that is to be included for Delphi 7 and not Delphi 7 Personal Edition. Use ! 'd7,d7p' when including a file that can be used for all versions of Delphi 7.<br> </td> --- 621,625 ---- above you could use the d7 target alone when specifying a file that is to be included for Delphi 7 and not Delphi 7 Personal Edition. Use ! 'd7,d7p' when including a file that must be used for all versions of Delphi 7.<br> </td> *************** *** 644,648 **** <td style="vertical-align: top;">A character to identify the version of the environment. Defaults to the second character of ! name. The expected value is a number and errors will arise if it is not.<br> </td> </tr> --- 647,652 ---- <td style="vertical-align: top;">A character to identify the version of the environment. Defaults to the second character of ! name. The expected value is a number and errors will arise if it is ! not. For instance, for Delphi 7, it should be 7.<br> </td> </tr> *************** *** 656,661 **** in the JVCL, we have the JVCLThemesEnabled compilation directive. It can be turned on manually, but if the target compiler is version 7 or ! upper, it is turned on by default as the theme support is included in ! the default distribution. Hence in the include file, we did this:<br> <code><br> </code> --- 660,665 ---- in the JVCL, we have the JVCLThemesEnabled compilation directive. It can be turned on manually, but if the target compiler is version 7 or ! upper, it is always turned on as the theme support is included in the ! Delphi distribution. Hence in the include file, we have this:<br> <code><br> </code> *************** *** 725,732 **** <br> <h2><a name="Template_Files_Format"></a>Template Files Format</h2> ! <h2><br> ! </h2> <h2><a name="Include_File_parsing"></a>Include File parsing</h2> <br> <h2><a name="Detailed_Generation_process"></a>Detailed Generation process</h2> --- 729,1050 ---- <br> <h2><a name="Template_Files_Format"></a>Template Files Format</h2> ! The template files are either binary of text files. To determine if a ! file is binary, the first 50 bytes are read from it and if more than 10 ! percent of them are not ASCII readable characters, the file is ! considered to be binary. An ASCII readable character is one from the ! [#9, #10, #13, #32..#127] set (Delphi Notation). The results of this ! analysis are cached to ensure that this doesn't impact on the speed of ! generation.<br> ! <br> ! If a template file is binary, then no special treatment is applied to ! it, it is simply copied over to the output file.<br> ! If a template file is text, then it is read lines by lines according to ! this state diagram:<br> ! <br> ! <div style="text-align: center;"><img ! style="width: 530px; height: 394px;" alt="Template state diagram" ! src="images/pg-template-state.png"><br> ! </div> ! <br> ! In each state, special markers can be found on the line being read. ! Markers are case sensitive and unless indicated otherwise, can be found ! anywhere on the line ! and can be present more than once.<br> ! <br> ! <table ! style="width: 90%; text-align: left; margin-left: auto; margin-right: auto;" ! border="1" cellspacing="1" cellpadding="2"> ! <tbody> ! <tr> ! <td ! style="vertical-align: top; font-weight: bold; text-align: center;">State<br> ! </td> ! <td ! style="vertical-align: top; font-weight: bold; text-align: center;">Marker<br> ! </td> ! <td ! style="vertical-align: top; font-weight: bold; text-align: center;">Description<br> ! </td> ! </tr> ! <tr> ! <td colspan="1" rowspan="12" ! style="vertical-align: top; white-space: nowrap;">Standard Line<br> ! </td> ! <td style="vertical-align: top; white-space: nowrap;"><%%% ! START REQUIRES %%%><br> ! </td> ! <td style="vertical-align: top;">Must be alone on the line. Goes ! to the 'Requires Section' state<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;"><%%% ! START FILES %%%></td> ! <td style="vertical-align: top;">Must be alone on the line. Goes ! to the 'Files Section' state<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;"><%%% ! START FORMS %%%></td> ! <td style="vertical-align: top;">Must be alone on the line. Goes ! to the 'Forms Section' state<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;"><%%% ! START LIBS %%%></td> ! <td style="vertical-align: top;">Must be alone on the line. Goes ! to the 'Libs Section' state<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%NAME%<br> ! </td> ! <td style="vertical-align: top;">Replaced by the name of the ! output file<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%XMLNAME%<br> ! </td> ! <td style="vertical-align: top;">Replaced by the name of the ! package XML source file.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%DESCRIPTION%<br> ! </td> ! <td style="vertical-align: top;">Replaced by the description of ! the package<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%C5PFLAGS%<br> ! </td> ! <td style="vertical-align: top;">Replaced by the value from the ! c5pflags node in the package XML source file, after it has been ! processed for conditions.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%C6PFLAGS%</td> ! <td style="vertical-align: top;">Replaced by the value from the ! c6pflags node in the package XML source file, after it has been ! processed for conditions.</td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%TYPE%<br> ! </td> ! <td style="vertical-align: top;">Replaced by 'DESIGN' or 'RUN' ! depending on the type of the package.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%type%<br> ! </td> ! <td style="vertical-align: top;">Replaced by 'd' or 'r' according ! to the type of the package.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;">%DATETIME%<br> ! </td> ! <td style="vertical-align: top;">Replaced by the current date and ! time adjusted to UTC, formated according to the string 'dd-mm-yyyy ! hh:nn:ss' and followed by ' UTC'<br> ! </td> ! </tr> ! <tr> ! <td colspan="1" rowspan="2" ! style="vertical-align: top; white-space: nowrap;">Requires ! section<br> ! <br> ! </td> ! <td style="vertical-align: top; white-space: nowrap;">%NAME%<br> ! </td> ! <td style="vertical-align: top;">The name of the package being ! required, as taken from the package node in the paclage XML source ! file. As explained before, the name may be modified according to the ! format for the curent model.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top; white-space: nowrap;"><%%% END ! REQUIRES %%%><br> ! </td> ! <td style="vertical-align: top;">Must be alone on the line. ! Returns to the 'Standard Line' state.<br> ! </td> ! </tr> ! <tr> ! <td colspan="1" rowspan="7" style="vertical-align: top;">Files ! section<br> ! Forms section<br> ! <br> ! <br> ! <br> ! <br> ! <br> ! <br> ! </td> ! <td style="vertical-align: top;">%FILENAME% </td> ! <td style="vertical-align: top;">The name of the source file as ! taken from the 'file' node in the package XML source file<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%UNITNAME%<br> ! </td> ! <td style="vertical-align: top;">The name of the source file, ! without any path information and without the extension<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%Unitname%<br> ! </td> ! <td style="vertical-align: top;">Same as %UNITNAME% but the ! replacement is all in lower case, except for the first letter which is ! put in upper case<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%FORMNAME%<br> ! </td> ! <td style="vertical-align: top;">The name of the form, if any. ! Taken from the formname attribute of the 'file' node in the package XML ! source file.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%FORMTYPE%<br> ! </td> ! <td style="vertical-align: top;">The type of the form, if any.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%FORMNAMEANDTYPE%<br> ! </td> ! <td style="vertical-align: top;">The name and the type of the ! form put together. If no type was specified in the formname attribute, ! then it is equivalent to %FORMNAME%<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%FORMPATHNAME%<br> ! </td> ! <td style="vertical-align: top;">The name of the dfm file ! containing the definition of the form. No extension is added, it ! is simply the filename to which the extension was removed.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Files section<br> ! </td> ! <td style="vertical-align: top;"><%%% END FILES %%%><br> ! </td> ! <td style="vertical-align: top;">Must be alone on the line. ! Returns to the 'Standard Line' state. ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Forms section<br> ! </td> ! <td style="vertical-align: top;"><%%% END FORMS %%%><br> ! </td> ! <td style="vertical-align: top;">Must be alone on the line. ! Returns to the 'Standard Line' state. ! </td> ! </tr> ! <tr> ! <td colspan="1" rowspan="3" style="vertical-align: top;">Libs ! section<br> ! <br> ! <br> ! </td> ! <td style="vertical-align: top;">%FILENAME%<br> ! </td> ! <td style="vertical-align: top;">The filename of the library file<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">%UNITNAME%<br> ! </td> ! <td style="vertical-align: top;">The filename of the library ! file, without any path information nor extension<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;"><%%% END LIBS %%%><br> ! </td> ! <td style="vertical-align: top;">Must be alone on the line. ! Returns to the 'Standard Line' state. ! </td> ! </tr> ! </tbody> ! </table> ! <br> ! Lines that result in a transtion are not included in the output file. ! Any line read in the 'Standard Line' state is written in the output ! file after marker replacement has been done. Lines read in the ! 'Section' states will be repeated according to this table:<br> ! <br> ! <table ! style="width: 90%; text-align: left; margin-left: auto; margin-right: auto;" ! border="1" cellspacing="1" cellpadding="2"> ! <tbody> ! <tr> ! <td ! style="vertical-align: top; font-weight: bold; text-align: center; white-space: nowrap;">Repeating ! section<br> ! </td> ! <td ! style="vertical-align: top; font-weight: bold; text-align: center;">Description<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Requires<br> ! </td> ! <td style="vertical-align: top;">The lines read while in this ! state will be replaced for every package required by the one being ! generated. That is, for every 'package' node found in the package XML ! source file. The markers will be replaced before the output occurs.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Libs<br> ! </td> ! <td style="vertical-align: top;">The lines read while in this ! state will be replaced for every library to be included in the package ! being generated. That is for every name in the space delimited value of ! the 'C5Libs' or 'C6Libs' node in the package XML source file. The node ! used depends on the target for which the generation takes place. If the ! target environment is not C and/or its version is not 5 or 6, the ! generator will most likely trigger an error.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Files<br> ! </td> ! <td style="vertical-align: top;">The lines read while in this ! state will be replaced for every file to be included in the package ! being generated. That is for every file 'node' found in the package XML ! source file. The markers will be replaced before the output occurs.<br> ! </td> ! </tr> ! <tr> ! <td style="vertical-align: top;">Forms<br> ! </td> ! <td style="vertical-align: top;">This section follows the same ! repeat conditions as the Files section, except that a 'file' node will ! only be used if its 'formname' attribute is not empty.<br> ! </td> ! </tr> ! </tbody> ! </table> ! <br> <h2><a name="Include_File_parsing"></a>Include File parsing</h2> <br> + <br> <h2><a name="Detailed_Generation_process"></a>Detailed Generation process</h2> |