Document [WinMM] drivers options.
[wine] / documentation / packaging.sgml
1 <!-- Wine Packaging guidelines.  This is a rough outline only,
2      and much of this was up for open debate on wine-devel.  -->
3
4     <chapter id="pkg-preface"> <title>Preface</title>
5
6         <sect1 id="pkg-authors"> <title>Authors</title>
7
8         <para>
9           Written by &name-marcus-meissner; <email>&email-marcus-meissner;</email>
10         </para>
11         <para>
12           Updated by &name-jeremy-white; <email>&email-jeremy-white;</email>
13         </para>
14         <para>
15           Updated by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
16         </para>
17         <para>
18           Updated by &name-tom-wickline; <email>&email-tom-wickline;</email>
19         </para>
20     </sect1>
21
22     <sect1 id="pkg-date"> <title>Document Revision Date</title>
23
24
25       <para>
26       The information contained in this document is extremely
27       time sensitive.  <emphasis>It is vital that a packager
28       stay current with changes in Wine. </>
29       Changes to this document could be tracked e.g. by viewing its CVS log.
30       Due to Wine's fast development, a recent revision date
31       does not necessarily indicate that this document is 100% on par
32       with what Wine's full installation requirements are
33       (especially whenever lazy developers don't properly update the
34       documentation to include info about new features they implemented).
35       </para>
36       <para>
37       This document was last revised on January 16, 2003.</para>
38
39       </sect1>
40
41     <sect1 id="pkg-terms"> <title>Terms used in this document</title>
42
43         <para>There are several terms and paths used in this
44         document as place holders for configurable values.
45         Those terms are described here.
46         </para>
47
48         <orderedlist>
49             <listitem id=WINECONFDIR><para id=wineconfdir.id><EnVar>WINECONFDIR</EnVar></para>
50                 <para>
51                 <envar>WINECONFDIR</envar> is the user's Wine configuration directory.
52                 This is almost always ~/.wine, but can be overridden
53                 by the user by setting the <EnVar>WINECONFDIR</EnVar> environment
54                 variable.
55                 </para>
56             </listitem>
57
58             <listitem id=PREFIX><para id=prefix.id><EnVar>PREFIX</EnVar></para>
59                 <para>
60                 <envar>PREFIX</envar> is the prefix used when selecting
61                 an installation target.  The current default is /usr/local.
62                 This results in binary installation into /usr/bin,
63                 library installation into /usr/wine/lib, and so forth.
64                 This value can be overridden by the packager.
65                 In fact, <ulink url="http://www.pathname.com/fhs/">FHS 2.2</ulink>
66                 specifications suggest that a better
67                 prefix is /opt/wine.  Ideally, a packager would also
68                 allow the installer to override this value.
69                 </para>
70             </listitem>
71
72             <listitem id=ETCDIR><para id=etcdir.id><EnVar>ETCDIR</EnVar></para>
73                 <para>
74                 <envar>ETCDIR</envar> is the prefix that Wine uses
75                 to find the global configuration directory.
76                 This can be changed by the configure option sysconfdir.
77                 The current default is $prefix/etc.
78                 </para>
79             </listitem>
80
81             <listitem id=WINDOWSDIR><para id=windowsdir.id><EnVar>WINDOWSDIR</EnVar></para>
82                 <para>
83                 <envar>WINDOWSDIR</envar> is an important concept
84                 to Wine.  This directory specifies what directory
85                 corresponds to the root Windows directory
86                 (e.g. C:\WINDOWS).
87                 </para>
88                 <para>
89                 This directory is specified by the user, in
90                 the user's <link linkend=winerc>configuration file</link>.
91                 </para>
92                 <para>
93                 Generally speaking, this directory is either set
94                 to point at an empty directory, or it is set
95                 to point at a Windows partition that has been
96                 mounted through the vfat driver.
97                 </para>
98                 <para>
99                 <emphasis>It is extremely important that the packager
100                 understand the importance of <envar>WINDOWSDIR</envar>
101                 and convey this information and choice to the end
102                 user</emphasis>.
103                 </para>
104             </listitem>
105
106         </orderedlist>
107
108
109     </sect1>
110
111   </chapter>
112
113
114
115     <chapter id="pkg-introduction"> <title>Introduction</title>
116
117     <para>
118         This document attempts to establish guidelines
119         for people making binary packages of Wine.
120     </para>
121
122     <para>
123         It expresses the basic principles that the
124         Wine developers have agreed should be
125         used when building Wine.
126         It also attempts to highlight the areas
127         where there are different approaches
128         to packaging Wine, so that the packager
129         can understand the different alternatives
130         that have been considered and their rationales.
131     </para>
132
133         <sect1 id="pkg-goals"> <title>Goals</title>
134         <para>
135             An installation from a Wine package should:
136         </para>
137           <itemizedlist>
138
139             <listitem>
140                 <para>
141                 Install quickly and simply.
142                 </para>
143                 <para>
144                 The initial installation should require no user
145                 input.  An rpm -i wine.rpm or apt-get install wine
146                 should suffice for initial installation.
147                 </para>
148             </listitem>
149
150             <listitem>
151                 <para>
152                 Work quickly and simply
153                 </para>
154                 <para>
155                 The user should be able to launch Solitaire
156                 within minutes of downloading the Wine package.
157                 </para>
158             </listitem>
159
160             <listitem>
161               <para>
162               Comply with Filesystem Hierarchy Standard
163               </para>
164               <para>
165               A Wine installation should, as much as possible, comply
166               with the
167                 <ulink url="http://www.pathname.com/fhs/">FHS standard</ulink>.
168               </para>
169             </listitem>
170
171             <listitem>
172                 <para>
173                 Preserve flexibility
174                 </para>
175                 <para>
176                 None of the flexibility built into Wine should
177                 be hidden from the end user.
178                 </para>
179             </listitem>
180
181             <listitem>
182               <para>
183                 Come as preconfigured as possible, so the user does
184                 not need to change any configuration files.
185               </para>
186             </listitem>
187
188             <listitem>
189               <para>Use only as much diskspace as needed per user.</para>
190             </listitem>
191
192             <listitem>
193               <para>
194               Reduce support requirements.
195               </para>
196               <para>
197               A packaged version of Wine should be sufficiently easy
198               to use and have quick and easy access to FAQs and
199               documentation such that requests to the
200               newsgroup and development group go down.
201               Further, it should be easy for users to capture
202               good bug reports.
203               </para>
204             </listitem>
205
206           </itemizedlist>
207
208
209         </sect1>
210
211         <sect1 id="pkg-requirements"> <title>Requirements</title>
212       <para>
213         Successfully installing Wine requires:
214       </para>
215
216         <itemizedlist>
217         <listitem>
218           <para>Much thought and work from the packager (1x)</para>
219         </listitem>
220         <listitem>
221           <para>
222           A configuration file
223           </para>
224           <para>
225           Wine will not run without a configuration file.  Wine provides a
226           a sample config file and it can be found in /usr/share/doc/wine/samples.
227           Some packagers may attempt to provide (or dynamically generate) a default configuration
228           file.  Some packagers may wish to rely on winesetup to generate the configuration file.
229           </para>
230         </listitem>
231
232
233             <listitem>
234               <para>
235                 A writeable <filename>C:\</filename> directory
236                 structure on a per-user basis. Applications do dump
237                 <filename>.ini</filename> files into
238                 <filename>c:\windows</filename>, installers dump
239                 <filename>.exe</filename>, <filename>.dll</filename>
240                 and more into <filename>c:\windows</filename> and
241                 subdirectories or into <filename>C:\Program Files</filename>.
242               </para>
243             </listitem>
244
245
246             <listitem>
247               <para>
248                 An initial set of registry entries.
249               </para>
250                 <para>
251                 The current Wine standard is to use the regedit tool
252                 against the 'winedefault.reg' file to generate
253                 a default registry.
254                 </para>
255                 <para> 
256                 The current preferred method of configuring/installing
257                 Wine is to run /toos/wineinstall.
258                 There are several other choices that could be made;
259                 registries can be imported from a Windows partition.
260                 At this time, Wine does not completely support
261                 a complex multi-user installation ala Windows NT,
262                 but it could fairly readily.
263                 </para>
264             </listitem>
265
266
267             <listitem>
268               <para>
269                 Some special <filename>.dll</filename> and
270                 <filename>.exe</filename> files in the
271                 <filename>windows\system</filename> directory, since
272                 applications directly check for their presence.
273               </para>
274             </listitem>
275           </itemizedlist>
276
277         </sect1>
278
279
280     </chapter>
281
282
283
284
285     <chapter id="pkg-components"><title>Wine Components</title>
286
287     <para>
288         This section lists all files that pertain to Wine.
289     </para>
290
291         <sect1 id="pkg-static"><title>Wine Static and Shareable Files</title>
292
293         <para>
294         At the time of this writing, almost all of the following components
295         are installed through a standard 'make install'
296         of Wine. Exceptions from the rule are noted.
297
298         <caution>
299         <para>
300         It is vital that a packager check for
301         changes in Wine.  This list will likely be out
302         of date by the time this document is committed to CVS.
303         </para>
304         </caution>
305
306         </para>
307
308         <orderedlist>
309
310             <listitem id=binfiles>
311                 <variablelist><title>Executable Files</title>
312
313                   <varlistentry><term><filename>wine</filename></term>
314                     <listitem>
315                     <para>
316                     The main Wine executable.  This program will load
317                     a Windows binary and run it, relying upon
318                     the Wine shared object libraries.
319                     </para>
320                     </listitem>
321                   </varlistentry>
322
323                   <varlistentry><term><filename>wineserver</filename></term>
324                     <listitem>
325                     <para>
326                     The Wine server is critical to Wine; it is the
327                     process that coordinates all shared Windows
328                     resources.
329                     </para>
330                     </listitem>
331                   </varlistentry>
332
333                   <varlistentry><term><filename>winebootup</filename></term>
334                     <listitem>
335                     <para>
336                     Winelib app to be found in programs/.
337                     It'll be called by the winelauncher wine wrapper startup
338                     script for every first-time wine invocation.
339                     Its purpose is to process all Windows startup autorun
340                     mechanisms, such as wininit.ini, win.ini Load=/Run=,
341                     registry keys: RenameFiles/Run/RunOnce*/RunServices*,
342                     Startup folders.
343                     </para>
344                     </listitem>
345                   </varlistentry>
346
347                   <varlistentry><term><filename>wineclipsrv</filename></term>
348                     <listitem>
349                     <para>
350                     The Wine Clipboard Server is a standalone XLib
351                     application whose purpose is to manage the X selection
352                     when Wine exits.
353                     </para>
354                     </listitem>
355                   </varlistentry>
356
357                   <varlistentry><term><filename>winedbg</filename></term>
358                     <listitem>
359                     <para>
360                     Winedbg is the Wine built in debugger.
361                     </para>
362                     </listitem>
363                   </varlistentry>
364
365                   <varlistentry><term><filename>winelauncher</filename></term>
366                     <listitem>
367                     <para>
368                     (not getting installed via make install)
369                     A wine wrapper shell script that intelligently handles
370                     wine invocation by informing the user about what's going
371                     on, among other things.
372                     To be found in tools/ directory.
373                     Use of this wrapper script instead of directly using wine
374                     is strongly encouraged, as it not only improves the user
375                     interface, but also adds important functionality to wine,
376                     such as session bootup/startup actions.
377                     If you intend to use this script, then you might want to
378                     rename the wine executable to e.g. wine.bin and
379                     winelauncher to wine.
380                     the <link linkend=WINECONFDIR endterm=wineconfdir.id></link>/config file.
381                     </para>
382                     </listitem>
383                   </varlistentry>
384
385                   <varlistentry><term><filename>winesetup</filename></term>
386                     <listitem>
387                     <para>
388                     This is a Tcl/Tk based front end that provides
389                     a user friendly tool to edit and configure
390                     the <link linkend=WINECONFDIR endterm=wineconfdir.id></link>/config file.
391                     </para>
392                     </listitem>
393                   </varlistentry>
394
395                   <varlistentry><term><filename>wineshelllink</filename></term>
396                     <listitem>
397                     <para>
398                     This shell script can be called by Wine in order
399                     to propagate Desktop icon and menu creation
400                     requests out to a GNOME or KDE (or other
401                     Window Managers).
402                     </para>
403                     </listitem>
404                   </varlistentry>
405
406                   <varlistentry><term><filename>winebuild</filename></term>
407                     <listitem>
408                     <para>
409                     Winebuild is a tool used for Winelib applications
410                     (and by Wine itself) to allow a developer to
411                     compile a .spec file into a .spec.c file.
412                     </para>
413                     </listitem>
414                   </varlistentry>
415                   <varlistentry><term><filename>wmc</filename></term>
416                     <listitem>
417                     <para>
418                     The wmc tools is the Wine Message Compiler.  It
419                     allows Windows message files to be compiled
420                     into a format usable by Wine.
421                     </para>
422                     </listitem>
423                   </varlistentry>
424                   <varlistentry><term><filename>wrc</filename></term>
425                     <listitem>
426                     <para>
427                     The wrc tool is the Wine Resource Compiler.
428                     It allows Winelib programmers (and Wine itself)
429                     to compile Windows style resource files
430                     into a form usable by Wine.
431                     </para>
432                     </listitem>
433                   </varlistentry>
434                   <varlistentry><term><filename>fnt2bdf</filename></term>
435                     <listitem>
436                     <para>
437                     The fnt2bdf utility extracts fonts from .fnt or
438                     .dll files and stores them in .bdf format files.
439                     </para>
440                     </listitem>
441                   </varlistentry>
442                   <varlistentry><term><filename>dosmod</filename></term>
443                     <listitem>
444                     <para>
445                     DOS Virtual Machine.
446                     </para>
447                     </listitem>
448                   </varlistentry>
449
450                   <varlistentry><term><filename>uninstaller</filename></term>
451                     <listitem>
452                     <para>
453                     (not getting installed via make install)
454                     A Winelib program to uninstall installed Windows programs.
455                     To be found in the programs/ source directory.
456                     This program can be used to uninstall most Windows programs
457                     (just like the Add/Remove Programs item in Windows)
458                     by taking the registry uninstall strings that get created
459                     by installers such as InstallShield or WISE.
460                     In binary packages, it should probably be renamed
461                     to something like wine-uninstaller for consistency's sake.
462                     </para>
463                     </listitem>
464                   </varlistentry>
465
466                 </variablelist>
467             </listitem>
468
469         <listitem id=libfiles>
470         <para>Shared Object Library Files</para>
471         <para>This list may NOT necessarily current!</para>
472
473         <simplelist columns=5>
474 <member>advapi32.dll.so</>
475 <member>avicap32.dll.so</>
476 <member>avifil32.dll.so</>
477 <member>avifile.dll.so</>
478 <member>aviinfo.exe.so</>
479 <member>aviplay.exe.so</>
480 <member>clock.exe.so </>
481 <member>comcat.dll.so</>
482 <member>comctl32.dll.so</>
483 <member>comdlg32.dll.so</>
484 <member>comm.dll.so</>
485 <member>commdlg.dll.so</>
486 <member>compobj.dll.so</>
487 <member>control.exe.so</>
488 <member>crtdll.dll.so</>
489 <member>crypt32.dll.so</>
490 <member>dciman32.dll.so</>
491 <member>ddeml.dll.so</>
492 <member>ddraw.dll.so</>
493 <member>devenum.dll.so</>
494 <member>dinput.dll.so</>
495 <member>dinput8.dll.so</>
496 <member>dispdib.dll.so</>
497 <member>display.dll.so</>
498 <member>dplay.dll.so</>
499 <member>dplayx.dll.so</>
500 <member>dsound.dll.so</>
501 <member>expand.exe.so</>
502 <member>gdi.exe.so</>
503 <member>gdi32.dll.so</>
504 <member>glu32.dll.so</>
505 <member>icmp.dll.so</>
506 <member>imaadp32.acm.so</>
507 <member>imagehlp.dll.so</>
508 <member>icinfo.exe.so</>
509 <member>icmp.dll.so</>
510 <member>imaadp32.acm.so</>
511 <member>imagehlp.dll.so</>
512 <member>imm.dll.so</>
513 <member>imm32.dll.so</>
514 <member>joystick.drv.so</>
515 <member>kernel32.dll.so</>
516 <member>keyboard.dll.so</>
517 <member>krnl386.exe.so</>
518 <member>libgdi32.dll.so</>
519 <member>libkernel32.dll.so</>
520 <member>libntdll.dll.so</>
521 <member>libuser32.dll.so</>
522 <member>libwine.so</>
523 <member>libwine_tsx11.so</>
524 <member>libwine_unicode.so</>
525 <member>libwinspool.drv.so</>
526 <member>lz32.dll.so</>
527 <member>lzexpand.dll.so</>
528 <member>mapi32.dll.so</>
529 <member>mcianim.drv.so</>
530 <member>mciavi.drv.so</>
531 <member>mcicda.drv.so</>
532 <member>mciseq.drv.so</>
533 <member>mciwave.drv.so</>
534 <member>midimap.drv.so</>
535 <member>mmsystem.dll.so</>
536 <member>mouse.dll.so</>
537 <member>mpr.dll.so</>
538 <member>msacm.dll.so</>
539 <member>msacm.drv.so</>
540 <member>msacm32.dll.so</>
541 <member>msdmo.dll.so</>
542 <member>msg711.drv.so</>
543 <member>msimg32.dll.so</>
544 <member>msacm.drv.so</>
545 <member>msnet32.dll.so</>
546 <member>msrle32.dll.so</>
547 <member>msdmo.dll.so</>
548 <member>msg711.acm.so</>
549 <member>msimg32.dll.so</>
550 <member>msisys.ocx.so</>
551 <member>msnet32.dll.so</>
552 <member>msrle32.dll.so</>
553 <member>msvcrt.dll.so</>
554 <member>msvcrt20.dll.so</>
555 <member>msvfw32.dll.so</>
556 <member>msvideo.dll.so</>
557 <member>netapi32.dll.so</>
558 <member>notepad.exe.so</>
559 <member>ntdll.dll.so</>
560 <member>odbc32.dll.so</>
561 <member>ole2.dll.so</>
562 <member>ole2conv.dll.so</>
563 <member>ole2disp.dll.so</>
564 <member>ole2nls.dll.so</>
565 <member>ole2prox.dll.so</>
566 <member>ole2thk.dll.so</>
567 <member>ole32.dll.so</>
568 <member>oleaut32.dll.so</>
569 <member>olecli.dll.so</>
570 <member>olecli32.dll.so</>
571 <member>oledlg.dll.so</>
572 <member>olepro32.dll.so</>
573 <member>olesvr.dll.so</>
574 <member>olesvr32.dll.so</>
575 <member>opengl32.dll.so</>
576 <member>osversioncheck.exe.so</>
577 <member>progman.exe.so</>
578 <member>psapi.dll.so</>
579 <member>qcap.dll.so</>
580 <member>quartz.dll.so</>
581 <member>rasapi16.dll.so</>
582 <member>rasapi32.dll.so</>
583 <member>regapi.exe.so</>
584 <member>regedit.exe.so </>
585 <member>regsvr32.exe.so</>
586 <member>regtest.exe.so</>
587 <member>riched32.dll.so</>
588 <member>rpcrt4.dll.so</>
589 <member>serialui.dll.so</>
590 <member>setupapi.dll.so</>
591 <member>setupx.dll.so</>
592 <member>shdocvw.dll.so</>
593 <member>shell.dll.so</>
594 <member>shell32.dll.so</>
595 <member>shfolder.dll.so</>
596 <member>shlwapi.dll.so</>
597 <member>sound.dll.so</>
598 <member>sti.dll.so</>
599 <member>storage.dll.so</>
600 <member>stress.dll.so</>
601 <member>system.dll.so</>
602 <member>tapi32.dll.so</>
603 <member>toolhelp.dll.so</>
604 <member>ttydrv.dll.so</>
605 <member>twain_32.dll.so</>
606 <member>typelib.dll.so</>
607 <member>uninstaller.exe.so</>
608 <member>url.dll.so</>
609 <member>urlmon.dll.so</>
610 <member>user.exe.so</>
611 <member>user32.dll.so</>
612 <member>ver.dll.so</>
613 <member>version.dll.so</>
614 <member>w32skrnl.dll.so</>
615 <member>w32sys.dll.so</>
616 <member>win32s16.dll.so</>
617 <member>win87em.dll.so</>
618 <member>winaspi.dll.so</>
619 <member>windebug.dll.so</>
620 <member>winealsa.drv.so</>
621 <member>winearts.drv.so</>
622 <member>wineconsole.exe.so</>
623 <member>winedbg.exe.so</>
624 <member>winedos.dll.so</>
625 <member>winefile.exe.so</>
626 <member>winemine.exe.so</>
627 <member>winemp3.acm.so</>
628 <member>wineoss.drv.so</>
629 <member>winepath.exe.so</>
630 <member>wineps.dll.so</>
631 <member>wineps16.dll.so</>
632 <member>wing.dll.so</>
633 <member>winhelp.exe.so</>
634 <member>wininet.dll.so</>
635 <member>winmm.dll.so</>
636 <member>winnls.dll.so</>
637 <member>winnls32.dll.so</>
638 <member>winsock.dll.so</>
639 <member>winspool.drv.so</>
640 <member>wintrust.dll.so</>
641 <member>wnaspi32.dll.so</>
642 <member>wow32.dll.so</>
643 <member>wprocs.dll.so</>
644 <member>ws2_32.dll.so</>
645 <member>wsock32.dll.so</>
646 <member>x11drv.dll.so</>
647         </simplelist>
648
649         </listitem>
650
651
652             <listitem id=manfiles>
653             <para> Man Pages</para>
654                 <simplelist columns=1>
655 <member>wine.conf.man</>
656 <member>wine.man</>
657 <member>winemaker</>
658 <member>wmc.man</>
659 <member>wrc.man</>
660                 </simplelist>
661             </listitem>
662
663
664             <listitem id=includefiles>
665             <para>Include Files</para>
666             <para>This list may NOT be current!</para>
667                 <simplelist columns=5>
668
669 <member>audevcod.h</>
670 <member>basetsd.h</>
671 <member>cderr.h</>
672 <member>cguid.h</>
673 <member>comcat.h</>
674 <member>commctrl.h</>
675 <member>commdlg.h</>
676 <member>compobj.h</>
677 <member>cpl.h</>
678 <member>d3d.h</>
679 <member>d3dcaps.h</>
680 <member>d3dtypes.h</>
681 <member>d3dvec.inl</>
682 <member>dde.h</>
683 <member>ddeml.h</>
684 <member>ddraw.h</>
685 <member>digitalv.h</>
686 <member>dinput.h</>
687 <member>dispdib.h</>
688 <member>dlgs.h</>
689 <member>dmo.h</>
690 <member>dmoreg.h</>
691 <member>dmort.h</>
692 <member>docobj.h</>
693 <member>dplay.h</>
694 <member>dplobby.h</>
695 <member>dshow.h</>
696 <member>dsound.h</>
697 <member>guiddef.h</>
698 <member>imagehlp.h</>
699 <member>imm.h</>
700 <member>initguid.h</>
701 <member>instance.h</>
702 <member>lmcons.h</>
703 <member>lzexpand.h</>
704 <member>mapi.h</>
705 <member>mapicode.h</>
706 <member>mapidefs.h</>
707 <member>mciavi.h</>
708 <member>mcx.h</>
709 <member>mediaerr.h</>
710 <member>mediaobj.h</>
711 <member>minmax.h</>
712 <member>mmreg.h</>
713 <member>mmsystem.h</>
714 <member>msacm.h</>
715 <member>msacmdlg.h</>
716 <member>msvcrt/conio.h</>
717 <member>msvcrt/crtdbg.h</>
718 <member>msvcrt/ctype.h</>
719 <member>msvcrt/direct.h</>
720 <member>msvcrt/dos.h</>
721 <member>msvcrt/eh.h</>
722 <member>msvcrt/excpt.h</>
723 <member>msvcrt/fcntl.h</>
724 <member>msvcrt/io.h</>
725 <member>msvcrt/locale.h</>
726 <member>msvcrt/malloc.h</>
727 <member>msvcrt/mbctype.h</>
728 <member>msvcrt/mbstring.h</>
729 <member>msvcrt/process.h</>
730 <member>msvcrt/search.h</>
731 <member>msvcrt/setjmp.h</>
732 <member>msvcrt/share.h</>
733 <member>msvcrt/stddef.h</>
734 <member>msvcrt/stdio.h</>
735 <member>msvcrt/stdlib.h</>
736 <member>msvcrt/string.h</>
737 <member>msvcrt/sys/locking.h</>
738 <member>msvcrt/sys/stat.h</>
739 <member>msvcrt/sys/timeb.h</>
740 <member>msvcrt/sys/types.h</>
741 <member>msvcrt/sys/utime.h</>
742 <member>msvcrt/time.h</>
743 <member>msvcrt/wchar.h</>
744 <member>msvcrt/wctype.h</>
745 <member>mswsock.h</>
746 <member>nb30.h</>
747 <member>nspapi.h</>
748 <member>ntsecapi.h</>
749 <member>oaidl.h</>
750 <member>objbase.h</>
751 <member>objidl.h</>
752 <member>ocidl.h</>
753 <member>ole2.h</>
754 <member>ole2ver.h</>
755 <member>oleauto.h</>
756 <member>olectl.h</>
757 <member>oledlg.h</>
758 <member>oleidl.h</>
759 <member>poppack.h</>
760 <member>prsht.h</>
761 <member>psapi.h</>
762 <member>pshpack1.h</>
763 <member>pshpack2.h</>
764 <member>pshpack4.h</>
765 <member>pshpack8.h</>
766 <member>ras.h</>
767 <member>regstr.h</>
768 <member>richedit.h</>
769 <member>rpc.h</>
770 <member>rpcdce.h</>
771 <member>rpcdcep.h</>
772 <member>rpcndr.h</>
773 <member>rpcnterr.h</>
774 <member>rpcproxy.h</>
775 <member>servprov.h</>
776 <member>setupapi.h</>
777 <member>shellapi.h</>
778 <member>shlguid.h</>
779 <member>shlobj.h</>
780 <member>shlwapi.h</>
781 <member>sql.h</>
782 <member>sqlext.h</>
783 <member>sqltypes.h</>
784 <member>storage.h</>
785 <member>tapi.h</>
786 <member>tlhelp32.h</>
787 <member>unknwn.h</>
788 <member>urlmon.h</>
789 <member>uuids.h</>
790 <member>ver.h</>
791 <member>vfw.h</>
792 <member>vfwmsgs.h</>
793 <member>winbase.h</>
794 <member>wincon.h</>
795 <member>wincrypt.h</>
796 <member>windef.h</>
797 <member>windows.h</>
798 <member>windowsx.h</>
799 <member>wine/debug.h</>
800 <member>wine/exception.h</>
801 <member>wine/icmpapi.h</>
802 <member>wine/ipexport.h</>
803 <member>wine/library.h</>
804 <member>wine/obj_base.h</>
805 <member>wine/obj_cache.h</>
806 <member>wine/obj_channel.h</>
807 <member>wine/obj_clientserver.h</>
808 <member>wine/obj_comcat.h</>
809 <member>wine/obj_commdlgbrowser.h</>
810 <member>wine/obj_connection.h</>
811 <member>wine/obj_contextmenu.h</>
812 <member>wine/obj_control.h</>
813 <member>wine/obj_dataobject.h</>
814 <member>wine/obj_dockingwindowframe.h</>
815 <member>wine/obj_dragdrop.h</>
816 <member>wine/obj_enumguid.h</>
817 <member>wine/obj_enumidlist.h</>
818 <member>wine/obj_errorinfo.h</>
819 <member>wine/obj_extracticon.h</>
820 <member>wine/obj_inplace.h</>
821 <member>wine/obj_marshal.h</>
822 <member>wine/obj_misc.h</>
823 <member>wine/obj_moniker.h</>
824 <member>wine/obj_oleaut.h</>
825 <member>wine/obj_olefont.h</>
826 <member>wine/obj_oleobj.h</>
827 <member>wine/obj_oleundo.h</>
828 <member>wine/obj_oleview.h</>
829 <member>wine/obj_picture.h</>
830 <member>wine/obj_property.h</>
831 <member>wine/obj_propertystorage.h</>
832 <member>wine/obj_queryassociations.h</>
833 <member>wine/obj_serviceprovider.h</>
834 <member>wine/obj_shellbrowser.h</>
835 <member>wine/obj_shellextinit.h</>
836 <member>wine/obj_shellfolder.h</>
837 <member>wine/obj_shelllink.h</>
838 <member>wine/obj_shellview.h</>
839 <member>wine/obj_storage.h</>
840 <member>wine/obj_webbrowser.h</>
841 <member>wine/unicode.h</>
842 <member>winerror.h</>
843 <member>wingdi.h</>
844 <member>wininet.h</>
845 <member>winioctl.h</>
846 <member>winnetwk.h</>
847 <member>winnls.h</>
848 <member>winnt.h</>
849 <member>winreg.h</>
850 <member>winres.h</>
851 <member>winresrc.h</>
852 <member>winsock.h</>
853 <member>winsock2.h</>
854 <member>winspool.h</>
855 <member>winsvc.h</>
856 <member>winuser.h</>
857 <member>winver.h</>
858 <member>wnaspi32.h</>
859 <member>wownt32.h</>
860 <member>ws2spi.h</>
861 <member>ws2tcpip.h</>
862 <member>wshisotp.h</>
863 <member>wsipx.h</>
864 <member>wtypes.h</>
865 <member>zmouse.h</>
866 <member>libwine_uuid.a</>
867         </simplelist>
868
869         </listitem>
870
871         <listitem id=docfiles>
872         <para>Documentation files.</para>
873         <para>This list may NOT be current!</para>
874
875         <simplelist columns=3>
876
877 <member>HOWTO-winelib.gz</>
878 <member>wine-devel-20020710/wine-devel</>
879 <member>wine-devel/accel-impl.html</>
880 <member>wine-devel/arch-dlls.html</>
881 <member>wine-devel/architecture.html</>
882 <member>wine-devel/build.html</>
883 <member>wine-devel/com-writing.html</>
884 <member>wine-devel/compiling.html</>
885 <member>wine-devel/consoles.html</>
886 <member>wine-devel/cvs-regression.html</>
887 <member>wine-devel/dbg-channels.html</>
888 <member>wine-devel/dbg-checking.html</>
889 <member>wine-devel/dbg-commands.html</>
890 <member>wine-devel/dbg-compiling.html</>
891 <member>wine-devel/dbg-config.html</>
892 <member>wine-devel/dbg-in-memory.html</>
893 <member>wine-devel/dbg-limits.html</>
894 <member>wine-devel/dbg-modes.html</>
895 <member>wine-devel/dbg-notes.html</>
896 <member>wine-devel/dbg-others.html</>
897 <member>wine-devel/dbg-param.html</>
898 <member>wine-devel/dbg-resource-ids.html</>
899 <member>wine-devel/dbg-using.html</>
900 <member>wine-devel/debugger.html</>
901 <member>wine-devel/debugging.html</>
902 <member>wine-devel/dlls.html</>
903 <member>wine-devel/documentation.html</>
904 <member>wine-devel/file-handles.html</>
905 <member>wine-devel/hardware-trace.html</>
906 <member>wine-devel/i18n.html</>
907 <member>wine-devel/implementation.html</>
908 <member>wine-devel/index.html</>
909 <member>wine-devel/memory-addresses.html</>
910 <member>wine-devel/module-overview.html</>
911 <member>wine-devel/ole-binary.html</>
912 <member>wine-devel/ole.html</>
913 <member>wine-devel/opengl-configure.html</>
914 <member>wine-devel/opengl-problems.html</>
915 <member>wine-devel/opengl-works.html</>
916 <member>wine-devel/opengl.html</>
917 <member>wine-devel/os2-wine.html</>
918 <member>wine-devel/part-one.html</>
919 <member>wine-devel/part-three.html</>
920 <member>wine-devel/part-two.html</>
921 <member>wine-devel/patch-quality.html</>
922 <member>wine-devel/patches.html</>
923 <member>wine-devel/porting.html</>
924 <member>wine-devel/tools.html</>
925 <member>wine-devel/wine-debugger.html</>
926 <member>wine-devel/wine-docbook.html</>
927 <member>winelib-user/bindlls-building.html</>
928 <member>winelib-user/bindlls-cxx-apis.html</>
929 <member>winelib-user/bindlls-spec.html</>
930 <member>winelib-user/bindlls-wrapper.html</>
931 <member>winelib-user/bindlls.html</>
932 <member>winelib-user/c-library.html</>
933 <member>winelib-user/com-support.html</>
934 <member>winelib-user/index.html</>
935 <member>winelib-user/init-problems.html</>
936 <member>winelib-user/linking.html</>
937 <member>winelib-user/mfc-compiling.html</>
938 <member>winelib-user/mfc-legal-issues.html</>
939 <member>winelib-user/mfc-using.html</>
940 <member>winelib-user/mfc.html</>
941 <member>winelib-user/others.html</>
942 <member>winelib-user/packaging.html</>
943 <member>winelib-user/portability-issues.html</>
944 <member>winelib-user/porting-compiling.html</>
945 <member>winelib-user/seh.html</>
946 <member>winelib-user/spec-file.html</>
947 <member>winelib-user/unicode.html</>
948 <member>winelib-user/winelib-getting-started.html</>
949 <member>winelib-user/winelib-introduction.html</>
950 <member>winelib-user/winelib-requirements.html</>
951 <member>winelib-user/winelib-toolkit.html</>
952 <member>winelib-user/wmc.html</>
953 <member>winelib-user/wrc.html</>
954         </simplelist>
955
956         </listitem>
957
958
959         </orderedlist>
960
961         </sect1>
962
963
964         <sect1 id="pkg-nonstatic"><title>Dynamic Wine Files</title>
965
966         <para>
967         Wine also generates and depends on a number of dynamic
968         files, including user configuration files and registry files.
969         </para>
970
971         <para>
972         At the time of this writing, there was not a clear
973         consensus of where these files should be located, and how
974         they should be handled.  This section attempts
975         to explain the alternatives clearly.
976         </para>
977
978         <orderedlist>
979
980             <listitem>
981                 <variablelist><title>Configuration File</title>
982                   <varlistentry id=winerc><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/config</filename></term>
983                     <listitem>
984                     <para>
985                     This file is the user local Wine configuration file.
986                     At the time of this writing, if this file exists,
987                     then no other configuration file is loaded.
988                     </para>
989                     </listitem>
990                   </varlistentry>
991
992                   <varlistentry><term>
993                     <filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.conf</filename></term>
994                     <listitem>
995                     <para>
996                     This is the global Wine configuration file.  It
997                     is only used if the user running Wine has
998                     no local configuration file.
999                     Global wine configuration is currently not possible;
1000                     this might get reenabled at some time.
1001                     </para>
1002                     <para>
1003                     Some packagers feel that this file should not
1004                     be supplied, and that only a wine.conf.default
1005                     should be given here.
1006                     </para>
1007                     <para>
1008                     Other packagers feel that this file should
1009                     be the predominant file used, and that
1010                     users should only shift to a local configuration
1011                     file if they need to.  An argument has been
1012                     made that the local configuration file
1013                     should inherit the global configuration file.
1014                     At this time, Wine does not do this;
1015                     please refer to the WineHQ discussion
1016                     archives for the debate concerning this.
1017                     </para>
1018                     <para>
1019                     This debate is addressed more completely
1020                     below, in <link linkend=pkg-strategy endterm=strategy.id></link>.
1021                     </para>
1022                     </listitem>
1023                   </varlistentry>
1024                 </variablelist>
1025
1026             </listitem>
1027
1028         <listitem>
1029
1030                 <para>Registry Files</para>
1031
1032                 <para>
1033                 In order to replicate the Windows registry system,
1034                 Wine stores registry entries in a series of files.
1035
1036                 For an excellent overview of this issue, read
1037                 this
1038                 <ulink url="http://www.winehq.com/News/2000-25.html#FTR">
1039                 Wine Weekly News feature.</ulink>
1040
1041                 </para>
1042
1043                 <para>
1044                 The bottom line is that, at Wine server startup,
1045                 Wine loads all registry entries into memory
1046                 to create an in memory image of the registry.
1047                 The order of files which Wine uses to load
1048                 registry entries is extremely important,
1049                 as it affects what registry entries are
1050                 actually present.  The order is roughly that
1051                 .dat files from a Windows partion are loaded,
1052                 then global registry settings from <link linkend=ETCDIR endterm=etcdir.id></link>,
1053                 and then finally local registry settings are
1054                 loaded from <link linkend=WINECONFDIR endterm=wineconfdir.id></link>
1055                 .  As each set are loaded,
1056                 they can override the prior entries.  Thus,
1057                 the local registry files take precedence.
1058                 </para>
1059
1060                 <para>
1061                 Then, at exit (or at periodic intervals),
1062                 Wine will write either all registry entries
1063                 (or, with the default setting) changed
1064                 registry entries to files in the
1065                 <link linkend=WINECONFDIR endterm=wineconfdir.id></link>.
1066                 </para>
1067
1068                 <variablelist>
1069                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/system.reg</filename></term>
1070                     <listitem>
1071                     <para>
1072                     This file contains the user's local copy of
1073                     the HKEY_LOCAL_MACHINE registry hive.  In general
1074                     use, it will contain only changes made to the
1075                     default registry values.
1076                     </para>
1077                     </listitem>
1078                   </varlistentry>
1079
1080                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/user.reg</filename></term>
1081                     <listitem>
1082                     <para>
1083                     This file contains the user's local copy of
1084                     the HKEY_CURRENT_USER registry hive.  In
1085                     general use, it will contain only changes made to the
1086                     default registry values.
1087                     </para>
1088                     </listitem>
1089                   </varlistentry>
1090
1091                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/userdef.reg</filename></term>
1092                     <listitem>
1093                     <para>
1094                     This file contains the user's local copy of
1095                     the HKEY_USERS\.Default registry hive.  In
1096                     general use, it will contain only changes made to the
1097                     default registry values.
1098                     </para>
1099                     </listitem>
1100                   </varlistentry>
1101
1102                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/wine.userreg</filename></term>
1103                     <listitem>
1104                     <para>
1105                     This file is being deprecated.  It is only read
1106                     if there is no user.reg or wine.userreg, and
1107                     it supplied the contents of HKEY_USERS.
1108                     </para>
1109                     </listitem>
1110                   </varlistentry>
1111
1112                   <varlistentry><term><filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.systemreg</filename></term>
1113                     <listitem>
1114                     <para>
1115                     This file contains the global values for
1116                     HKEY_LOCAL_MACHINE.  The values in this file
1117                     can be overridden by the user's local settings.
1118                     </para>
1119                     <note>
1120                     <para>
1121                     The location of this directory is hardcoded within
1122                     wine, generally to /etc.  This will hopefully be
1123                     fixed at some point in the future.
1124                     </para>
1125                     </note>
1126                     </listitem>
1127                   </varlistentry>
1128
1129
1130                   <varlistentry><term><filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.userreg</filename></term>
1131                     <listitem>
1132                     <para>
1133                     This file contains the global values for
1134                     HKEY_USERS.  The values in this file
1135                     can be overridden by the user's local settings.
1136                     This file is likely to be deprecated in
1137                     favor of a global wine.userdef.reg that will
1138                     only contain HKEY_USERS/.Default.
1139                     </para>
1140                     </listitem>
1141                   </varlistentry>
1142
1143                 </variablelist>
1144
1145
1146         </listitem>
1147
1148         <listitem>
1149                 <variablelist><title>Other files in <link linkend=WINECONFDIR endterm=wineconfdir.id></link></title>
1150                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/wineserver-[hostname]</filename></term>
1151                     <listitem>
1152                     <para>
1153                     This directory contains files used by Wine and the Wineserver
1154                     to communicate. A packager may want to have a facility for the user to erase files in this directory, as a crash in the 
1155                     wineserver resulting in a bogus lock file can render wine unusable.
1156                     </para>
1157                     </listitem>
1158                   </varlistentry>
1159
1160                   <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/cachedmetrics.[display]</filename></term>
1161                     <listitem>
1162                     <para>
1163                     This file contains font metrics for the given X display.
1164                     Generally, this cache is generated once at Wine start time.
1165                     cachedmetrics can be generated if absent.You should note this can be long.
1166                     </para>
1167                     </listitem>
1168                   </varlistentry>
1169
1170                 </variablelist>
1171         </listitem>
1172
1173
1174         </orderedlist>
1175
1176
1177         </sect1>
1178
1179         <sect1 id="pkg-winpartition"><title>Important Files from a Windows Partition</title>
1180         <para>
1181         Wine has the ability to use files from an installation of the
1182         actual Microsoft Windows operating system.  Generally these
1183         files are loaded on a VFAT partition that is mounted
1184         under Linux.
1185         </para>
1186         <para>
1187         This is probably the most important configuration detail.
1188         The use of Windows registry and DLL files dramatically
1189         alters the behaviour of Wine.  If nothing else,
1190         pacakager have to make this distinction clear
1191         to the end user, so that they can intelligently
1192         choose their configuration.
1193         </para>
1194
1195
1196         <orderedlist>
1197
1198             <listitem>
1199                 <variablelist><title>Registry Files</title>
1200                   <varlistentry><term><filename>[WINDOWSDIR]/system32/system.dat</filename></term>
1201                     <listitem>
1202                     <para>
1203                     </para>
1204                     </listitem>
1205                   </varlistentry>
1206
1207                   <varlistentry><term><filename>[WINDOWSDIR]/system32/user.dat</filename></term>
1208                     <listitem>
1209                     <para>
1210                     </para>
1211                     </listitem>
1212                   </varlistentry>
1213
1214                   <varlistentry><term><filename>[WINDOWSDIR]/win.ini</filename></term>
1215                     <listitem>
1216                     <para>
1217                     </para>
1218                     </listitem>
1219                   </varlistentry>
1220
1221                 </variablelist>
1222
1223             </listitem>
1224
1225             <listitem>
1226                 <para>
1227                 Windows Dynamic Link Libraries ([WINDOWSDIR]/system32/*.dll)
1228                 </para>
1229                 <para>
1230                 Wine has the ability to use the actual Windows DLL files
1231                 when running an application.  An end user can configure
1232                 Wine so that Wine uses some or all of these DLL files
1233                 when running a given application.
1234                 </para>
1235             </listitem>
1236
1237         </orderedlist>
1238
1239         </sect1>
1240
1241     </chapter>
1242
1243     <chapter id="pkg-strategy"><title id=strategy.id>Packaging Strategies</title>
1244
1245         <para>
1246         There has recently been a lot of discussion on the Wine
1247         development mailing list about the best way to
1248         build Wine packages.
1249         </para>
1250         <para>
1251         There was a lot of discussion, and several diverging
1252         points of view.  This section of the document
1253         attempts to present the areas of common agreement,
1254         and also to present the different approaches
1255         advocated on the mailing list.
1256         </para>
1257
1258         <sect1 id="pkg-whatfiles"><title>Distribution of Wine into packages</title>
1259         <para>
1260         The most basic question to ask is given the Wine CVS tree,
1261         what physical files are you, the packager, going to produce?
1262         Are you going to produce only a wine.rpm (as Marcus has done),
1263         or are you going to produce 6 Debian files
1264         (libwine, libwine-dev, wine, wine-doc, wine-utils and winesetuptk) as
1265         Ove has done?
1266         </para>
1267         <para>
1268         At this point, there is no consensus
1269         amongst the wine-devel community on this subject.
1270         </para>
1271         </sect1>
1272
1273         <sect1 id="pkg-wherefiles"><title>Where to install files</title>
1274         <para>
1275         This question is not really contested.  It will vary
1276         by distribution, and is really up to the packager.
1277         As a guideline, the current 'make install' process
1278         seems to behave such that
1279         if we pick a single <link linkend=PREFIX endterm=prefix.id></link>,
1280         then :
1281         </para>
1282         <orderedlist>
1283
1284             <listitem>
1285             <para>
1286             all <link linkend=binfiles>binary files</link> go into
1287             <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/bin,
1288             </para>
1289             </listitem>
1290
1291             <listitem>
1292             <para>
1293             all <link linkend=libfiles>library files</link> go into
1294             <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/lib/wine,
1295             </para>
1296             </listitem>
1297
1298             <listitem>
1299             <para>
1300             all <link linkend=includefiles>include files</link> go into
1301             <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/include/wine,
1302             </para>
1303             </listitem>
1304
1305             <listitem>
1306             <para>
1307             all <link linkend=docfiles>documentation files</link> go into
1308             <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/share/doc/wine-VERSION,
1309             </para>
1310             </listitem>
1311
1312             <listitem>
1313             <para>
1314             and <link linkend=manfiles>man pages</link> go into
1315             <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/share/man,
1316             </para>
1317             </listitem>
1318
1319         </orderedlist>
1320
1321         <para>
1322         Refer to the specific information on the Debian package
1323         and the OpenLinux package for specific details on how
1324         those packages are built.
1325         </para>
1326         <para>
1327         You might also want to use the wine wrapper script winelauncher
1328         that can be found in tools/ directory, as it has several important
1329         advantages over directly invoking the wine binary.
1330         See the <link linkend=binfiles>Executable Files</link> section
1331         for details.
1332         </para>
1333
1334         <sect2 id=opt><title>The question of /opt/wine</title>
1335         <para>
1336         The FHS 2.2 specification suggests that Wine as a package
1337         should be installed to /opt/wine.  None of the
1338         existing packages follow this guideline (today;
1339         check again tomorrow).
1340         </para>
1341         </sect2>
1342
1343         </sect1>
1344
1345         <sect1 id="pkg-whattomake"><title>What files to create</title>
1346         <para>
1347         After installing the static and shareable files, the next
1348         question the packager needs to ask is how much dynamic
1349         configuration will be done, and what configuration
1350         files should be created.
1351         </para>
1352         <para>
1353         There are several approaches to this:
1354         <orderedlist>
1355             <listitem>
1356                 <para>
1357                 Rely completely on user file space - install nothing
1358                 </para>
1359                 <para>
1360                 This approach relies upon the new winesetup utility and
1361                 the new ability of Wine to launch winesetup if no configuration file is found.
1362                 The basic concept is that no global configuration files
1363                 are created at install time.
1364                 Instead, Wine configuration files are created on the
1365                 fly by the winesetup program when Wine is invoked.
1366                 Further, winesetup creates default Windows directories
1367                 and paths that are stored completely in
1368                 the user's <link linkend=WINECONFDIR endterm=wineconfdir.id></link>.
1369                 </para>
1370                 <para>
1371                 This approach has the benefit of simplicity in that all
1372                 Wine files are either stored under /opt/wine or under
1373                 ~/.wine.  Further, there is only ever one Wine
1374                 configuration file.
1375                 </para>
1376                 <para>
1377                 This approach, however, adds another level of complexity.
1378                 It does not allow Wine to run Solitaire 'out of the box';
1379                 the user must run the configuration program first.  Further,
1380                 winesetup requires Tcl/Tk, a requirement not beloved by some.
1381                 Additionally, this approach closes the door on multi
1382                 user configurations and presumes a single user approach.
1383                 </para>
1384             </listitem>
1385
1386
1387             <listitem>
1388                 <para>
1389                 Build a reasonable set of defaults for the global wine.conf,
1390                 facilitate creation of a user's local Wine configuration.
1391                 </para>
1392                 <para>
1393                 This approach, best shown by Marcus, causes the
1394                 installation process to auto scan the system,
1395                 and generate a global wine.conf file with best
1396                 guess defaults.  The OpenLinux packages follow
1397                 this behaviour.
1398                 </para>
1399                 <para>
1400                 The keys to this approach are always putting
1401                 an existing Windows partition into the
1402                 path, and being able to run Solitaire
1403                 right out of the box.
1404                 Another good thing that Marcus does is he
1405                 detects a first time installation and
1406                 does some clever things to improve the
1407                 user's Wine experience.
1408                 </para>
1409                 <para>
1410                 A flaw with this approach, however, is it doesn't
1411                 give the user an obvious way to choose not to
1412                 use a Windows partition.
1413                 </para>
1414             </listitem>
1415
1416             <listitem>
1417                 <para>
1418                 Build a reasonable set of defaults for the global wine.conf,
1419                 and ask the user if possible
1420                 </para>
1421                 <para>
1422                 This approach, demonstrated by Ove, causes the
1423                 installation process to auto scan the system,
1424                 and generate a global wine.conf file with best
1425                 guess defaults.  Because Ove built a Debian
1426                 package, he was able to further query debconf and
1427                 get permission to ask the user some questions,
1428                 allowing the user to decide whether or not to
1429                 use a Windows partition.
1430                 </para>
1431             </listitem>
1432
1433
1434             </orderedlist>
1435         </para>
1436
1437         </sect1>
1438
1439
1440         <sect1 id="pkg-wineconf"><title>What to put into the wine config file</title>
1441         <para>
1442           This is the sample config file provided with wine 20030115. You can edit this file
1443           to best suit the needs of your intended user.
1444         </para>
1445
1446         <programlisting>
1447     
1448 WINE REGISTRY Version 2
1449 ;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config
1450
1451 ;; If you think it is necessary to show others your complete config for a
1452 ;; bug report, filter out empty lines and comments with
1453 ;; grep -v "^;" ~/.wine/config | grep '.'
1454 ;;
1455 ;; MS-DOS drives configuration
1456 ;;
1457 ;; Each section has the following format:
1458 ;; [Drive X]
1459 ;; "Path"="xxx"       (Unix path for drive root)
1460 ;; "Type"="xxx"       (supported types are 'floppy', 'hd', 'cdrom' and 'network')
1461 ;; "Label"="xxx"      (drive label, at most 11 characters)
1462 ;; "Serial"="xxx"     (serial number, 8 characters hexadecimal number)
1463 ;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
1464 ;;   This is the FS Wine is supposed to emulate on a certain
1465 ;;   directory structure.
1466 ;;   Recommended:
1467 ;;   - "win95" for ext2fs, VFAT and FAT32
1468 ;;   - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
1469 ;;   DON'T use "unix" unless you intend to port programs using Winelib !
1470 ;; "Device"="/dev/xx" (only if you want to allow raw device access)
1471 ;;
1472 [Drive A]
1473 "Path" = "/mnt/fd0"
1474 "Type" = "floppy"
1475 "Label" = "Floppy"
1476 "Filesystem" = "win95"
1477 "Serial" = "87654321"
1478 "Device" = "/dev/fd0"
1479
1480 [Drive C]
1481 "Path" = "/c"
1482 "Type" = "hd"
1483 "Label" = "MS-DOS"
1484 "Filesystem" = "win95"
1485
1486 [Drive D]
1487 "Path" = "/cdrom"
1488 "Type" = "cdrom"
1489 "Label" = "CD-Rom"
1490 "Filesystem" = "win95"
1491 ; make sure that device is correct and has proper permissions !
1492 "Device" = "/dev/cdrom"
1493
1494 [Drive E]
1495 "Path" = "/tmp"
1496 "Type" = "hd"
1497 "Label" = "Tmp Drive"
1498 "Filesystem" = "win95"
1499
1500 [Drive F]
1501 "Path" = "${HOME}"
1502 "Type" = "network"
1503 "Label" = "Home"
1504 "Filesystem" = "win95"
1505
1506 [wine]
1507 "Windows" = "c:\\windows"
1508 "System" = "c:\\windows\\system"
1509 "Temp" = "e:\\"
1510 "Path" = "c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\"
1511 "Profile" = "c:\\windows\\Profiles\\Administrator"
1512 "GraphicsDriver" = "x11drv"
1513 ;"ShowDirSymlinks" = "1"
1514 ;"ShowDotFiles" = "1"
1515 "ShellLinker" = "wineshelllink"
1516
1517 # &lt;wineconf&gt;
1518
1519 [Version]
1520 ; Windows version to imitate (win95,win98,winme,nt351,nt40,win2k,winxp,win20,win30,win31)
1521 ;"Windows" = "win98"
1522 ; DOS version to imitate
1523 ;"DOS" = "6.22"
1524
1525 ; Be careful here, wrong DllOverrides settings have the potential
1526 ; to pretty much kill your setup.
1527 [DllOverrides]
1528 ; some dlls you may want to change
1529 "oleaut32"     = "builtin, native"
1530 "ole32"        = "builtin, native"
1531 "commdlg"      = "builtin, native"
1532 "comdlg32"     = "builtin, native"
1533 "shell"        = "builtin, native"
1534 "shell32"      = "builtin, native"
1535 "shfolder"     = "builtin, native"
1536 "shlwapi"      = "builtin, native"
1537 "shdocvw"      = "builtin, native"
1538 "advapi32"     = "builtin, native"
1539 "msvcrt"       = "native, builtin"
1540 "mciavi.drv"   = "native, builtin"
1541 "mcianim.drv"  = "native, builtin"
1542 ; you can specify applications too
1543 ; this one will apply for all notepad.exe
1544 ;"*notepad.exe" = "native, builtin"
1545 ; this one will apply only for a particular file
1546 ;"C:\\windows\\regedit.exe" = "native, builtin"
1547 ; default for all other dlls
1548 "*" = "builtin, native"
1549
1550 [x11drv]
1551 ; Number of colors to allocate from the system palette
1552 "AllocSystemColors" = "100"
1553 ; Use a private color map
1554 "PrivateColorMap" = "N"
1555 ; Favor correctness over speed in some graphics operations
1556 "PerfectGraphics" = "N"
1557 ; Color depth to use on multi-depth screens
1558 ;;"ScreenDepth" = "16"
1559 ; Name of X11 display to use
1560 ;;"Display" = ":0.0"
1561 ; Allow the window manager to manage created windows
1562 "Managed" = "Y"
1563 ; Use a desktop window of 640x480 for Wine
1564 ;"Desktop" = "640x480"
1565 ; Use XFree86 DGA extension if present
1566 ; (make sure /dev/mem is accessible by you !)
1567 "UseDGA" = "Y"
1568 ; Use XShm extension if present
1569 "UseXShm" = "Y"
1570 ; Use XVidMode extension if present
1571 "UseXVidMode" = "Y"
1572 ; Use the take focus protocol
1573 "UseTakeFocus" = "Y"
1574 ; Enable DirectX mouse grab
1575 "DXGrab" = "N"
1576 ; Create the desktop window with a double-buffered visual
1577 ; (useful to play OpenGL games)
1578 "DesktopDoubleBuffered" = "N"
1579 ; Code page used for captions in managed mode
1580 ; 0 means default ANSI code page (CP_ACP == 0)
1581 "TextCP" = "0"
1582 ; Use this if you have more than one port for video on your setup
1583 ; (Wine uses for now the first 'input image' it finds).
1584 ;; "XVideoPort" = "43"
1585 ; Run in synchronous mode (useful for debugging X11 problems)
1586 ;;"Synchronous" = "Y"
1587 ;
1588 ; Use the Render extension to render client side fonts (default "Y")
1589 ;;"ClientSideWithRender" = "Y"
1590 ; Fallback on X core requests to render client side fonts (default "Y")
1591 ;;"ClientSideWithCore" = "Y"
1592 ; Set both of the previous two to "N" in order to force X11 server side fonts
1593 ;
1594 ; Anti-alias fonts if using the Render extension (default "Y")
1595 ;;"ClientSideAntiAliasWithRender" = "Y"
1596 ; Anti-alias fonts if using core requests fallback (default "Y")
1597 ;;"ClientSideAntiAliasWithCore" = "Y"
1598 ;
1599
1600 [fonts]
1601 ;Read the Fonts topic in the Wine User Guide before adding aliases
1602 ;See a couple of examples for russian users below
1603 "Resolution" = "96"
1604 "Default" = "-adobe-helvetica-"
1605 "DefaultFixed" = "fixed"
1606 "DefaultSerif" = "-adobe-times-"
1607 "DefaultSansSerif" = "-adobe-helvetica-"
1608
1609 ;; default TrueType fonts with russian koi8-r encoding
1610 ;"Default" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1611 ;"DefaultFixed" = "-monotype-courier new-*-*-*--*-*-*-*-*-*-koi8-r"
1612 ;"DefaultSerif" = "-monotype-times new roman-*-*-*--*-*-*-*-*-*-koi8-r"
1613 ;"DefaultSansSerif" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1614 ;; default cyrillic bitmap X fonts
1615 ;"Default" = "-cronyx-helvetica-"
1616 ;"DefaultFixed" = "fixed"
1617 ;"DefaultSerif" = "-cronyx-times-"
1618 ;"DefaultSansSerif" = "-cronyx-helvetica-"
1619
1620 ; the TrueType font dirs you want to make accessible to wine
1621 [FontDirs]
1622 ;"dir1" = "/usr/X11R6/lib/X11/fonts/TrueType"
1623 ;"dir2" = "/usr/share/fonts/truetype"
1624 ;"dir3" = "/usr/X11R6/lib/X11/fonts/TT"
1625 ;"dir4" = "/usr/share/fonts/TT"
1626
1627 [serialports]
1628 "Com1" = "/dev/ttyS0"
1629 "Com2" = "/dev/ttyS1"
1630 "Com3" = "/dev/ttyS2"
1631 "Com4" = "/dev/modem"
1632
1633 [parallelports]
1634 "Lpt1" = "/dev/lp0"
1635
1636 [ppdev]
1637 ;; key:  io-base of the emulated port
1638 ;; value : parport-device{,timeout}
1639 ;; timeout for auto closing an open device ( not yet implemented)
1640 ;"378" = "/dev/parport0"
1641 ;"278" = "/dev/parport1"
1642 ;"3bc" = "/dev/parport2"
1643
1644 [spooler]
1645 "FILE:" = "tmp.ps"
1646 "LPT1:" = "|lpr"
1647 "LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"
1648 "LPT3:" = "/dev/lp3"
1649
1650 [ports]
1651 ;"read"  = "0x779,0x379,0x280-0x2a0"
1652 ;"write" = "0x779,0x379,0x280-0x2a0"
1653
1654 [Debug]
1655 ;"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1656 ;"RelayInclude" = "user32.CreateWindowA"
1657 ;"SnoopExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1658 ;"SpyExclude" = "WM_SIZE;WM_TIMER;"
1659
1660 [registry]
1661 ;These are all booleans.  Y/y/T/t/1 are true, N/n/F/f/0 are false.
1662 ;Defaults are read all, write to Home
1663 ; Where to find the global registries
1664 ;"GlobalRegistryDir" = "/etc";
1665 ; Global registries (stored in /etc)
1666 "LoadGlobalRegistryFiles" = "Y"
1667 ; Home registries (stored in ~user/.wine/)
1668 "LoadHomeRegistryFiles" = "Y"
1669 ; Load Windows registries from the Windows directory
1670 "LoadWindowsRegistryFiles" = "Y"
1671 ; TRY to write all changes to home registries
1672 "WritetoHomeRegistryFiles" = "Y"
1673 ; Registry periodic save timeout in seconds
1674 ; "PeriodicSave" = "600"
1675 ; Save only modified keys
1676 "SaveOnlyUpdatedKeys" = "Y"
1677
1678 [Tweak.Layout]
1679 ;; supported styles are 'Win31'(default), 'Win95', 'Win98'
1680 ;; this has *nothing* to do with the windows version Wine returns:
1681 ;; set the "Windows" value in the [Version] section if you want that.
1682 "WineLook" = "Win95"
1683
1684 [Console]
1685 ;"Drivers" = "tty"
1686 ;"XtermProg" = "nxterm"
1687 ;"InitialRows" = "25"
1688 ;"InitialColumns" = "80"
1689 ;"TerminalType" = "nxterm"
1690
1691 [Clipboard]
1692 "ClearAllSelections" = "0"
1693 "PersistentSelection" = "1"
1694
1695 ; List of all directories directly contain .AFM files
1696 [afmdirs]
1697 "1" = "/usr/share/ghostscript/fonts"
1698 "2" = "/usr/share/a2ps/afm"
1699 "3" = "/usr/share/enscript"
1700 "4" = "/usr/X11R6/lib/X11/fonts/Type1"
1701
1702 [WinMM]
1703 #"Drivers" = "winearts.drv"
1704 #"Drivers" = "winejack.drv"
1705 "Drivers" = "wineoss.drv"
1706 "WaveMapper" = "msacm.drv"
1707 "MidiMapper" = "midimap.drv"
1708
1709 [dsound]
1710 ;; HEL only: Number of waveOut fragments ahead to mix in new buffers.
1711 ;"HELmargin" = "5"
1712 ;; HEL only: Number of waveOut fragments ahead to queue to driver.
1713 ;"HELqueue" = "5"
1714 ;; Max number of fragments to prebuffer
1715 ;"SndQueueMax" = "28"
1716 ;; Min number of fragments to prebuffer
1717 ;"SndQueueMin" = "12"
1718
1719 [Network]
1720 ;; Use the DNS (Unix) host name always as NetBIOS "ComputerName" (boolean, default "Y").
1721 ;; Set to N if you need a persistent NetBIOS ComputerName that possibly differs 
1722 ;; from the Unix host name. You'll need to set ComputerName in 
1723 ;; HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName, too.
1724 ;"UseDnsComputerName" = "N"
1725
1726 ;; sample AppDefaults entries
1727
1728 ; 3 InstallShield versions who like to put their full screen window in front,
1729 ; without any chance to switch to another X11 application.
1730 ; So just catch them in a desktop window.
1731
1732 [AppDefaults\\_INS5576._MP\\x11drv]
1733 "Desktop" = "640x480"
1734
1735 [AppDefaults\\_INS5176._MP\\x11drv]
1736 "Desktop" = "640x480"
1737
1738 [AppDefaults\\_INS0466._MP\\x11drv]
1739 "Desktop" = "640x480"
1740
1741 ;[AppDefaults\\iexplore.exe\\DllOverrides]
1742 ;"shlwapi" = "native"
1743 ;"rpcrt4" = "native"
1744 ;"ole32" = "native"
1745 ;"shdocvw" = "native"
1746 ;"wininet" = "native"
1747 ;"shfolder" = "native"
1748 ;"shell32" = "native"
1749 ;"shell" = "native"
1750 ;"comctl32" = "native"
1751 ;
1752 ;[AppDefaults\\setup.exe\\x11drv]
1753 ;"Desktop" = "800x600"
1754 ;
1755 ;[AppDefaults\\sol.exe\\Version]
1756 ;"Windows" = "nt40"
1757 ;
1758 ;; Some games (Quake 2, UT) refuse to accept emulated dsound devices.
1759 ;; You can add an AppDefault entry like this for such cases.
1760 ;[AppDefaults\\pickygame.exe\\dsound]
1761 ;"EmulDriver" = "N"
1762
1763 # &lt;/wineconf&gt;
1764
1765  </programlisting>      
1766         </sect1>
1767
1768     </chapter>
1769
1770
1771
1772
1773     <chapter id="pkg-implementation"> <title>Implementation</title>
1774
1775     <sect1 id="pkg-openlinux"><title>RedHat 8.0 Sample</title>
1776
1777           <orderedlist inheritnum="inherit">
1778             <listitem>
1779               <para>Building the package</para>
1780               <para>
1781                 Wine is configured the usual way (depending on your
1782                 build environment). The "prefix" is chosen using your
1783                 application placement policy
1784                 (<filename>/usr/</filename>,
1785                 <filename>/usr/X11R6/</filename>,
1786                 <filename>/opt/wine/</filename> or similar).  The
1787                 configuration files (<filename>wine.conf</filename>,
1788                 <filename>wine.userreg</filename>,
1789                 <filename>wine.systemreg</filename>) are targeted for
1790                 <filename>/etc/wine/</filename> (rationale: FHS 2.2,
1791                 multiple readonly configuration files of a package).
1792               </para>
1793               <para>
1794                 Example (split this into <literal>%build</literal> and
1795                 <literal>%install</literal> section for
1796                 <command>rpm</command>):
1797               </para>
1798               <screen>
1799 CFLAGS=$RPM_OPT_FLAGS \
1800 ./configure --prefix=/usr/X11R6 --sysconfdir=/etc/wine/ --enable-dll
1801 make
1802 BR=$RPM_BUILD_ROOT
1803 make install prefix=$BR/usr/X11R6/ sysconfdir=$BR/etc/wine/
1804 install -d $BR/etc/wine/
1805 install -m 644 wine.ini $BR/etc/wine/wine.conf
1806
1807 # Put all our dlls in a seperate directory. (this works only if
1808 # you have a buildroot)
1809 install -d $BR/usr/X11R6/lib/wine
1810 mv $BR/usr/X11R6/lib/lib* $BR/usr/X11R6/lib/wine/
1811
1812 # the clipboard server is started on demand.
1813 install -m 755 dlls/x11drv/wineclipsrv $BR/usr/X11R6/bin/
1814
1815 # The Wine server is needed.
1816 install -m 755 server/wineserver $BR/usr/X11R6/bin/
1817               </screen>
1818               <para>
1819                 Here we unfortunately do need to create
1820                 <filename>wineuser.reg</filename> and
1821                 <filename>winesystem.reg</filename> from the Wine
1822                 distributed <filename>winedefault.reg</filename>. This
1823                 can be done using <command>./regedit</command> once for
1824                 one example user and then reusing his
1825                 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/user.reg</filename> and
1826                 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/system.reg</filename> files.
1827                 <note>
1828                   <title>FIXME</title>
1829                   <para>this needs to be done better</para>
1830                 </note>
1831               </para>
1832               <screen>
1833 install -m 644 wine.sytemreg $BR/etc/wine/
1834 install -m 644 wine.userreg $BR/etc/wine/
1835               </screen>
1836               <para>
1837                 There are now a lot of libraries generated by the
1838                 build process, so a seperate library directory should
1839                 be used.
1840               </para>
1841               <screen>
1842 install -d 755 $BR/usr/X11R6/lib/
1843 mv $BR/
1844               </screen>
1845               <para>
1846                 You will need to package the files:
1847               </para>
1848               <screen>
1849 $prefix/bin/wine, $prefix/bin/dosmod, $prefix/lib/wine/*
1850 $prefix/man/man1/wine.1, $prefix/include/wine/*,
1851 $prefix/bin/wineserver, $prefix/bin/wineclipsrv
1852
1853 %config /etc/wine/*
1854 %doc ... choose from the toplevel directory and documentation/
1855               </screen>
1856               <para>
1857                 The post-install script:
1858               </para>
1859               <screen>
1860 if ! grep -q /usr/X11R6/lib/wine /etc/ld.so.conf; then
1861     echo "/usr/X11R6/lib/wine" &gt;&gt; /etc/ld.so.conf
1862 fi
1863 /sbin/ldconfig
1864               </screen>
1865               <para>
1866                 The post-uninstall script:
1867               </para>
1868               <screen>
1869 if [ "$1" = 0 ]; then
1870     perl -ni -e 'print unless m:/usr/X11R6/lib/wine:;' /etc/ld.so.conf
1871 fi
1872 /sbin/ldconfig
1873               </screen>
1874             </listitem>
1875             <listitem>
1876               <para>Creating a good default configuration file</para>
1877               <para>
1878                 For the rationales of needing as less input from the
1879                 user as possible arises the need for a very good
1880                 configuration file. The one supplied with Wine is
1881                 currently lacking. We need:
1882               </para>
1883               <itemizedlist>
1884                 <listitem>
1885                   <para>
1886                     [Drive X]:
1887                   </para>
1888                   <itemizedlist>
1889                     <listitem>
1890                       <para>
1891                         A for the floppy. Specify your distribution's
1892                         default floppy mountpoint here.
1893                       </para>
1894                       <programlisting>
1895 Path=/auto/floppy
1896                       </programlisting>
1897                     </listitem>
1898                     <listitem>
1899                       <para>
1900                         C for the <filename>C:\</filename> directory.
1901                         Here we use the user's home directory, for most
1902                         applications do see <filename>C:\</filename>
1903                         as root-writeable directory of every windows
1904                         installation and this basically is it in the
1905                         UNIX-user context.
1906                         </para>
1907                       <programlisting>
1908 Path=${HOME}
1909                       </programlisting>
1910                     </listitem>
1911                     <listitem>
1912                       <para>
1913                         R for the CD-Rom drive. Specify your
1914                         distribution's default CD-ROM drives mountpoint
1915                         here.
1916                         </para>
1917                       <programlisting>
1918 Path=/auto/cdrom
1919                       </programlisting>
1920                     </listitem>
1921                     <listitem>
1922                       <para>
1923                         T for temporary storage. We do use
1924                         <filename>/tmp/</filename> (rationale: between
1925                         process temporary data belongs to
1926                         <filename>/tmp/</filename>, FHS 2.0)
1927                       </para>
1928                     </listitem>
1929                     <listitem>
1930                       <para>
1931                         W for the original Windows installation. This
1932                         drive points to the
1933                         <filename>windows\</filename> subdirectory of
1934                         the original windows installation. This avoids
1935                         problems with renamed
1936                         <filename>windows</filename> directories (as
1937                         for instance <filename>lose95</filename>,
1938                         <filename>win</filename> or
1939                         <filename>sys\win95</filename>). During
1940                         compile/package/install we leave this to be
1941                         <filename>/</filename>, it has to be
1942                         configured after the package install.
1943                       </para>
1944                     </listitem>
1945                     <listitem>
1946                       <para>
1947                         Z for the UNIX Root directory. This avoids any
1948                         problems with "could not find drive for
1949                         current directory" users occasionally complain
1950                         about in the newsgroup and the irc channel. It
1951                         also makes the whole directory structure
1952                         browseable. The type of Z should be network,
1953                         so applications expect it to be readonly.
1954                       </para>
1955                       <programlisting>
1956 Path=/
1957                       </programlisting>
1958                     </listitem>
1959                   </itemizedlist>
1960                 </listitem>
1961                 <listitem>
1962                   <para>
1963                     [wine]:
1964                   </para>
1965                   <screen>
1966   Windows=c:\windows\           (the windows/ subdirectory in the user's
1967                                  home directory)
1968   System=c:\windows\system\     (the windows/system subdirectory in the user's
1969                                  home directory)
1970   Path=c:\windows;c:\windows\system;c:\windows\system32;w:\;w:\system;w:\system32;
1971   ; Using this trick we have in fact two windows installations in one, we
1972   ; get the stuff from the readonly installation and can write to our own.
1973   Temp=t:\                      (the TEMP directory)
1974                   </screen>
1975                 </listitem>
1976                 <listitem>
1977                   <para>[Tweak.Layout]</para>
1978                   <screen>
1979   WineLook=win95                (just the coolest look ;)
1980                   </screen>
1981                 </listitem>
1982                 <listitem>
1983                   <para>
1984                     Possibly modify the [spooler], [serialports] and
1985                     [parallelports] sections.
1986                   </para>
1987                   <note>
1988                     <title>FIXME</title>
1989                     <para>possibly more, including printer stuff.</para>
1990                   </note>
1991                 </listitem>
1992               </itemizedlist>
1993
1994               <para>Add this prepared configuration file to the package.</para>
1995             </listitem>
1996             <listitem>
1997               <para>Installing Wine for the system administrator</para>
1998               <para>
1999                 Install the package using the usual packager
2000                 <command>rpm -i wine.rpm</command>. You may edit
2001                 <filename>/etc/wine/wine.conf</filename>, [Drive W],
2002                 to point to a possible windows installation right
2003                 after the install. That's it.
2004               </para>
2005               <para>
2006                 Note that on Linux you should somehow try to add the
2007                 <option>unhide</option> mount option (see <command>man
2008                   mount</command>) to the CD-ROM entry in
2009                 <filename>/etc/fstab</filename> during package
2010                 install, as several stupid Windows programs mark some
2011                 setup (!) files as hidden (ISO9660) on CD-ROMs, which
2012                 will greatly confuse users as they won't find their
2013                 setup files on the CD-ROMs as they were used on
2014                 Windows systems when <option>unhide</option> is not
2015                 set ;-\ And of course the setup program will complain
2016                 that <filename>setup.ins</filename> or some other mess
2017                 is missing... If you choose to do so, then please make
2018                 this change verbose to the admin.
2019                 Also make sure that the kernel you use includes the Joliet
2020                 CD-ROM support, for the very same reasons as given above
2021                 (no long filenames due to missing Joliet, files not found).
2022               </para>
2023             </listitem>
2024             <listitem>
2025               <para>Installing Wine for the user</para>
2026               <para>
2027                 The user will need to run a setup script before the
2028                 first invocation of Wine. This script should:
2029               </para>
2030
2031
2032               <itemizedlist>
2033                 <listitem>
2034                   <para>
2035                     Copy <filename>/etc/wine/wine.conf</filename> for
2036                     user modification.
2037                   </para>
2038                 </listitem>
2039                 <listitem>
2040                   <para>
2041                     Allow specification of the original windows
2042                     installation to use (which modifies the copied
2043                     <filename>wine.conf</filename> file).
2044                   </para>
2045                 </listitem>
2046                 <listitem>
2047                   <para>
2048                     Create the windows directory structure
2049                     (<filename>c:\windows</filename>,
2050                     <filename>c:\windows\system</filename>,
2051                     <filename>c:\windows\Start Menu\Programs</filename>,
2052                     <filename>c:\Program Files</filename>,
2053                     <filename>c:\Desktop</filename>, etc.)
2054                   </para>
2055                 </listitem>
2056                 <listitem>
2057                   <para>
2058                     Symlink all <filename>.dll</filename> and
2059                     <filename>.exe</filename> files from the original
2060                     windows installation to the
2061                     <filename>windows</filename> directory. Why? Some
2062                     programs reference "%windowsdir%/file.dll" or
2063                     "%systemdir%/file.dll" directly and fail if they
2064                     are not present.
2065                   </para>
2066                   <para>
2067                     This will give a huge number of symlinks, yes.
2068                     However, if an installer later overwrites one of
2069                     those files, it will overwrite the symlink (so
2070                     that the file now lies in the
2071                     <filename>windows/</filename> subdirectory).
2072                   </para>
2073                   <note>
2074                     <title>FIXME</title>
2075                     <para>Not sure this is needed for all files.</para>
2076                   </note>
2077                 </listitem>
2078                 <listitem>
2079                   <para>
2080                     On later invocation the script might want to
2081                     compare regular files in the user's windows
2082                     directories and in the global windows directories
2083                     and replace same files by symlinks (to avoid
2084                     diskspace problems).
2085                   </para>
2086                 </listitem>
2087               </itemizedlist>
2088
2089
2090             </listitem>
2091           </orderedlist>
2092
2093
2094       <sect2 id=sample><title>Sample RedHat 8.0 .spec file for review purposes</title>
2095
2096
2097 <programlisting>
2098
2099 %define DATE 20030115
2100 Summary: A Windows 16/32 bit emulator.
2101 Name: wine
2102 Version: %{DATE}
2103 Release: 1rh8winehq
2104 Group: Applications/Emulators
2105 License: LGPL
2106 URL: http://www.winehq.com/
2107 Source: ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.bz2
2108 Source1: wine.init
2109 Patch: wine-%{version}-initial.patch
2110 Patch1: wine-%{version}-kde2.patch
2111 Patch2: wine-%{version}-winelauncher.patch
2112 Patch3: wine-%{version}-defaultcfg.patch
2113 Patch4: wine-%{version}-stabs+.patch
2114 Buildroot: %{_tmppath}/%{name}-root
2115 ExclusiveArch: %{ix86}
2116 Prereq: shadow-utils
2117 Conflicts: kdebase < 2.0
2118 Requires: cups-libs >= 1.1.12
2119 BuildRequires: docbook-utils, cups-devel >= 1.1.12, autoconf253, perl
2120
2121 %description
2122 While Wine is usually thought of as a Windows(TM) emulator, the Wine
2123 developers would prefer that users thought of Wine as a Windows
2124 compatibility layer for UNIX. This package includes a program loader,
2125 which allows unmodified Windows 3.1/95/NT binaries to run under Intel
2126 Unixes. Wine does not require MS Windows, but it can use native system
2127 .dll files if they are available.
2128
2129 %package devel
2130 Summary: Wine development environment.
2131 Group: System Environment/Libraries
2132 Requires: wine = %{version}
2133
2134 %description devel
2135 Header and include files for developing applications with the Wine
2136 Windows(TM) emulation libraries.
2137
2138 %prep
2139 %setup -q -n wine-%{version}
2140 find . -type d -name CVS |xargs rm -rf
2141 %patch -p1 -b .initial
2142 %patch1 -p1 -b .kde2
2143 %patch2 -p1 -b .wl
2144 %patch3 -p1 -b .defcfg
2145 %patch4 -p1 -b .stabs+
2146
2147 %build
2148 export CFLAGS="$RPM_OPT_FLAGS"
2149 autoconf || autoconf-2.53
2150 %configure \
2151         --with-x \
2152         --libdir=%{_libdir}/wine \
2153         --includedir=%{_includedir}/wine \
2154         --sysconfdir=%{_sysconfdir}/wine
2155
2156 make depend
2157 make
2158 make -C documentation doc
2159
2160 %install
2161 rm -rf $RPM_BUILD_ROOT
2162
2163 %makeinstall \
2164         includedir=%{?buildroot:%{buildroot}}%{_includedir}/wine \
2165         libdir=%{?buildroot:%{buildroot}}%{_libdir}/wine \
2166         sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir}/wine \
2167         dlldir=%{?buildroot:%{buildroot}}%{_libdir}/wine/wine \
2168         LDCONFIG=/bin/true
2169
2170 for i in system "Start Menu/Programs/Startup" Profiles/Administrator Fonts \
2171          Desktop Favorites NetHood Recent SendTo ShellNew; do
2172         mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/windows/$i"
2173 done
2174 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/My Documents"
2175 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/Program Files/Common Files"
2176
2177 # Take care of wine and windows configuration files...
2178 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/wine
2179 mv documentation/samples/config documentation/samples/config.orig
2180 sed "s/\"GraphicsDriver\" = .*/\"GraphicsDriver\" = \"ttydrv\"/" documentation/samples/config.orig |\
2181 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"$RPM_BUILD_ROOT%{_datadir}/wine-c\"|" |\
2182 sed "s|\"Path\" = \"\${HOME}\"$|\"Path\" = \"%{_builddir}/%{buildsubdir}\"|" -> documentation/samples/config
2183 WINEPREFIX=%{_builddir}/%{buildsubdir}/documentation/samples programs/regedit/regedit winedefault.reg > /dev/null
2184 # Wait until wineserver finishes and closes those files
2185 sleep 5
2186 install -c -m 0644 documentation/samples/system.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/system.reg
2187 install -c -m 0644 documentation/samples/user.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/user.reg
2188 install -c -m 0644 documentation/samples/userdef.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/userdef.reg
2189 rm -f documentation/samples/system.reg
2190 rm -f documentation/samples/user.reg
2191 rm -f documentation/samples/userdef.reg
2192
2193 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"%{_datadir}/wine-c\"|" documentation/samples/config.orig > documentation/samples/config.rh
2194 install -c -m 0644 documentation/samples/config.rh $RPM_BUILD_ROOT%{_sysconfdir}/wine/wine.conf
2195 rm -f documentation/samples/config
2196 rm -f documentation/samples/config.rh
2197 mv documentation/samples/config.orig documentation/samples/config
2198
2199 # Install link to windows applications replacements
2200 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/notepad.exe
2201 ln -sf %{_libdir}/wine/regedit.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/regedit.exe
2202 ln -sf %{_libdir}/wine/rundll32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/rundll32.exe
2203 ln -sf %{_libdir}/wine/wcmd.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/cmd.exe
2204 ln -sf %{_libdir}/wine/control.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/control.exe
2205 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/help.exe
2206 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/notepad.exe
2207 ln -sf %{_libdir}/wine/progman.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/progman.exe
2208 ln -sf %{_libdir}/wine/regsvr32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/regsvr32.exe
2209 ln -sf %{_libdir}/wine/winemine.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winmine.exe
2210 ln -sf %{_libdir}/wine/winver.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winver.exe
2211 ln -sf %{_libdir}/wine/uninstaller.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/uninstaller.exe
2212 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhelp.exe
2213 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhlp32.exe
2214
2215 for i in shell.dll shell32.dll winsock.dll wnsock32.dll; do
2216         touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/$i
2217 done
2218 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/autoexec.bat
2219 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/config.sys
2220 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/win.ini
2221 install -c -m 0644 documentation/samples/system.ini $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system.ini
2222
2223 cat >RedHat &lt;&lt;EOF
2224 Wine directory structure used in Red Hat Linux:
2225 ===============================================
2226
2227 %{_datadir}/wine-c is the root directory (aka C: drive) wine looks for
2228 by default. It contains (empty) C:\windows and C:\windows\system
2229 directories, needed to operate Wine without an existing Windows installation.
2230
2231 If you want to use Wine with an existing Windows installation that is mounted,
2232 for example, in /mnt/windows-c, edit /etc/wine.conf to say
2233
2234 [Drive C]
2235 Path=/mnt/windows-c
2236 Type=hd
2237 Label=Whatever
2238 Filesystem=win95
2239
2240 instead of the defaults set by installation.
2241
2242 If you do this, you can safely remove %{_datadir}/wine-c.
2243 (Alternatively, just mount your Windows partition to %{_datadir}/wine-c.)
2244 EOF
2245
2246 # Allow users to launch Windows programs by just clicking on the .exe file...
2247 mkdir -p $RPM_BUILD_ROOT%{_initrddir}
2248 install -c -m 755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/wine
2249
2250 %clean
2251 rm -rf $RPM_BUILD_ROOT
2252
2253 %pre
2254 /usr/sbin/groupadd -g 66 -r wine &>/dev/null || :
2255
2256 %post
2257 if ! grep -q "^/usr/lib/wine$" /etc/ld.so.conf; then
2258         echo "/usr/lib/wine" >>/etc/ld.so.conf
2259 fi
2260 /sbin/ldconfig
2261 /sbin/chkconfig --add wine
2262 /sbin/chkconfig --level 2345 wine on
2263 /sbin/service wine start &>/dev/null || :
2264
2265 %preun
2266 if test "$1" = "0"; then
2267         /sbin/chkconfig --del wine
2268 fi
2269
2270 %postun
2271 if test "$1" = "0"; then
2272         perl -pi -e "s,^/usr/lib/wine$,,g" /etc/ld.so.conf
2273         /usr/sbin/groupdel wine &>/dev/null || :
2274 fi
2275 /sbin/ldconfig
2276
2277 %files
2278 %defattr(-,root,root)
2279 %attr(0775, root, wine) %dir %{_datadir}/wine-c
2280 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows
2281 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/system
2282 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu"
2283 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs"
2284 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs/Startup"
2285 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles
2286 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles/Administrator
2287 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Fonts
2288 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Desktop
2289 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Favorites
2290 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/NetHood
2291 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Recent
2292 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/SendTo
2293 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/ShellNew
2294 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/My Documents"
2295 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files"
2296 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files/Common Files"
2297 %{_libdir}/wine
2298 %{_bindir}/*
2299 %{_mandir}/man?/*
2300 %{_datadir}/wine-c/windows/system/*.dll
2301 %{_datadir}/wine-c/windows/*.exe
2302 %config %{_datadir}/wine-c/autoexec.bat
2303 %config %{_datadir}/wine-c/config.sys
2304 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/win.ini
2305 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/system.ini
2306 %config %{_sysconfdir}/wine/*
2307 %config %{_initrddir}/*
2308 %doc ANNOUNCE BUGS COPYING.LIB ChangeLog DEVELOPERS-HINTS LICENSE LICENSE.OLD README VERSION
2309 %doc AUTHORS RedHat
2310 %doc documentation/ChangeLog.OLD documentation/HOWTO-winelib documentation/README.fr
2311 %doc documentation/wine-devel documentation/wine-user documentation/winelib-user documentation/samples
2312
2313 %files devel
2314 %defattr(-,root,root)
2315 %{_includedir}/*
2316
2317
2318       </programlisting>
2319
2320       </sect2>
2321   </sect1>
2322
2323 </chapter>
2324
2325 <chapter id="pkg-todo"><Title>Work to be done</title>
2326
2327     <para>
2328     In preparing this document, it became clear that there were
2329     still a range of action items to be done in Wine
2330     that would improve this packaging process.
2331     For lack of a better place, I record them here.
2332     <emphasis>This list is almost certain to be obsolete;
2333     check bugzilla for a better list.</emphasis>
2334     </para>
2335
2336     <orderedlist>
2337         <listitem>
2338             <para>
2339             Remove duplication of code between winesetup and
2340             wineconf/wineinstall.
2341             </para>
2342             <para>
2343             Currently, winesetup duplicates all of the code contained
2344             in wineconf.
2345             </para>
2346             <para>
2347             Instead, wineconf should be improved to generate
2348             the new style config file, and then winesetup should
2349             rely on wineconf to generate the default
2350             configuration file.
2351             </para>
2352             <para>
2353             Similarly, there is functionality such as creating
2354             the default registry files that is now done by
2355             both winesetup and wineinstall.
2356             </para>
2357             <para>
2358             At this time, it seems like the right thing to do
2359             is to break up or parameterize wineinstall, so that
2360             it can be used for single function actions,
2361             and then have winesetup call those functions.
2362             </para>
2363         </listitem>
2364
2365         <listitem>
2366             <para>
2367             Enhance winesetup to support W: drive generation.
2368             </para>
2369             <para>
2370             The best practices convention now seems to be
2371             to generate a set of drives from M: through W:.
2372             At this point, winesetup does not generate
2373             a default wine config file that follows
2374             these conventions. It should.
2375             </para>
2376         </listitem>
2377
2378         <listitem>
2379             <para>
2380             Enhance Wine to allow more dynamic switching
2381             between the use of a real Windows partition
2382             and an empty one.
2383             </para>
2384         </listitem>
2385
2386         <listitem>
2387             <para>
2388             Write a winelauncher utility application.
2389             </para>
2390             <para>
2391             Currently, Wine really requires a user to launch it
2392             from a command line, so that the user can look for
2393             error messages and warnings.  However, eventually, we will
2394             want users to be able to launch Wine from a more
2395             friendly GUI launcher.  The launcher should have the
2396             ability to allow the end user to turn on debugging
2397             messages and capture those traces for bug reporting
2398             purposes.  Also, if we make it possible to
2399             switch between use of a Windows partition or not
2400             automatically, that option should be controlled here.
2401             </para>
2402         </listitem>
2403
2404         <listitem>
2405             <para>
2406             Get Marcus's winesetup facilities into CVS
2407             </para>
2408             <para>
2409             Along the lines of the changes to winesetup,
2410             and the consolidation of wineconf and wineinstall,
2411             we should extract the good stuff from Marcus's
2412             winesetup script, and get it into CVS.
2413             Again, perhaps we should have a set of scripts
2414             that perform discrete functions, or maybe
2415             one script with parameters.
2416             </para>
2417         </listitem>
2418
2419         <listitem>
2420             <para>
2421             Finish this document
2422             </para>
2423             <para>
2424             This document is pretty rough itself.  Many hard
2425             things aren't addressed, and lots of stuff was missed.
2426             </para>
2427         </listitem>
2428     </orderedlist>
2429 </chapter>
2430
2431
2432 <!-- Keep this comment at the end of the file
2433 Local variables:
2434 mode: sgml
2435 sgml-parent-document:("wine-doc.sgml" "book" "part" "chapter" "")
2436 End:
2437 -->