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