ws2_32: Test wait alertability in WSAGetOverlappedResult().
[wine.git] / tools / wrc / wrc.man.in
blob807c66ad006b6a952f715a23e8df9216a6255620
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 .I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
25 Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
26 See also
27 .B PREPROCESSOR
28 below.
29 .TP
30 .I \fB\-\-debug\fR=\fInn\fR
31 Set debug level to \fInn\fR. The value is a bitmask consisting of
32 1=verbose, 2=dump internals, 4=resource parser trace, 8=preprocessor
33 messages, 16=preprocessor scanner and 32=preprocessor parser trace.
34 .TP
35 .I \fB\-E\fR
36 Preprocess only. The output is written to standard output if no
37 outputfile was selected. The output is compatible with what gcc would
38 generate.
39 .TP
40 .I \fB\-h\fR, \fB\-\-help\fR
41 Prints a summary message and exits.
42 .TP
43 .I \fB\-i\fR, \fB\-\-input\fR=\fIfile\fR
44 The name of the input file. If this option is not used, then \fBwrc\fR 
45 will use the first non-option argument as the input file name. If there 
46 are no non-option arguments, then \fBwrc\fR will read from standard input.
47 .TP
48 .I \fB\-I\fR, \fB\-\-include\-dir\fR=\fIpath\fR
49 Add \fIpath\fR to the list of directories to search for includes. It
50 is allowed to specify \fB\-I\fR multiple times. Include files are
51 searched in the order in which the \fB\-I\fR options were specified.
52 .br
53 The search is compatible with gcc, in which '<>' quoted filenames are
54 searched exclusively via the \fB\-I\fR set path, whereas the '""' quoted
55 filenames are first tried to be opened in the current directory. Also
56 resource statements with file references are located in the same way.
57 .TP
58 .I \fB\-J\fR, \fB\-\-input\-format\fR=\fIformat\fR
59 Sets the input format. Valid options are 'rc' or 'rc16'. Setting the
60 input to 'rc16' disables the recognition of win32 keywords.
61 .TP
62 .I \fB\-l\fR, \fB\-\-language\fR=\fIlang\fR
63 Set default language to \fIlang\fR. Default is the neutral language 0
64 (i.e. "LANGUAGE 0, 0").
65 .TP
66 .B \-m16, -m32, -m64
67 Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
68 The only difference between 32-bit and 64-bit is whether
69 the _WIN64 preprocessor symbol is defined.
70 .TP
71 .I \fB\-\-nls-dir=\fIdir\fR
72 Specify the directory to search for the NLS files containing the
73 codepage mapping tables.
74 .TP
75 .I \fB\-\-nostdinc\fR
76 Do not search the standard include path, look for include files only
77 in the directories explicitly specified with the \fB\-I\fR option.
78 .TP
79 .I \fB\-\-no\-use\-temp\-file\fR
80 Ignored for compatibility with \fIwindres\fR.
81 .TP
82 .I \fB\-o\fR, \fB\-fo\fR, \fB\-\-output\fR=\fIfile\fR
83 Write output to \fIfile\fR. Default is \fBinputfile.res\fR
84 with \fB.rc\fR stripped or \fBwrc.tab.res\fR if input is read
85 from standard input.
86 .TP
87 .I \fB\-O\fR, \fB\-\-output\-format\fR=\fIformat\fR
88 Sets the output format. The supported formats are \fBpo\fR, \fBpot\fR,
89 \fBres\fR, and \fBres16\fR.  If this option is not specified, the
90 format defaults to \fBres\fR.
91 .br
92 In \fBpo\fR mode, if an output file name is specified it must match a
93 known language name, like \fBen_US.po\fR; only resources for the
94 specified language are output. If no output file name is specified, a
95 separate \fI.po\fR file is created for every language encountered in the
96 input.
97 .TP
98 .I \fB\-\-pedantic\fR
99 Enable pedantic warnings. Notably redefinition of #define statements can
100 be discovered with this option.
102 .I \fB\-\-po-dir=\fIdir\fR
103 Enable the generation of resource translations based on mo files
104 loaded from the specified directory. That directory must follow the
105 gettext convention, in particular it must contain one \fI.mo\fR file for
106 each language, and a LINGUAS file listing the available languages.
108 .I \fB\-r\fR
109 Ignored for compatibility with \fIrc\fR.
111 .I \fB\-\-preprocessor\fR=\fIprogram\fR
112 This option may be used to specify the preprocessor to use, including any 
113 leading arguments. If not specified, \fBwrc\fR uses its builtin processor.
114 To disable preprocessing, use \fB--preprocessor=cat\fR.
116 .I \fB\-\-sysroot=\fIdir\fR
117 Prefix the standard include paths with \fIdir\fR.
119 .I \fB\-\-utf8\fR, \fB\-u\fR
120 Set the default codepage of the input file to UTF-8.
122 .I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
123 Undefine preprocessor identifier \fIid\fR.  Please note that only macros 
124 defined up to this point are undefined by this command. However, these 
125 include the special macros defined automatically by \fIwrc\fR.
126 See also
127 .B PREPROCESSOR
128 below.
130 .I \fB\-\-use\-temp\-file\fR
131 Ignored for compatibility with \fIwindres\fR.
133 .I \fB\-v\fR, \fB\-\-verbose\fR
134 Turns on verbose mode (equivalent to \fB-d 1\fR).
136 .I \fB\-\-version\fR
137 Print version and exit.
138 .SH PREPROCESSOR
139 The preprocessor is ANSI\-C compatible with some of the extensions of 
140 the gcc preprocessor. 
142 The preprocessor recognizes these directives: #include, #define (both
143 simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
144 #error, #warning, #line, # (both null\- and line\-directive), #pragma
145 (ignored), #ident (ignored).
147 The preprocessor sets by default several defines:
149 RC_INVOKED      set to 1
151 __WRC__         Major version of wrc
153 __WRC_MINOR__   Minor version of wrc
155 __WRC_PATCHLEVEL__   Patch level
157 Win32 compilation mode also sets _WIN32 to 1.
159 Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
160 recognized and expand to their respective equivalent.
161 .SH "LANGUAGE SUPPORT"
162 Language, version and characteristics can be bound to all resource types that
163 have inline data, such as RCDATA. This is an extension to Microsoft's resource
164 compiler, which lacks this support completely. Only VERSIONINFO cannot have
165 version and characteristics attached, but languages are propagated properly if
166 you declare it correctly before the VERSIONINFO resource starts.
168 Example:
170 1 RCDATA DISCARDABLE
172 LANGUAGE 1, 0
174 VERSION 312
176 CHARACTERISTICS 876
180         1, 2, 3, 4, 5, "and whatever more data you want"
182         '00 01 02 03 04 05 06 07 08'
185 .SH AUTHORS
186 .B wrc
187 was written by Bertho A. Stultiens and is a nearly complete rewrite of
188 the first wine resource compiler (1994) by Martin von Loewis.
189 Additional resource\-types were contributed by Ulrich Czekalla and Albert
190 den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003.
191 Bugfixes have been contributed by many Wine developers.
192 .SH BUGS
193 \- The preprocessor recognizes variable argument macros, but does not
194 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. 
199 \- Default memory options should differ between win16 and win32.
201 There is no support for:
203 \- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
205 \- PUSHBOX control is unsupported due to lack of original functionality.
207 Fonts are parsed and generated, but there is no support for the
208 generation of the FONTDIR yet. The user must supply the FONTDIR
209 resource in the source to match the FONT resources.
211 Bugs can be reported on the
212 .UR https://bugs.winehq.org
213 .B Wine bug tracker
214 .UE .
215 .SH AVAILABILITY
216 .B wrc
217 is part of the Wine distribution, which is available through WineHQ,
219 .UR https://www.winehq.org/
220 .B Wine development headquarters
221 .UE .
222 .SH "SEE ALSO"
223 .BR wine (1),
225 .UR https://www.winehq.org/help
226 .B Wine documentation and support
227 .UE .