Removed SO loading type.
[wine.git] / documentation / configuring.sgml
blob45762f13498b8a73933f903856ec5f4719fb2d45
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 id="config-wine">
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 to work 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 too system-specific
533 or error-prone in native form (KERNEL for example),
534 you don't have 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. Has been deprecated, ignored.
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, 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/ttySY"</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/ttyS0"</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/exclude
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 system
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="network-section">
935 <title>The [Network] Section</title>
936 <para>
937 [Network] contains settings related to
938 networking. Currently there is only one value that can be set.
939 </para>
940 <variablelist>
941 <varlistentry>
942 <term>UseDnsComputerName</term>
943 <listitem>
944 <para>
945 A boolean setting (default: <literal>Y</literal>)
946 that affects the way Wine sets the computer name. The computer
947 name in the Windows world is the so-called <emphasis>NetBIOS name</emphasis>.
948 It is contained in the <varname>ComputerName</varname> in the registry entry
949 <varname>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName</varname>.
950 </para>
951 <para>
952 If this option is set to "Y" or missing, Wine will set the
953 NetBIOS name to the Unix host name of your computer, if
954 necessary truncated to 31 characters. The Unix hostname is the output
955 of the shell command <command>hostname</command>, up to but not
956 including the first dot ('.'). Among other things, this means that
957 Windows programs running under Wine cannot change the NetBIOS computer name.
958 </para>
959 <para>
960 If this option is set to "N", Wine will use the registry value above
961 to set the NetBIOS name. Only if the registry entry doesn't exist (usually
962 only during the first wine startup) it will use the Unix hostname as
963 usual. Windows applications can change the NetBIOS name. The change
964 will be effective after a "reboot", i.e. after restarting Wine.
965 </para>
966 </listitem>
967 </varlistentry>
968 </variablelist>
969 </sect3>
971 <sect3 id="appdefaults-section">
972 <title>The [AppDefaults] Section</title>
973 <para>
974 The section is used to overwrite certain settings of this file for a
975 special program with different settings.
976 [AppDefaults] is not the real name of the section. The real name
977 consists of the leading word AppDefaults followed by the name
978 of the executable the section is valid for.
979 The end of the section name is the name of the
980 corresponding "standard" section of the configuration file
981 that should have some of its settings overwritten with the
982 application specific settings you define.
983 The three parts of the section name are separated by two backslashes.
984 </para>
985 <para>
986 Currently wine supports overriding selected settings within
987 the sections [DllOverrides], [x11drv], [version] and [dsound] only.
988 </para>
989 <para>
990 Here is an example that overrides the normal settings for a
991 program:
992 <programlisting>
993 ;; default settings
994 [x11drv]
995 "Managed" = "Y"
996 "Desktop" = "N"
998 ;; run install in desktop mode
999 [AppDefaults\\install.exe\\x11drv]
1000 "Managed" = "N"
1001 "Desktop" = "800x600"
1002 </programlisting>
1003 </para>
1004 </sect3>
1005 </sect2>
1007 <sect2>
1008 <title>Where Do I Put It?</title>
1009 <para>
1010 The wine config file can go in two places.
1011 </para>
1012 <variablelist>
1013 <varlistentry>
1014 <term><filename>/usr/local/etc/wine.conf</filename></term>
1015 <listitem><para>
1016 A systemwide config file, used for anyone who doesn't
1017 have their own. NOTE: this file is currently unused as a
1018 new global configuration mechanism is not in place at this
1019 time.
1020 </para></listitem>
1021 </varlistentry>
1022 <varlistentry>
1023 <term><filename>$HOME/.wine/config</filename></term>
1024 <listitem><para>
1025 Your own config file (which only is used for your user).
1026 </para></listitem>
1027 </varlistentry>
1028 </variablelist>
1029 <para>
1030 So copy your version of the wine config file to
1031 <filename>$HOME/.wine/config</filename>
1032 or <filename>/usr/local/etc/wine.conf</filename>
1033 for wine to recognize it.
1034 </para>
1035 </sect2>
1037 <sect2>
1038 <title>What If It Doesn't Work?</title>
1039 <para>
1040 There is always a chance that things will go wrong. If the
1041 unthinkable happens, report the problem to
1042 <ulink url="http://bugs.winehq.com/">Wine Bugzilla</ulink>,
1043 try the newsgroup
1044 <systemitem>comp.emulators.ms-windows.wine</systemitem>,
1045 or the IRC channel <systemitem>#WineHQ</systemitem> found on
1046 irc.freenode.net, or connected servers.
1047 Make sure that you have looked over this document thoroughly,
1048 and have also read:
1049 </para>
1050 <itemizedlist>
1051 <listitem>
1052 <para><filename>README</filename></para>
1053 </listitem>
1054 <listitem>
1055 <para>
1056 <filename>http://www.winehq.org/trouble/</filename>
1057 </para>
1058 </listitem>
1059 </itemizedlist>
1060 <para>
1061 If indeed it looks like you've done your research, be
1062 prepared for helpful suggestions. If you haven't, brace
1063 yourself for heaving flaming.
1064 </para>
1065 </sect2>
1066 </sect1>
1068 <sect1 id="x11drv">
1069 <title>Configuring the x11drv Driver</title>
1071 <para>
1072 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
1073 </para>
1074 <para>
1075 (Extracted from <filename>wine/documentation/x11drv</filename>)
1076 </para>
1078 <para>
1079 Most Wine users run Wine under the windowing system known as
1080 X11. During most of Wine's history, this was the only display
1081 driver available, but in recent years, parts of Wine have been
1082 reorganized to allow for other display drivers (although the
1083 only alternative currently available is Patrik Stridvall's
1084 ncurses-based ttydrv, which he claims works for displaying
1085 calc.exe). The display driver is chosen with the
1086 <literal>GraphicsDriver</literal> option in the [wine] section
1087 of <filename>~/.wine/config</filename>, but I will only cover the
1088 x11drv driver in this article.
1089 </para>
1091 <sect2>
1092 <title>x11drv modes of operation</title>
1094 <para>
1095 The x11drv driver consists of two conceptually distinct
1096 pieces, the graphics driver (GDI part), and the windowing
1097 driver (USER part). Both of these are linked into the
1098 <filename>libx11drv.so</filename> module, though (which you
1099 load with the <literal>GraphicsDriver</literal> option). In
1100 Wine, running on X11, the graphics driver must draw on
1101 drawables (window interiors) provided by the windowing
1102 driver. This differs a bit from the Windows model, where the
1103 windowing system creates and configures device contexts
1104 controlled by the graphics driver, and applications are
1105 allowed to hook into this relationship anywhere they like.
1106 Thus, to provide any reasonable tradeoff between
1107 compatibility and usability, the x11drv has three different
1108 modes of operation.
1109 </para>
1111 <variablelist>
1112 <varlistentry>
1113 <term>Managed</term>
1114 <listitem>
1115 <para>
1116 The default. Specified by using the <literal>Managed</literal>
1117 wine config file option (see below).
1118 Ordinary top-level frame windows with thick borders,
1119 title bars, and system menus will be managed by your
1120 window manager. This lets these applications integrate
1121 better with the rest of your desktop, but may not
1122 always work perfectly (a rewrite of this mode of
1123 operation, to make it more robust and less patchy, is
1124 currently being done, though, and it's planned to be
1125 finished before the Wine 1.0 release).
1126 </para>
1127 </listitem>
1128 </varlistentry>
1129 <varlistentry>
1130 <term>Unmanaged/Normal</term>
1131 <listitem>
1132 <para>
1133 Window manager independent (any running
1134 window manager is ignored completely). Window
1135 decorations (title bars, borders, etc) are drawn by
1136 Wine to look and feel like the real Windows. This is
1137 compatible with applications that depend on being able
1138 to compute the exact sizes of any such decorations, or
1139 that want to draw their own.
1140 Unmanaged mode is only used if both Managed and Desktop
1141 are set to disabled.
1142 </para>
1143 </listitem>
1144 </varlistentry>
1145 <varlistentry>
1146 <term>Desktop-in-a-Box</term>
1147 <listitem>
1148 <para>
1149 Specified by using the <literal>Desktop</literal>
1150 wine config file option (see below).
1151 (adding a geometry, e.g. <literal>800x600</literal>
1152 for a such-sized desktop, or
1153 even <literal>800x600+0+0</literal> to
1154 automatically position the desktop at the upper-left
1155 corner of the display). This is the mode most
1156 compatible with the Windows model. All application
1157 windows will just be Wine-drawn windows inside the
1158 Wine-provided desktop window (which will itself be
1159 managed by your window manager), and Windows
1160 applications can roam freely within this virtual
1161 workspace and think they own it all, without
1162 disturbing your other X apps.
1163 Note: currently there's one desktop window for every
1164 application; this will be fixed at some time.
1165 </para>
1166 </listitem>
1167 </varlistentry>
1168 </variablelist>
1169 </sect2>
1171 <sect2>
1172 <title>The [x11drv] section</title>
1174 <variablelist>
1175 <varlistentry>
1176 <term>Managed</term>
1177 <listitem>
1178 <para>
1179 Wine can let frame windows be managed by your window
1180 manager. This option specifies whether you want that
1181 by default.
1182 </para>
1183 </listitem>
1184 </varlistentry>
1185 <varlistentry>
1186 <term>Desktop</term>
1187 <listitem>
1188 <para>
1189 Creates a main desktop window of a specified size
1190 to display all Windows applications in.
1191 The size argument could e.g. be "800x600".
1192 </para>
1193 </listitem>
1194 </varlistentry>
1195 <varlistentry>
1196 <term>DXGrab</term>
1197 <listitem>
1198 <para>
1199 If you don't use DGA, you may want an alternative
1200 means to convince the mouse cursor to stay within the
1201 game window. This option does that. Of course, as with
1202 DGA, if Wine crashes, you're in trouble (although not
1203 as badly as in the DGA case, since you can still use
1204 the keyboard to get out of X).
1205 </para>
1206 </listitem>
1207 </varlistentry>
1208 <varlistentry>
1209 <term>UseDGA</term>
1210 <listitem>
1211 <para>
1212 This specifies whether you want DirectDraw to use
1213 XFree86's <firstterm>Direct Graphics
1214 Architecture</firstterm> (DGA), which is able to
1215 take over the entire display and run the game
1216 full-screen at maximum speed. (With DGA1 (XFree86
1217 3.x), you still have to configure the X server to the
1218 game's requested bpp first, but with DGA2 (XFree86
1219 4.x), runtime depth-switching may be possible,
1220 depending on your driver's capabilities.) But be aware
1221 that if Wine crashes while in DGA mode, it may not be
1222 possible to regain control over your computer without
1223 rebooting. DGA normally requires either root
1224 privileges or read/write access to
1225 <filename>/dev/mem</filename>.
1226 </para>
1227 </listitem>
1228 </varlistentry>
1229 <varlistentry>
1230 <term>UseXShm</term>
1231 <listitem>
1232 <para>
1233 If you don't want DirectX to use DGA, you can at least
1234 use X Shared Memory extensions (XShm). It is much
1235 slower than DGA, since the app doesn't have direct
1236 access to the physical frame buffer, but using shared
1237 memory to draw the frame is at least faster than
1238 sending the data through the standard X11 socket, even
1239 though Wine's XShm support is still known to crash
1240 sometimes.
1241 </para>
1242 </listitem>
1243 </varlistentry>
1244 <varlistentry>
1245 <term>DesktopDoubleBuffered</term>
1246 <listitem>
1247 <para>
1248 Applies only if you use the
1249 <parameter>--desktop</parameter> command-line option
1250 to run in a desktop window. Specifies whether to
1251 create the desktop window with a double-buffered
1252 visual, something most OpenGL games need to run
1253 correctly.
1254 </para>
1255 </listitem>
1256 </varlistentry>
1257 <varlistentry>
1258 <term>AllocSystemColors</term>
1259 <listitem>
1260 <para>
1261 Applies only if you have a palette-based display, i.e.
1262 if your X server is set to a depth of 8bpp, and if you
1263 haven't requested a private color map. It specifies
1264 the maximum number of shared colormap cells (palette
1265 entries) Wine should occupy. The higher this value,
1266 the less colors will be available to other
1267 applications.
1268 </para>
1269 </listitem>
1270 </varlistentry>
1271 <varlistentry>
1272 <term>PrivateColorMap</term>
1273 <listitem>
1274 <para>
1275 Applies only if you have a palette-based display, i.e.
1276 if your X server is set to a depth of 8bpp. It
1277 specifies that you don't want to use the shared color
1278 map, but a private color map, where all 256 colors are
1279 available. The disadvantage is that Wine's private
1280 color map is only seen while the mouse pointer is
1281 inside a Wine window, so psychedelic flashing and
1282 funky colors will become routine if you use the mouse
1283 a lot.
1284 </para>
1285 </listitem>
1286 </varlistentry>
1287 <varlistentry>
1288 <term>Synchronous</term>
1289 <listitem>
1290 <para>
1291 To be used for debugging X11 operations.
1292 If Wine crashes with an X11 error, then you should enable
1293 Synchronous mode to disable X11 request caching in order
1294 to make sure that the X11 error happens directly after
1295 the corresponding X11 call in the log file appears.
1296 Will slow down X11 output !
1297 </para>
1298 </listitem>
1299 </varlistentry>
1300 <varlistentry>
1301 <term>ScreenDepth</term>
1302 <listitem>
1303 <para>
1304 Applies only to multi-depth displays. It specifies
1305 which of the available depths Wine should use (and
1306 tell Windows apps about).
1307 </para>
1308 </listitem>
1309 </varlistentry>
1310 <varlistentry>
1311 <term>Display</term>
1312 <listitem>
1313 <para>
1314 This specifies which X11 display to use, and if
1315 specified, will override the
1316 <envar>DISPLAY</envar> environment variable.
1317 </para>
1318 </listitem>
1319 </varlistentry>
1320 <varlistentry>
1321 <term>PerfectGraphics</term>
1322 <listitem>
1323 <para>
1324 This option only determines whether fast X11 routines
1325 or exact Wine routines will be used for certain ROP
1326 codes in blit operations. Most users won't notice any
1327 difference.
1328 </para>
1329 </listitem>
1330 </varlistentry>
1331 <varlistentry>
1332 <term>TextCP</term>
1333 <listitem>
1334 <para>
1335 Codepage to be used for rendering the text in X11
1336 output. Some sample values would be 437 (USA, Canada),
1337 850 (Europe), 852 (Central/Eastern Europe), 855
1338 (Cyrillic). For additional suitable values, see e.g. the Linux
1339 kernel's codepage configuration page.
1340 </para>
1341 </listitem>
1342 </varlistentry>
1343 </variablelist>
1344 </sect2>
1345 </sect1>
1347 &registry;
1349 <sect1 id="windows-versions">
1351 <title>Setting the windows and DOS version value that's passed to
1352 programs</title>
1354 <para>
1355 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1356 Oct 18 2002
1357 </para>
1359 <para>
1360 The windows and DOS version value a program gets e.g. by calling the
1361 Windows function GetVersion() plays a very important role:
1362 If your Wine installation for whatever reason fails to provide
1363 to your program the correct version value that it expects,
1364 then the program might assume some very bad things and fail (in
1365 the worst case even silently !).
1367 Fortunately Wine contains some more or less intelligent Windows
1368 version guessing algorithm that will try to guess the Windows
1369 version a program might expect and pass that one on to the
1370 program.
1372 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.
1373 </para>
1375 <sect2>
1376 <title>How to configure the Windows and DOS version value Wine
1377 should return</title>
1379 <para>
1380 The version values can be configured in the wine config file in
1381 the [Version] section.
1382 </para>
1384 <variablelist>
1385 <varlistentry>
1386 <term>"Windows" = "&lt;version string&gt;"</term>
1387 <listitem>
1388 <para>
1389 default: none; chosen by semi-intelligent detection
1390 mechanism based on DLL environment.
1391 Used to specify which Windows version to return to
1392 programs (forced value, overrides standard detection
1393 mechanism !). Valid settings are e.g. "win31", "win95",
1394 "win98", "win2k", "winxp".
1395 Also valid as an
1396 <link linkend="appdefaults-section">AppDefaults</link>
1397 setting (recommended/preferred use).
1398 </para>
1399 </listitem>
1400 </varlistentry>
1401 <varlistentry>
1402 <term>"DOS"="&lt;version string&gt;"</term>
1403 <listitem>
1404 <para>
1405 Used to specify the DOS version that should be returned
1406 to programs. Only takes effect in case Wine acts as
1407 "win31" Windows version ! Common DOS version settings
1408 include 6.22, 6.20, 6.00, 5.00, 4.00, 3.30, 3.10.
1409 Also valid as an
1410 <link linkend="appdefaults-section">AppDefaults</link>
1411 setting (recommended/preferred use).
1412 </para>
1413 </listitem>
1414 </varlistentry>
1415 </variablelist>
1416 </sect2>
1417 </sect1>
1419 <sect1 id="cdrom-labels">
1420 <sect1info>
1421 <authorgroup>
1422 <author>
1423 <firstname>Petr</firstname>
1424 <surname>Tomasek</surname>
1425 <affiliation>
1426 <address><email>&email-petr-tomasek;</email></address>
1427 </affiliation>
1428 <contrib>Nov 14 1999</contrib>
1429 </author>
1430 <author>
1431 <firstname>Andreas</firstname>
1432 <surname>Mohr</surname>
1433 <affiliation>
1434 <address><email>&email-andreas-mohr;</email></address>
1435 </affiliation>
1436 <contrib>Jan 25 2000</contrib>
1437 </author>
1438 </authorgroup>
1439 </sect1info>
1441 <title>Drive labels and serial numbers with wine</title>
1442 <para>
1443 Written by &name-petr-tomasek; <email>&email-petr-tomasek;</email>
1444 Nov 14 1999
1445 </para>
1446 <para>
1447 Changes by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1448 Jan 25 2000
1449 </para>
1450 <para>
1451 (Extracted from <filename>wine/documentation/cdrom-labels</filename>)
1452 </para>
1453 <para>
1454 Until now, your only possibility of specifying drive volume
1455 labels and serial numbers was to set them manually in the wine
1456 config file. By now, wine can read them directly from the
1457 device as well. This may be useful for many Win 9x games or
1458 for setup programs distributed on CD-ROMs that check for
1459 volume label.
1460 </para>
1462 <sect2>
1463 <title>What's Supported?</title>
1465 <informaltable frame="all">
1466 <tgroup cols="3">
1467 <thead>
1468 <row>
1469 <entry>File System</entry>
1470 <entry>Types</entry>
1471 <entry>Comment</entry>
1472 </row>
1473 </thead>
1474 <tbody>
1475 <row>
1476 <entry>FAT systems</entry>
1477 <entry>hd, floppy</entry>
1478 <entry>reads labels and serial numbers</entry>
1479 </row>
1480 <row>
1481 <entry>ISO9660</entry>
1482 <entry>cdrom</entry>
1483 <entry>reads labels and serial numbers (not mixed-mode CDs yet !)</entry>
1484 </row>
1485 </tbody>
1486 </tgroup>
1487 </informaltable>
1489 </sect2>
1491 <sect2>
1492 <title>How To Set Up?</title>
1493 <para>
1494 Reading labels and serial numbers just works automagically
1495 if you specify a <literal>Device=</literal> line in the
1496 [Drive X] section in your <filename>~/.wine/config</filename>.
1497 Note that the device has to exist and must be accessible if
1498 you do this, though.
1499 </para>
1500 <para>
1501 If you don't do that, then you should give fixed
1502 <literal>"Label" =</literal> or <literal>"Serial" =</literal>
1503 entries in <filename>~/.wine/config</filename>, as Wine returns
1504 these entries instead if no device is given. If they don't
1505 exist, then Wine will return default values (label
1506 <literal>Drive X</literal> and serial
1507 <literal>12345678</literal>).
1508 </para>
1509 <para>
1510 If you want to give a <literal>"Device" =</literal> entry
1511 <emphasis>only</emphasis> for drive raw sector accesses,
1512 but not for reading the volume info from the device (i.e. you want
1513 a <emphasis>fixed</emphasis>, preconfigured label), you need
1514 to specify <literal>"ReadVolInfo" = "0"</literal> to tell Wine
1515 to skip the volume reading.
1516 </para>
1517 </sect2>
1519 <sect2>
1520 <title>EXAMPLES</title>
1521 <para>
1522 Here's a simple example of cdrom and floppy; labels will be
1523 read from the device on both cdrom and floppy; serial
1524 numbers on floppy only:
1525 </para>
1526 <screen>
1527 [Drive A]
1528 "Path" = "/mnt/floppy"
1529 "Type" = "floppy"
1530 "Device" = "/dev/fd0"
1531 "Filesystem" = "msdos"
1533 [Drive R]
1534 "Path" = "/mnt/cdrom"
1535 "Type" = "cdrom"
1536 "Device" = "/dev/hda1"
1537 "Filesystem" = "win95"
1538 </screen>
1539 <para>
1540 Here's an example of overriding the CD-ROM label:
1541 </para>
1542 <screen>
1543 [Drive J]
1544 "Path" = "/mnt/cdrom"
1545 "Type" = "cdrom"
1546 "Label" = "X234GCDSE"
1547 ; note that the device isn't really needed here as we have a fixed label
1548 "Device" = "/dev/cdrom"
1549 "Filesystem" = "msdos"
1550 </screen>
1551 </sect2>
1553 <sect2>
1554 <title>Todo / Open Issues</title>
1555 <itemizedlist>
1556 <listitem> <para>
1557 The cdrom label can be read only if the data track of
1558 the disk resides in the first track and the cdrom is
1559 iso9660.
1560 </para> </listitem>
1561 <listitem> <para>
1562 Better checking for FAT superblock (it now checks only
1563 one byte). </para>
1564 </listitem>
1565 <listitem> <para>
1566 Support for labels/serial nums WRITING.
1567 </para> </listitem>
1568 <listitem> <para>
1569 Can the label be longer than 11 chars? (iso9660 has 32
1570 chars).
1571 </para> </listitem>
1572 <listitem> <para>
1573 What about reading ext2 volume label? ....
1574 </para> </listitem>
1575 </itemizedlist>
1576 </sect2>
1577 </sect1>
1579 <sect1 id="dll-config">
1580 <title>DLL configuration</title>
1581 <sect2 id="dll-overrides">
1582 <title>DLL Overrides</title>
1584 <para>
1585 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
1586 </para>
1587 <para>
1588 (Extracted from <filename>wine/documentation/dll-overrides</filename>)
1589 </para>
1591 <para>
1592 The wine config file directives [DllDefaults]
1593 and [DllOverrides] are the subject of some confusion. The
1594 overall purpose of most of these directives are clear enough,
1595 though - given a choice, should Wine use its own built-in
1596 DLLs, or should it use <filename>.DLL</filename> files found
1597 in an existing Windows installation? This document explains
1598 how this feature works.
1599 </para>
1601 <sect3>
1602 <title>DLL types</title>
1603 <variablelist>
1604 <varlistentry>
1605 <term>native</term>
1606 <listitem> <para>
1607 A "native" DLL is a <filename>.DLL</filename> file
1608 written for the real Microsoft Windows.
1609 </para> </listitem>
1610 </varlistentry>
1611 <varlistentry>
1612 <term>builtin</term>
1613 <listitem> <para>
1614 A "builtin" DLL is a Wine DLL. These can either be a
1615 part of <filename>libwine.so</filename>, or more
1616 recently, in a special <filename>.so</filename> file
1617 that Wine is able to load on demand.
1618 </para> </listitem>
1619 </varlistentry>
1620 </variablelist>
1621 </sect3>
1623 <sect3>
1624 <title>The [DllDefaults] section</title>
1625 <variablelist>
1626 <varlistentry>
1627 <term>DefaultLoadOrder</term>
1628 <listitem> <para>
1629 This specifies in what order Wine should search for
1630 available DLL types, if the DLL in question was not
1631 found in the [DllOverrides] section.
1632 </para> </listitem>
1633 </varlistentry>
1634 </variablelist>
1635 </sect3>
1637 <sect3>
1638 <title>The [DllPairs] section</title>
1639 <para>
1640 At one time, there was a section called [DllPairs] in the
1641 default configuration file, but this has been obsoleted
1642 because the pairing information has now been embedded into
1643 Wine itself. (The purpose of this section was merely to be
1644 able to issue warnings if the user attempted to pair
1645 codependent 16-bit/32-bit DLLs of different types.) If you
1646 still have this in your <filename>~/.wine/config</filename> or
1647 <filename>wine.conf</filename>, you may safely delete it.
1648 </para>
1649 </sect3>
1651 <sect3>
1652 <title>The [DllOverrides] section</title>
1653 <para>
1654 This section specifies how you want specific DLLs to be
1655 handled, in particular whether you want to use "native" DLLs
1656 or not, if you have some from a real Windows configuration.
1657 Because builtins do not mix seamlessly with native DLLs yet,
1658 certain DLL dependencies may be problematic, but workarounds
1659 exist in Wine for many popular DLL configurations. Also see
1660 WWN's [16]Status Page to figure out how well your favorite
1661 DLL is implemented in Wine.
1662 </para>
1663 <para>
1664 It is of course also possible to override these settings by
1665 explictly using Wine's <parameter>--dll</parameter>
1666 command-line option (see the man page for details). Some
1667 hints for choosing your optimal configuration (listed by
1668 16/32-bit DLL pair):
1669 </para>
1670 <variablelist>
1671 <varlistentry>
1672 <term>krnl386, kernel32</term>
1673 <listitem> <para>
1674 Native versions of these will never work, so don't try. Leave
1675 at <literal>builtin</literal>.
1676 </para> </listitem>
1677 </varlistentry>
1678 <varlistentry>
1679 <term>gdi, gdi32</term>
1680 <listitem> <para>
1681 Graphics Device Interface. No effort has been made at trying to
1682 run native GDI. Leave at <literal>builtin</literal>.
1683 </para> </listitem>
1684 </varlistentry>
1685 <varlistentry>
1686 <term>user, user32</term>
1687 <listitem> <para>
1688 Window management and standard controls. It was
1689 possible to use Win95's <literal>native</literal>
1690 versions at some point (if all other DLLs that depend
1691 on it, such as comctl32 and comdlg32, were also run
1692 <literal>native</literal>). However, this is no longer
1693 possible after the Address Space Separation, so leave
1694 at <literal>builtin</literal>.
1695 </para> </listitem>
1696 </varlistentry>
1697 <varlistentry>
1698 <term>ntdll</term>
1699 <listitem> <para>
1700 NT kernel API. Although badly documented, the
1701 <literal>native</literal> version of this will never
1702 work. Leave at <literal>builtin</literal>.
1703 </para> </listitem>
1704 </varlistentry>
1705 <varlistentry>
1706 <term>w32skrnl</term>
1707 <listitem> <para>
1708 Win32s (for Win3.x). The <literal>native</literal>
1709 version will probably never work. Leave at
1710 <literal>builtin</literal>.
1711 </para> </listitem>
1712 </varlistentry>
1713 <varlistentry>
1714 <term>wow32</term>
1715 <listitem> <para>
1716 Win16 support library for NT. The
1717 <literal>native</literal> version will probably never
1718 work. Leave at <literal>builtin</literal>.
1719 </para> </listitem>
1720 </varlistentry>
1721 <varlistentry>
1722 <term>system</term>
1723 <listitem> <para>
1724 Win16 kernel stuff. Will never work
1725 <literal>native</literal>. Leave at
1726 <literal>builtin</literal>.
1727 </para> </listitem>
1728 </varlistentry>
1729 <varlistentry>
1730 <term>display</term>
1731 <listitem> <para>
1732 Display driver. Definitely leave at <literal>builtin</literal>.
1733 </para> </listitem>
1734 </varlistentry>
1735 <varlistentry>
1736 <term>toolhelp</term>
1737 <listitem> <para>
1738 Tool helper routines. This is rarely a source of problems.
1739 Leave at <literal>builtin</literal>.
1740 </para> </listitem>
1741 </varlistentry>
1742 <varlistentry>
1743 <term>ver, version</term>
1744 <listitem> <para>
1745 Versioning. Seldom useful to mess with.
1746 </para> </listitem>
1747 </varlistentry>
1748 <varlistentry>
1749 <term>advapi32</term>
1750 <listitem> <para>
1751 Registry and security features. Trying the
1752 <literal>native</literal> version of this may or may
1753 not work.
1754 </para> </listitem>
1755 </varlistentry>
1756 <varlistentry>
1757 <term>commdlg, comdlg32</term>
1758 <listitem> <para>
1759 Common Dialogs, such as color picker, font dialog,
1760 print dialog, open/save dialog, etc. It is safe to try
1761 <literal>native</literal>.
1762 </para> </listitem>
1763 </varlistentry>
1764 <varlistentry>
1765 <term>commctrl, comctl32</term>
1766 <listitem> <para>
1767 Common Controls. This is toolbars, status bars, list controls,
1768 the works. It is safe to try <literal>native</literal>.
1769 </para> </listitem>
1770 </varlistentry>
1771 <varlistentry>
1772 <term>shell, shell32</term>
1773 <listitem> <para>
1774 Shell interface (desktop, filesystem, etc). Being one of the
1775 most undocumented pieces of Windows, you may have luck with the
1776 <literal>native</literal> version, should you need it.
1777 </para> </listitem>
1778 </varlistentry>
1779 <varlistentry>
1780 <term>winsock, wsock32</term>
1781 <listitem> <para>
1782 Windows Sockets. The <literal>native</literal> version
1783 will not work under Wine, so leave at
1784 <literal>builtin</literal>.
1785 </para> </listitem>
1786 </varlistentry>
1787 <varlistentry>
1788 <term>icmp</term>
1789 <listitem> <para>
1790 ICMP routines for wsock32. As with wsock32, leave at
1791 <literal>builtin</literal>.
1792 </para> </listitem>
1793 </varlistentry>
1794 <varlistentry>
1795 <term>mpr</term>
1796 <listitem> <para>
1797 The <literal>native</literal> version may not work due
1798 to thunking issues. Leave at
1799 <literal>builtin</literal>.
1800 </para> </listitem>
1801 </varlistentry>
1802 <varlistentry>
1803 <term>lzexpand, lz32</term>
1804 <listitem> <para>
1805 Lempel-Ziv decompression. Wine's
1806 <literal>builtin</literal> version ought to work fine.
1807 </para> </listitem>
1808 </varlistentry>
1809 <varlistentry>
1810 <term>winaspi, wnaspi32</term>
1811 <listitem> <para>
1812 Advanced SCSI Peripheral Interface. The
1813 <literal>native</literal> version will probably never
1814 work. Leave at <literal>builtin</literal>.
1815 </para> </listitem>
1816 </varlistentry>
1817 <varlistentry>
1818 <term>crtdll</term>
1819 <listitem> <para>
1820 C Runtime library. The <literal>native</literal>
1821 version will easily work better than Wine's on this
1822 one.
1823 </para> </listitem>
1824 </varlistentry>
1825 <varlistentry>
1826 <term>winspool.drv</term>
1827 <listitem> <para>
1828 Printer spooler. You are not likely to have more luck
1829 with the <literal>native</literal> version.
1830 </para> </listitem>
1831 </varlistentry>
1832 <varlistentry>
1833 <term>ddraw</term>
1834 <listitem> <para>
1835 DirectDraw/Direct3D. Since Wine does not implement the
1836 DirectX HAL, the <literal>native</literal> version
1837 will not work at this time.
1838 </para> </listitem>
1839 </varlistentry>
1840 <varlistentry>
1841 <term>dinput</term>
1842 <listitem> <para>
1843 DirectInput. Running this <literal>native</literal>
1844 may or may not work.
1845 </para> </listitem>
1846 </varlistentry>
1847 <varlistentry>
1848 <term>dsound</term>
1849 <listitem> <para>
1850 DirectSound. It may be possible to run this
1851 <literal>native</literal>, but don't count on it.
1852 </para> </listitem>
1853 </varlistentry>
1854 <varlistentry>
1855 <term>dplay/dplayx</term>
1856 <listitem> <para>
1857 DirectPlay. The <literal>native</literal> version
1858 ought to work best on this, if at all.
1859 </para> </listitem>
1860 </varlistentry>
1861 <varlistentry>
1862 <term>mmsystem, winmm</term>
1863 <listitem> <para>
1864 Multimedia system. The <literal>native</literal>
1865 version is not likely to work. Leave at
1866 <literal>builtin</literal>.
1867 </para> </listitem>
1868 </varlistentry>
1869 <varlistentry>
1870 <term>msacm, msacm32</term>
1871 <listitem> <para>
1872 Audio Compression Manager. The
1873 <literal>builtin</literal> version works best, if you
1874 set msacm.drv to the same.
1875 </para> </listitem>
1876 </varlistentry>
1877 <varlistentry>
1878 <term>msvideo, msvfw32</term>
1879 <listitem> <para>
1880 Video for Windows. It is safe (and recommended) to try
1881 <literal>native</literal>.
1882 </para> </listitem>
1883 </varlistentry>
1884 <varlistentry>
1885 <term>mcicda.drv</term>
1886 <listitem> <para>
1887 CD Audio MCI driver.
1888 </para> </listitem>
1889 </varlistentry>
1890 <varlistentry>
1891 <term>mciseq.drv</term>
1892 <listitem> <para>
1893 MIDI Sequencer MCI driver (<filename>.MID</filename>
1894 playback).
1895 </para> </listitem>
1896 </varlistentry>
1897 <varlistentry>
1898 <term>mciwave.drv</term>
1899 <listitem> <para>
1900 Wave audio MCI driver (<filename>.WAV</filename> playback).
1901 </para> </listitem>
1902 </varlistentry>
1903 <varlistentry>
1904 <term>mciavi.drv</term>
1905 <listitem> <para>
1906 AVI MCI driver (<filename>.AVI</filename> video
1907 playback). Best to use <literal>native</literal>.
1908 </para> </listitem>
1909 </varlistentry>
1910 <varlistentry>
1911 <term>mcianim.drv</term>
1912 <listitem> <para>
1913 Animation MCI driver.
1914 </para> </listitem>
1915 </varlistentry>
1916 <varlistentry>
1917 <term>msacm.drv</term>
1918 <listitem> <para>
1919 Audio Compression Manager. Set to same as msacm32.
1920 </para> </listitem>
1921 </varlistentry>
1922 <varlistentry>
1923 <term>midimap.drv</term>
1924 <listitem> <para>
1925 MIDI Mapper.
1926 </para> </listitem>
1927 </varlistentry>
1928 <varlistentry>
1929 <term>wprocs</term>
1930 <listitem> <para>
1931 This is a pseudo-DLL used by Wine for thunking
1932 purposes. A <literal>native</literal> version of this
1933 doesn't exist.
1934 </para> </listitem>
1935 </varlistentry>
1936 </variablelist>
1937 </sect3>
1938 </sect2>
1939 <sect2 id="dll-missing">
1940 <title>Missing DLLs</title>
1942 <para>
1943 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
1944 </para>
1946 <para>
1947 In case Wine complains about a missing DLL, you should check whether
1948 this file is a publicly available DLL or a custom DLL belonging
1949 to your program (by searching for its name on the internet).
1950 If you managed to get hold of the DLL, then you should make sure
1951 that Wine is able to find and load it.
1952 DLLs usually get loaded according to the mechanism of the
1953 SearchPath() function.
1954 This function searches directories in the following order:
1956 <orderedlist>
1957 <listitem>
1958 <para>
1959 The directory the program was started from.
1960 </para>
1961 </listitem>
1962 <listitem>
1963 <para>
1964 The current directory.
1965 </para>
1966 </listitem>
1967 <listitem>
1968 <para>
1969 The Windows system directory.
1970 </para>
1971 </listitem>
1972 <listitem>
1973 <para>
1974 The Windows directory.
1975 </para>
1976 </listitem>
1977 <listitem>
1978 <para>
1979 The PATH variable directories.
1980 </para>
1981 </listitem>
1982 </orderedlist>
1984 In short: either put the required DLL into your application
1985 directory (might be ugly), or usually put it into the Windows system
1986 directory. Just find out its directory by having a look at the Wine
1987 config File variable "System" (which indicates the location of the
1988 Windows system directory) and the associated drive entry.
1989 Note that you probably shouldn't use NT-based native DLLs,
1990 since Wine's NT API support is somewhat weaker than its Win9x
1991 API support (thus leading to even worse compatibility with NT DLLs
1992 than with a no-windows setup !), so better use Win9x native DLLs
1993 instead or no native DLLs at all.
1994 </para>
1995 </sect2>
1996 <sect2 id="dll-windows">
1997 <title>Fetching native DLLs from a Windows CD</title>
1999 <para>
2000 Written by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
2001 </para>
2003 <para>
2004 The Linux <command>cabextract</command> utility can be used to
2005 extract native Windows .dll files from .cab files that are to be
2006 found on many Windows installation CDs.
2007 </para>
2008 </sect2>
2009 </sect1>
2011 &fonts;
2012 &printing;
2014 <sect1 id="win95look">
2015 <title>Win95/98 Look</title>
2016 <para>
2017 Written by &name-david-cuthbert; <email>&email-david-cuthbert;</email>
2018 </para>
2019 <para>
2020 (Extracted from <filename>wine/documentation/win95look</filename>)
2021 </para>
2022 <para>
2023 Win95/Win98 interface code is being introduced.
2024 </para>
2025 <para>
2026 Instead of compiling Wine for Win3.1 vs. Win95 using
2027 <constant>#define</constant> switches, the code now looks in a
2028 special [Tweak.Layout] section of
2029 <filename>~/.wine/config</filename> for a
2030 <literal>"WineLook" = "Win95"</literal> or
2031 <literal>"WineLook" = "Win98"</literal> entry.
2032 </para>
2033 <para>
2034 A few new sections and a number of entries have been added to
2035 the <filename>~/.wine/config</filename> file -- these are for
2036 debugging the Win95 tweaks only and may be removed in a future
2037 release! These entries/sections are:
2038 </para>
2039 <programlisting>
2040 [Tweak.Fonts]
2041 "System.Height" = "&lt;point size>" # Sets the height of the system typeface
2042 "System.Bold" = "[true|false]" # Whether the system font should be boldfaced
2043 "System.Italic" = "[true|false]" # Whether the system font should be italicized
2044 "System.Underline" = "[true|false]" # Whether the system font should be underlined
2045 "System.StrikeOut" = "[true|false]" # Whether the system font should be struck out
2046 "OEMFixed.xxx" # Same parameters for the OEM fixed typeface
2047 "AnsiFixed.xxx" # Same parameters for the Ansi fixed typeface
2048 "AnsiVar.xxx" # Same parameters for the Ansi variable typeface
2049 "SystemFixed.xxx" # Same parameters for the System fixed typeface
2051 [Tweak.Layout]
2052 "WineLook" = "[Win31|Win95|Win98]" # Changes Wine's look and feel
2053 </programlisting>
2054 </sect1>
2056 <sect1 id="keyboard">
2057 <title>Keyboard</title>
2059 <para>
2060 Written by &name-ove-kaaven; <email>&email-ove-kaaven;</email>
2061 </para>
2062 <para>
2063 (Extracted from <filename>wine/documentation/keyboard</filename>)
2064 </para>
2066 <para>
2067 Wine now needs to know about your keyboard layout. This
2068 requirement comes from a need from many apps to have the
2069 correct scancodes available, since they read these directly,
2070 instead of just taking the characters returned by the X
2071 server. This means that Wine now needs to have a mapping from
2072 X keys to the scancodes these applications expect.
2073 </para>
2074 <para>
2075 On startup, Wine will try to recognize the active X layout by
2076 seeing if it matches any of the defined tables. If it does,
2077 everything is alright. If not, you need to define it.
2078 </para>
2079 <para>
2080 To do this, open the file
2081 <filename>dlls/x11drv/keyboard.c</filename> and take a look
2082 at the existing tables. Make a backup copy of it, especially
2083 if you don't use CVS.
2084 </para>
2085 <para>
2086 What you really would need to do, is find out which scancode
2087 each key needs to generate. Find it in the
2088 <function>main_key_scan</function> table, which looks like
2089 this:
2090 </para>
2091 <programlisting>
2092 static const int main_key_scan[MAIN_LEN] =
2094 /* this is my (102-key) keyboard layout, sorry if it doesn't quite match yours */
2095 0x29,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0A,0x0B,0x0C,0x0D,
2096 0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1A,0x1B,
2097 0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x2B,
2098 0x2C,0x2D,0x2E,0x2F,0x30,0x31,0x32,0x33,0x34,0x35,
2099 0x56 /* the 102nd key (actually to the right of l-shift) */
2101 </programlisting>
2102 <para>
2103 Next, assign each scancode the characters imprinted on the
2104 keycaps. This was done (sort of) for the US 101-key keyboard,
2105 which you can find near the top in
2106 <filename>keyboard.c</filename>. It also shows that if there
2107 is no 102nd key, you can skip that.
2108 </para>
2109 <para>
2110 However, for most international 102-key keyboards, we have
2111 done it easy for you. The scancode layout for these already
2112 pretty much matches the physical layout in the
2113 <function>main_key_scan</function>, so all you need to do is
2114 to go through all the keys that generate characters on your
2115 main keyboard (except spacebar), and stuff those into an
2116 appropriate table. The only exception is that the 102nd key,
2117 which is usually to the left of the first key of the last line
2118 (usually <keycap>Z</keycap>), must be placed on a separate
2119 line after the last line.
2120 </para>
2121 <para>
2122 For example, my Norwegian keyboard looks like this
2123 </para>
2124 <screen>
2125 § ! " # ¤ % & / ( ) = ? ` Back-
2126 | 1 2@ 3£ 4$ 5 6 7{ 8[ 9] 0} + \´ space
2128 Tab Q W E R T Y U I O P Å ^
2130 Enter
2131 Caps A S D F G H J K L Ø Æ *
2132 Lock '
2134 Sh- > Z X C V B N M ; : _ Shift
2135 ift &lt; , . -
2137 Ctrl Alt Spacebar AltGr Ctrl
2138 </screen>
2139 <para>
2140 Note the 102nd key, which is the <keycap>&lt;></keycap> key, to
2141 the left of <keycap>Z</keycap>. The character to the right of
2142 the main character is the character generated by
2143 <keycap>AltGr</keycap>.
2144 </para>
2145 <para>
2146 This keyboard is defined as follows:
2147 </para>
2148 <programlisting>
2149 static const char main_key_NO[MAIN_LEN][4] =
2151 "","1!","2\"@","3#£","4¤$","5%","6&","7/{","8([","9)]","0=}","+?","\\´",
2152 "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","åÅ","¨^~",
2153 "aA","sS","dD","fF","gG","hH","jJ","kK","lL","øØ","æÆ","'*",
2154 "zZ","xX","cC","vV","bB","nN","mM",",;",".:","-_",
2155 "&lt;>"
2157 </programlisting>
2158 <para>
2159 Except that " and \ needs to be quoted with a backslash, and
2160 that the 102nd key is on a separate line, it's pretty
2161 straightforward.
2162 </para>
2163 <para>
2164 After you have written such a table, you need to add it to the
2165 <function>main_key_tab[]</function> layout index table. This
2166 will look like this:
2167 </para>
2168 <programlisting>
2169 static struct {
2170 WORD lang, ansi_codepage, oem_codepage;
2171 const char (*key)[MAIN_LEN][4];
2172 } main_key_tab[]={
2175 {MAKELANGID(LANG_NORWEGIAN,SUBLANG_DEFAULT), 1252, 865, &amp;main_key_NO},
2177 </programlisting>
2178 <para>
2179 After you have added your table, recompile Wine and test that
2180 it works. If it fails to detect your table, try running
2181 </para>
2182 <screen>
2183 wine --debugmsg +key,+keyboard >& key.log
2184 </screen>
2185 <para>
2186 and look in the resulting <filename>key.log</filename> file to
2187 find the error messages it gives for your layout.
2188 </para>
2189 <para>
2190 Note that the <constant>LANG_*</constant> and
2191 <constant>SUBLANG_*</constant> definitions are in
2192 <filename>include/winnls.h</filename>, which you might need to
2193 know to find out which numbers your language is assigned, and
2194 find it in the debugmsg output. The numbers will be
2195 <literal>(SUBLANG * 0x400 + LANG)</literal>, so, for example
2196 the combination <literal>LANG_NORWEGIAN (0x14)</literal> and
2197 <literal>SUBLANG_DEFAULT (0x1)</literal> will be (in hex)
2198 <literal>14 + 1*400 = 414</literal>, so since I'm Norwegian, I
2199 could look for <literal>0414</literal> in the debugmsg output
2200 to find out why my keyboard won't detect.
2201 </para>
2202 <para>
2203 Once it works, submit it to the Wine project. If you use CVS,
2204 you will just have to do
2205 </para>
2206 <screen>
2207 cvs -z3 diff -u dlls/x11drv/keyboard.c > layout.diff
2208 </screen>
2209 <para>
2210 from your main Wine directory, then submit
2211 <filename>layout.diff</filename> to
2212 <email>wine-patches@winehq.com</email> along with a brief note
2213 of what it is.
2214 </para>
2215 <para>
2216 If you don't use CVS, you need to do
2217 </para>
2218 <screen>
2219 diff -u the_backup_file_you_made dlls/x11drv/keyboard.c > layout.diff
2220 </screen>
2221 <para>
2222 and submit it as explained above.
2223 </para>
2224 <para>
2225 If you did it right, it will be included in the next Wine
2226 release, and all the troublesome applications (especially
2227 remote-control applications) and games that use scancodes will
2228 be happily using your keyboard layout, and you won't get those
2229 annoying fixme messages either.
2230 </para>
2231 <para>
2232 Good luck.
2233 </para>
2234 </sect1>
2236 <sect1 id="odbc">
2237 <title>Using ODBC</title>
2238 <para>
2239 This section describes how ODBC works within Wine and how to configure
2240 it to do what you want (if it can do what you want).
2241 </para>
2242 <para>
2243 The ODBC system within wine, as with the printing system, is designed
2244 to hook across to the Unix system at a high level. Rather than
2245 ensuring that all the windows code works under wine it uses a suitable
2246 Unix ODBC provider, such as UnixODBC. Thus if you configure Wine to
2247 use the builtin odbc32.dll that wine dll will interface to your
2248 Unix ODBC package and let that do the work, whereas if you configure
2249 Wine to use the native odbc32.dll it will try to use the native
2250 ODBC32 drivers etc.
2251 </para>
2252 <sect2>
2253 <title>Using a Unix ODBC system with Wine</title>
2254 <para>
2255 The first step in using a Unix ODBC system with Wine is, of course,
2256 to get the Unix ODBC system working itself. This may involve
2257 downloading code or rpms etc. There are several Unix ODBC systems
2258 available; the one the author is used to is unixODBC (with the
2259 IBM DB2 driver). Typically such systems will include a tool, such
2260 as isql, which will allow you to access the data from the command
2261 line so that you can check that the system is working.
2262 </para>
2263 <para>
2264 The next step is to hook the Unix ODBC library to the wine builtin
2265 odbc32 dll. The builtin odbc32 (currently) looks to the
2266 environmental variable <emphasis>LIB_ODBC_DRIVER_MANAGER</emphasis>
2267 for the name of the odbc library. For example in the author's
2268 .bashrc file is the line:
2269 </para>
2270 <programlisting>
2271 export LIB_ODBC_DRIVER_MANAGER=/usr/lib/libodbc.so.1.0.0
2272 </programlisting>
2273 <para>
2274 If that environmental variable is not set then it looks for a
2275 library called libodbc.so and so you can add a symbolic link to
2276 equate that to your own library. For example as root you could
2277 run the commands:
2278 </para>
2279 <programlisting>
2280 ln -s libodbc.so.1.0.0 /usr/lib/libodbc.so
2281 /sbin/ldconfig
2282 </programlisting>
2283 <para>
2284 The last step in configuring this is to ensure that Wine is set up
2285 to run the builtin version of odbc32.dll, by modifying the DLL
2286 configuration. This builtin dll merely acts as a stub between the
2287 calling code and the Unix ODBC library.
2288 </para>
2289 <para>
2290 If you have any problems then you can use the debugmsg channel
2291 odbc32 to trace what is happening. One word of warning. Some
2292 programs actually cheat a little and bypass the odbc library. For
2293 example the Crystal Reports engine goes to the registry to check on
2294 the DSN. The fix for this is documented at unixODBC's site where
2295 there is a section on using unixODBC with Wine.
2296 </para>
2297 </sect2>
2298 <sect2>
2299 <title>Using Windows ODBC drivers</title>
2300 <para>
2301 Does anyone actually have any experience of this and anything to
2302 add?
2303 </para>
2304 </sect2>
2305 </sect1>
2307 </chapter>
2309 <!-- Keep this comment at the end of the file
2310 Local variables:
2311 mode: sgml
2312 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
2313 End: