|
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-5280EC0E-1A1F-5777-ACB1-CF4791EE2147" xml:lang="en"><title>start |
|
13 resource</title><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <p> <codeph>start resource</codeph> <varname>source-file</varname> </p> |
|
15 <p>[<codeph>target</codeph> <varname>target-file-name</varname>] </p> |
|
16 <p>[<codeph>targetpath</codeph> <varname>targetpath</varname>] </p> |
|
17 <p>[<codeph>header</codeph> | <codeph>headeronly</codeph>] </p> |
|
18 <p>[<codeph>lang</codeph> <varname>languages</varname>] </p> |
|
19 <p>[<codeph>uid</codeph> <varname>uid-value-1</varname> [<varname>uid-value-2</varname>] |
|
20 ] </p> |
|
21 <p> <codeph>end</codeph> </p> |
|
22 <p>A <codeph>start resource</codeph> section specifies how a resource file |
|
23 should be compiled. </p> |
|
24 <p> <varname>source-file</varname> specifies the resource source (<filepath>.rss</filepath>) |
|
25 file. The file should be in the current <xref href="GUID-565074B2-53E2-54CD-A06B-7E044E66EBE8.dita">sourcepath</xref> directory, |
|
26 or specified relatively to that directory. </p> |
|
27 <p>The optional <codeph>target</codeph> <varname>target-file</varname> specifies |
|
28 the name of the compiled resource file. The file extension part of the name |
|
29 does not need to be specified, as this will be automatically supplied. By |
|
30 default, the target has the same name as the source file. </p> |
|
31 <p>The optional <codeph>targetpath</codeph> <varname>targetpath</varname> allows |
|
32 you to specify the location of the compiled file on the <filepath>z:</filepath> drive |
|
33 (or the emulated <filepath>Z:</filepath> drive). By default, the target file |
|
34 is built into the same directory as the project's executable.</p> |
|
35 <note> In Symbian OS v9.0 and later, platform security requires resources |
|
36 to be placed into the correct path, either <filepath>\resource</filepath> for |
|
37 resources that are public but read-only, or <filepath>\private\12345678</filepath>, |
|
38 for resources that are private to the application with application Secure_Id <codeph>12345678</codeph>. |
|
39 This means that this keyword will almost always be used.</note> |
|
40 <p>The optional <codeph>header</codeph> keyword causes a resource header (<filepath>.rsg</filepath>) |
|
41 file to be created in <filepath>epoc32\include\</filepath> along with the |
|
42 resource (<filepath>.rsc</filepath>) file. The optional <codeph>headeronly</codeph> keyword |
|
43 causes only the resource header (<filepath>.rsg</filepath>) file to be created |
|
44 in <filepath>epoc32\include\</filepath>. The resource header defines identifiers |
|
45 for the index positions of the structures in the resource file. </p> |
|
46 <p>The optional <codeph>lang</codeph> keyword specifies language codes for |
|
47 the resource. This overrides any language settings made for the mmp file using |
|
48 the <xref href="GUID-7C4A8920-359F-5328-8D28-2AFBA25A6A9E.dita">lang</xref> keyword. |
|
49 A language code is two-digit code, and is used to complete the extension of |
|
50 the built resource file: e.g. if the language code is 01, then the extension |
|
51 is <filepath>.r01</filepath>. The default language code is <codeph>sc</codeph>. |
|
52 The resource file is compiled multiple times, once for each language specified. </p> |
|
53 <p>The optional <codeph>uid</codeph> keyword specifies the values for the |
|
54 second, and optionally, the third UID of the resource file. See <xref href="GUID-914DD950-4332-5F23-B725-F4D330DB19EB.dita">UID2 |
|
55 and UID3 statements</xref> and <xref href="GUID-AA6DEF11-6F23-3523-A9F7-F15DF918E1BA.dita#GUID-AA6DEF11-6F23-3523-A9F7-F15DF918E1BA/GUID-142C2031-3101-34E0-8A16-5410123C8D18"><apiname>RResourceFile::UidType()</apiname></xref> for |
|
56 more information. </p> |
|
57 <example><p>This example builds the resource <filepath>foo.rss</filepath> into <filepath>z:\private\10001234\foo.rsc</filepath>. </p><codeblock id="GUID-A1A82EAC-AC98-581D-A0B3-A05791E5C98E" xml:space="preserve">start resource foo.rss |
|
58 TARGETPATH private\10001234 |
|
59 end |
|
60 </codeblock><p>This example builds the resource <filepath>foo.rss</filepath> into <filepath>z:\private\10001234\bar.r01</filepath>, |
|
61 and creates a header <filepath>bar.rsg</filepath> in <filepath>epoc32\include</filepath>. </p><codeblock id="GUID-01641ED1-A531-5090-BA9F-508D74401D1F" xml:space="preserve">START RESOURCE foo.rss |
|
62 TARGET bar |
|
63 TARGETPATH private\10001234 |
|
64 HEADER |
|
65 LANG 01 |
|
66 UID 0x10002345 0x10003456 |
|
67 END</codeblock><p>This example builds only the resource header <filepath>bar.rsg</filepath> in <filepath>epoc32\include</filepath>. </p><codeblock id="GUID-6538518A-321E-5BD4-A68D-4EFCA96AF6A4" xml:space="preserve">START RESOURCE foo.rss |
|
68 HEADERONLY |
|
69 END</codeblock></example> |
|
70 </conbody><related-links> |
|
71 <link href="GUID-617A7B7E-DF91-5757-B473-D2E0B665F5E4.dita"><linktext>Application |
|
72 resource tools guide</linktext></link> |
|
73 <link href="GUID-687AFC9D-ADB7-5190-A535-C54B835825DD.dita"><linktext>Application |
|
74 resource tools reference</linktext></link> |
|
75 </related-links></concept> |