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