File: tools.sgml

package info (click to toggle)
wine 0.0.20020411-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 43,012 kB
  • ctags: 104,265
  • sloc: ansic: 550,196; perl: 21,747; yacc: 3,990; sh: 3,904; makefile: 3,297; tcl: 2,616; lex: 2,443
file content (94 lines) | stat: -rw-r--r-- 2,944 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
  <chapter id="tools">
    <title>Tools</title>

    <sect1 id="bin2res">
      <title>bin2res</title>

      <para>
        Written by &name-juergen-schmied; <email>&email-juergen-schmied;</email> (11/99)
      </para>
      <para>
        (Extracted from <filename>wine/documentation/resources</filename>)
      </para>

      <para>
        This document desribes tools for handling resources within wine
      </para>

      <sect2>
        <title>bin2res</title>

        <para>
          This tool allows the editing of embedded binary resources
          within  <filename>*.rc</filename> files. These resources are
          stored as hex dump so they can be stored within the cvs
          tree. This makes the editing of the embedded bitmaps and
          icons harder.
        </para>
      </sect2>

      <sect2>
        <title>Create binary files from an <filename>.rc</filename> file</title>

        <para>
          The resources in the <filename>.rc</filename> file have to
          be marked by a header:
        </para>
        <programlisting>
/* BINRES idb_std_small.bmp */
IDB_STD_SMALL BITMAP LOADONCALL DISCARDABLE
{
  '42 4D 20 07 00 00 00 00 00 00 76 00 00 00 28 00'
        </programlisting>
        <para>
          <constant>BINRES</constant> is the keyword followed by a
          filename. <command>bin2res -d bin rsrc.rc</command>
          generates binary files from all marked resources. If the
          binary file is newer it gets not overwritten. To force
          overwriting use the <parameter>-f</parameter> switch.
        </para>
      </sect2>

      <sect2>
        <title>Create a <filename>.rc</filename> file from binaries</title>

        <para>
          Put a header followed by empty brackets in the
          <filename>.rc</filename> file.
        </para>
        <programlisting>
/* BINRES idb_std_small.bmp */
{}
        </programlisting>
        <para>
          Then run <command>bin2res rsrc.rc</command>. It will merge
          the resources into the <filename>.rc</filename> file if the
          binary resources are newer than the.rc file. To force the
          resources into the <filename>.rc</filename> file use the
          <parameter>-f</parameter> switch. If there is already a
          resource with the same filename in the
          <filename>.rc</filename> file it gets overwritten.
        </para>
      </sect2>

      <sect2>
        <title>output of <command>bin2res</command></title>

        <programlisting>
bash-2.03# ../../tools/bin2res -d bin shres.rc
[000.ico:c][003.ico:c][008.ico:s][015.ico:s][034.ico:s]
        </programlisting>
        <para>
          <literal>s</literal> means skipped, <literal>c</literal>
          means changed.
        </para>
      </sect2>
    </sect1>
  </chapter>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-parent-document:("wine-doc.sgml" "set" "book" "part" "chapter" "")
End:
-->