Resource builder tool: epocrc

Purpose

epocrc combines the actions of passing a resource file through the C++ preprocessor, and then compiling it with rcomp.

Command line syntax

epocrc [-Dargs] [-Iargs] [-u] [-ttmpdir] [-uid2 uid] [-uid3 uid] source-file [-ooutput-file] [-hheader-file]

Arguments

-D args

Pass arguments args to the preprocessor's -D (macro definitions) option.

-I args

Pass arguments args to the preprocessor's -I (additional include files path) option.

-u

Generate a Unicode resource binary.

-t tmpdir

Create any temporary files in the directory tmpdir.

If this option is not specified, the current directory is used.

-uid2 uid

Second UID for the resource file. Specifying either -uid2 or -uid3 overrides all UIDs specified in the source file.

-uid3 uid

Third UID for the resource file

source-file

Name (and path if the file is not in the current directory) of the resource file to compile

-o output-file

Create data output file output-file. If a path is not specified, the current directory is used.

If this option is not specified, no data output file is created.

-h header-file

Create header output file header-file. If a path is not specified, the current directory is used.

If this option is not specified, no header output file is created.

-v

Verbose. Displays the command line syntax.

Output files

output-file

Compiled resource data referred to by the application at run-time.

header-file

The generated header file defining macro identifiers for referring to resources by a resource index

epocrc configuration file format

Apart from the options listed above, you can use the epocrc.config file located at epoc32\tools\ to configure the pre-processor and the rcomp tool. The file is supplied to each Symbian platform licensee as they need it, but it may not be present on some platforms.

The epocrc.config file contains the following options:

  • check_rls_items: This option can either be set to 0 or 1. If you want to check for the presence of localisation comment tags before each RLS item declaration, set it to 1, otherwise set it to 0. If there are no localisation comment tags within the resource file, it is assumed that localisation is not required for this file.

  • strict_checking: This option can either be set to 0 or 1. If you set it to 1, the rcomp tool warns you if the rpp file contains RLS item declarations without the localisation comment tags. If you want to enable this functionality, you must set check_rls_items to 1.

  • include:: This option is used to specify files and directories, which need to be passed to the C++ pre-processor. File names and directory names must be relative to EPOCROOT.

Note: You can comment a line in the epocrc.config file by preceding it by '#'.

Here is an example of the epocrc.config file, which enables the strict_checking and check_rls_items options, and lists the resource headers to be included using the include: option:

# epocrc.config
#
# Copyright (c) 2005 Symbian Ltd.  All rights reserved.
#
check_rls_items = 1;
strict_checking = 1;
include: epoc32\include\SymbianTags.rh
include: epoc32\include\SymbainContexts.rh

Example

The following example compiles the source file ex.rss into the compiled resource file ex.rsc and the header file ex.rsg.

epocrc -I\symbian\epoc32\include\ -u ex.rss -oex.rsc -hex.rsg