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