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