d2d1/tests: Add tests for rounded rectangle drawing.
[wine.git] / tools / wrc / wrc.man.in
blob80fcd04c5bc9ece37fb766006311844717ce7d12
1 .TH WRC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
2 .SH NAME
3 wrc \- Wine Resource Compiler
4 .SH SYNOPSIS
5 .B wrc
6 .RI [ options ]\ [ inputfile ...]
7 .SH DESCRIPTION
8 .B wrc
9 compiles resources from \fIinputfile\fR
10 into win16 and win32 compatible binary format.
11 .PP
12 The source file is preprocessed with a builtin ANSI\-C compatible
13 preprocessor before the resources are compiled. See \fBPREPROCESSOR\fR
14 below.
15 .PP
16 .B wrc
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.
22 .SH OPTIONS
23 .TP
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.
28 .TP
29 .I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
30 Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
31 See also
32 .B PREPROCESSOR
33 below.
34 .TP
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.
39 .TP
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.
45 .TP
46 .I \fB\-E\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
49 generate.
50 .TP
51 .I \fB\-h\fR, \fB\-\-help\fR
52 Prints a summary message and exits.
53 .TP
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.
58 .TP
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.
64 .br
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.
69 .TP
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.
73 .TP
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").
77 .TP
78 .B \-m16, -m32, -m64
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.
82 .TP
83 .I \fB\-\-nostdinc\fR
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.
86 .TP
87 .I \fB\-\-no\-use\-temp\-file\fR
88 Ignored for compatibility with \fIwindres\fR.
89 .TP
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
93 from standard input.
94 .TP
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.
99 .br
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
104 input.
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.
116 .I \fB\-r\fR
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\-\-sysroot=\fIdir\fR
125 Prefix the standard include paths with \fIdir\fR.
127 .I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
128 Undefine preprocessor identifier \fIid\fR.  Please note that only macros 
129 defined up to this point are undefined by this command. However, these 
130 include the special macros defined automatically by \fIwrc\fR.
131 See also
132 .B PREPROCESSOR
133 below.
135 .I \fB\-\-use\-temp\-file\fR
136 Ignored for compatibility with \fIwindres\fR.
138 .I \fB\-v\fR, \fB\-\-verbose\fR
139 Turns on verbose mode (equivalent to \fB-d 1\fR).
141 .I \fB\-\-version\fR
142 Print version and exit.
143 .SH PREPROCESSOR
144 The preprocessor is ANSI\-C compatible with some of the extensions of 
145 the gcc preprocessor. 
147 The preprocessor recognizes these directives: #include, #define (both
148 simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
149 #error, #warning, #line, # (both null\- and line\-directive), #pragma
150 (ignored), #ident (ignored).
152 The preprocessor sets by default several defines:
154 RC_INVOKED      set to 1
156 __WRC__         Major version of wrc
158 __WRC_MINOR__   Minor version of wrc
160 __WRC_PATCHLEVEL__   Patch level
162 Win32 compilation mode also sets _WIN32 to 1.
164 Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
165 recognized and expand to their respective equivalent.
166 .SH "LANGUAGE SUPPORT"
167 Language, version and characteristics can be bound to all resource types that
168 have inline data, such as RCDATA. This is an extension to Microsoft's resource
169 compiler, which lacks this support completely. Only VERSIONINFO cannot have
170 version and characteristics attached, but languages are propagated properly if
171 you declare it correctly before the VERSIONINFO resource starts.
173 Example:
175 1 RCDATA DISCARDABLE
177 LANGUAGE 1, 0
179 VERSION 312
181 CHARACTERISTICS 876
185         1, 2, 3, 4, 5, "and whatever more data you want"
187         '00 01 02 03 04 05 06 07 08'
190 .SH AUTHORS
191 .B wrc
192 was written by Bertho A. Stultiens and is a nearly complete rewrite of
193 the first wine resource compiler (1994) by Martin von Loewis.
194 Additional resource\-types were contributed by Ulrich Czekalla and Albert
195 den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003.
196 Bugfixes have been contributed by many Wine developers.
197 .SH BUGS
198 \- The preprocessor recognizes variable argument macros, but does not
199 expand them correctly.
201 \- Error reporting should be more precise, as currently the column and
202 line number reported are those of the next token. 
204 \- Default memory options should differ between win16 and win32.
206 There is no support for:
208 \- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
210 \- PUSHBOX control is unsupported due to lack of original functionality.
212 Fonts are parsed and generated, but there is no support for the
213 generation of the FONTDIR yet. The user must supply the FONTDIR
214 resource in the source to match the FONT resources.
216 Bugs can be reported on the
217 .UR https://bugs.winehq.org
218 .B Wine bug tracker
219 .UE .
220 .SH AVAILABILITY
221 .B wrc
222 is part of the Wine distribution, which is available through WineHQ,
224 .UR https://www.winehq.org/
225 .B Wine development headquarters
226 .UE .
227 .SH "SEE ALSO"
228 .BR wine (1),
230 .UR https://www.winehq.org/help
231 .B Wine documentation and support
232 .UE .