jscript: Removed unused do_*_tag_format arguments.
[wine/multimedia.git] / tools / wrc / wrc.man.in
blobed1fd820e5f36450609cd99c018132b47cdde46e
1 .\" -*- nroff -*-
2 .TH WRC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
3 .SH NAME
4 wrc \- Wine Resource Compiler
5 .SH SYNOPSIS
6 .BI "wrc " "[options] " "[inputfiles]"
7 .SH DESCRIPTION
8 .B wrc
9 compiles resources from \fBinputfile\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 \fBinputfile\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 \fI-o\fR, then \fBwrc\fR will write the output to 
20 \fBinputfile.res\fR with \fB.rc\fR stripped, or to \fBwrc.tab.res\fR if 
21 no inputfile was given.
22 .SH OPTIONS
23 .TP
24 .BI \-b,\ --target= cpu-manufacturer[-kernel]-os
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 config.sub.
28 .TP
29 .I \fB\-D\fR, \fB\-\-define\fR=\fIid[=val]\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=\fIfile\fR
60 Add \fIpath\fR to include search directories. \fIPath\fR may contain
61 multiple directories, separated with ':'. It is allowed to specify
62 \fI\-I\fR multiple times. Include files are searched in the order in
63 with the \fI\-I\fR options were specified.
64 .br
65 The search is compatible with gcc, in which '<>' quoted filenames are
66 searched exclusively via the \fI\-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=\fIlan\fR
75 Set default language to \fIlan\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, respectively 64-bit
80 platforms. 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 \fI\-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 .po 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 in must contain one .mo 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\-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.
128 See also
129 .B PREPROCESSOR
130 below.
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 -d 1).
138 .I \fB\-\-version\fR
139 Print version end exit.
140 .SH PREPROCESSOR
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:
151 RC_INVOKED      set to 1
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.
170 Example:
172 1 RCDATA DISCARDABLE
174 LANGUAGE 1, 0
176 VERSION 312
178 CHARACTERISTICS 876
182         1, 2, 3, 4, 5, "and whatever more data you want"
184         '00 01 02 03 04 05 06 07 08'
187 .SH AUTHORS
188 .B wrc
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.
194 .SH BUGS
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.
212 .SH AVAILABILITY
213 .B wrc
214 is part of the Wine distribution, which is available through
215 WineHQ, the Wine development headquarters, at
216 .I http://www.winehq.org/.
217 .SH "SEE ALSO"
218 .BR wine (1)