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       --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       -U, --undefine=id
123              Undefine  preprocessor  identifier  id.   Please  note that only
124              macros defined up to this point are undefined by  this  command.
125              However,  these include the special macros defined automatically
126              by wrc.  See also PREPROCESSOR below.
127
128       --use-temp-file
129              Ignored for compatibility with windres.
130
131       -v, --verbose
132              Turns on verbose mode (equivalent to -d 1).
133
134       --version
135              Print version and exit.
136

PREPROCESSOR

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

LANGUAGE SUPPORT

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

AUTHORS

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

BUGS

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

AVAILABILITY

201       wrc is part of  the  Wine  distribution,  which  is  available  through
202       WineHQ, the Wine development headquarters https://www.winehq.org/⟩.
203

SEE ALSO

205       wine(1),
206       Wine documentation and support https://www.winehq.org/help⟩.
207
208
209
210Wine 4.9                         October 2005                           WRC(1)
Impressum