blob: 9825f327beac7a8b5d4dd560c0921a5a8310af49 [file] [log] [blame]
.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.el \{\
. de IX
..
.\}
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "WINDRES 1"
.TH WINDRES 1 "2013-07-21" "binutils-2.23.52.0.2" "GNU Development Tools"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
windres \- manipulate Windows resources.
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
windres [options] [input\-file] [output\-file]
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBwindres\fR reads resources from an input file and copies them into
an output file. Either file may be in one of three formats:
.ie n .IP """rc""" 4
.el .IP "\f(CWrc\fR" 4
.IX Item "rc"
A text format read by the Resource Compiler.
.ie n .IP """res""" 4
.el .IP "\f(CWres\fR" 4
.IX Item "res"
A binary format generated by the Resource Compiler.
.ie n .IP """coff""" 4
.el .IP "\f(CWcoff\fR" 4
.IX Item "coff"
A \s-1COFF\s0 object or executable.
.PP
The exact description of these different formats is available in
documentation from Microsoft.
.PP
When \fBwindres\fR converts from the \f(CW\*(C`rc\*(C'\fR format to the \f(CW\*(C`res\*(C'\fR
format, it is acting like the Windows Resource Compiler. When
\&\fBwindres\fR converts from the \f(CW\*(C`res\*(C'\fR format to the \f(CW\*(C`coff\*(C'\fR
format, it is acting like the Windows \f(CW\*(C`CVTRES\*(C'\fR program.
.PP
When \fBwindres\fR generates an \f(CW\*(C`rc\*(C'\fR file, the output is similar
but not identical to the format expected for the input. When an input
\&\f(CW\*(C`rc\*(C'\fR file refers to an external filename, an output \f(CW\*(C`rc\*(C'\fR file
will instead include the file contents.
.PP
If the input or output format is not specified, \fBwindres\fR will
guess based on the file name, or, for the input file, the file contents.
A file with an extension of \fI.rc\fR will be treated as an \f(CW\*(C`rc\*(C'\fR
file, a file with an extension of \fI.res\fR will be treated as a
\&\f(CW\*(C`res\*(C'\fR file, and a file with an extension of \fI.o\fR or
\&\fI.exe\fR will be treated as a \f(CW\*(C`coff\*(C'\fR file.
.PP
If no output file is specified, \fBwindres\fR will print the resources
in \f(CW\*(C`rc\*(C'\fR format to standard output.
.PP
The normal use is for you to write an \f(CW\*(C`rc\*(C'\fR file, use \fBwindres\fR
to convert it to a \s-1COFF\s0 object file, and then link the \s-1COFF\s0 file into
your application. This will make the resources described in the
\&\f(CW\*(C`rc\*(C'\fR file available to Windows.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-i\fR \fIfilename\fR" 4
.IX Item "-i filename"
.PD 0
.IP "\fB\-\-input\fR \fIfilename\fR" 4
.IX Item "--input filename"
.PD
The name of the input file. If this option is not used, then
\&\fBwindres\fR will use the first non-option argument as the input file
name. If there are no non-option arguments, then \fBwindres\fR will
read from standard input. \fBwindres\fR can not read a \s-1COFF\s0 file from
standard input.
.IP "\fB\-o\fR \fIfilename\fR" 4
.IX Item "-o filename"
.PD 0
.IP "\fB\-\-output\fR \fIfilename\fR" 4
.IX Item "--output filename"
.PD
The name of the output file. If this option is not used, then
\&\fBwindres\fR will use the first non-option argument, after any used
for the input file name, as the output file name. If there is no
non-option argument, then \fBwindres\fR will write to standard output.
\&\fBwindres\fR can not write a \s-1COFF\s0 file to standard output. Note,
for compatibility with \fBrc\fR the option \fB\-fo\fR is also
accepted, but its use is not recommended.
.IP "\fB\-J\fR \fIformat\fR" 4
.IX Item "-J format"
.PD 0
.IP "\fB\-\-input\-format\fR \fIformat\fR" 4
.IX Item "--input-format format"
.PD
The input format to read. \fIformat\fR may be \fBres\fR, \fBrc\fR, or
\&\fBcoff\fR. If no input format is specified, \fBwindres\fR will
guess, as described above.
.IP "\fB\-O\fR \fIformat\fR" 4
.IX Item "-O format"
.PD 0
.IP "\fB\-\-output\-format\fR \fIformat\fR" 4
.IX Item "--output-format format"
.PD
The output format to generate. \fIformat\fR may be \fBres\fR,
\&\fBrc\fR, or \fBcoff\fR. If no output format is specified,
\&\fBwindres\fR will guess, as described above.
.IP "\fB\-F\fR \fItarget\fR" 4
.IX Item "-F target"
.PD 0
.IP "\fB\-\-target\fR \fItarget\fR" 4
.IX Item "--target target"
.PD
Specify the \s-1BFD\s0 format to use for a \s-1COFF\s0 file as input or output. This
is a \s-1BFD\s0 target name; you can use the \fB\-\-help\fR option to see a list
of supported targets. Normally \fBwindres\fR will use the default
format, which is the first one listed by the \fB\-\-help\fR option.
.IP "\fB\-\-preprocessor\fR \fIprogram\fR" 4
.IX Item "--preprocessor program"
When \fBwindres\fR reads an \f(CW\*(C`rc\*(C'\fR file, it runs it through the C
preprocessor first. This option may be used to specify the preprocessor
to use, including any leading arguments. The default preprocessor
argument is \f(CW\*(C`gcc \-E \-xc\-header \-DRC_INVOKED\*(C'\fR.
.IP "\fB\-\-preprocessor\-arg\fR \fIoption\fR" 4
.IX Item "--preprocessor-arg option"
When \fBwindres\fR reads an \f(CW\*(C`rc\*(C'\fR file, it runs it through
the C preprocessor first. This option may be used to specify additional
text to be passed to preprocessor on its command line.
This option can be used multiple times to add multiple options to the
preprocessor command line.
.IP "\fB\-I\fR \fIdirectory\fR" 4
.IX Item "-I directory"
.PD 0
.IP "\fB\-\-include\-dir\fR \fIdirectory\fR" 4
.IX Item "--include-dir directory"
.PD
Specify an include directory to use when reading an \f(CW\*(C`rc\*(C'\fR file.
\&\fBwindres\fR will pass this to the preprocessor as an \fB\-I\fR
option. \fBwindres\fR will also search this directory when looking for
files named in the \f(CW\*(C`rc\*(C'\fR file. If the argument passed to this command
matches any of the supported \fIformats\fR (as described in the \fB\-J\fR
option), it will issue a deprecation warning, and behave just like the
\&\fB\-J\fR option. New programs should not use this behaviour. If a
directory happens to match a \fIformat\fR, simple prefix it with \fB./\fR
to disable the backward compatibility.
.IP "\fB\-D\fR \fItarget\fR" 4
.IX Item "-D target"
.PD 0
.IP "\fB\-\-define\fR \fIsym\fR\fB[=\fR\fIval\fR\fB]\fR" 4
.IX Item "--define sym[=val]"
.PD
Specify a \fB\-D\fR option to pass to the preprocessor when reading an
\&\f(CW\*(C`rc\*(C'\fR file.
.IP "\fB\-U\fR \fItarget\fR" 4
.IX Item "-U target"
.PD 0
.IP "\fB\-\-undefine\fR \fIsym\fR" 4
.IX Item "--undefine sym"
.PD
Specify a \fB\-U\fR option to pass to the preprocessor when reading an
\&\f(CW\*(C`rc\*(C'\fR file.
.IP "\fB\-r\fR" 4
.IX Item "-r"
Ignored for compatibility with rc.
.IP "\fB\-v\fR" 4
.IX Item "-v"
Enable verbose mode. This tells you what the preprocessor is if you
didn't specify one.
.IP "\fB\-c\fR \fIval\fR" 4
.IX Item "-c val"
.PD 0
.IP "\fB\-\-codepage\fR \fIval\fR" 4
.IX Item "--codepage val"
.PD
Specify the default codepage to use when reading an \f(CW\*(C`rc\*(C'\fR file.
\&\fIval\fR should be a hexadecimal prefixed by \fB0x\fR or decimal
codepage code. The valid range is from zero up to 0xffff, but the
validity of the codepage is host and configuration dependent.
.IP "\fB\-l\fR \fIval\fR" 4
.IX Item "-l val"
.PD 0
.IP "\fB\-\-language\fR \fIval\fR" 4
.IX Item "--language val"
.PD
Specify the default language to use when reading an \f(CW\*(C`rc\*(C'\fR file.
\&\fIval\fR should be a hexadecimal language code. The low eight bits are
the language, and the high eight bits are the sublanguage.
.IP "\fB\-\-use\-temp\-file\fR" 4
.IX Item "--use-temp-file"
Use a temporary file to instead of using popen to read the output of
the preprocessor. Use this option if the popen implementation is buggy
on the host (eg., certain non-English language versions of Windows 95 and
Windows 98 are known to have buggy popen where the output will instead
go the console).
.IP "\fB\-\-no\-use\-temp\-file\fR" 4
.IX Item "--no-use-temp-file"
Use popen, not a temporary file, to read the output of the preprocessor.
This is the default behaviour.
.IP "\fB\-h\fR" 4
.IX Item "-h"
.PD 0
.IP "\fB\-\-help\fR" 4
.IX Item "--help"
.PD
Prints a usage summary.
.IP "\fB\-V\fR" 4
.IX Item "-V"
.PD 0
.IP "\fB\-\-version\fR" 4
.IX Item "--version"
.PD
Prints the version number for \fBwindres\fR.
.IP "\fB\-\-yydebug\fR" 4
.IX Item "--yydebug"
If \fBwindres\fR is compiled with \f(CW\*(C`YYDEBUG\*(C'\fR defined as \f(CW1\fR,
this will turn on parser debugging.
.IP "\fB@\fR\fIfile\fR" 4
.IX Item "@file"
Read command-line options from \fIfile\fR. The options read are
inserted in place of the original @\fIfile\fR option. If \fIfile\fR
does not exist, or cannot be read, then the option will be treated
literally, and not removed.
.Sp
Options in \fIfile\fR are separated by whitespace. A whitespace
character may be included in an option by surrounding the entire
option in either single or double quotes. Any character (including a
backslash) may be included by prefixing the character to be included
with a backslash. The \fIfile\fR may itself contain additional
@\fIfile\fR options; any such options will be processed recursively.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
the Info entries for \fIbinutils\fR.
.SH "COPYRIGHT"
.IX Header "COPYRIGHT"
Copyright (c) 1991\-2013 Free Software Foundation, Inc.
.PP
Permission is granted to copy, distribute and/or modify this document
under the terms of the \s-1GNU\s0 Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled \*(L"\s-1GNU\s0 Free Documentation License\*(R".