This topic describes the Central Repository Converter (CenRepConv) tool. The CenRepConv tool is used to convert text files into binary files.
The CenRepConv is an emulator based tool. The CenRepConv tool can be used to convert binary files to text files for debugging. The central repository initialisation files are used to register the repositories with central repository. The initialisation files can be either in text or binary format, although binary format is recommended for better efficiency. For example, the loading time of a repository with 2000 settings on a H2 development board is 41ms for binary files and 485ms for text files.
The tool uses the file extension to identify the fomats. TXT is used for the text file extension and CRE is used as the binary file extension
The syntax for text to binary conversion is:
CentRepConv [-nowait] [-o output_path] [input_path\]<repository_uid>.txt
where,
repository_uid is the UID of repository in hexadecimal format, for example 00000001
output_path – Optional, default is C:\. Note that if the user specifies the output filename, then the extension must be .cre and the filename must match the <repository_uid> of the input file.
-nowait option should be used when CentRepConv is invoked as part of an automated process such as from a build script. It instructs CentRepConv not to wait for user acknowledgement. Without this option the tool will wait for up to 30 seconds for acknowledgement
The syntax for bianary to text conversion is:
CentRepConv [-nowait] [-o output_path] [input_path\]<repository_uid>.cre
where,
repository_uid is the UID of repository in hexadecimal format, for example 00000001
input_path is optional, default is C:\. Note that location of path must be a Symbian path, not a path of the PC’s native OS.
output_path is optional, default is C:\. Note that if the user specifies the output filename, then the extension must be .txt and the filename must match the <repository_uid> of the input file.
This section describes how to automate text to binary conversion whislt building the ROM. The group folder must contain bld.inf file, extension makefile, script to invoke the cenRepConv tool and the initialisation text file.
The bld.inf file must contain:
PRJ_PLATFORMS DEFAULT PRJ_MMPFILES gnumakefile CreateBinaryRep.mk
The extension makefile is configured as:
do_nothing : rem do_nothing MAKMAKE : do_nothing RESOURCE : do_nothing SAVESPACE : BLD BLD : do_nothing FREEZE : do_nothing LIB : do_nothing CLEANLIB : do_nothing FINAL : CreateBinaryRep.cmd build CLEAN : CreateBinaryRep.cmd clean RELEASABLES : CreateBinaryRep.cmd releasables
The script file is used to move the text files to the emulators folder, invoke the CenRepConv tool and copy the binary folders into the central repository private folder.
@ECHO OFF SET RETURNCODE=0 IF /I "%1"=="build" goto BUILD IF /I "%1"=="clean" goto CLEAN IF /I "%1"=="releasables" goto WHAT echo error: unknown option %1 >&2 SET RETURNCODE=1 goto END :WHAT echo %EPOCROOT%epoc32\release\winscw\udeb\Z\private\10202BE9\1027431B.cre goto END :CLEAN ERASE %EPOCROOT%epoc32\release\winscw\udeb\Z\private\10202BE9\1027431B.cre 2>NUL goto END :BUILD ERASE %EPOCROOT%epoc32\winscw\c\1027431B.cre 2>NUL ERASE %EPOCROOT%epoc32\release\winscw\udeb\z\private\10202BE9\1027431B.cre 2>NUL COPY 1027431B.txt %EPOCROOT%epoc32\winscw\c CALL %EPOCROOT%epoc32\release\winscw\udeb\CentRepConv -nowait -o C:\1027431B.cre C:\1027431B.txt IF exist %EPOCROOT%epoc32\winscw\c\1027431B.cre goto BLDSUCCESS SET RETURNCODE=1 ECHO error: build fail >&2 goto END :BLDSUCCESS ERASE %EPOCROOT%epoc32\winscw\c\1027431B.txt MOVE %EPOCROOT%epoc32\winscw\c\1027431B.cre %EPOCROOT%epoc32\release\winscw\udeb\z\private\10202BE9\1027431B.cre goto END :END EXIT /B %RETURNCODE%
The following are the error codes that may occur during the text to binary conversion and vice versa.
Error condition | Leave Code |
---|---|
Input file corrupted |
|
Input file is not a Direct File Store |
|
No input file specified |
|
Bad input file extension (not .txt or .cre) |
|
Input filename is not a valid UID |
|
Output filename does not match input filename |
|
Extension of output filename does not match extension of input filename (if one is .txt and the other must be .cre) |
|
Output directory is in read only drive |
|
Cannot access input file because it is in private data cage |
|
Cannot write output file because it is in private data cage |
|
Input file does not exist |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.