Wine Resource Compiler
see also :
add an example, a script, a trick and tips
no example yet ...
... Feel free to add your own example above to help other Linux-lovers !
compiles resources from inputfile into win16 and
win32 compatible binary format.
source-file is preprocessed with a builtin
ANSI-C compatible preprocessor before the resources
are compiled. See PREPROCESSOR below.
takes a series of inputfile as argument. The
resources are read from standard input if no inputfile is
given. If the output file is not specified with -o,
then wrc will write the output to
inputfile.res with .rc stripped, or to
wrc.tab.res if no inputfile was given.
Specify the target CPU and
platform on which the generated code will be built. The
target specification is in the standard autoconf format as
returned by config.sub.
Define preprocessor identifier
id to (optionally) value val. See also
Set debug level to nn.
The value is a bitmask consisting of 1=verbose, 2=dump
internals, 4=resource parser trace, 8=preprocessor messages,
16=preprocessor scanner and 32=preprocessor parser
Win32 only; set output
byte-ordering, where e is one of n[ative],
l[ittle] or b[ig]. Only resources in source-form can be
reordered. Native ordering depends on the system on which
wrc was built. You can see the native ordering by
typing wrc -h.
Preprocess only. The output is written to standard
output if no outputfile was selected. The output is
compatible with what gcc would generate.
Prints a summary message and
The name of the input file. If
this option is not used, then wrc will use the first
non-option argument as the input file name. If there are no
non-option arguments, then wrc will read from
Add path to include
search directories. Path may contain multiple
directories, separated with ’:’. It is allowed
to specify -I multiple times. Include files are
searched in the order in with the -I options
The search is compatible with gcc, in which
’<>’ quoted filenames are searched
exclusively via the -I set path, whereas the
’""’ quoted filenames are first tried
to be opened in the current directory. Also resource
statements with file references are located in the same
Sets the input format. Valid
options are ’rc’ or ’rc16’. Setting
the input to ’rc16’ disables the recognition of
Set default language to
lan. Default is the neutral language 0 (i.e.
"LANGUAGE 0, 0").
Generate resources for 16-bit,
32-bit, respectively 64-bit platforms. The only difference
between 32-bit and 64-bit is whether the _WIN64 preprocessor
symbol is defined.
Do not search the standard
include path, look for include files only in the directories
explicitly specified with the -I option.
Ignored for compatibility with
Write output to file.
Default is inputfile.res with .rc stripped or
wrc.tab.res if input is read from standard input.
Sets the output format. The
supported formats are po, pot, res, and
res16. If this option is not specified, the format
defaults to res.
In po mode, if an output file name is specified it
must match a known language name, like en_US.po; only
resources for the specified language are output. If no
output file name is specified, a separate .po file is
created for every language encountered in the input.
Enable pedantic warnings.
Notably redefinition of #define statements can be discovered
with this option.
Enable the generation of
resource translations based on mo files loaded from the
specified directory. That directory must follow the gettext
convention, in particular in must contain one .mo file for
each language, and a LINGUAS file listing the available
Ignored for compatibility with rc.
This option may be used to
specify the preprocessor to use, including any leading
arguments. If not specified, wrc uses its builtin
processor. To disable preprocessing, use
identifier id. Please note that only macros defined
up to this point are undefined by this command. However,
these include the special macros defined automatically by
wrc. See also PREPROCESSOR below.
Ignored for compatibility with
Turns on verbose mode
(equivalent to -d 1).
Print version end exit.
wrc is part of the Wine distribution, which is available
through WineHQ, the Wine development headquarters, at
Language, version and characteristics can be bound to all
resource types that have inline data, such as RCDATA. This is an
extension to Microsoft’s resource compiler, which lacks
this support completely. Only VERSIONINFO cannot have version and
characteristics attached, but languages are propagated properly
if you declare it correctly before the VERSIONINFO resource
1 RCDATA DISCARDABLE
LANGUAGE 1, 0
1, 2, 3, 4, 5, "and whatever more data you want"
’00 01 02 03 04 05 06 07 08’
The preprocessor is ANSI-C compatible with some of the extensions
of the gcc preprocessor.
The preprocessor recognizes these directives: #include, #define
(both simple and macro), #undef, #if, #ifdef, #ifndef, #elif,
#else, #endif, #error, #warning, #line, # (both null- and
line-directive), #pragma (ignored), #ident (ignored).
The preprocessor sets by default several defines:
RC_INVOKED set to 1
__WRC__ Major version of wrc
__WRC_MINOR__ Minor version of wrc
__WRC_PATCHLEVEL__ Patch level
Win32 compilation mode also sets _WIN32 to 1.
Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
recognized and expand to their respective equivalent.
preprocessor recognizes variable argument macros, but does
not expand them correctly.
- Error reporting should be more precise, as currently
the column and line number reported are those of the next
- Default memory options should differ between win16
There is no
- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML
- PUSHBOX control is unsupported due to lack of
parsed and generated, but there is no support for the
generation of the FONTDIR yet. The user must supply the
FONTDIR resource in the source to match the FONT
written by Bertho A. Stultiens and is a nearly complete
rewrite of the first wine resource compiler (1994) by Martin
von Loewis. Additional resource-types were contributed
by Ulrich Czekalla and Albert den Haan. Many cleanups by
Dimitrie O. Paun in 2002-2003. Bugfixes have been
contributed by many Wine developers.