Direct bug reports to Wine bugzilla. Some other minor documentation
[wine/multimedia.git] / documentation / configuring.sgml
blob5a684eecb294cb1eb8665777e9a5dfdc3b5a18e1
1 <chapter id="configuring">
2 <title>Configuring Wine</title>
3 <para>Setting up config files, etc.</para>
5 <sect1 id="config">
6 <title>General Configuration</title>
7 <para>
8 Copyright 1999 &name-adam-sacarny; <email>&email-adam-sacarny;</email>
9 </para>
10 <para>
11 (Extracted from <filename>wine/documentation/config</filename>)
12 </para>
14 <sect2>
15 <title>The Wine Config File</title>
16 <para>
17 The Wine config file stores various settings for Wine. These include:
18 <itemizedlist>
19 <listitem>
20 <para>
21 Drives and Information about them
22 </para>
23 </listitem>
24 <listitem>
25 <para>
26 Directory Settings
27 </para>
28 </listitem>
29 <listitem>
30 <para>
31 Port Settings
32 </para>
33 </listitem>
34 <listitem>
35 <para>
36 The Wine look and feel
37 </para>
38 </listitem>
39 <listitem>
40 <para>
41 Wine's DLL Usage
42 </para>
43 </listitem>
44 <listitem>
45 <para>
46 Wine's Multimedia drivers and DLL configuration
47 </para>
48 </listitem>
49 </itemizedlist>
50 </para>
51 </sect2>
53 <sect2>
54 <title>How Do I Make One?</title>
55 <para>
56 This section will guide you through the process of making a
57 config file. Take a look at the file <filename>&lt;dirs to
58 wine>/documentation/samples/config</filename>. It is organized by section.
59 </para>
61 <informaltable frame="all">
62 <tgroup cols="3">
63 <thead>
64 <row>
65 <entry>Section Name</entry>
66 <entry>Needed?</entry>
67 <entry>What it Does</entry>
68 </row>
69 </thead>
70 <tbody>
71 <row>
72 <entry>[Drive X]</entry>
73 <entry>yes</entry>
74 <entry>Sets up drives recognized by wine</entry>
75 </row>
76 <row>
77 <entry>[wine]</entry>
78 <entry>yes</entry>
79 <entry>Settings for wine directories</entry>
80 </row>
81 <row>
82 <entry>[DllDefaults]</entry>
83 <entry>recmd</entry>
84 <entry>Defaults for loading DLL's</entry>
85 </row>
86 <row>
87 <entry>[DllPairs]</entry>
88 <entry>recmd</entry>
89 <entry>Sanity checkers for DLL's</entry>
90 </row>
91 <row>
92 <entry>[DllOverrides]</entry>
93 <entry>recmd</entry>
94 <entry>Overides defaults for DLL loading</entry>
95 </row>
96 <row>
97 <entry>[x11drv]</entry>
98 <entry>recmd</entry>
99 <entry>Graphic driver settings</entry>
100 </row>
101 <row>
102 <entry>[fonts]</entry>
103 <entry>yes</entry>
104 <entry>Font appearance and recognition</entry>
105 </row>
106 <row>
107 <entry>[serialports]</entry>
108 <entry>no</entry>
109 <entry>COM ports seen by wine</entry>
110 </row>
111 <row>
112 <entry>[parallelports]</entry>
113 <entry>no</entry>
114 <entry>LPT ports seen by wine</entry>
115 </row>
116 <row>
117 <entry>[ppdev]</entry>
118 <entry>no</entry>
119 <entry>Parallelport emulation</entry>
120 </row>
121 <row>
122 <entry>[spooler]</entry>
123 <entry>no</entry>
124 <entry>Print spooling</entry>
125 </row>
126 <row>
127 <entry>[ports]</entry>
128 <entry>no</entry>
129 <entry>Direct port access</entry>
130 </row>
131 <row>
132 <entry>[spy]</entry>
133 <entry>no</entry>
134 <entry>What to do with certain debug messages</entry>
135 </row>
136 <row>
137 <entry>[Registry]</entry>
138 <entry>no</entry>
139 <entry>Specifies locations of windows registry files</entry>
140 </row>
141 <row>
142 <entry>[tweak.layout]</entry>
143 <entry>recmd</entry>
144 <entry>Appearance of wine</entry>
145 </row>
146 <row>
147 <entry>[programs]</entry>
148 <entry>no</entry>
149 <entry>Programs to be run automatically</entry>
150 </row>
151 <row>
152 <entry>[Console]</entry>
153 <entry>no</entry>
154 <entry>Console settings</entry>
155 </row>
156 <row>
157 <entry>[Clipboard]</entry>
158 <entry>no</entry>
159 <entry>Interaction for wine and X11 clipboard</entry>
160 </row>
161 <row>
162 <entry>[afmdirs]</entry>
163 <entry>no</entry>
164 <entry>Postscript driver settings</entry>
165 </row>
166 <row>
167 <entry>[WinMM]</entry>
168 <entry>yes</entry>
169 <entry>Multimedia settings</entry>
170 </row>
171 <row>
172 <entry>[AppDefaults]</entry>
173 <entry>no</entry>
174 <entry>Overwrite the settings of previous sections for special programs</entry>
175 </row>
176 </tbody>
177 </tgroup>
178 </informaltable>
180 <sect3>
181 <title>The [Drive X] Section</title>
182 <para>
183 It should be pretty self explanatory, but here is an
184 in-depth tutorial about them. There are up to 6 lines for
185 each drive in Wine.
186 </para>
187 <para>
188 <programlisting>[Drive X]</programlisting>
189 The above line begins the section for a drive whose letter is X.
190 </para>
191 <para>
192 <programlisting>Path=/dir/to/path</programlisting> This
193 path is where the drive will begin. When Wine is browsing
194 in drive X, it will see the files that are in the
195 directory <filename>/dir/to/path</filename>. Don't forget
196 to leave off the trailing slash!
197 </para>
198 <para>
199 <programlisting>"Type" = "floppy|hd|cdrom|network"</programlisting>
200 Sets up the type of drive Wine will see it as. Type must
201 equal one of the four <literal>floppy</literal>,
202 <literal>hd</literal>, <literal>cdrom</literal>, or
203 <literal>network</literal>. They are self-explanatory.
204 (The |'s mean "Type = '&lt;one of the options&gt;'".)
205 </para>
206 <para>
207 <programlisting>"Label" = "blah"</programlisting> Defines the
208 drive label. Generally only needed for programs that look
209 for a special CD-ROM. Info on finding the lable is in
210 <literal>&lt;dirs to wine>/documentation/cdrom-labels</literal>.
211 The label may be up to 11 characters.
212 </para>
213 <para>
214 <programlisting>"Serial" = "deadbeef"</programlisting>
215 Tells Wine the serial number of the drive. A few programs with
216 intense protection for pirating might need this, but otherwise
217 don't use it. Up to 8 characters and hexadecimal.
218 </para>
219 <para>
220 <programlisting>"Filesystem" = "msdos|win95|unix"</programlisting>
221 Sets up the way Wine looks at files on the drive.
222 </para>
224 <variablelist>
225 <varlistentry>
226 <term><literal>msdos</literal></term>
227 <listitem>
228 <para>
229 Case insensitive filesystem. Alike to DOS and
230 Windows 3.x. <literal>8.3</literal> is the maximum
231 length of files (eightdot.123) - longer ones will be
232 truncated. (NOTE: this is a very bad choice if you
233 plan on running apps that use long filenames. win95
234 should work fine with apps that were designed to run
235 under the msdos system. In other words, you might
236 not want to use this.)
237 </para>
238 </listitem>
239 </varlistentry>
240 <varlistentry>
241 <term><literal>win95</literal></term>
242 <listitem>
243 <para>
244 Case insensitive. Alike to Windows 9x/NT 4. This is
245 the long filename filesystem you are probably used
246 to working with. The filesystem of choice for most
247 applications to be run under wine. PROBABLY THE ONE
248 YOU WANT!
249 </para>
250 </listitem>
251 </varlistentry>
252 <varlistentry>
253 <term><literal>unix</literal></term>
254 <listitem>
255 <para>
256 Case sensitive. This filesystem has almost no use
257 (Windows apps expect case insensitive filenames).
258 Try it if you dare, but win95 is a much better
259 choice.
260 </para>
261 </listitem>
262 </varlistentry>
263 </variablelist>
265 <programlisting>"Device" = "/dev/xx"</programlisting>
266 <para>
267 Use this ONLY for floppy and cdrom devices. Using it on
268 Extended2 partitions can have dire results (when a windows
269 app tries to do a lowlevel write, they do it in a FAT way
270 -- FAT does not mix with Extended2).
271 </para>
272 <note>
273 <para>
274 This setting is not really important; almost all apps
275 will have no problem if it remains unspecified. For
276 CD-ROMs you might want to add it to get automatic label
277 detection, though. If you are unsure about specifying
278 device names, just leave out this setting for your
279 drives.
280 </para>
281 </note>
282 <para>
283 Here is a setup for Drive X, a generic hard drive:
284 <programlisting>
285 [Drive X]
286 "Path" = "/dos-a"
287 "Type" = "hd"
288 "Label" = "Hard Drive"
289 "Filesystem" = "win95"
290 This is a setup for Drive X, a generic CD-ROM drive:
291 [Drive X]
292 "Path" = "/dos-d"
293 "Type" = "cdrom"
294 "Label" = "Total Annihilation"
295 "Filesystem" = "win95"
296 "Device" = "/dev/hdc"
297 And here is a setup for Drive X, a generic floppy drive:
298 [Drive X]
299 "Type" = "floppy"
300 "Path" = "/mnt/floppy"
301 "Label" = "Floppy Drive"
302 "Serial" = "87654321"
303 "Filesystem" = "win95"
304 "Device" = "/dev/fd0"
305 </programlisting>
306 </para>
307 </sect3>
309 <sect3>
310 <title>The [wine] Section </title>
311 <para>
312 The [wine] section of the configuration file contains all kinds
313 of general settings for Wine. When specifying the directories
314 for the directory related settings, make them as they would
315 appear in wine. If your drive <medialabel>C</medialabel>
316 has a path of <filename>/dos</filename>, and your
317 <filename>windows</filename> directory is located in
318 <filename>/dos/windows</filename>, then use:
319 <programlisting>"Windows" = "c:\\windows"</programlisting>
320 </para>
321 <para>
322 This sets up the <filename>windows</filename> directory.
323 Make one if you don't already have one. NO TRAILING SLASH
324 (NOT <filename>C:\\windows\</filename>)!
325 </para>
326 <para>
327 <programlisting>"System" = "c:\\windows\\system"</programlisting>
328 This sets up where the windows system files are. Should
329 reside in the directory used for the
330 <literal>Windows</literal> setting. If you don't have
331 <filename>windows</filename> then this is where the system
332 files will go. Again, NO TRAILING SLASH!
333 </para>
334 <para>
335 <programlisting>"Temp" = "c:\\temp"</programlisting> This should
336 be the directory you want your temp files stored in. YOU
337 MUST HAVE WRITE ACCESS TO IT.
338 </para>
339 <para>
340 <programlisting>
341 "Path" = "c:\\windows;c:\\windows\\system;c:\\blanco"
342 </programlisting>
343 </para>
344 <para>
345 Behaves like the <envar>PATH</envar> setting on UNIX
346 boxes. When wine is run like <userinput>wine
347 sol.exe</userinput>, if <filename>sol.exe</filename>
348 resides in a directory specified in the
349 <literal>Path</literal> setting, wine will run it (Of
350 course, if <filename>sol.exe</filename> resides in the
351 current directory, wine will run that one). Make sure it
352 always has your <filename>windows</filename> directory and
353 system directory (For this setup, it must have
354 <filename>"c:\\windows;c:\\windows\\system"</filename>).
355 </para>
356 <para>
357 <programlisting>"GraphicsDriver" = "x11drv|ttydrv"</programlisting>
358 Sets the graphics driver to use for Wine output.
359 x11drv is for X11 output, ttydrv is for text console output.
360 WARNING: if you use ttydrv here, then you won't be able to run
361 any Windows GUI programs. Thus this option is mainly interesting
362 for e.g. embedded use of Wine in web server scripts.
363 </para>
364 <para>
365 <programlisting>"Printer" = "off|on"</programlisting> Tells wine
366 whether to allow printing via printer drivers to work.
367 This option isn't needed for our builtin psdrv printer driver
368 at all.
369 Using these things are pretty alpha, so you might want to
370 watch out. Some people might find it useful, however. If
371 you're not planning on working on printing via windows printer
372 drivers, don't even add this to your wine config file
373 (It probably isn't already in it).
374 Check out the [spooler] and [parallelports] sections too.
375 </para>
376 <para>
377 <programlisting>"ShellLinker" = "wineshelllink"</programlisting>
378 This setting specifies the shell linker script to use for setting
379 up Windows icons in e.g. KDE or Gnome that are given by programs
380 making use of appropriate shell32.dll functionality to create
381 icons on the desktop/start menu during installation.
382 </para>
383 <para>
384 <programlisting>"ShowDirSymlinks" = "1"</programlisting>
385 Wine doesn't pass directory symlinks to Windows programs by
386 default, as doing so may crash some programs that do
387 recursive lookups of whole subdirectory trees
388 whenever a directory symlink points back to itself or one of its
389 parent directories.
390 That's why we disallowed the use of directory symlinks
391 and added this setting to reenable ("1") this functionality.
392 </para>
393 <para>
394 <programlisting>"SymbolTableFile" = "wine.sym"</programlisting>
395 Sets up the symbol table file for the wine debugger. You
396 probably don't need to fiddle with this. May be useful if
397 your wine is stripped.
398 </para>
399 </sect3>
401 <sect3>
402 <title>Introduction To DLL Sections</title>
403 <para>
404 There are a few things you will need to know before
405 configuring the DLL sections in your wine configuration
406 file.
407 </para>
408 <sect4>
409 <title>Windows DLL Pairs</title>
410 <para>
411 Most windows DLL's have a win16 (Windows 3.x) and win32
412 (Windows 9x/NT) form. The combination of the win16 and
413 win32 DLL versions are called the "DLL pair". This is a
414 list of the most common pairs:
415 </para>
417 <informaltable>
418 <tgroup cols="3">
419 <thead>
420 <row>
421 <entry>Win16</entry>
422 <entry>Win32</entry>
423 <entry>
424 Native
425 <footnote>
426 <para>
427 Is it possible to use native dll with wine?
428 (See next section)
429 </para>
430 </footnote>
431 </entry>
432 </row>
433 </thead>
434 <tbody>
435 <row>
436 <entry>KERNEL</entry>
437 <entry>KERNEL32</entry>
438 <entry>No!</entry>
439 </row>
440 <row>
441 <entry>USER</entry>
442 <entry>USER32</entry>
443 <entry>No!</entry>
444 </row>
445 <row>
446 <entry>SHELL</entry>
447 <entry>SHELL32</entry>
448 <entry>Yes</entry>
449 </row>
450 <row>
451 <entry>GDI</entry>
452 <entry>GDI32</entry>
453 <entry>No!</entry>
454 </row>
455 <row>
456 <entry>COMMDLG</entry>
457 <entry>COMDLG32</entry>
458 <entry>Yes</entry>
459 </row>
460 <row>
461 <entry>VER</entry>
462 <entry>VERSION</entry>
463 <entry>Yes</entry>
464 </row>
465 </tbody>
466 </tgroup>
467 </informaltable>
468 </sect4>
470 <sect4>
471 <title>Different Forms Of DLL's</title>
472 <para>
473 There are a few different forms of DLL's wine can load:
474 <variablelist>
475 <varlistentry>
476 <term>native</term>
477 <listitem><para>
478 The DLL's that are included with windows. Many
479 windows DLL's can be loaded in their native
480 form. Many times these native versions work
481 better than their non-Microsoft equivalent --
482 other times they don't.
483 </para></listitem>
484 </varlistentry>
485 <varlistentry>
486 <term>elfdll</term>
487 <listitem><para>
488 ELF encapsulated windows DLL's. This is currently
489 experimental (Not working yet).
490 </para></listitem>
491 </varlistentry>
492 <varlistentry>
493 <term>so</term>
494 <listitem><para>
495 Native ELF libraries. Will not work yet.
496 </para></listitem>
497 </varlistentry>
498 <varlistentry>
499 <term>builtin</term>
500 <listitem><para>
501 The most common form of DLL loading. This is
502 what you will use if the DLL is error-prone in
503 native form (KERNEL for example), you don't have
504 the native DLL, or you just want to be
505 Microsoft-free.
506 </para></listitem>
507 </varlistentry>
508 </variablelist>
509 </para>
510 </sect4>
511 </sect3>
513 <sect3>
514 <title>The [DllDefaults] Section</title>
515 <para>
516 These settings provide wine's default handling of DLL loading.
517 </para>
518 <para>
519 <programlisting>"DefaultLoadOrder" =" native, so, builtin"</programlisting>
520 </para>
521 <para>
522 This setting is a comma-delimited list of the order in
523 which to attempt loading DLLs. If the first option fails,
524 it will try the second, and so on. The order specified
525 above is probably the best in most conditions.
526 </para>
527 </sect3>
529 <sect3>
530 <title>The [DllPairs] Section</title>
531 <para>
532 At one time, there was a section called [DllPairs] in the
533 default configuration file, but this has been obsoleted
534 because the pairing information has now been embedded into
535 Wine itself. (The purpose of this section was merely to be
536 able to issue warnings if the user attempted to pair
537 codependent 16-bit/32-bit DLLs of different types.) If you
538 still have this in your <filename>wine.conf</filename> or
539 <filename>~/.wine/config</filename>, you may safely delete it.
540 </para>
541 </sect3>
543 <sect3>
544 <title>The [DllOverrides] Section</title>
545 <para>
546 The format for this section is the same for each line:
547 <programlisting>
548 &lt;DLL>{,&lt;DLL>,&lt;DLL>...} = &lt;FORM>{,&lt;FORM>,&lt;FORM>...}
549 </programlisting>
550 </para>
551 <para>
552 For example, to load builtin KERNEL pair (case doesn't
553 matter here):
554 <programlisting>
555 "kernel,kernel32" = "builtin"
556 </programlisting>
557 </para>
558 <para>
559 To load the native COMMDLG pair, but if that doesn't work
560 try builtin:
561 <programlisting>
562 "commdlg,comdlg32" = "native,builtin"
563 </programlisting>
564 </para>
565 <para>
566 To load the native COMCTL32:
567 <programlisting>
568 "comctl32" = "native"
569 </programlisting>
570 </para>
571 <para>
572 Here is a good generic setup (As it is defined in config
573 that was included with your wine package):
574 <programlisting>
575 [DllOverrides]
576 "commdlg" = "builtin, native"
577 "comdlg32" = "builtin, native"
578 "ver" = "builtin, native"
579 "version" = "builtin, native"
580 "shell" = "builtin, native"
581 "shell32" = "builtin, native"
582 "lzexpand" = "builtin, native"
583 "lz32" = "builtin, native"
584 "comctl32" = "builtin, native"
585 "commctrl" = "builtin, native"
586 "wsock32" = "builtin"
587 "winsock" = "builtin"
588 "advapi32" = "builtin, native"
589 "crtdll" = "builtin, native"
590 "mpr" = "builtin, native"
591 "winspool.drv" = "builtin, native"
592 "ddraw" = "builtin, native"
593 "dinput" = "builtin, native"
594 "dsound" = "builtin, native"
595 "mmsystem" = "builtin"
596 "winmm" = "builtin"
597 "msvcrt" = "native, builtin"
598 "msvideo" = "builtin, native"
599 "msvfw32" = "builtin, native"
600 "mcicda.drv" = "builtin, native"
601 "mciseq.drv" = "builtin, native"
602 "mciwave.drv" = "builtin, native"
603 "mciavi.drv" = "native, builtin"
604 "mcianim.drv" = "native, builtin"
605 "msacm.drv" = "builtin, native"
606 "msacm" = "builtin, native"
607 "msacm32" = "builtin, native"
608 "midimap.drv" = "builtin, native"
609 "wnaspi32" = "builtin"
610 "icmp" = "builtin"
611 </programlisting>
612 </para>
613 <note>
614 <para>
615 You see that elfdll or so is the first option for a few
616 of these dll's. This will fail for you, but you won't
617 notice it as wine will just use the second or third
618 option.
619 </para>
620 </note>
621 </sect3>
623 <sect3>
624 <title>The [fonts] Section</title>
625 <para>
626 This section sets up wine's font handling.
627 </para>
628 <para>
629 <programlisting>"Resolution" = "96"</programlisting>
630 </para>
631 <para>
632 Since the way X handles fonts is different from the way
633 Windows does, wine uses a special mechanism to deal with
634 them. It must scale them using the number defined in the
635 "Resolution" setting. 60-120 are reasonable values, 96 is
636 a nice in the middle one. If you have the real windows
637 fonts available (<filename>&lt;dirs to
638 wine>/documentation/ttfserver</filename> and
639 <filename>fonts</filename>), this parameter will not be as
640 important. Of course, it's always good to get your X fonts
641 working acceptably in wine.
642 </para>
643 <para>
644 <programlisting>"Default" = "-adobe-times-"</programlisting>
645 The default font wine uses. Fool around with it if you'd like.
646 </para>
647 <para>
648 OPTIONAL:
649 </para>
650 <para>
651 The <literal>Alias</literal> setting allows you to map an X font to a font
652 used in wine. This is good for apps that need a special font you don't have,
653 but a good replacement exists. The syntax is like so:
654 <programlisting>
655 "AliasX" = "[Fake windows name],[Real X name]"&lt;,optional "masking" section>
656 </programlisting>
657 </para>
658 <para>
659 Pretty straightforward. Replace "AliasX" with "Alias0",
660 then "Alias1" and so on. The fake windows name is the name
661 that the font will be under a windows app in wine. The
662 real X name is the font name as seen by X (Run
663 "xfontsel"). The optional "masking" section allows you to
664 utilize the fake windows name you define. If it is not
665 used, then wine will just try to extract the fake windows
666 name itself and not use the value you enter.
667 </para>
668 <para>
669 Here is an example of an alias without masking. The font will show up in windows
670 apps as "Google". When defining an alias in a config file, forget about my
671 comment text (The "&lt;-- blah" stuff)
672 <programlisting>
673 "Alias0" = "Foo,--google-" &lt;
674 </programlisting>
675 </para>
676 <para>
677 Here is an example with masking enabled. The font will show up as "Foo" in
678 windows apps.
679 <programlisting>
680 "Alias1" = "Foo,--google-,subst"
681 </programlisting>
682 </para>
683 <para>
684 For more info check out <filename>&lt;dirs to wine>/documentation/fonts</filename>
685 </para>
686 </sect3>
688 <sect3>
689 <title>The [serialports], [parallelports], [spooler], and [ports] Sections</title>
690 <para>
691 Even though it sounds like a lot of sections, these are
692 all closely related. They are all for communications and
693 parallel ports.
694 </para>
695 <para>
696 The [serialports] section tells wine what serial ports it
697 is allowed to use.
698 <programlisting>"ComX" = "/dev/cuaY"</programlisting>
699 </para>
700 <para>
701 Replace <literal>X</literal> with the number of the COM
702 port in Windows (1-8) and <literal>Y</literal> with the
703 number of it in <literal>X</literal> (Usually the number
704 of the port in Windows minus 1). <literal>ComX</literal>
705 can actually equal any device
706 (<medialabel>/dev/modem</medialabel> is acceptable). It is
707 not always necessary to define any COM ports (An optional
708 setting). Here is an example:
709 <programlisting>"Com1" = "/dev/cua0"</programlisting>
710 </para>
711 <para>
712 Use as many of these as you like in the section to define
713 all of the COM ports you need.
714 </para>
715 <para>
716 The [parallelports] section sets up any parallel ports
717 that will be allowed access under wine.
718 <programlisting>"LptX" = "/dev/lpY"</programlisting>
719 </para>
720 <para>
721 Sounds familiar? Syntax is just like the COM port setting.
722 Replace <literal>X</literal> with a value from 1-4 as it
723 is in Windows and <literal>Y</literal> with a value from
724 0-3 (<literal>Y</literal> is usually the value in windows
725 minus 1, just like for COM ports). You don't always need
726 to define a parallel port (AKA, it's optional). As with
727 the other section, LptX can equal any device (Maybe
728 <medialabel>/dev/printer</medialabel>). Here is an
729 example: <programlisting>"Lpt1" = "/dev/lp0"</programlisting>
730 </para>
731 <para>
732 The [spooler] section will inform wine where to spool
733 print jobs. Use this if you want to try printing. Wine
734 docs claim that spooling is "rather primitive" at this
735 time, so it won't work perfectly. IT IS OPTIONAL. The only
736 setting you use in this section works to map a port (LPT1,
737 for example) to a file or a command. Here is an example,
738 mapping LPT1 to the file <filename>out.ps</filename>:
739 <programlisting>"LPT1:" = "out.ps"</programlisting>
740 </para>
741 <para>
742 The following command maps printing jobs to LPT1 to the
743 command <command>lpr</command>. Notice the |:
744 <programlisting>"LPT1:" = "|lpr"</programlisting>
745 </para>
746 <para>
747 The [ports] section is usually useful only for people who
748 need direct port access for programs requiring dongles or
749 scanners. IF YOU DON'T NEED IT, DON'T USE IT!
750 </para>
751 <para>
752 <programlisting>"read" = "0x779,0x379,0x280-0x2a0"</programlisting>
753 Gives direct read access to those IO's.
754 </para>
755 <para>
756 <programlisting>"write" = "0x779,0x379,0x280-0x2a0"</programlisting>
757 Gives direct write access to those IO's. It's probably a
758 good idea to keep the values of the
759 <literal>read</literal> and <literal>write</literal>
760 settings the same. This stuff will only work when you're
761 root.
762 </para>
763 </sect3>
765 <sect3>
766 <title>The [spy], [Registry], [tweak.layout], and [programs] Sections</title>
767 <para>
768 [spy] is used to include or exclude debug messages, and to
769 output them to a file. The latter is rarely used. THESE
770 ARE ALL OPTIONAL AND YOU PROBABLY DON'T NEED TO ADD OR
771 REMOVE ANYTHING IN THIS SECTION TO YOUR CONFIG.
772 </para>
773 <para>
774 <programlisting>"File" = "/blanco"</programlisting>
775 Sets the logfile for wine. Set to CON to log to standard out.
776 THIS IS RARELY USED.
777 </para>
778 <para>
779 <programlisting>"Exclude" = "WM_SIZE;WM_TIMER;"</programlisting>
780 Excludes debug messages about <constant>WM_SIZE</constant>
781 and <constant>WM_TIMER</constant> in the logfile.
782 </para>
783 <para>
784 <programlisting>"Include" = "WM_SIZE;WM_TIMER;"</programlisting>
785 Includes debug messages about <constant>WM_SIZE</constant>
786 and <constant>WM_TIMER</constant> in the logfile.
787 </para>
788 <para>
789 [Registry] can be used to tell wine where your old windows
790 registry files exist. This section is completely optional
791 and useless to people using wine without an existing
792 windows installation.
793 </para>
794 <para>
795 <programlisting>"UserFileName" = "/dirs/to/user.reg"</programlisting>
796 The location of your old <filename>user.reg</filename> file.
797 </para>
798 <para>
799 [tweak.layout] is devoted to wine's look. There is only
800 one setting for it.
801 </para>
802 <para>
803 <programlisting>"WineLook" = "win31|win95|win98"</programlisting>
804 Will change the look of wine from Windows 3.1 to Windows 95.
805 The <literal>win98</literal> setting behaves
806 just like <literal>win95</literal> most of the time.
807 </para>
808 <para>
809 [programs] can be used to say what programs run under
810 special conditions.
811 </para>
812 <para>
813 <programlisting>"Default" = "/program/to/execute.exe"</programlisting>
814 Sets the program to be run if wine is started without specifying a program.
815 </para>
816 <para>
817 <programlisting>"Startup" = "/program/to/execute.exe"</programlisting>
818 Sets the program to automatically be run at startup every time.
819 </para>
820 </sect3>
822 <sect3>
823 <title>The [WinMM] Section</title>
824 <para>
825 [WinMM] is used to define which multimedia drivers have to be loaded. Since
826 those drivers may depend on the multimedia interfaces available on your sustem
827 (OSS, Alsa... to name a few), it's needed to be able to configure which driver
828 has to be loaded.
829 </para>
831 <para>
832 The content of the section looks like:
833 <programlisting>
834 [WinMM]
835 "Drivers" = "wineoss.drv"
836 "WaveMapper" = "msacm.drv"
837 "MidiMapper" = "midimap.drv"
838 </programlisting>
839 All the keys must be defined:
840 <itemizedlist>
841 <listitem>
842 <para>
843 The "Drivers" key is a ';' separated list of modules name, each of
844 them containing a low level driver. All those drivers will be loaded
845 when MMSYSTEM/WINMM is started and will provide their inner features.
846 </para>
847 </listitem>
848 <listitem>
849 <para>
850 The "WaveMapper" represents the name of the module containing the Wave
851 Mapper driver. Only one wave mapper can be defined in the system.
852 </para>
853 </listitem>
854 <listitem>
855 <para>
856 The "MidiMapper" represents the name of the module containing the Midi
857 Mapper driver. Only one Midi mapper can be defined in the system.
858 </para>
859 </listitem>
860 </itemizedlist>
861 </para>
862 </sect3>
864 <sect3>
865 <title>The [AppDefaults] Section</title>
866 <para>
867 The section is used to overwrite the setting of this file for a
868 special program with different settings.
869 [AppDefaults] is not the real name of the section. The real name
870 consists of the leading word AppDefaults followed by the name
871 of the executable the section is valid for. The end of the section
872 name is the name of the section of the configuration file its
873 values should be overwritten with different settings. The three
874 parts of the section name are separated by two backslashes.
875 </para>
876 <para>
877 Currently wine supports only overwriting the sections
878 [DllOverrides] and [x11drv].
879 </para>
880 <para>
881 Here is an example that overwrites the normal settings for a
882 program:
883 <programlisting>
884 ;; default settings
885 [x11drv]
886 "Managed" = "Y"
887 "Desktop" = "N"
889 ;; run install in desktop mode
890 [AppDefaults\\install.exe\\x11drv]
891 "Managed" = "N"
892 "Desktop" = "800x600"
893 </programlisting>
894 </para>
895 </sect3>
896 </sect2>
898 <sect2>
899 <title>Where Do I Put It?</title>
900 <para>
901 The wine config file can go in two places.
902 </para>
903 <variablelist>
904 <varlistentry>
905 <term><filename>/usr/local/etc/wine.conf</filename></term>
906 <listitem><para>
907 A systemwide config file, used for anyone who doesn't
908 have their own. NOTE: this file is currently unused as a
909 new global configuration mechanism is not in place at this
910 time
911 </para></listitem>
912 </varlistentry>
913 <varlistentry>
914 <term><filename>$HOME/.wine/config</filename></term>
915 <listitem><para>
916 Your own config file, that only is used for your user.
917 </para></listitem>
918 </varlistentry>
919 </variablelist>
920 <para>
921 So copy your version of the <filename>wine.conf</filename> file to
922 <filename>/usr/local/etc/wine.conf</filename> or
923 <filename>$HOME/.wine/config</filename> for wine to recognize
924 it.
925 </para>
926 </sect2>
928 <sect2>
929 <title>What If It Doesn't Work?</title>
930 <para>
931 There is always a chance that things will go wrong. If the
932 unthinkable happens report the problem to
933 <ulink url="http://bugs.winehq.com/">Wine Bugzilla</ulink>,
934 try the newsgroup
935 <systemitem>comp.emulators.ms-windows.wine</systemitem>,
936 or the IRCnet channel <systemitem>#WineHQ</systemitem> found on
937 irc.stealth.net:6668, or connected servers.
938 Make sure that you have looked over this document thoroughly,
939 and have also read:
940 </para>
941 <itemizedlist>
942 <listitem>
943 <para><filename>README</filename></para>
944 </listitem>
945 <listitem>
946 <para>
947 <filename>http://www.la-sorciere.de/wine/index.html</filename>
948 (optional but recommended)
949 </para>
950 </listitem>
951 </itemizedlist>
952 <para>
953 If indeed it looks like you've done your research, be
954 prepared for helpful suggestions. If you haven't, brace
955 yourself for heaving flaming.
956 </para>
957 </sect2>
958 </sect1>
960 <sect1 id="win95look">
961 <title>Win95/98 Look</title>
962 <para>
963 Written by &name-david-cuthbert; <email>&email-david-cuthbert;</email>
964 </para>
965 <para>
966 (Extracted from <filename>wine/documentation/win95look</filename>)
967 </para>
968 <para>
969 Win95/Win98 interface code is being introduced.
970 </para>
971 <para>
972 Instead of compiling Wine for Win3.1 vs. Win95 using
973 <constant>#define</constant> switches, the code now looks in a
974 special [Tweak.Layout] section of
975 <filename>~/.wine/config</filename> for a
976 <literal>"WineLook" = "Win95"</literal> or
977 <literal>"WineLook" = "Win98"</literal> entry.
978 </para>
979 <para>
980 A few new sections and a number of entries have been added to
981 the <filename>~/.wine/config</filename> file -- these are for
982 debugging the Win95 tweaks only and may be removed in a future
983 release! These entries/sections are:
984 </para>
985 <programlisting>
986 [Tweak.Fonts]
987 "System.Height" = "&lt;point size>" # Sets the height of the system typeface
988 "System.Bold" = "[true|false]" # Whether the system font should be boldfaced
989 "System.Italic" = "[true|false]" # Whether the system font should be italicized
990 "System.Underline" = "[true|false]" # Whether the system font should be underlined
991 "System.StrikeOut" = "[true|false]" # Whether the system font should be struck out
992 "OEMFixed.xxx" # Same parameters for the OEM fixed typeface
993 "AnsiFixed.xxx" # Same parameters for the Ansi fixed typeface
994 "AnsiVar.xxx" # Same parameters for the Ansi variable typeface
995 "SystemFixed.xxx" # Same parameters for the System fixed typeface
997 [Tweak.Layout]
998 "WineLook" = "[Win31|Win95|Win98]" # Changes Wine's look and feel
999 </programlisting>
1000 </sect1>
1002 <sect1 id="x11drv">
1003 <title>Configuring the x11drv Driver</title>
1005 <para>
1006 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
1007 </para>
1008 <para>
1009 (Extracted from <filename>wine/documentation/x11drv</filename>)
1010 </para>
1012 <para>
1013 Most Wine users run Wine under the windowing system known as
1014 X11. During most of Wine's history, this was the only display
1015 driver available, but in recent years, parts of Wine has been
1016 reorganized to allow for other display drivers (although the
1017 only alternative currently available is Patrik Stridvall's
1018 ncurses-based ttydrv, which he claims works for displaying
1019 calc.exe). The display driver is chosen with the
1020 <literal>GraphicsDriver</literal> option in the [wine] section
1021 of <filename>~/.wine/config</filename>, but I will only cover the
1022 x11drv driver in this article.
1023 </para>
1025 <sect2>
1026 <title>x11drv modes of operation</title>
1028 <para>
1029 <!-- FIXME: This is outdated -->
1030 Note: This is now all done in the config file. Needs an update...
1031 </para>
1033 <para>
1034 The x11drv driver consists of two conceptually distinct
1035 pieces, the graphics driver (GDI part), and the windowing
1036 driver (USER part). Both of these are linked into the
1037 <filename>libx11drv.so</filename> module, though (which you
1038 load with the <literal>GraphicsDriver</literal> option). In
1039 Wine, running on X11, the graphics driver must draw on
1040 drawables (window interiors) provided by the windowing
1041 driver. This differs a bit from the Windows model, where the
1042 windowing system creates and configures device contexts
1043 controlled by the graphics driver, and applications are
1044 allowed to hook into this relationship anywhere they like.
1045 Thus, to provide any reasonable tradeoff between
1046 compatibility and usability, the x11drv has three different
1047 modes of operation.
1048 </para>
1050 <variablelist>
1051 <varlistentry>
1052 <term>Unmanaged/Normal</term>
1053 <listitem>
1054 <para>
1055 The default. Window-manager-independent (any running
1056 window manager is ignored completely). Window
1057 decorations (title bars, borders, etc) are drawn by
1058 Wine to look and feel like the real Windows. This is
1059 compatible with applications that depend on being able
1060 to compute the exact sizes of any such decorations, or
1061 that want to draw their own.
1062 </para>
1063 </listitem>
1064 </varlistentry>
1065 <varlistentry>
1066 <term>Managed</term>
1067 <listitem>
1068 <para>
1069 Specified by using the
1070 <parameter>--managed</parameter> command-line option
1071 or the <literal>Managed</literal>
1072 <filename>wine.conf</filename> option (see below).
1073 Ordinary top-level frame windows with thick borders,
1074 title bars, and system menus will be managed by your
1075 window manager. This lets these applications integrate
1076 better with the rest of your desktop, but may not
1077 always work perfectly. (A rewrite of this mode of
1078 operation, to make it more robust and less patchy, is
1079 highly desirable, though, and is planned to be done
1080 before the Wine 1.0 release.)
1081 </para>
1082 </listitem>
1083 </varlistentry>
1084 <varlistentry>
1085 <term>Desktop-in-a-Box</term>
1086 <listitem>
1087 <para>
1088 Specified by using the
1089 <parameter>--desktop</parameter> command-line option
1090 (with a geometry, e.g. <parameter>--desktop
1091 800x600</parameter> for a such-sized desktop, or
1092 even <parameter>--desktop 800x600+0+0</parameter> to
1093 automatically position the desktop at the upper-left
1094 corner of the display). This is the mode most
1095 compatible with the Windows model. All application
1096 windows will just be Wine-drawn windows inside the
1097 Wine-provided desktop window (which will itself be
1098 managed by your window manager), and Windows
1099 applications can roam freely within this virtual
1100 workspace and think they own it all, without
1101 disturbing your other X apps.
1102 </para>
1103 </listitem>
1104 </varlistentry>
1105 </variablelist>
1106 </sect2>
1108 <sect2>
1109 <title>The [x11drv] section</title>
1111 <variablelist>
1112 <varlistentry>
1113 <term>AllocSystemColors</term>
1114 <listitem>
1115 <para>
1116 Applies only if you have a palette-based display, i.e.
1117 if your X server is set to a depth of 8bpp, and if you
1118 haven't requested a private color map. It specifies
1119 the maximum number of shared colormap cells (palette
1120 entries) Wine should occupy. The higher this value,
1121 the less colors will be available to other
1122 applications.
1123 </para>
1124 </listitem>
1125 </varlistentry>
1126 <varlistentry>
1127 <term>PrivateColorMap</term>
1128 <listitem>
1129 <para>
1130 Applies only if you have a palette-based display, i.e.
1131 if your X server is set to a depth of 8bpp. It
1132 specifies that you don't want to use the shared color
1133 map, but a private color map, where all 256 colors are
1134 available. The disadvantage is that Wine's private
1135 color map is only seen while the mouse pointer is
1136 inside a Wine window, so psychedelic flashing and
1137 funky colors will become routine if you use the mouse
1138 a lot.
1139 </para>
1140 </listitem>
1141 </varlistentry>
1142 <varlistentry>
1143 <term>PerfectGraphics</term>
1144 <listitem>
1145 <para>
1146 This option only determines whether fast X11 routines
1147 or exact Wine routines will be used for certain ROP
1148 codes in blit operations. Most users won't notice any
1149 difference.
1150 </para>
1151 </listitem>
1152 </varlistentry>
1153 <varlistentry>
1154 <term>ScreenDepth</term>
1155 <listitem>
1156 <para>
1157 Applies only to multi-depth displays. It specifies
1158 which of the available depths Wine should use (and
1159 tell Windows apps about).
1160 </para>
1161 </listitem>
1162 </varlistentry>
1163 <varlistentry>
1164 <term>Display</term>
1165 <listitem>
1166 <para>
1167 This specifies which X11 display to use, and if
1168 specified, will override both the
1169 <envar>DISPLAY</envar> environment variable and the
1170 <parameter>--display</parameter> command-line option.
1171 </para>
1172 </listitem>
1173 </varlistentry>
1174 <varlistentry>
1175 <term>Managed</term>
1176 <listitem>
1177 <para>
1178 Wine can let frame windows be managed by your window
1179 manager. This option specifies whether you want that
1180 by default.
1181 </para>
1182 </listitem>
1183 </varlistentry>
1184 <varlistentry>
1185 <term>UseDGA</term>
1186 <listitem>
1187 <para>
1188 This specifies whether you want DirectDraw to use
1189 XFree86's <firstterm>Direct Graphics
1190 Architecture</firstterm> (DGA), which is able to
1191 take over the entire display and run the game
1192 full-screen at maximum speed. (With DGA1 (XFree86
1193 3.x), you still have to configure the X server to the
1194 game's requested bpp first, but with DGA2 (XFree86
1195 4.x), runtime depth-switching may be possible,
1196 depending on your driver's capabilities.) But be aware
1197 that if Wine crashes while in DGA mode, it may not be
1198 possible to regain control over your computer without
1199 rebooting. DGA normally requires either root
1200 privileges or read/write access to
1201 <filename>/dev/mem</filename>.
1202 </para>
1203 </listitem>
1204 </varlistentry>
1205 <varlistentry>
1206 <term>UseXShm</term>
1207 <listitem>
1208 <para>
1209 If you don't want DirectX to use DGA, you can at least
1210 use X Shared Memory extensions (XShm). It is much
1211 slower than DGA, since the app doesn't have direct
1212 access to the physical frame buffer, but using shared
1213 memory to draw the frame is at least faster than
1214 sending the data through the standard X11 socket, even
1215 though Wine's XShm support is still known to crash
1216 sometimes.
1217 </para>
1218 </listitem>
1219 </varlistentry>
1220 <varlistentry>
1221 <term>DXGrab</term>
1222 <listitem>
1223 <para>
1224 If you don't use DGA, you may want an alternative
1225 means to convince the mouse cursor to stay within the
1226 game window. This option does that. Of course, as with
1227 DGA, if Wine crashes, you're in trouble (although not
1228 as badly as in the DGA case, since you can still use
1229 the keyboard to get out of X).
1230 </para>
1231 </listitem>
1232 </varlistentry>
1233 <varlistentry>
1234 <term>DesktopDoubleBuffered</term>
1235 <listitem>
1236 <para>
1237 Applies only if you use the
1238 <parameter>--desktop</parameter> command-line option
1239 to run in a desktop window. Specifies whether to
1240 create the desktop window with a double-buffered
1241 visual, something most OpenGL games need to run
1242 correctly.
1243 </para>
1244 </listitem>
1245 </varlistentry>
1246 <varlistentry>
1247 <term>TextCP</term>
1248 <listitem>
1249 <para>
1250 <!-- FIXME: To be documented -->
1251 To be documented...
1252 </para>
1253 </listitem>
1254 </varlistentry>
1255 <varlistentry>
1256 <term>XVideoPort</term>
1257 <listitem>
1258 <para>
1259 <!-- FIXME: To be documented -->
1260 To be documented...
1261 </para>
1262 </listitem>
1263 </varlistentry>
1264 <varlistentry>
1265 <term>Synchronous</term>
1266 <listitem>
1267 <para>
1268 <!-- FIXME: To be documented -->
1269 To be documented...
1270 </para>
1271 </listitem>
1272 </varlistentry>
1273 </variablelist>
1274 </sect2>
1275 </sect1>
1277 &registry;
1279 <sect1 id="cdrom-labels">
1280 <sect1info>
1281 <authorgroup>
1282 <author>
1283 <firstname>Petr</firstname>
1284 <surname>Tomasek</surname>
1285 <affiliation>
1286 <address><email>&email-petr-tomasek;</email></address>
1287 </affiliation>
1288 <contrib>Nov 14 1999</contrib>
1289 </author>
1290 <author>
1291 <firstname>Andreas</firstname>
1292 <surname>Mohr</surname>
1293 <affiliation>
1294 <address><email>&email-andreas-mohr;</email></address>
1295 </affiliation>
1296 <contrib>Jan 25 2000</contrib>
1297 </author>
1298 </authorgroup>
1299 </sect1info>
1301 <title>Drive labels and serial numbers with wine</title>
1302 <para>
1303 Written by &name-petr-tomasek; <email>&email-petr-tomasek;</email>
1304 Nov 14 1999
1305 </para>
1306 <para>
1307 Changes by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1308 Jan 25 2000
1309 </para>
1310 <para>
1311 (Extracted from <filename>wine/documentation/cdrom-labels</filename>)
1312 </para>
1313 <para>
1314 Until now, your only possibility of specifying drive volume
1315 labels and serial numbers was to set them manually in the wine
1316 config file. By now, wine can read them directly from the
1317 device as well. This may be useful for many Win 9x games or
1318 for setup programs distributed on CD-ROMs that check for
1319 volume label.
1320 </para>
1322 <sect2>
1323 <title>What's Supported?</title>
1325 <informaltable frame="all">
1326 <tgroup cols="3">
1327 <thead>
1328 <row>
1329 <entry>File System</entry>
1330 <entry>Types</entry>
1331 <entry>Comment</entry>
1332 </row>
1333 </thead>
1334 <tbody>
1335 <row>
1336 <entry>FAT systems</entry>
1337 <entry>hd, floppy</entry>
1338 <entry>reads labels and serial numbers</entry>
1339 </row>
1340 <row>
1341 <entry>ISO9660</entry>
1342 <entry>cdrom</entry>
1343 <entry>reads labels and serial numbers (not mixed-mode CDs yet !)</entry>
1344 </row>
1345 </tbody>
1346 </tgroup>
1347 </informaltable>
1349 </sect2>
1351 <sect2>
1352 <title>How To Set Up?</title>
1353 <para>
1354 Reading labels and serial numbers just works automagically
1355 if you specify a <literal>Device=</literal> line in the
1356 [Drive X] section in your <filename>~/.wine/config</filename>.
1357 Note that the device has to exist and must be accessible if
1358 you do this, though.
1359 </para>
1360 <para>
1361 If you don't do that, then you should give fixed
1362 <literal>"Label" =</literal> or <literal>"Serial" =</literal>
1363 entries in <filename>~./wine/config</filename>, as Wine returns
1364 these entries instead if no device is given. If they don't
1365 exist, then Wine will return default values (label
1366 <literal>Drive X</literal> and serial
1367 <literal>12345678</literal>).
1368 </para>
1369 <para>
1370 If you want to give a <literal>"Device" =</literal> entry
1371 <emphasis>only</emphasis> for drive raw sector accesses,
1372 but not for reading the volume info from the device (i.e. you want
1373 a <emphasis>fixed</emphasis>, preconfigured label), you need
1374 to specify <literal>"ReadVolInfo" = "0"</literal> to tell Wine
1375 to skip the volume reading.
1376 </para>
1377 </sect2>
1379 <sect2>
1380 <title>EXAMPLES</title>
1381 <para>
1382 Here's a simple example of cdrom and floppy; labels will be
1383 read from the device on both cdrom and floppy; serial
1384 numbers on floppy only:
1385 </para>
1386 <screen>
1387 [Drive A]
1388 "Path" = "/mnt/floppy"
1389 "Type" = "floppy"
1390 "Device" = "/dev/fd0"
1391 "Filesystem" = "msdos"
1393 [Drive R]
1394 "Path" = "/mnt/cdrom"
1395 "Type" = "cdrom"
1396 "Device" = "/dev/hda1"
1397 "Filesystem" = "win95"
1398 </screen>
1399 <para>
1400 Here's an example of overriding the CD-ROM label:
1401 </para>
1402 <screen>
1403 [Drive J]
1404 "Path" = "/mnt/cdrom"
1405 "Type" = "cdrom"
1406 "Label" = "X234GCDSE"
1407 ; note that the device isn't really needed here as we have a fixed label
1408 "Device" = "/dev/cdrom"
1409 "Filesystem" = "msdos"
1410 </screen>
1411 </sect2>
1413 <sect2>
1414 <title>Todo / Open Issues</title>
1415 <itemizedlist>
1416 <listitem> <para>
1417 The cdrom label can be read only if the data track of
1418 the disk resides in the first track and the cdrom is
1419 iso9660.
1420 </para> </listitem>
1421 <listitem> <para>
1422 Better checking for FAT superblock (it now checks only
1423 one byte). </para>
1424 </listitem>
1425 <listitem> <para>
1426 Support for labels/serial nums WRITING.
1427 </para> </listitem>
1428 <listitem> <para>
1429 Can the label be longer than 11 chars? (iso9660 has 32
1430 chars).
1431 </para> </listitem>
1432 <listitem> <para>
1433 What about reading ext2 volume label? ....
1434 </para> </listitem>
1435 </itemizedlist>
1436 </sect2>
1437 </sect1>
1439 <sect1 id="dll-config">
1440 <title>DLL configuration</title>
1441 <sect2 id="dll-overrides">
1442 <title>DLL Overrides</title>
1444 <para>
1445 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
1446 </para>
1447 <para>
1448 (Extracted from <filename>wine/documentation/dll-overrides</filename>)
1449 </para>
1451 <para>
1452 The <filename>wine.conf</filename> directives [DllDefaults]
1453 and [DllOverrides] are the subject of some confusion. The
1454 overall purpose of most of these directives are clear enough,
1455 though - given a choice, should Wine use its own built-in
1456 DLLs, or should it use <filename>.DLL</filename> files found
1457 in an existing Windows installation? This document explains
1458 how this feature works.
1459 </para>
1461 <sect3>
1462 <title>DLL types</title>
1463 <variablelist>
1464 <varlistentry>
1465 <term>native</term>
1466 <listitem> <para>
1467 A "native" DLL is a <filename>.DLL</filename> file
1468 written for the real Microsoft Windows.
1469 </para> </listitem>
1470 </varlistentry>
1471 <varlistentry>
1472 <term>builtin</term>
1473 <listitem> <para>
1474 A "builtin" DLL is a Wine DLL. These can either be a
1475 part of <filename>libwine.so</filename>, or more
1476 recently, in a special <filename>.so</filename> file
1477 that Wine is able to load on demand.
1478 </para> </listitem>
1479 </varlistentry>
1480 <varlistentry>
1481 <term>elfdll</term>
1482 <listitem> <para>
1483 An "elfdll" is a Wine <filename>.so</filename> file
1484 with a special Windows-like file structure that is as
1485 close to Windows as possible, and that can also
1486 seamlessly link dynamically with "native" DLLs, by
1487 using special ELF loader and linker tricks. Bertho
1488 Stultiens did some work on this, but this feature has
1489 not yet been merged back into Wine (because of
1490 political reasons and lack of time), so this DLL type
1491 does not exist in the official Wine at this time. In
1492 the meantime, the "builtin" DLL type gained some of
1493 the features of elfdlls (such as dynamic loading), so
1494 it's possible that "elfdll" functionality will be
1495 folded into "builtin" at some point.
1496 </para> </listitem>
1497 </varlistentry>
1498 <varlistentry>
1499 <term>so</term>
1500 <listitem> <para>
1501 A native Unix <filename>.so</filename> file, with
1502 calling convention conversion thunks generated on the
1503 fly as the library is loaded. This is mostly useful
1504 for libraries such as "glide" that have exactly the
1505 same API on both Windows and Unix.
1506 </para> </listitem>
1507 </varlistentry>
1508 </variablelist>
1509 </sect3>
1511 <sect3>
1512 <title>The [DllDefaults] section</title>
1513 <variablelist>
1514 <varlistentry>
1515 <term>DefaultLoadOrder</term>
1516 <listitem> <para>
1517 This specifies in what order Wine should search for
1518 available DLL types, if the DLL in question was not
1519 found in the [DllOverrides] section.
1520 </para> </listitem>
1521 </varlistentry>
1522 </variablelist>
1523 </sect3>
1525 <sect3>
1526 <title>The [DllPairs] section</title>
1527 <para>
1528 At one time, there was a section called [DllPairs] in the
1529 default configuration file, but this has been obsoleted
1530 because the pairing information has now been embedded into
1531 Wine itself. (The purpose of this section was merely to be
1532 able to issue warnings if the user attempted to pair
1533 codependent 16-bit/32-bit DLLs of different types.) If you
1534 still have this in your <filename>wine.conf</filename> or
1535 <filename>~/.wine/config</filename>, you may safely delete it.
1536 </para>
1537 </sect3>
1539 <sect3>
1540 <title>The [DllOverrides] section</title>
1541 <para>
1542 This section specifies how you want specific DLLs to be
1543 handled, in particular whether you want to use "native" DLLs
1544 or not, if you have some from a real Windows configuration.
1545 Because builtins do not mix seamlessly with native DLLs yet,
1546 certain DLL dependencies may be problematic, but workarounds
1547 exist in Wine for many popular DLL configurations. Also see
1548 WWN's [16]Status Page to figure out how well your favorite
1549 DLL is implemented in Wine.
1550 </para>
1551 <para>
1552 It is of course also possible to override these settings by
1553 explictly using Wine's <parameter>--dll</parameter>
1554 command-line option (see the man page for details). Some
1555 hints for choosing your optimal configuration (listed by
1556 16/32-bit DLL pair):
1557 </para>
1558 <variablelist>
1559 <varlistentry>
1560 <term>krnl386, kernel32</term>
1561 <listitem> <para>
1562 Native versions of these will never work, so don't try. Leave
1563 at <literal>builtin</literal>.
1564 </para> </listitem>
1565 </varlistentry>
1566 <varlistentry>
1567 <term>gdi, gdi32</term>
1568 <listitem> <para>
1569 Graphics Device Interface. No effort has been made at trying to
1570 run native GDI. Leave at <literal>builtin</literal>.
1571 </para> </listitem>
1572 </varlistentry>
1573 <varlistentry>
1574 <term>user, user32</term>
1575 <listitem> <para>
1576 Window management and standard controls. It was
1577 possible to use Win95's <literal>native</literal>
1578 versions at some point (if all other DLLs that depend
1579 on it, such as comctl32 and comdlg32, were also run
1580 <literal>native</literal>). However, this is no longer
1581 possible after the Address Space Separation, so leave
1582 at <literal>builtin</literal>.
1583 </para> </listitem>
1584 </varlistentry>
1585 <varlistentry>
1586 <term>ntdll</term>
1587 <listitem> <para>
1588 NT kernel API. Although badly documented, the
1589 <literal>native</literal> version of this will never
1590 work. Leave at <literal>builtin</literal>.
1591 </para> </listitem>
1592 </varlistentry>
1593 <varlistentry>
1594 <term>w32skrnl</term>
1595 <listitem> <para>
1596 Win32s (for Win3.x). The <literal>native</literal>
1597 version will probably never work. Leave at
1598 <literal>builtin</literal>.
1599 </para> </listitem>
1600 </varlistentry>
1601 <varlistentry>
1602 <term>wow32</term>
1603 <listitem> <para>
1604 Win16 support library for NT. The
1605 <literal>native</literal> version will probably never
1606 work. Leave at <literal>builtin</literal>.
1607 </para> </listitem>
1608 </varlistentry>
1609 <varlistentry>
1610 <term>system</term>
1611 <listitem> <para>
1612 Win16 kernel stuff. Will never work
1613 <literal>native</literal>. Leave at
1614 <literal>builtin</literal>.
1615 </para> </listitem>
1616 </varlistentry>
1617 <varlistentry>
1618 <term>display</term>
1619 <listitem> <para>
1620 Display driver. Definitely leave at <literal>builtin</literal>.
1621 </para> </listitem>
1622 </varlistentry>
1623 <varlistentry>
1624 <term>toolhelp</term>
1625 <listitem> <para>
1626 Tool helper routines. This is rarely a source of problems.
1627 Leave at <literal>builtin</literal>.
1628 </para> </listitem>
1629 </varlistentry>
1630 <varlistentry>
1631 <term>ver, version</term>
1632 <listitem> <para>
1633 Versioning. Seldom useful to mess with.
1634 </para> </listitem>
1635 </varlistentry>
1636 <varlistentry>
1637 <term>advapi32</term>
1638 <listitem> <para>
1639 Registry and security features. Trying the
1640 <literal>native</literal> version of this may or may
1641 not work.
1642 </para> </listitem>
1643 </varlistentry>
1644 <varlistentry>
1645 <term>commdlg, comdlg32</term>
1646 <listitem> <para>
1647 Common Dialogs, such as color picker, font dialog,
1648 print dialog, open/save dialog, etc. It is safe to try
1649 <literal>native</literal>.
1650 </para> </listitem>
1651 </varlistentry>
1652 <varlistentry>
1653 <term>commctrl, comctl32</term>
1654 <listitem> <para>
1655 Common Controls. This is toolbars, status bars, list controls,
1656 the works. It is safe to try <literal>native</literal>.
1657 </para> </listitem>
1658 </varlistentry>
1659 <varlistentry>
1660 <term>shell, shell32</term>
1661 <listitem> <para>
1662 Shell interface (desktop, filesystem, etc). Being one of the
1663 most undocumented pieces of Windows, you may have luck with the
1664 <literal>native</literal> version, should you need it.
1665 </para> </listitem>
1666 </varlistentry>
1667 <varlistentry>
1668 <term>winsock, wsock32</term>
1669 <listitem> <para>
1670 Windows Sockets. The <literal>native</literal> version
1671 will not work under Wine, so leave at
1672 <literal>builtin</literal>.
1673 </para> </listitem>
1674 </varlistentry>
1675 <varlistentry>
1676 <term>icmp</term>
1677 <listitem> <para>
1678 ICMP routines for wsock32. As with wsock32, leave at
1679 <literal>builtin</literal>.
1680 </para> </listitem>
1681 </varlistentry>
1682 <varlistentry>
1683 <term>mpr</term>
1684 <listitem> <para>
1685 The <literal>native</literal> version may not work due
1686 to thunking issues. Leave at
1687 <literal>builtin</literal>.
1688 </para> </listitem>
1689 </varlistentry>
1690 <varlistentry>
1691 <term>lzexpand, lz32</term>
1692 <listitem> <para>
1693 Lempel-Ziv decompression. Wine's
1694 <literal>builtin</literal> version ought to work fine.
1695 </para> </listitem>
1696 </varlistentry>
1697 <varlistentry>
1698 <term>winaspi, wnaspi32</term>
1699 <listitem> <para>
1700 Advanced SCSI Peripheral Interface. The
1701 <literal>native</literal> version will probably never
1702 work. Leave at <literal>builtin</literal>.
1703 </para> </listitem>
1704 </varlistentry>
1705 <varlistentry>
1706 <term>crtdll</term>
1707 <listitem> <para>
1708 C Runtime library. The <literal>native</literal>
1709 version will easily work better than Wine's on this
1710 one.
1711 </para> </listitem>
1712 </varlistentry>
1713 <varlistentry>
1714 <term>winspool.drv</term>
1715 <listitem> <para>
1716 Printer spooler. You are not likely to have more luck
1717 with the <literal>native</literal> version.
1718 </para> </listitem>
1719 </varlistentry>
1720 <varlistentry>
1721 <term>ddraw</term>
1722 <listitem> <para>
1723 DirectDraw/Direct3D. Since Wine does not implement the
1724 DirectX HAL, the <literal>native</literal> version
1725 will not work at this time.
1726 </para> </listitem>
1727 </varlistentry>
1728 <varlistentry>
1729 <term>dinput</term>
1730 <listitem> <para>
1731 DirectInput. Running this <literal>native</literal>
1732 may or may not work.
1733 </para> </listitem>
1734 </varlistentry>
1735 <varlistentry>
1736 <term>dsound</term>
1737 <listitem> <para>
1738 DirectSound. It may be possible to run this
1739 <literal>native</literal>, but don't count on it.
1740 </para> </listitem>
1741 </varlistentry>
1742 <varlistentry>
1743 <term>dplay/dplayx</term>
1744 <listitem> <para>
1745 DirectPlay. The <literal>native</literal> version
1746 ought to work best on this, if at all.
1747 </para> </listitem>
1748 </varlistentry>
1749 <varlistentry>
1750 <term>mmsystem, winmm</term>
1751 <listitem> <para>
1752 Multimedia system. The <literal>native</literal>
1753 version is not likely to work. Leave at
1754 <literal>builtin</literal>.
1755 </para> </listitem>
1756 </varlistentry>
1757 <varlistentry>
1758 <term>msacm, msacm32</term>
1759 <listitem> <para>
1760 Audio Compression Manager. The
1761 <literal>builtin</literal> version works best, if you
1762 set msacm.drv to the same.
1763 </para> </listitem>
1764 </varlistentry>
1765 <varlistentry>
1766 <term>msvideo, msvfw32</term>
1767 <listitem> <para>
1768 Video for Windows. It is safe (and recommended) to try
1769 <literal>native</literal>.
1770 </para> </listitem>
1771 </varlistentry>
1772 <varlistentry>
1773 <term>mcicda.drv</term>
1774 <listitem> <para>
1775 CD Audio MCI driver.
1776 </para> </listitem>
1777 </varlistentry>
1778 <varlistentry>
1779 <term>mciseq.drv</term>
1780 <listitem> <para>
1781 MIDI Sequencer MCI driver (<filename>.MID</filename>
1782 playback).
1783 </para> </listitem>
1784 </varlistentry>
1785 <varlistentry>
1786 <term>mciwave.drv</term>
1787 <listitem> <para>
1788 Wave audio MCI driver (<filename>.WAV</filename> playback).
1789 </para> </listitem>
1790 </varlistentry>
1791 <varlistentry>
1792 <term>mciavi.drv</term>
1793 <listitem> <para>
1794 AVI MCI driver (<filename>.AVI</filename> video
1795 playback). Best to use <literal>native</literal>.
1796 </para> </listitem>
1797 </varlistentry>
1798 <varlistentry>
1799 <term>mcianim.drv</term>
1800 <listitem> <para>
1801 Animation MCI driver.
1802 </para> </listitem>
1803 </varlistentry>
1804 <varlistentry>
1805 <term>msacm.drv</term>
1806 <listitem> <para>
1807 Audio Compression Manager. Set to same as msacm32.
1808 </para> </listitem>
1809 </varlistentry>
1810 <varlistentry>
1811 <term>midimap.drv</term>
1812 <listitem> <para>
1813 MIDI Mapper.
1814 </para> </listitem>
1815 </varlistentry>
1816 <varlistentry>
1817 <term>wprocs</term>
1818 <listitem> <para>
1819 This is a pseudo-DLL used by Wine for thunking
1820 purposes. A <literal>native</literal> version of this
1821 doesn't exist.
1822 </para> </listitem>
1823 </varlistentry>
1824 </variablelist>
1825 </sect3>
1826 </sect2>
1827 <sect2 id="dll-missing">
1828 <title>Missing DLLs</title>
1830 <para>
1831 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1832 </para>
1834 <para>
1835 In case Wine complains about a missing DLL, you should check whether
1836 this file is a publicly available DLL or a custom DLL belonging
1837 to your program (by searching for its name on the internet).
1838 If you managed to get hold of the DLL, then you should make sure
1839 that Wine is able to find and load it.
1840 DLLs usually get loaded according to the mechanism of the
1841 SearchPath() function.
1842 This function searches directories in the following order:
1844 a) The directory the program was started from.
1845 b) The current directory.
1846 c) The Windows system directory.
1847 d) The Windows directory.
1848 e) The PATH variable directories.
1850 In short: either put the required DLL into your application
1851 directory (might be ugly), or usually put it into the Windows system
1852 directory. Just find out its directory by having a look at the Wine
1853 config File variable "System" (which indicates the location of the
1854 Windows system directory) and the associated drive entry.
1855 </para>
1856 </sect2>
1857 </sect1>
1859 <sect1 id="keyboard">
1860 <title>Keyboard</title>
1862 <para>
1863 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
1864 </para>
1865 <para>
1866 (Extracted from <filename>wine/documentation/keyboard</filename>)
1867 </para>
1869 <para>
1870 Wine now needs to know about your keyboard layout. This
1871 requirement comes from a need from many apps to have the
1872 correct scancodes available, since they read these directly,
1873 instead of just taking the characters returned by the X
1874 server. This means that Wine now needs to have a mapping from
1875 X keys to the scancodes these applications expect.
1876 </para>
1877 <para>
1878 On startup, Wine will try to recognize the active X layout by
1879 seeing if it matches any of the defined tables. If it does,
1880 everything is alright. If not, you need to define it.
1881 </para>
1882 <para>
1883 To do this, open the file
1884 <filename>dlls/x11drv/keyboard.c</filename> and take a look
1885 at the existing tables. Make a backup copy of it, especially
1886 if you don't use CVS.
1887 </para>
1888 <para>
1889 What you really would need to do, is find out which scancode
1890 each key needs to generate. Find it in the
1891 <function>main_key_scan</function> table, which looks like
1892 this:
1893 </para>
1894 <programlisting>
1895 static const int main_key_scan[MAIN_LEN] =
1897 /* this is my (102-key) keyboard layout, sorry if it doesn't quite match yours */
1898 0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,
1899 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
1900 0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,
1901 0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,
1902 0x56 /* the 102nd key (actually to the right of l-shift) */
1904 </programlisting>
1905 <para>
1906 Next, assign each scancode the characters imprinted on the
1907 keycaps. This was done (sort of) for the US 101-key keyboard,
1908 which you can find near the top in
1909 <filename>keyboard.c</filename>. It also shows that if there
1910 is no 102nd key, you can skip that.
1911 </para>
1912 <para>
1913 However, for most international 102-key keyboards, we have
1914 done it easy for you. The scancode layout for these already
1915 pretty much matches the physical layout in the
1916 <function>main_key_scan</function>, so all you need to do is
1917 to go through all the keys that generate characters on your
1918 main keyboard (except spacebar), and stuff those into an
1919 appropriate table. The only exception is that the 102nd key,
1920 which is usually to the left of the first key of the last line
1921 (usually <keycap>Z</keycap>), must be placed on a separate
1922 line after the last line.
1923 </para>
1924 <para>
1925 For example, my Norwegian keyboard looks like this
1926 </para>
1927 <screen>
1928 § ! " # ¤ % & / ( ) = ? ` Back-
1929 | 1 2@ 3£ 4$ 5 6 7{ 8[ 9] 0} + \´ space
1931 Tab Q W E R T Y U I O P Å ^
1933 Enter
1934 Caps A S D F G H J K L Ø Æ *
1935 Lock '
1937 Sh- > Z X C V B N M ; : _ Shift
1938 ift &lt; , . -
1940 Ctrl Alt Spacebar AltGr Ctrl
1941 </screen>
1942 <para>
1943 Note the 102nd key, which is the <keycap>&lt;></keycap> key, to
1944 the left of <keycap>Z</keycap>. The character to the right of
1945 the main character is the character generated by
1946 <keycap>AltGr</keycap>.
1947 </para>
1948 <para>
1949 This keyboard is defined as follows:
1950 </para>
1951 <programlisting>
1952 static const char main_key_NO[MAIN_LEN][4] =
1954 "","1!","2\"@","3#£","4¤$","5%","6&","7/{","8([","9)]","0=}","+?","\\´",
1955 "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","åÅ","¨^~",
1956 "aA","sS","dD","fF","gG","hH","jJ","kK","lL","øØ","æÆ","'*",
1957 "zZ","xX","cC","vV","bB","nN","mM",",;",".:","-_",
1958 "&lt;>"
1960 </programlisting>
1961 <para>
1962 Except that " and \ needs to be quoted with a backslash, and
1963 that the 102nd key is on a separate line, it's pretty
1964 straightforward.
1965 </para>
1966 <para>
1967 After you have written such a table, you need to add it to the
1968 <function>main_key_tab[]</function> layout index table. This
1969 will look like this:
1970 </para>
1971 <programlisting>
1972 static struct {
1973 WORD lang, ansi_codepage, oem_codepage;
1974 const char (*key)[MAIN_LEN][4];
1975 } main_key_tab[]={
1978 {MAKELANGID(LANG_NORWEGIAN,SUBLANG_DEFAULT), 1252, 865, &amp;main_key_NO},
1980 </programlisting>
1981 <para>
1982 After you have added your table, recompile Wine and test that
1983 it works. If it fails to detect your table, try running
1984 </para>
1985 <screen>
1986 wine --debugmsg +key,+keyboard >& key.log
1987 </screen>
1988 <para>
1989 and look in the resulting <filename>key.log</filename> file to
1990 find the error messages it gives for your layout.
1991 </para>
1992 <para>
1993 Note that the <constant>LANG_*</constant> and
1994 <constant>SUBLANG_*</constant> definitions are in
1995 <filename>include/winnls.h</filename>, which you might need to
1996 know to find out which numbers your language is assigned, and
1997 find it in the debugmsg output. The numbers will be
1998 <literal>(SUBLANG * 0x400 + LANG)</literal>, so, for example
1999 the combination <literal>LANG_NORWEGIAN (0x14)</literal> and
2000 <literal>SUBLANG_DEFAULT (0x1)</literal> will be (in hex)
2001 <literal>14 + 1*400 = 414</literal>, so since I'm Norwegian, I
2002 could look for <literal>0414</literal> in the debugmsg output
2003 to find out why my keyboard won't detect.
2004 </para>
2005 <para>
2006 Once it works, submit it to the Wine project. If you use CVS,
2007 you will just have to do
2008 </para>
2009 <screen>
2010 cvs -z3 diff -u dlls/x11drv/keyboard.c > layout.diff
2011 </screen>
2012 <para>
2013 from your main Wine directory, then submit
2014 <filename>layout.diff</filename> to
2015 <email>wine-patches@winehq.com</email> along with a brief note
2016 of what it is.
2017 </para>
2018 <para>
2019 If you don't use CVS, you need to do
2020 </para>
2021 <screen>
2022 diff -u the_backup_file_you_made dlls/x11drv/keyboard.c > layout.diff
2023 </screen>
2024 <para>
2025 and submit it as explained above.
2026 </para>
2027 <para>
2028 If you did it right, it will be included in the next Wine
2029 release, and all the troublesome applications (especially
2030 remote-control applications) and games that use scancodes will
2031 be happily using your keyboard layout, and you won't get those
2032 annoying fixme messages either.
2033 </para>
2034 <para>
2035 Good luck.
2036 </para>
2037 </sect1>
2039 &fonts;
2040 &printing;
2042 </chapter>
2044 <!-- Keep this comment at the end of the file
2045 Local variables:
2046 mode: sgml
2047 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
2048 End: