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