1WRC(1) Wine Developers Manual WRC(1)
2
3
4
6 wrc - Wine Resource Compiler
7
9 wrc [options] [inputfile...]
10
12 wrc compiles resources from inputfile into win16 and win32 compatible
13 binary format.
14
15 The source file is preprocessed with a builtin ANSI-C compatible pre‐
16 processor before the resources are compiled. See PREPROCESSOR below.
17
18 wrc takes a series of inputfile as argument. The resources are read
19 from standard input if no inputfile is given. If the output file is not
20 specified with -o, then wrc will write the output to inputfile.res with
21 .rc stripped, or to wrc.tab.res if no inputfile was given.
22
24 -b, --target=cpu-manufacturer[-kernel]-os
25 Specify the target CPU and platform on which the generated code
26 will be built. The target specification is in the standard auto‐
27 conf format as returned by config.sub.
28
29 -D, --define=id[=val]
30 Define preprocessor identifier id to (optionally) value val.
31 See also PREPROCESSOR below.
32
33 --debug=nn
34 Set debug level to nn. The value is a bitmask consisting of
35 1=verbose, 2=dump internals, 4=resource parser trace, 8=pre‐
36 processor messages, 16=preprocessor scanner and 32=preprocessor
37 parser trace.
38
39 --endianness=e
40 Win32 only; set output byte-ordering, where e is one of
41 n[ative], l[ittle] or b[ig]. Only resources in source-form can
42 be reordered. Native ordering depends on the system on which wrc
43 was built. You can see the native ordering by typing wrc -h.
44
45 -E Preprocess only. The output is written to standard output if no
46 outputfile was selected. The output is compatible with what gcc
47 would generate.
48
49 -h, --help
50 Prints a summary message and exits.
51
52 -i, --input=file
53 The name of the input file. If this option is not used, then wrc
54 will use the first non-option argument as the input file name.
55 If there are no non-option arguments, then wrc will read from
56 standard input.
57
58 -I, --include-dir=path
59 Add path to include search directories. path may contain multi‐
60 ple directories, separated with ':'. It is allowed to specify -I
61 multiple times. Include files are searched in the order in which
62 the -I options were specified.
63 The search is compatible with gcc, in which '<>' quoted file‐
64 names are searched exclusively via the -I set path, whereas the
65 '""' quoted filenames are first tried to be opened in the cur‐
66 rent directory. Also resource statements with file references
67 are located in the same way.
68
69 -J, --input-format=format
70 Sets the input format. Valid options are 'rc' or 'rc16'. Setting
71 the input to 'rc16' disables the recognition of win32 keywords.
72
73 -l, --language=lang
74 Set default language to lang. Default is the neutral language 0
75 (i.e. "LANGUAGE 0, 0").
76
77 -m16, -m32, -m64
78 Generate resources for 16-bit, 32-bit or 64-bit platforms
79 respectively. The only difference between 32-bit and 64-bit is
80 whether the _WIN64 preprocessor symbol is defined.
81
82 --nostdinc
83 Do not search the standard include path, look for include files
84 only in the directories explicitly specified with the -I option.
85
86 --no-use-temp-file
87 Ignored for compatibility with windres.
88
89 -o, -fo, --output=file
90 Write output to file. Default is inputfile.res with .rc stripped
91 or wrc.tab.res if input is read from standard input.
92
93 -O, --output-format=format
94 Sets the output format. The supported formats are po, pot, res,
95 and res16. If this option is not specified, the format defaults
96 to res.
97 In po mode, if an output file name is specified it must match a
98 known language name, like en_US.po; only resources for the spec‐
99 ified language are output. If no output file name is specified,
100 a separate .po file is created for every language encountered in
101 the input.
102
103 --pedantic
104 Enable pedantic warnings. Notably redefinition of #define state‐
105 ments can be discovered with this option.
106
107 --po-dir=dir
108 Enable the generation of resource translations based on mo files
109 loaded from the specified directory. That directory must follow
110 the gettext convention, in particular it must contain one .mo
111 file for each language, and a LINGUAS file listing the available
112 languages.
113
114 -r Ignored for compatibility with rc.
115
116 --preprocessor=program
117 This option may be used to specify the preprocessor to use,
118 including any leading arguments. If not specified, wrc uses its
119 builtin processor. To disable preprocessing, use --preproces‐
120 sor=cat.
121
122 --sysroot=dir
123 Prefix the standard include paths with dir.
124
125 -U, --undefine=id
126 Undefine preprocessor identifier id. Please note that only
127 macros defined up to this point are undefined by this command.
128 However, these include the special macros defined automatically
129 by wrc. See also PREPROCESSOR below.
130
131 --use-temp-file
132 Ignored for compatibility with windres.
133
134 -v, --verbose
135 Turns on verbose mode (equivalent to -d 1).
136
137 --version
138 Print version and exit.
139
141 The preprocessor is ANSI-C compatible with some of the extensions of
142 the gcc preprocessor.
143
144 The preprocessor recognizes these directives: #include, #define (both
145 simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
146 #error, #warning, #line, # (both null- and line-directive), #pragma
147 (ignored), #ident (ignored).
148
149 The preprocessor sets by default several defines:
150 RC_INVOKED set to 1
151 __WRC__ Major version of wrc
152 __WRC_MINOR__ Minor version of wrc
153 __WRC_PATCHLEVEL__ Patch level
154
155 Win32 compilation mode also sets _WIN32 to 1.
156
157 Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also rec‐
158 ognized and expand to their respective equivalent.
159
161 Language, version and characteristics can be bound to all resource
162 types that have inline data, such as RCDATA. This is an extension to
163 Microsoft's resource compiler, which lacks this support completely.
164 Only VERSIONINFO cannot have version and characteristics attached, but
165 languages are propagated properly if you declare it correctly before
166 the VERSIONINFO resource starts.
167
168 Example:
169
170 1 RCDATA DISCARDABLE
171 LANGUAGE 1, 0
172 VERSION 312
173 CHARACTERISTICS 876
174 {
175 1, 2, 3, 4, 5, "and whatever more data you want"
176 '00 01 02 03 04 05 06 07 08'
177 }
178
180 wrc was written by Bertho A. Stultiens and is a nearly complete rewrite
181 of the first wine resource compiler (1994) by Martin von Loewis. Addi‐
182 tional resource-types were contributed by Ulrich Czekalla and Albert
183 den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003. Bugfixes
184 have been contributed by many Wine developers.
185
187 - The preprocessor recognizes variable argument macros, but does not
188 expand them correctly.
189 - Error reporting should be more precise, as currently the column and
190 line number reported are those of the next token.
191 - Default memory options should differ between win16 and win32.
192
193 There is no support for:
194 - RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
195 - PUSHBOX control is unsupported due to lack of original functionality.
196
197 Fonts are parsed and generated, but there is no support for the genera‐
198 tion of the FONTDIR yet. The user must supply the FONTDIR resource in
199 the source to match the FONT resources.
200
201 Bugs can be reported on the Wine bug tracker ⟨https://bugs.winehq.org⟩.
202
204 wrc is part of the Wine distribution, which is available through
205 WineHQ, the Wine development headquarters ⟨https://www.winehq.org/⟩.
206
208 wine(1),
209 Wine documentation and support ⟨https://www.winehq.org/help⟩.
210
211
212
213Wine 4.21 October 2005 WRC(1)