|
1 # rez.cif |
|
2 # |
|
3 # Copyright (c) 2010 Accenture. All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Accenture - Initial contribution |
|
11 # |
|
12 |
|
13 ==name rez |
|
14 |
|
15 ==short-description |
|
16 |
|
17 Reads text out of resource files. |
|
18 |
|
19 ==argument string resource-identifier |
|
20 |
|
21 The identifier of the resource to display, of the form C<R:FILENAME:ID[:OFFSET]>. |
|
22 |
|
23 ==option bool x hex |
|
24 |
|
25 Display the resource in hex. |
|
26 |
|
27 ==long-description |
|
28 |
|
29 Extracts a string from a resource file, taking in to account the current device language settings and the different drives that a resource file might be installed on to. |
|
30 |
|
31 The C<resource-identifier> syntax is as follows: |
|
32 |
|
33 =over 4 |
|
34 |
|
35 =item * |
|
36 |
|
37 C<FILENAME> is the path of the resource file, relative to the resource directory and not including extension. Eg "Apps\MyApp" would match a file that (on an unlocalised, uncustomised system) resided at C<Z:\Resource\Apps\MyApp.rsc>. |
|
38 |
|
39 =item * |
|
40 |
|
41 C<ID> is the numeric resource id, in hex with preceding 0x or in decimal. |
|
42 |
|
43 =item * |
|
44 |
|
45 C<OFFSET> is a sequence of numbers and d/D characters. A number indicates the number of bytes to skip over, 'D' means read a 16-bit descriptor (an LTEXT, in resource file parlance), 'd' means read an 8-bit descriptor (LTEXT8). So an offset of 14DD24D means 'skip 14 bytes from the start of the resource, then skip over 2 LTEXTs, then skip another 24 bytes, the descriptor I want is next (and is a 16-bit LTEXT). |
|
46 |
|
47 If no offset is specified, the whole resource is read as if it was a TBUF. This is different to specifying an offset of 0D, which would be a resource starting with an LTEXT (the difference is whether there's a leading length byte - TBUF doesn't use one). |
|
48 |
|
49 =back |
|
50 |
|
51 A full resource identifier might be C<R:Apps\MyApp:0x23> indicating resource 0x23 of C<x:\Resource\Apps\MyApp.rxx>. Or C<R:eikcoctl:7:8D30d> indicating resource 7 of C<x:\Resource\eikcoctl.rxx>, seeking 8 bytes, one 16-bit descriptor, 30 bytes more, then the result is a 8-bit descriptor at that point. |
|
52 |
|
53 ==copyright |
|
54 |
|
55 Copyright (c) 2009-2010 Accenture. All rights reserved. |
|
56 |