2005-10-06 18:10:01 +02:00
|
|
|
.TH WRC 1 "October 2005" "@PACKAGE_STRING@" "Wine Developers Manual"
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH NAME
|
|
|
|
wrc \- Wine Resource Compiler
|
|
|
|
.SH SYNOPSIS
|
2013-07-17 16:45:20 +02:00
|
|
|
.B wrc
|
|
|
|
.RI [ options ]\ [ inputfile ...]
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B wrc
|
2013-07-17 16:45:20 +02:00
|
|
|
compiles resources from \fIinputfile\fR
|
2003-02-26 06:04:12 +01:00
|
|
|
into win16 and win32 compatible binary format.
|
2000-05-10 00:35:10 +02:00
|
|
|
.PP
|
2013-07-17 16:45:20 +02:00
|
|
|
The source file is preprocessed with a builtin ANSI\-C compatible
|
2000-05-10 00:35:10 +02:00
|
|
|
preprocessor before the resources are compiled. See \fBPREPROCESSOR\fR
|
|
|
|
below.
|
|
|
|
.PP
|
|
|
|
.B wrc
|
2013-07-17 16:45:20 +02:00
|
|
|
takes a series of \fIinputfile\fR as argument. The resources are read from
|
|
|
|
standard input if no inputfile is given. If the output file is not
|
|
|
|
specified with \fB-o\fR, then \fBwrc\fR will write the output to
|
|
|
|
\fIinputfile.res\fR with \fI.rc\fR stripped, or to \fIwrc.tab.res\fR if
|
2003-02-26 06:04:12 +01:00
|
|
|
no inputfile was given.
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2013-07-17 16:45:20 +02:00
|
|
|
.I \fB\-D\fR, \fB\-\-define\fR=\fIid\fR[\fB=\fIval\fR]
|
2010-09-29 20:13:28 +02:00
|
|
|
Define preprocessor identifier \fIid\fR to (optionally) value \fIval\fR.
|
|
|
|
See also
|
|
|
|
.B PREPROCESSOR
|
|
|
|
below.
|
|
|
|
.TP
|
2003-03-28 20:31:49 +01:00
|
|
|
.I \fB\-\-debug\fR=\fInn\fR
|
|
|
|
Set debug level to \fInn\fR. 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 trace.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-E\fR
|
2000-05-10 00:35:10 +02:00
|
|
|
Preprocess only. The output is written to standard output if no
|
|
|
|
outputfile was selected. The output is compatible with what gcc would
|
|
|
|
generate.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-h\fR, \fB\-\-help\fR
|
2003-01-11 21:55:18 +01:00
|
|
|
Prints a summary message and exits.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-i\fR, \fB\-\-input\fR=\fIfile\fR
|
|
|
|
The name of the input file. If this option is not used, then \fBwrc\fR
|
|
|
|
will use the first non-option argument as the input file name. If there
|
|
|
|
are no non-option arguments, then \fBwrc\fR will read from standard input.
|
|
|
|
.TP
|
2013-07-17 16:45:20 +02:00
|
|
|
.I \fB\-I\fR, \fB\-\-include\-dir\fR=\fIpath\fR
|
2021-11-12 11:39:31 +01:00
|
|
|
Add \fIpath\fR to the list of directories to search for includes. It
|
|
|
|
is allowed to specify \fB\-I\fR multiple times. Include files are
|
|
|
|
searched in the order in which the \fB\-I\fR options were specified.
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
|
|
|
The search is compatible with gcc, in which '<>' quoted filenames are
|
2013-07-17 16:45:20 +02:00
|
|
|
searched exclusively via the \fB\-I\fR set path, whereas the '""' quoted
|
2000-05-10 00:35:10 +02:00
|
|
|
filenames are first tried to be opened in the current directory. Also
|
|
|
|
resource statements with file references are located in the same way.
|
|
|
|
.TP
|
2003-03-20 20:23:08 +01:00
|
|
|
.I \fB\-J\fR, \fB\-\-input\-format\fR=\fIformat\fR
|
|
|
|
Sets the input format. Valid options are 'rc' or 'rc16'. Setting the
|
|
|
|
input to 'rc16' disables the recognition of win32 keywords.
|
|
|
|
.TP
|
2013-07-17 16:45:20 +02:00
|
|
|
.I \fB\-l\fR, \fB\-\-language\fR=\fIlang\fR
|
|
|
|
Set default language to \fIlang\fR. Default is the neutral language 0
|
2000-05-10 00:35:10 +02:00
|
|
|
(i.e. "LANGUAGE 0, 0").
|
|
|
|
.TP
|
2010-09-29 20:13:28 +02:00
|
|
|
.B \-m16, -m32, -m64
|
2013-07-17 16:45:20 +02:00
|
|
|
Generate resources for 16-bit, 32-bit or 64-bit platforms respectively.
|
|
|
|
The only difference between 32-bit and 64-bit is whether
|
2010-09-29 20:13:28 +02:00
|
|
|
the _WIN64 preprocessor symbol is defined.
|
|
|
|
.TP
|
2020-02-12 09:03:51 +01:00
|
|
|
.I \fB\-\-nls-dir=\fIdir\fR
|
|
|
|
Specify the directory to search for the NLS files containing the
|
|
|
|
codepage mapping tables.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-\-nostdinc\fR
|
2003-03-19 23:45:51 +01:00
|
|
|
Do not search the standard include path, look for include files only
|
2013-07-17 16:45:20 +02:00
|
|
|
in the directories explicitly specified with the \fB\-I\fR option.
|
2003-03-19 23:45:51 +01:00
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-\-no\-use\-temp\-file\fR
|
2003-03-28 20:31:49 +01:00
|
|
|
Ignored for compatibility with \fIwindres\fR.
|
2003-03-27 19:37:59 +01:00
|
|
|
.TP
|
2003-04-19 04:47:28 +02:00
|
|
|
.I \fB\-o\fR, \fB\-fo\fR, \fB\-\-output\fR=\fIfile\fR
|
2003-02-26 06:04:12 +01:00
|
|
|
Write output to \fIfile\fR. Default is \fBinputfile.res\fR
|
|
|
|
with \fB.rc\fR stripped or \fBwrc.tab.res\fR if input is read
|
|
|
|
from standard input.
|
2000-05-10 00:35:10 +02:00
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-O\fR, \fB\-\-output\-format\fR=\fIformat\fR
|
2011-01-04 11:18:10 +01:00
|
|
|
Sets the output format. The supported formats are \fBpo\fR, \fBpot\fR,
|
|
|
|
\fBres\fR, and \fBres16\fR. If this option is not specified, the
|
|
|
|
format defaults to \fBres\fR.
|
|
|
|
.br
|
|
|
|
In \fBpo\fR mode, if an output file name is specified it must match a
|
|
|
|
known language name, like \fBen_US.po\fR; only resources for the
|
|
|
|
specified language are output. If no output file name is specified, a
|
2013-07-17 16:45:20 +02:00
|
|
|
separate \fI.po\fR file is created for every language encountered in the
|
2011-01-04 11:18:10 +01:00
|
|
|
input.
|
2000-05-10 00:35:10 +02:00
|
|
|
.TP
|
2003-03-28 20:31:49 +01:00
|
|
|
.I \fB\-\-pedantic\fR
|
|
|
|
Enable pedantic warnings. Notably redefinition of #define statements can
|
|
|
|
be discovered with this option.
|
|
|
|
.TP
|
2011-01-04 11:18:45 +01:00
|
|
|
.I \fB\-\-po-dir=\fIdir\fR
|
2011-10-22 18:21:04 +02:00
|
|
|
Enable the generation of resource translations based on mo files
|
2011-01-04 11:18:45 +01:00
|
|
|
loaded from the specified directory. That directory must follow the
|
2013-07-17 16:45:20 +02:00
|
|
|
gettext convention, in particular it must contain one \fI.mo\fR file for
|
2011-01-04 11:18:45 +01:00
|
|
|
each language, and a LINGUAS file listing the available languages.
|
|
|
|
.TP
|
2003-03-28 20:31:49 +01:00
|
|
|
.I \fB\-r\fR
|
|
|
|
Ignored for compatibility with \fIrc\fR.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-\-preprocessor\fR=\fIprogram\fR
|
2003-02-11 22:58:46 +01:00
|
|
|
This option may be used to specify the preprocessor to use, including any
|
|
|
|
leading arguments. If not specified, \fBwrc\fR uses its builtin processor.
|
2003-03-27 19:37:59 +01:00
|
|
|
To disable preprocessing, use \fB--preprocessor=cat\fR.
|
2003-02-11 22:58:46 +01:00
|
|
|
.TP
|
2019-11-02 13:33:36 +01:00
|
|
|
.I \fB\-\-sysroot=\fIdir\fR
|
|
|
|
Prefix the standard include paths with \fIdir\fR.
|
|
|
|
.TP
|
2020-02-07 08:48:08 +01:00
|
|
|
.I \fB\-\-utf8\fR, \fB\-u\fR
|
|
|
|
Set the default codepage of the input file to UTF-8.
|
|
|
|
.TP
|
2003-03-28 20:31:49 +01:00
|
|
|
.I \fB\-U\fR, \fB\-\-undefine\fR=\fIid\fR
|
|
|
|
Undefine preprocessor identifier \fIid\fR. Please note that only macros
|
|
|
|
defined up to this point are undefined by this command. However, these
|
|
|
|
include the special macros defined automatically by \fIwrc\fR.
|
|
|
|
See also
|
|
|
|
.B PREPROCESSOR
|
|
|
|
below.
|
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-\-use\-temp\-file\fR
|
2003-03-28 20:31:49 +01:00
|
|
|
Ignored for compatibility with \fIwindres\fR.
|
2003-03-27 19:37:59 +01:00
|
|
|
.TP
|
2004-05-30 05:09:57 +02:00
|
|
|
.I \fB\-v\fR, \fB\-\-verbose\fR
|
2013-07-17 16:45:20 +02:00
|
|
|
Turns on verbose mode (equivalent to \fB-d 1\fR).
|
2003-01-11 21:55:18 +01:00
|
|
|
.TP
|
2003-03-27 19:37:59 +01:00
|
|
|
.I \fB\-\-version\fR
|
2013-07-17 16:45:20 +02:00
|
|
|
Print version and exit.
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH PREPROCESSOR
|
2003-03-27 19:37:59 +01:00
|
|
|
The preprocessor is ANSI\-C compatible with some of the extensions of
|
|
|
|
the gcc preprocessor.
|
2000-05-10 00:35:10 +02:00
|
|
|
.PP
|
|
|
|
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).
|
|
|
|
.PP
|
2003-03-27 19:37:59 +01:00
|
|
|
The preprocessor sets by default several defines:
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
|
|
|
RC_INVOKED set to 1
|
|
|
|
.br
|
|
|
|
__WRC__ Major version of wrc
|
|
|
|
.br
|
|
|
|
__WRC_MINOR__ Minor version of wrc
|
|
|
|
.br
|
2005-10-06 18:10:01 +02:00
|
|
|
__WRC_PATCHLEVEL__ Patch level
|
2000-05-10 00:35:10 +02:00
|
|
|
.PP
|
2010-09-29 20:13:28 +02:00
|
|
|
Win32 compilation mode also sets _WIN32 to 1.
|
2000-05-10 00:35:10 +02:00
|
|
|
.PP
|
|
|
|
Special macros __FILE__, __LINE__, __TIME__ and __DATE__ are also
|
|
|
|
recognized and expand to their respective equivalent.
|
2003-02-01 01:36:59 +01:00
|
|
|
.SH "LANGUAGE SUPPORT"
|
|
|
|
Language, version and characteristics can be bound to all resource types that
|
2003-03-27 19:37:59 +01:00
|
|
|
have inline data, such as RCDATA. This is an extension to Microsoft's resource
|
2003-02-01 01:36:59 +01:00
|
|
|
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 starts.
|
|
|
|
.PP
|
|
|
|
Example:
|
|
|
|
.PP
|
|
|
|
1 RCDATA DISCARDABLE
|
|
|
|
.br
|
|
|
|
LANGUAGE 1, 0
|
|
|
|
.br
|
|
|
|
VERSION 312
|
|
|
|
.br
|
|
|
|
CHARACTERISTICS 876
|
|
|
|
.br
|
|
|
|
{
|
|
|
|
.br
|
|
|
|
1, 2, 3, 4, 5, "and whatever more data you want"
|
|
|
|
.br
|
|
|
|
'00 01 02 03 04 05 06 07 08'
|
|
|
|
.br
|
|
|
|
}
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH AUTHORS
|
|
|
|
.B wrc
|
|
|
|
was written by Bertho A. Stultiens and is a nearly complete rewrite of
|
|
|
|
the first wine resource compiler (1994) by Martin von Loewis.
|
2011-05-27 16:19:31 +02:00
|
|
|
Additional resource\-types were contributed by Ulrich Czekalla and Albert
|
2003-03-27 19:37:59 +01:00
|
|
|
den Haan. Many cleanups by Dimitrie O. Paun in 2002-2003.
|
|
|
|
Bugfixes have been contributed by many Wine developers.
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH BUGS
|
|
|
|
\- The preprocessor recognizes variable argument macros, but does not
|
2011-05-27 16:19:31 +02:00
|
|
|
expand them correctly.
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
2003-03-27 19:37:59 +01:00
|
|
|
\- Error reporting should be more precise, as currently the column and
|
|
|
|
line number reported are those of the next token.
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
|
|
|
\- Default memory options should differ between win16 and win32.
|
|
|
|
.PP
|
2000-05-23 03:18:38 +02:00
|
|
|
There is no support for:
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
2000-06-08 02:38:47 +02:00
|
|
|
\- RT_DLGINCLUDE, RT_VXD, RT_PLUGPLAY and RT_HTML (unknown format)
|
2000-05-10 00:35:10 +02:00
|
|
|
.br
|
2000-05-23 03:18:38 +02:00
|
|
|
\- PUSHBOX control is unsupported due to lack of original functionality.
|
|
|
|
.PP
|
|
|
|
Fonts are 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 resources.
|
2013-07-16 20:48:05 +02:00
|
|
|
.PP
|
|
|
|
Bugs can be reported on the
|
2017-11-30 19:57:07 +01:00
|
|
|
.UR https://bugs.winehq.org
|
2013-07-16 20:48:05 +02:00
|
|
|
.B Wine bug tracker
|
|
|
|
.UE .
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.B wrc
|
2013-07-16 20:48:05 +02:00
|
|
|
is part of the Wine distribution, which is available through WineHQ,
|
|
|
|
the
|
2017-11-30 19:57:07 +01:00
|
|
|
.UR https://www.winehq.org/
|
2013-07-16 20:48:05 +02:00
|
|
|
.B Wine development headquarters
|
|
|
|
.UE .
|
2000-05-10 00:35:10 +02:00
|
|
|
.SH "SEE ALSO"
|
2013-07-16 20:48:05 +02:00
|
|
|
.BR wine (1),
|
|
|
|
.br
|
2017-11-30 19:57:07 +01:00
|
|
|
.UR https://www.winehq.org/help
|
2013-07-16 20:48:05 +02:00
|
|
|
.B Wine documentation and support
|
|
|
|
.UE .
|