commsfwtools/preparedefaultcommsdatabase/Tools/cfg2xml/Conversion-howto.txt
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 
       
     2 How to convert a .CFG CommDB configuration file to the new XML format
       
     3 =====================================================================
       
     4 
       
     5 
       
     6 1. Installing the CommDB Editor and Utilities
       
     7 ---------------------------------------------
       
     8 
       
     9 The process to convert a CommDB configuration file in the .CFG format to the new XML format
       
    10 requires the installation of the "cxmled" component in your Symbian OS directory. Currently
       
    11 this component can be found in the GT167 project branch in Perforce:
       
    12 
       
    13 \\EPOC\Development\Networking\projects\GT167\commdb-xml\comms-infras\commdb\cxmled
       
    14 
       
    15 Once this component is installed you need to open a command-line shell and then
       
    16 go to the "cxmled\group" directory. In that directory issue the commands:
       
    17 
       
    18   bldmake bldfiles
       
    19   abld export
       
    20 
       
    21 These commands will copy the binary Java files and utilities to the \epoc32\tools\ directory
       
    22 of your Symbian OS installation. It will also copy all the XML Schema files which define
       
    23 the structure of CommDB to the \epoc32\tools\commdb-schema\ directory. 
       
    24 
       
    25 You can only perform the conversion process if your computer has the Java Runtime Version 1.4
       
    26 or higher installed. If this is not already installed you can obtain it from Sun's web site:
       
    27 
       
    28   http://java.sun.com/
       
    29 
       
    30 For more details on the requirements for using the CommDB Editor and the conversion utility
       
    31 read the file:
       
    32 
       
    33 \\EPOC\Development\Networking\projects\GT167\commdb-xml\comms-infras\commdb\cxmled\group\ReadMe.txt
       
    34 
       
    35 
       
    36 2. Conversion Process
       
    37 ---------------------
       
    38 
       
    39 The conversion process is simple. You need to use the command-line and enter the directory
       
    40 which contains the CFG file to modify. Then issue the following command:
       
    41 
       
    42   cfg2xml -mode:file filename.cfg
       
    43 
       
    44 where "filename.cfg" is assumed to be the name of the .CFG file to convert. Once the execution
       
    45 is completed file "filename.xml" will be created in the same directory. If the directory
       
    46 contains more than one CFG files and you wish to convert them all then you can issue the
       
    47 command:
       
    48 
       
    49   cfg2xml -mode:dir .\
       
    50 
       
    51 This command will convert all CFG files to the XML format. However, note that it will also
       
    52 convert all CFG files encountered in any subdirectory which happens to be under the working
       
    53 directory. As a result, this command can be used to modify many CFG files located in various
       
    54 subdirectories at any depth in one go.
       
    55 
       
    56 If you need to examine the XML file you can view it on any text or XML editor, load it on 
       
    57 any web browser or alternatively load it on the CommDB Editor using the "Import XML" menu
       
    58 option.
       
    59 
       
    60 
       
    61 3. Using the XML configuration file
       
    62 -----------------------------------
       
    63 
       
    64 In order to use the XML configuration file to run test cases you also need to build the new
       
    65 dual-mode CED utility currently located at:
       
    66 
       
    67 \\EPOC\Development\Networking\projects\GT167\commdb-xml\comms-infras\commdb\ced
       
    68 
       
    69 Since this version of CED parses an XML file, you also need to build the XML Framework library
       
    70 which can be obtained from:
       
    71 
       
    72 \\EPOC\master\common\generic\syslibs\xml\
       
    73 
       
    74 Furthermore, you need to modify the script files which call CED so that they use the XML
       
    75 configuration file instead of the original CFG file. If for example, the script file has the
       
    76 command:
       
    77 
       
    78   ced -i c:\ced.cfg ced.log
       
    79 
       
    80 you need to modify it to the following:
       
    81 
       
    82   ced -i c:\test.xml ced.log
       
    83 
       
    84 Finally, you need to make sure that the XML configuration file is now exported to the appropriate
       
    85 directory rather than the CFG file and that means a modification of the "bld.inf" and "*.iby" files
       
    86 which perform the exporting.
       
    87 
       
    88 
       
    89 -- 
       
    90 Panos Asproulis (01/12/2003)
       
    91 
       
    92