tools/servicedbgen/README
changeset 0 876b1a06bc25
equal deleted inserted replaced
-1:000000000000 0:876b1a06bc25
       
     1 *) Intended readers:
       
     2 
       
     3 The servicedbgen tool is intended to be used during Symbian rom
       
     4 creation for prepopulating  Qt Serviceframework databases. It is not a
       
     5 tool for normal runtime or application usage,  although it may be
       
     6 useful also for development or testing purposes.
       
     7 
       
     8 *) Overview:
       
     9 
       
    10 The servicedbgen tool is a command line application to populate Qt
       
    11 Serviceframework databases.  The tool takes XML files describing the
       
    12 service, and produces SQLite databases.  Services can  be added and
       
    13 removed.
       
    14 
       
    15 Servicedbgen runs on the cross-compiling machine (i.e. Windows or
       
    16 Linux) and is delivered as a prebuilt  application along with the SDK,
       
    17 or must compiled with host tools. It can be invoked  from the command
       
    18 line or by directives in your project's .pro-file. Qmake and make can
       
    19 then run the tool automatically. The latter approach is used at Symbian
       
    20 rom creation time.
       
    21 
       
    22 *) Design:
       
    23 
       
    24 The tool uses the same servicedatabase creation components as the Qt 
       
    25 Serviceframework. Therefore whenever the tool is rebuilt, it reflects
       
    26 the latest changes in database components.
       
    27 
       
    28 There are two operating modes, individual and batch mode. In individual
       
    29 mode, the tool is given individual XML files as input. In batch mode,
       
    30 the tool reads XML files from a given directory, or from a default
       
    31 directory if none given. The tool uses Nokia Vendor ID as the security
       
    32 token when adding the services. If an application needs to change the
       
    33 preinstalled services during runtime, it needs to be  equipped with
       
    34 Nokia Vendor ID.
       
    35 
       
    36 Services that require initialization prior to their first usage (e.g.
       
    37 to initialize databases etc.)  can set a parameter.  QServiceManager
       
    38 will call QServicePluginInterface::installService() when the service is
       
    39 loaded first time when QServiceManager::loadInterface() is called.
       
    40 
       
    41 The tool supports WINSCW emulator and hardware targets. The resulting
       
    42 databases are identical, but the locations differ (see Appendix). 
       
    43 
       
    44 *) Command line use
       
    45 
       
    46 The usage of the tool is as follows:
       
    47 
       
    48 servicedbgen [options] <command> [command parameters]
       
    49 
       
    50 To see the list of all available options,  type 'servicedbgen --help'.
       
    51 
       
    52 Basic usage examples:
       
    53  - registering service1 and service2 for winscw target:
       
    54         servicedbgen -twinscw add service1.xml service2.xml
       
    55  - registering service1 for all targets, service requesting initialization:
       
    56         servicedbgen -tall -i add service1.xml
       
    57  - unregistering service1 from all targets:
       
    58         servicedbgen -tall remove service1.xml
       
    59  - registering all services for armv5 from default descriptor path:
       
    60         servicedbgen -tall -b -c add
       
    61  - registering services for all targets from specific descriptor path:
       
    62         servicedbgen -tall -b add ./mypath/services
       
    63  - removing services for all targets from default descriptor path:
       
    64         servicedbgen -tall -b remove
       
    65 
       
    66 The default target, if unspecified, is '-tall'.
       
    67 
       
    68 *) Project file use
       
    69 
       
    70 Add following lines to your project's .pro file (inside a
       
    71 symbian-block):
       
    72 
       
    73 CONFIG += qtservice                  # qmake magic, causes processing of qtservice.prf
       
    74 QTSERVICE.DESCRIPTOR = <XML files>   # the list of service descriptor XML files
       
    75 QTSERVICE.INITIALIZE = yes           # add  this if given descriptors need initialization
       
    76 
       
    77 ----------- Appendix
       
    78 
       
    79 *) Database locations
       
    80 
       
    81 Paths to the db. They can not be changed since Qt Serviceframework is
       
    82 hardcoded to these paths.
       
    83 
       
    84 "/epoc32/winscw/c/data/temp/QtServiceFW" // Emulator without WDS
       
    85 "/epoc32/winscw/c/private/2002AC7F/Nokia" // Emulator with WDS
       
    86 "/epoc32/data/c/private/2002AC7F/Nokia"  // HW
       
    87 
       
    88 *) Default XML lookup paths
       
    89 
       
    90 These are the paths where the tool looks for XML files (.xml) if  batch
       
    91 option was given and no path was specified.
       
    92 
       
    93 "/epoc32/winscw/c/private/2002AC7F/Nokia/des" // Emulator
       
    94 "/epoc32/data/z/private/2002AC7F/Nokia/des"   // HW
       
    95 
       
    96 
       
    97 *) Notes For Symbian ROM images
       
    98 
       
    99 In the initialization phase, typically first boot, if the database is
       
   100 not found on the C drive, it is copied from the Z drive.
       
   101 
       
   102 qtmobility.iby must contain:
       
   103 
       
   104 data=\epoc32\data\z\private\2002ac7f\QtServiceFramework_4.6_system.db  private\2002ac7f\QtServiceFramework_4.6_system.db
       
   105 
       
   106 To use servicedbgen when it's not provided as part of SDK these files
       
   107 should be deployed to:
       
   108 
       
   109 features\qtservice.meta -> $EPOCROOT\epoc32\tools\makefile_templates\qt
       
   110 features\qtservice.mk 	-> $EPOCROOT\epoc32\tools\makefile_templates\qt
       
   111 features\qtservice.prf 	-> $EPOCROOT\epoc32\tools\qt\mkspecs\features\symbian
       
   112 servicedbgen.exe      	-> $EPOCROOT\epoc32\tools
       
   113 QtCore4.dll and 	-> $EPOCROOT\epoc32\tools
       
   114 QtSql4.dll.exe 		-> $EPOCROOT\epoc32\tools
       
   115 qsqlite4.dll		-> $EPOCROOT\epoc32\tools\sqldrivers
       
   116 
       
   117 
       
   118