1WRC(1)                      Wine Developers Manual                      WRC(1)
2
3
4

NAME

6       wrc - Wine Resource Compiler
7

SYNOPSIS

9       wrc [options] [inputfile...]
10

DESCRIPTION

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

OPTIONS

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       --nls-dir=dir
83              Specify the directory to search for the NLS files containing the
84              codepage mapping tables.
85
86       --nostdinc
87              Do not search the standard include path, look for include  files
88              only in the directories explicitly specified with the -I option.
89
90       --no-use-temp-file
91              Ignored for compatibility with windres.
92
93       -o, -fo, --output=file
94              Write output to file. Default is inputfile.res with .rc stripped
95              or wrc.tab.res if input is read from standard input.
96
97       -O, --output-format=format
98              Sets the output format. The supported formats are po, pot,  res,
99              and res16.  If this option is not specified, the format defaults
100              to res.
101              In po mode, if an output file name is specified it must match  a
102              known language name, like en_US.po; only resources for the spec‐
103              ified language are output. If no output file name is  specified,
104              a separate .po file is created for every language encountered in
105              the input.
106
107       --pedantic
108              Enable pedantic warnings. Notably redefinition of #define state‐
109              ments can be discovered with this option.
110
111       --po-dir=dir
112              Enable the generation of resource translations based on mo files
113              loaded from the specified directory. That directory must  follow
114              the  gettext  convention,  in particular it must contain one .mo
115              file for each language, and a LINGUAS file listing the available
116              languages.
117
118       -r     Ignored for compatibility with rc.
119
120       --preprocessor=program
121              This  option  may  be  used  to specify the preprocessor to use,
122              including any leading arguments. If not specified, wrc uses  its
123              builtin  processor.   To disable preprocessing, use --preproces‐
124              sor=cat.
125
126       --sysroot=dir
127              Prefix the standard include paths with dir.
128
129       --utf8, -u
130              Set the default codepage of the input file to UTF-8.
131
132       -U, --undefine=id
133              Undefine preprocessor identifier  id.   Please  note  that  only
134              macros  defined  up to this point are undefined by this command.
135              However, these include the special macros defined  automatically
136              by wrc.  See also PREPROCESSOR below.
137
138       --use-temp-file
139              Ignored for compatibility with windres.
140
141       -v, --verbose
142              Turns on verbose mode (equivalent to -d 1).
143
144       --version
145              Print version and exit.
146

PREPROCESSOR

148       The  preprocessor  is  ANSI-C compatible with some of the extensions of
149       the gcc preprocessor.
150
151       The preprocessor recognizes these directives: #include,  #define  (both
152       simple  and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
153       #error, #warning, #line, # (both  null-  and  line-directive),  #pragma
154       (ignored), #ident (ignored).
155
156       The preprocessor sets by default several defines:
157       RC_INVOKED      set to 1
158       __WRC__         Major version of wrc
159       __WRC_MINOR__   Minor version of wrc
160       __WRC_PATCHLEVEL__   Patch level
161
162       Win32 compilation mode also sets _WIN32 to 1.
163
164       Special  macros __FILE__, __LINE__, __TIME__ and __DATE__ are also rec‐
165       ognized and expand to their respective equivalent.
166

LANGUAGE SUPPORT

168       Language, version and characteristics can  be  bound  to  all  resource
169       types  that  have  inline data, such as RCDATA. This is an extension to
170       Microsoft's resource compiler, which  lacks  this  support  completely.
171       Only  VERSIONINFO cannot have version and characteristics attached, but
172       languages are propagated properly if you declare  it  correctly  before
173       the VERSIONINFO resource starts.
174
175       Example:
176
177       1 RCDATA DISCARDABLE
178       LANGUAGE 1, 0
179       VERSION 312
180       CHARACTERISTICS 876
181       {
182            1, 2, 3, 4, 5, "and whatever more data you want"
183            '00 01 02 03 04 05 06 07 08'
184       }
185

AUTHORS

187       wrc was written by Bertho A. Stultiens and is a nearly complete rewrite
188       of the first wine resource compiler (1994) by Martin von Loewis.  Addi‐
189       tional  resource-types  were  contributed by Ulrich Czekalla and Albert
190       den Haan. Many cleanups by Dimitrie O.  Paun  in  2002-2003.   Bugfixes
191       have been contributed by many Wine developers.
192

BUGS

194       -  The  preprocessor  recognizes variable argument macros, but does not
195       expand them correctly.
196       - Error reporting should be more precise, as currently the  column  and
197       line number reported are those of the next token.
198       - Default memory options should differ between win16 and win32.
199
200       There is no support for:
201       - RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
202       - PUSHBOX control is unsupported due to lack of original functionality.
203
204       Fonts are parsed and generated, but there is no support for the genera‐
205       tion of the FONTDIR yet. The user must supply the FONTDIR  resource  in
206       the source to match the FONT resources.
207
208       Bugs can be reported on the Wine bug tracker https://bugs.winehq.org⟩.
209

AVAILABILITY

211       wrc  is  part  of  the  Wine  distribution,  which is available through
212       WineHQ, the Wine development headquarters https://www.winehq.org/⟩.
213

SEE ALSO

215       wine(1),
216       Wine documentation and support https://www.winehq.org/help⟩.
217
218
219
220Wine 5.7                         October 2005                           WRC(1)
Impressum