neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

184 lines
10 KiB
HTML

<html lang="en">
<head>
<title>windres - GNU Binary Utilities</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Binary Utilities">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="nlmconv.html#nlmconv" title="nlmconv">
<link rel="next" href="windmc.html#windmc" title="windmc">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
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 ``GNU Free Documentation License''.
man end-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="windres"></a>Next:&nbsp;<a rel="next" accesskey="n" href="windmc.html#windmc">windmc</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="nlmconv.html#nlmconv">nlmconv</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="chapter">13 windres</h2>
<p><span class="command">windres</span> may be used to manipulate Windows resources.
<blockquote>
<em>Warning:</em> <span class="command">windres</span> is not always built as part of the binary
utilities, since it is only useful for Windows targets.
</blockquote>
<!-- man title windres manipulate Windows resources. -->
<pre class="smallexample"> <!-- man begin SYNOPSIS windres -->
windres [options] [input-file] [output-file]
<!-- man end -->
</pre>
<!-- man begin DESCRIPTION windres -->
<p><span class="command">windres</span> reads resources from an input file and copies them into
an output file. Either file may be in one of three formats:
<dl>
<dt><code>rc</code><dd>A text format read by the Resource Compiler.
<br><dt><code>res</code><dd>A binary format generated by the Resource Compiler.
<br><dt><code>coff</code><dd>A COFF object or executable.
</dl>
<p>The exact description of these different formats is available in
documentation from Microsoft.
<p>When <span class="command">windres</span> converts from the <code>rc</code> format to the <code>res</code>
format, it is acting like the Windows Resource Compiler. When
<span class="command">windres</span> converts from the <code>res</code> format to the <code>coff</code>
format, it is acting like the Windows <code>CVTRES</code> program.
<p>When <span class="command">windres</span> generates an <code>rc</code> file, the output is similar
but not identical to the format expected for the input. When an input
<code>rc</code> file refers to an external filename, an output <code>rc</code> file
will instead include the file contents.
<p>If the input or output format is not specified, <span class="command">windres</span> will
guess based on the file name, or, for the input file, the file contents.
A file with an extension of <span class="file">.rc</span> will be treated as an <code>rc</code>
file, a file with an extension of <span class="file">.res</span> will be treated as a
<code>res</code> file, and a file with an extension of <span class="file">.o</span> or
<span class="file">.exe</span> will be treated as a <code>coff</code> file.
<p>If no output file is specified, <span class="command">windres</span> will print the resources
in <code>rc</code> format to standard output.
<p>The normal use is for you to write an <code>rc</code> file, use <span class="command">windres</span>
to convert it to a COFF object file, and then link the COFF file into
your application. This will make the resources described in the
<code>rc</code> file available to Windows.
<!-- man end -->
<!-- man begin OPTIONS windres -->
<dl>
<dt><span class="env">-i </span><var>filename</var><dt><span class="env">--input </span><var>filename</var><dd>The name of the input file. If this option is not used, then
<span class="command">windres</span> will use the first non-option argument as the input file
name. If there are no non-option arguments, then <span class="command">windres</span> will
read from standard input. <span class="command">windres</span> can not read a COFF file from
standard input.
<br><dt><span class="env">-o </span><var>filename</var><dt><span class="env">--output </span><var>filename</var><dd>The name of the output file. If this option is not used, then
<span class="command">windres</span> 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 <span class="command">windres</span> will write to standard output.
<span class="command">windres</span> can not write a COFF file to standard output. Note,
for compatibility with <span class="command">rc</span> the option <span class="option">-fo</span> is also
accepted, but its use is not recommended.
<br><dt><span class="env">-J </span><var>format</var><dt><span class="env">--input-format </span><var>format</var><dd>The input format to read. <var>format</var> may be <span class="samp">res</span>, <span class="samp">rc</span>, or
<span class="samp">coff</span>. If no input format is specified, <span class="command">windres</span> will
guess, as described above.
<br><dt><span class="env">-O </span><var>format</var><dt><span class="env">--output-format </span><var>format</var><dd>The output format to generate. <var>format</var> may be <span class="samp">res</span>,
<span class="samp">rc</span>, or <span class="samp">coff</span>. If no output format is specified,
<span class="command">windres</span> will guess, as described above.
<br><dt><span class="env">-F </span><var>target</var><dt><span class="env">--target </span><var>target</var><dd>Specify the BFD format to use for a COFF file as input or output. This
is a BFD target name; you can use the <span class="option">--help</span> option to see a list
of supported targets. Normally <span class="command">windres</span> will use the default
format, which is the first one listed by the <span class="option">--help</span> option.
<a href="Target-Selection.html#Target-Selection">Target Selection</a>.
<br><dt><span class="env">--preprocessor </span><var>program</var><dd>When <span class="command">windres</span> reads an <code>rc</code> 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 <code>gcc -E -xc-header -DRC_INVOKED</code>.
<br><dt><span class="env">-I </span><var>directory</var><dt><span class="env">--include-dir </span><var>directory</var><dd>Specify an include directory to use when reading an <code>rc</code> file.
<span class="command">windres</span> will pass this to the preprocessor as an <span class="option">-I</span>
option. <span class="command">windres</span> will also search this directory when looking for
files named in the <code>rc</code> file. If the argument passed to this command
matches any of the supported <var>formats</var> (as described in the <span class="option">-J</span>
option), it will issue a deprecation warning, and behave just like the
<span class="option">-J</span> option. New programs should not use this behaviour. If a
directory happens to match a <var>format</var>, simple prefix it with <span class="samp">./</span>
to disable the backward compatibility.
<br><dt><span class="env">-D </span><var>target</var><dt><span class="env">--define </span><var>sym</var><span class="env">[=</span><var>val</var><span class="env">]</span><dd>Specify a <span class="option">-D</span> option to pass to the preprocessor when reading an
<code>rc</code> file.
<br><dt><span class="env">-U </span><var>target</var><dt><span class="env">--undefine </span><var>sym</var><dd>Specify a <span class="option">-U</span> option to pass to the preprocessor when reading an
<code>rc</code> file.
<br><dt><span class="env">-r</span><dd>Ignored for compatibility with rc.
<br><dt><span class="env">-v</span><dd>Enable verbose mode. This tells you what the preprocessor is if you
didn't specify one.
<br><dt><span class="env">-c </span><var>val</var><br><dt><span class="env">--codepage </span><var>val</var><dd>Specify the default codepage to use when reading an <code>rc</code> file.
<var>val</var> should be a hexadecimal prefixed by <span class="samp">0x</span> or decimal
codepage code. The valid range is from zero up to 0xffff, but the
validity of the codepage is host and configuration dependent.
<br><dt><span class="env">-l </span><var>val</var><br><dt><span class="env">--language </span><var>val</var><dd>Specify the default language to use when reading an <code>rc</code> file.
<var>val</var> should be a hexadecimal language code. The low eight bits are
the language, and the high eight bits are the sublanguage.
<br><dt><span class="env">--use-temp-file</span><dd>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).
<br><dt><span class="env">--no-use-temp-file</span><dd>Use popen, not a temporary file, to read the output of the preprocessor.
This is the default behaviour.
<br><dt><span class="env">-h</span><br><dt><span class="env">--help</span><dd>Prints a usage summary.
<br><dt><span class="env">-V</span><br><dt><span class="env">--version</span><dd>Prints the version number for <span class="command">windres</span>.
<br><dt><span class="env">--yydebug</span><dd>If <span class="command">windres</span> is compiled with <code>YYDEBUG</code> defined as <code>1</code>,
this will turn on parser debugging.
</dl>
<!-- man end -->
</body></html>