source: trunk/tools/wrc/wrc.man@ 10367

Last change on this file since 10367 was 5523, checked in by sandervl, 24 years ago

updates

File size: 7.9 KB
Line 
1.TH WRC 1 "August 24, 2000" "Version 1.1.8" "Wine Resource Compiler"
2.SH NAME
3wrc \- Wine Resource Compiler
4.SH SYNOPSIS
5.BI "wrc " "[options] " "[inputfile]"
6.SH DESCRIPTION
7.B wrc
8compiles resources from
9.I inputfile
10into win16 and win32 compatible
11binary format.
12.B wrc
13outputs the binary data either in a standard \fB.res\fR formatted binary
14file, or an assembly file.
15.B wrc
16is also capable of reading \fB.res\fR formatted files and convert them
17into an assembly file.
18.PP
19The source\-file is preprocessed with a builtin ANSI\-C compatible
20preprocessor before the resources are compiled. See \fBPREPROCESSOR\fR
21below.
22.PP
23.B wrc
24takes only one \fBinputfile\fR as argument. The \fBinputfile\fR has
25extension \fB.rc\fR for resources in source form and \fB.res\fR for
26binary resources. The resources are read from standard input if no
27inputfile is given. If the outputfile is not specified with \fI-o\fR,
28then \fBwrc\fR will write the output to \fBinputfile.{s,h,res}\fR
29with \fB.rc\fR stripped, depending on the mode of compilation.
30The outputfile is named \fBwrc.tab.{s,h,res}\fR if no inputfile was
31given.
32.SH OPTIONS
33.TP
34.I \-a n
35Win16 only; set the alignment between resources n. The alignment must
36be a power of 2. The default is 4.
37.TP
38.I \-A
39Obsolete; include code in the assembly output to auto register resources
40by calling a special wine function (only with gcc 2.7 and better).
41.TP
42.I \-b
43Create an assembly file from a binary \fB.res\fR file.
44.TP
45.I \-B x
46Win32 only; set output byte\-ordering, where \fIx\fR is one of n[ative],
47l[ittle] or b[ig]. Only resources in source-form can be reorderd. Native
48ordering depends on the system on which \fBwrc\fR was built. You can see
49the native ordering by typing \fIwrc \-?\fR.
50.TP
51.I \-c
52Add 'const' prefix to C constants when writing header files.
53.TP
54.I \-C cp
55Set the resource's codepage to \fIcp\fR. Default codepage is 0.
56.TP
57.I \-d n
58Set debug level to \fIn\fR. The value is a bitmask consisting of
591=verbose, 2=dump internals, 4=resource parser trace, 8=preprocessor
60messages, 16=preprocessor scanner and 32=preprocessor parser trace.
61.TP
62.I \-D id[=val]
63Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
64See also
65.B PREPROCESSOR
66below.
67.TP
68.I \-e
69Win16 only; disable recognition of win32 keywords in 16bit compile.
70Normally, all keywords are recognized in win16 compilation mode. Use
71this switch if old sources use win32 reserved names as resource names.
72.TP
73.I \-E
74Preprocess only. The output is written to standard output if no
75outputfile was selected. The output is compatible with what gcc would
76generate.
77.TP
78.I \-g
79Add symbols to the global C namespace. This makes all symbols available
80for linking by other modules.
81.TP
82.I \-h
83Generate a \fB.h\fR header-file. The resource tables are described by
84extern declarations.
85.TP
86.I \-H file
87Same as \fI\-h\fR but written to \fIfile\fR.
88.TP
89.I \-I path
90Add \fIpath\fR to include search directories. \fIPath\fR may contain
91multiple directories, separated with ':'. It is allowed to specify
92\fI\-I\fR multiple times. Include files are searched in the order in
93with the \fI\-I\fR options were specified.
94.br
95The search is compatible with gcc, in which '<>' quoted filenames are
96searched exclusively via the \fI\-I\fR set path, whereas the '""' quoted
97filenames are first tried to be opened in the current directory. Also
98resource statements with file references are located in the same way.
99.TP
100.I \-l lan
101Set default language to \fIlan\fR. Default is the neutral language 0
102(i.e. "LANGUAGE 0, 0").
103.TP
104.I \-L
105Leave case of embedded filenames as is. All filenames are converted to
106lower case before they are attemped to be opened without this option.
107.TP
108.I \-m
109Do not remap numerical resource type-IDs onto standard resources. This will
110cause all numerical resource type\-IDs to be treated as user\-type resources
111and will not be checked nor byte\-reversed. Without this option, resources
112with, for example, type\-ID 2 are parsed as bitmaps and other type\-IDs will
113map onto their respective standard type.
114Use this option with caution because it can create problems when compiling for,
115for example, big\-endian platforms. The \fI\-m\fR option is usefull for
116source\-files that contain overlapping type\-IDs, or when the format of the
117resource is not 100% compliant.
118.TP
119.I \-n
120Do not generate an assembly outputfile (suppress generation of \fB.s\fR
121file). Usefull if you are interested in a header file only.
122.TP
123.I \-N
124Do not preprocess the input. This will most certainly result in
125compilation failure, unless you have preprocessed the source with
126another preprocessor before passing it to \fBwrc\fR.
127.TP
128.I \-o file
129Write output to \fIfile\fR. Default is \fBinputfile.{res,s,h}\fR
130with \fB.rc\fR stripped or \fBwrc.tab.{s,h,res}\fR, depending on the
131compilation mode.
132.TP
133.I \-p prefix
134Prefix all generated names with \fIprefix\fR. This is only relevant for
135names in the assembly code and header file. Resource names are not
136affected.
137.TP
138.I \-r
139Create binary \fB.res\fR file (compile only).
140.TP
141.I \-s
142Add structure with win32/16 (PE/NE) resource directory to outputfile.
143This directory is always in native byteorder.
144.TP
145.I \-t
146Obsolete; generate indirect loadable resource tables.
147.TP
148.I \-T
149Obsolete; generate only indirect loadable resources tables.
150.TP
151.I \-V
152Print version end exit.
153.TP
154.I \-w 16|32
155Select win16 or win32 output. Default is win32.
156.TP
157.I \-W
158Enable pedantic warnings. Notably redefinition of #define statements can
159be discovered with this option.
160.SH PREPROCESSOR
161The preprocessor is ANSI\-C compatible with some extensions of the gcc
162preprocessor.
163.PP
164The preprocessor recognizes these directives: #include, #define (both
165simple and macro), #undef, #if, #ifdef, #ifndef, #elif, #else, #endif,
166#error, #warning, #line, # (both null\- and line\-directive), #pragma
167(ignored), #ident (ignored).
168.PP
169The preprocessor default sets several defines:
170.br
171RC_INVOKED set to 1
172.br
173__WRC__ Major version of wrc
174.br
175__WRC_MINOR__ Minor version of wrc
176.br
177__WRC_MICRO__ Patch level
178.br
179__WRC_PATCH__ Same as __WRC_MICRO__
180.PP
181Win32 compilation mode also sets __WIN32__ to 1 and __FLAT__ to 1.
182.PP
183Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
184recognized and expand to their respective equivalent.
185.SH "ERROR REPORTING"
186All errors and warnings are written to standard error and report:
187.br
188\fIfilename\fR:\fIline\-number\fR:\fIcharacter\-pos\fR:\fI{Error,Warning}\fR:\fI<message>\fR
189.br
190The character\-position is always at the next token. I.e. the error
191or warning happened before. The line\-number suffers from the same
192problem if the error occurred at the last token of the previous line.
193The line\-number will be several lines off when the error was followed
194by several empry lines. See also \fBBUGS\fR.
195.SH AUTHORS
196.B wrc
197was written by Bertho A. Stultiens and is a nearly complete rewrite of
198the first wine resource compiler (1994) by Martin von Loewis.
199Additional resource\-types were contributed Ulrich Czekalla and Albert
200den Haan. Bugfixes have been contributed by many wine developpers.
201.SH BUGS
202\- The preprocessor recognizes variable argument macros, but does not
203expanded them correctly
204.br
205\- Error reporting should be more to the point (and verbose)
206.br
207\- Codepage/UNICODE translations are not/not correct implemented
208.br
209\- Default memory options should differ between win16 and win32.
210.PP
211There is no support for:
212.br
213\- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
214.br
215\- PUSHBOX control is unsupported due to lack of original functionality.
216.PP
217Fonts are parsed and generated, but there is no support for the
218generation of the FONTDIR yet. The user must supply the FONTDIR
219resource in the source to match the FONT resources.
220.PP
221See the CHANGES and README.wrc files in the distribution for more
222comments on bugs and fixes across the versions.
223.SH AVAILABILITY
224.B wrc
225is part of the wine distribution, which is available through
226WineHQ, the
227.B wine
228development headquarters, at
229.I http://www.winehq.com/.
230.SH "SEE ALSO"
231.BR wine (1),
Note: See TracBrowser for help on using the repository browser.