Symbian3/SDK/Source/GUID-5FFBC0B0-FC6E-5D60-868B-064DBEB632E0.dita
changeset 13 48780e181b38
parent 12 80ef3a206772
child 14 578be2adaf3e
equal deleted inserted replaced
12:80ef3a206772 13:48780e181b38
     1 <?xml version="1.0" encoding="utf-8"?>
       
     2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
       
     3 <!-- This component and the accompanying materials are made available under the terms of the License 
       
     4 "Eclipse Public License v1.0" which accompanies this distribution, 
       
     5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
       
     6 <!-- Initial Contributors:
       
     7     Nokia Corporation - initial contribution.
       
     8 Contributors: 
       
     9 -->
       
    10 <!DOCTYPE concept
       
    11   PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
       
    12 <concept id="GUID-5FFBC0B0-FC6E-5D60-868B-064DBEB632E0" xml:lang="en"><title>Resource
       
    13 builder tool: epocrc</title><prolog><metadata><keywords/></metadata></prolog><conbody>
       
    14 <section><title>Purpose</title> <p> <filepath>epocrc</filepath> combines the
       
    15 actions of passing a resource file through the C++ preprocessor, and then
       
    16 compiling it with <filepath>rcomp</filepath>. </p> </section>
       
    17 <section id="GUID-B5C61C4D-7AC0-503B-B164-A24C417444FB"><title>Command line
       
    18 syntax</title><userinput><cmdname>epocrc </cmdname>[-D<parmname>args</parmname>]
       
    19 [-I<parmname>args</parmname>] [-u] [-t<parmname>tmpdir</parmname>] [-uid2 <parmname>uid</parmname>]
       
    20 [-uid3 <parmname>uid</parmname>] <parmname>source-file</parmname> [-o<parmname>output-file</parmname>]
       
    21 [-h<parmname>header-file</parmname>] </userinput><p><b>Arguments</b> </p> <table id="GUID-34194FD9-B978-51A6-BA9A-BEEBE3649303">
       
    22 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    23 <tbody>
       
    24 <row>
       
    25 <entry><p> <codeph>-D</codeph> <varname>args</varname>  </p> </entry>
       
    26 <entry><p>Pass arguments <varname>args</varname> to the preprocessor's -D
       
    27 (macro definitions) option. </p> </entry>
       
    28 </row>
       
    29 <row>
       
    30 <entry><p> <codeph>-I</codeph> <varname>args</varname>  </p> </entry>
       
    31 <entry><p>Pass arguments <varname>args</varname> to the preprocessor's -I
       
    32 (additional include files path) option. </p> </entry>
       
    33 </row>
       
    34 <row>
       
    35 <entry><p> <codeph>-u</codeph>  </p> </entry>
       
    36 <entry><p>Generate a Unicode resource binary. </p> </entry>
       
    37 </row>
       
    38 <row>
       
    39 <entry><p> <codeph>-t</codeph> <varname>tmpdir</varname>  </p> </entry>
       
    40 <entry><p>Create any temporary files in the directory <varname>tmpdir</varname>. </p> <p>If
       
    41 this option is not specified, the current directory is used. </p> </entry>
       
    42 </row>
       
    43 <row>
       
    44 <entry><p> <codeph>-uid2</codeph>  <varname>uid</varname>  </p> </entry>
       
    45 <entry><p>Second UID for the resource file. Specifying either -uid2 or -uid3
       
    46 overrides all UIDs specified in the source file. </p> </entry>
       
    47 </row>
       
    48 <row>
       
    49 <entry><p> <codeph>-uid3</codeph>  <varname>uid</varname>  </p> </entry>
       
    50 <entry><p>Third UID for the resource file </p> </entry>
       
    51 </row>
       
    52 <row>
       
    53 <entry><p> <varname>source-file</varname>  </p> </entry>
       
    54 <entry><p>Name (and path if the file is not in the current directory) of the
       
    55 resource file to compile </p> </entry>
       
    56 </row>
       
    57 <row>
       
    58 <entry><p> <codeph>-o</codeph> <varname>output-file</varname>  </p> </entry>
       
    59 <entry><p>Create data output file <varname>output-file</varname>. If a path
       
    60 is not specified, the current directory is used. </p> <p>If this option is
       
    61 not specified, no data output file is created. </p> </entry>
       
    62 </row>
       
    63 <row>
       
    64 <entry><p> <codeph>-h</codeph> <varname>header-file</varname>  </p> </entry>
       
    65 <entry><p>Create header output file <varname>header-file</varname>. If a path
       
    66 is not specified, the current directory is used. </p> <p>If this option is
       
    67 not specified, no header output file is created. </p> </entry>
       
    68 </row>
       
    69 <row>
       
    70 <entry><p> <codeph>-v</codeph>  </p> </entry>
       
    71 <entry><p>Verbose. Displays the command line syntax. </p> </entry>
       
    72 </row>
       
    73 </tbody>
       
    74 </tgroup>
       
    75 </table> <p><b>Output files</b> </p> <table id="GUID-A29C41E0-D092-5B1A-A857-B0B8364BB1AA">
       
    76 <tgroup cols="2"><colspec colname="col0"/><colspec colname="col1"/>
       
    77 <tbody>
       
    78 <row>
       
    79 <entry><p> <varname>output-file</varname>  </p> </entry>
       
    80 <entry><p>Compiled resource data referred to by the application at run-time. </p> </entry>
       
    81 </row>
       
    82 <row>
       
    83 <entry><p> <varname>header-file</varname>  </p> </entry>
       
    84 <entry><p>The generated header file defining macro identifiers for referring
       
    85 to resources by a resource index </p> </entry>
       
    86 </row>
       
    87 </tbody>
       
    88 </tgroup>
       
    89 </table> <p id="GUID-014671B6-C19E-528A-984C-D8226375AC5A"><b>epocrc configuration
       
    90 file format</b> </p> <p>Apart from the options listed above, you can use the <filepath>epocrc.config</filepath> file
       
    91 located at <filepath>epoc32\tools\</filepath> to configure the pre-processor
       
    92 and the <codeph>rcomp</codeph> tool. The file is supplied to each Symbian
       
    93 platform licensee as they need it, but it may not be present on some platforms. </p> <p>The <filepath>epocrc.config</filepath> file
       
    94 contains the following options: </p> <ul>
       
    95 <li id="GUID-0E0AE904-D462-5780-898E-95E04AA5884D"><p> <codeph>check_rls_items</codeph>:
       
    96 This option can either be set to 0 or 1. If you want to check for the presence
       
    97 of localisation comment tags before each RLS item declaration, set it to 1,
       
    98 otherwise set it to 0. If there are no localisation comment tags within the
       
    99 resource file, it is assumed that localisation is not required for this file. </p> </li>
       
   100 <li id="GUID-ABEB6B58-5C5A-5D21-A74C-7B4DFFD1EBC9"><p> <codeph>strict_checking</codeph>:
       
   101 This option can either be set to 0 or 1. If you set it to 1, the <codeph>rcomp</codeph> tool
       
   102 warns you if the <filepath>rpp</filepath> file contains RLS item declarations
       
   103 without the localisation comment tags. If you want to enable this functionality,
       
   104 you must set <codeph>check_rls_items</codeph> to 1. </p> </li>
       
   105 <li id="GUID-5F0CD403-B332-594A-AAF0-7D7BE11882C1"><p> <codeph>include:</codeph>:
       
   106 This option is used to specify files and directories, which need to be passed
       
   107 to the C++ pre-processor. File names and directory names must be relative
       
   108 to <codeph>EPOCROOT</codeph>. </p> </li>
       
   109 </ul><note>  You can comment a line in the <filepath>epocrc.config</filepath> file
       
   110 by preceding it by '#'. </note> <p>Here is an example of the <filepath>epocrc.config</filepath> file,
       
   111 which enables the <codeph>strict_checking</codeph> and <codeph>check_rls_items</codeph> options,
       
   112 and lists the resource headers to be included using the <codeph>include:</codeph> option: </p> <codeblock id="GUID-F02F6D20-6370-5092-A1B8-D4EA475ECAE4" xml:space="preserve"># epocrc.config
       
   113 #
       
   114 # Copyright (c) 2005 Symbian Ltd.  All rights reserved.
       
   115 #
       
   116 check_rls_items = 1;
       
   117 strict_checking = 1;
       
   118 include: epoc32\include\SymbianTags.rh
       
   119 include: epoc32\include\SymbainContexts.rh
       
   120 </codeblock> </section>
       
   121 <section><title>Example</title> <p>The following example compiles the source
       
   122 file <filepath>ex.rss</filepath> into the compiled resource file <filepath>ex.rsc</filepath> and
       
   123 the header file <filepath>ex.rsg</filepath>. </p> <p><userinput>epocrc -I\symbian\epoc32\include\
       
   124 -u ex.rss -oex.rsc -hex.rsg</userinput> </p> </section>
       
   125 </conbody></concept>