1 .TH WRC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
3 wrc \- Wine Resource Compiler
6 .RI [ options ]\ [ inputfile ...]
9 compiles resources from \fIinputfile\fR
10 into win16 and win32 compatible binary format.
12 The source file is preprocessed with a builtin ANSI\-C compatible
13 preprocessor before the resources are compiled. See \fBPREPROCESSOR\fR
17 takes a series of \fIinputfile\fR as argument. The resources are read from
18 standard input if no inputfile is given. If the output file is not
19 specified with \fB-o\fR, then \fBwrc\fR will write the output to
20 \fIinputfile.res\fR with \fI.rc\fR stripped, or to \fIwrc.tab.res\fR if
21 no inputfile was given.
24 .BI \-b,\ --target= cpu-manufacturer\fR[\fI\fB-\fIkernel\fR]\fB-\fIos
25 Specify the target CPU and platform on which the generated code will
26 be built. The target specification is in the standard autoconf format
27 as returned by \fBconfig.sub\fR.
29 .I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
30 Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
35 .I \fB\-\-debug\fR=\fInn\fR
36 Set debug level to \fInn\fR. The value is a bitmask consisting of
37 1=verbose, 2=dump internals, 4=resource parser trace, 8=preprocessor
38 messages, 16=preprocessor scanner and 32=preprocessor parser trace.
40 .I \fB\-\-endianness\fR=\fIe\fR
41 Win32 only; set output byte\-ordering, where \fIe\fR is one of n[ative],
42 l[ittle] or b[ig]. Only resources in source-form can be reordered. Native
43 ordering depends on the system on which \fBwrc\fR was built. You can see
44 the native ordering by typing \fIwrc \-h\fR.
47 Preprocess only. The output is written to standard output if no
48 outputfile was selected. The output is compatible with what gcc would
51 .I \fB\-h\fR, \fB\-\-help\fR
52 Prints a summary message and exits.
54 .I \fB\-i\fR, \fB\-\-input\fR=\fIfile\fR
55 The name of the input file. If this option is not used, then \fBwrc\fR
56 will use the first non-option argument as the input file name. If there
57 are no non-option arguments, then \fBwrc\fR will read from standard input.
59 .I \fB\-I\fR, \fB\-\-include\-dir\fR=\fIpath\fR
60 Add \fIpath\fR to include search directories. \fIpath\fR may contain
61 multiple directories, separated with ':'. It is allowed to specify
62 \fB\-I\fR multiple times. Include files are searched in the order in
63 which the \fB\-I\fR options were specified.
65 The search is compatible with gcc, in which '<>' quoted filenames are
66 searched exclusively via the \fB\-I\fR set path, whereas the '""' quoted
67 filenames are first tried to be opened in the current directory. Also
68 resource statements with file references are located in the same way.
70 .I \fB\-J\fR, \fB\-\-input\-format\fR=\fIformat\fR
71 Sets the input format. Valid options are 'rc' or 'rc16'. Setting the
72 input to 'rc16' disables the recognition of win32 keywords.
74 .I \fB\-l\fR, \fB\-\-language\fR=\fIlang\fR
75 Set default language to \fIlang\fR. Default is the neutral language 0
76 (i.e. "LANGUAGE 0, 0").
79 Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
80 The only difference between 32-bit and 64-bit is whether
81 the _WIN64 preprocessor symbol is defined.
84 Do not search the standard include path, look for include files only
85 in the directories explicitly specified with the \fB\-I\fR option.
87 .I \fB\-\-no\-use\-temp\-file\fR
88 Ignored for compatibility with \fIwindres\fR.
90 .I \fB\-o\fR, \fB\-fo\fR, \fB\-\-output\fR=\fIfile\fR
91 Write output to \fIfile\fR. Default is \fBinputfile.res\fR
92 with \fB.rc\fR stripped or \fBwrc.tab.res\fR if input is read
95 .I \fB\-O\fR, \fB\-\-output\-format\fR=\fIformat\fR
96 Sets the output format. The supported formats are \fBpo\fR, \fBpot\fR,
97 \fBres\fR, and \fBres16\fR. If this option is not specified, the
98 format defaults to \fBres\fR.
100 In \fBpo\fR mode, if an output file name is specified it must match a
101 known language name, like \fBen_US.po\fR; only resources for the
102 specified language are output. If no output file name is specified, a
103 separate \fI.po\fR file is created for every language encountered in the
106 .I \fB\-\-pedantic\fR
107 Enable pedantic warnings. Notably redefinition of #define statements can
108 be discovered with this option.
110 .I \fB\-\-po-dir=\fIdir\fR
111 Enable the generation of resource translations based on mo files
112 loaded from the specified directory. That directory must follow the
113 gettext convention, in particular it must contain one \fI.mo\fR file for
114 each language, and a LINGUAS file listing the available languages.
117 Ignored for compatibility with \fIrc\fR.
119 .I \fB\-\-preprocessor\fR=\fIprogram\fR
120 This option may be used to specify the preprocessor to use, including any
121 leading arguments. If not specified, \fBwrc\fR uses its builtin processor.
122 To disable preprocessing, use \fB--preprocessor=cat\fR.
124 .I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
125 Undefine preprocessor identifier \fIid\fR. Please note that only macros
126 defined up to this point are undefined by this command. However, these
127 include the special macros defined automatically by \fIwrc\fR.
132 .I \fB\-\-use\-temp\-file\fR
133 Ignored for compatibility with \fIwindres\fR.
135 .I \fB\-v\fR, \fB\-\-verbose\fR
136 Turns on verbose mode (equivalent to \fB-d 1\fR).
139 Print version and exit.
141 The preprocessor is ANSI\-C compatible with some of the extensions of
142 the gcc preprocessor.
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).
149 The preprocessor sets by default several defines:
153 __WRC__ Major version of wrc
155 __WRC_MINOR__ Minor version of wrc
157 __WRC_PATCHLEVEL__ Patch level
159 Win32 compilation mode also sets _WIN32 to 1.
161 Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
162 recognized and expand to their respective equivalent.
163 .SH "LANGUAGE SUPPORT"
164 Language, version and characteristics can be bound to all resource types that
165 have inline data, such as RCDATA. This is an extension to Microsoft's resource
166 compiler, which lacks this support completely. Only VERSIONINFO cannot have
167 version and characteristics attached, but languages are propagated properly if
168 you declare it correctly before the VERSIONINFO resource starts.
182 1, 2, 3, 4, 5, "and whatever more data you want"
184 '00 01 02 03 04 05 06 07 08'
189 was written by Bertho A. Stultiens and is a nearly complete rewrite of
190 the first wine resource compiler (1994) by Martin von Loewis.
191 Additional resource\-types were contributed by Ulrich Czekalla and Albert
192 den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003.
193 Bugfixes have been contributed by many Wine developers.
195 \- The preprocessor recognizes variable argument macros, but does not
196 expand them correctly.
198 \- Error reporting should be more precise, as currently the column and
199 line number reported are those of the next token.
201 \- Default memory options should differ between win16 and win32.
203 There is no support for:
205 \- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
207 \- PUSHBOX control is unsupported due to lack of original functionality.
209 Fonts are parsed and generated, but there is no support for the
210 generation of the FONTDIR yet. The user must supply the FONTDIR
211 resource in the source to match the FONT resources.
213 Bugs can be reported on the
214 .UR http://bugs.winehq.org
219 is part of the Wine distribution, which is available through WineHQ,
221 .UR http://www.winehq.org/
222 .B Wine development headquarters
227 .UR http://www.winehq.org/help
228 .B Wine documentation and support