Removed the old win.ini sample replaced it with a RH 8.0 rpm .spec.
[wine/testsucceed.git] / documentation / packaging.sgml
blob83ba4452bdd14688a50e173f8e78552e7c313d18
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 rpm -i wine.rpm or apt-get install wine
146 should suffice for initial installation.
147 </para>
148 </listitem>
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>
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>
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>
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>
188 <listitem>
189 <para>Use only as much diskspace as needed per user.</para>
190 </listitem>
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>
206 </itemizedlist>
209 </sect1>
211 <sect1 id="pkg-requirements"> <title>Requirements</title>
212 <para>
213 Successfully installing Wine requires:
214 </para>
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>
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>
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>
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>
277 </sect1>
280 </chapter>
285 <chapter id="pkg-components"><title>Wine Components</title>
287 <para>
288 This section lists all files that pertain to Wine.
289 </para>
291 <sect1 id="pkg-static"><title>Wine Static and Shareable Files</title>
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.
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>
306 </para>
308 <orderedlist>
310 <listitem id=binfiles>
311 <variablelist><title>Executable Files</title>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
466 </variablelist>
467 </listitem>
469 <listitem id=libfiles>
470 <para>Shared Object Library Files</para>
471 <para>This list may NOT necessarily current!</para>
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>
649 </listitem>
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>
664 <listitem id=includefiles>
665 <para>Include Files</para>
666 <para>This list may NOT be current!</para>
667 <simplelist columns=5>
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>
869 </listitem>
871 <listitem id=docfiles>
872 <para>Documentation files.</para>
873 <para>This list may NOT be current!</para>
875 <simplelist columns=3>
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>
956 </listitem>
959 </orderedlist>
961 </sect1>
964 <sect1 id="pkg-nonstatic"><title>Dynamic Wine Files</title>
966 <para>
967 Wine also generates and depends on a number of dynamic
968 files, including user configuration files and registry files.
969 </para>
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>
978 <orderedlist>
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>
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>
1026 </listitem>
1028 <listitem>
1030 <para>Registry Files</para>
1032 <para>
1033 In order to replicate the Windows registry system,
1034 Wine stores registry entries in a series of files.
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>
1041 </para>
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>
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>
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>
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>
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>
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>
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>
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>
1143 </variablelist>
1146 </listitem>
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>
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>
1170 </variablelist>
1171 </listitem>
1174 </orderedlist>
1177 </sect1>
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>
1196 <orderedlist>
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>
1207 <varlistentry><term><filename>[WINDOWSDIR]/system32/user.dat</filename></term>
1208 <listitem>
1209 <para>
1210 </para>
1211 </listitem>
1212 </varlistentry>
1214 <varlistentry><term><filename>[WINDOWSDIR]/win.ini</filename></term>
1215 <listitem>
1216 <para>
1217 </para>
1218 </listitem>
1219 </varlistentry>
1221 </variablelist>
1223 </listitem>
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>
1237 </orderedlist>
1239 </sect1>
1241 </chapter>
1243 <chapter id="pkg-strategy"><title id=strategy.id>Packaging Strategies</title>
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>
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>
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>
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>
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>
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>
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>
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>
1319 </orderedlist>
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>
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>
1343 </sect1>
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>
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>
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>
1434 </orderedlist>
1435 </para>
1437 </sect1>
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 <para>
1446 WINE REGISTRY Version 2
1447 ;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config
1449 ;; If you think it is necessary to show others your complete config for a
1450 ;; bug report, filter out empty lines and comments with
1451 ;; grep -v "^;" ~/.wine/config | grep '.'
1453 ;; MS-DOS drives configuration
1455 ;; Each section has the following format:
1456 ;; [Drive X]
1457 ;; "Path"="xxx" (Unix path for drive root)
1458 ;; "Type"="xxx" (supported types are 'floppy', 'hd', 'cdrom' and 'network')
1459 ;; "Label"="xxx" (drive label, at most 11 characters)
1460 ;; "Serial"="xxx" (serial number, 8 characters hexadecimal number)
1461 ;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
1462 ;; This is the FS Wine is supposed to emulate on a certain
1463 ;; directory structure.
1464 ;; Recommended:
1465 ;; - "win95" for ext2fs, VFAT and FAT32
1466 ;; - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
1467 ;; DON'T use "unix" unless you intend to port programs using Winelib !
1468 ;; "Device"="/dev/xx" (only if you want to allow raw device access)
1470 [Drive A]
1471 "Path" = "/mnt/fd0"
1472 "Type" = "floppy"
1473 "Label" = "Floppy"
1474 "Filesystem" = "win95"
1475 "Serial" = "87654321"
1476 "Device" = "/dev/fd0"
1478 [Drive C]
1479 "Path" = "/c"
1480 "Type" = "hd"
1481 "Label" = "MS-DOS"
1482 "Filesystem" = "win95"
1484 [Drive D]
1485 "Path" = "/cdrom"
1486 "Type" = "cdrom"
1487 "Label" = "CD-Rom"
1488 "Filesystem" = "win95"
1489 ; make sure that device is correct and has proper permissions !
1490 "Device" = "/dev/cdrom"
1492 [Drive E]
1493 "Path" = "/tmp"
1494 "Type" = "hd"
1495 "Label" = "Tmp Drive"
1496 "Filesystem" = "win95"
1498 [Drive F]
1499 "Path" = "${HOME}"
1500 "Type" = "network"
1501 "Label" = "Home"
1502 "Filesystem" = "win95"
1504 [wine]
1505 "Windows" = "c:\\windows"
1506 "System" = "c:\\windows\\system"
1507 "Temp" = "e:\\"
1508 "Path" = "c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\"
1509 "Profile" = "c:\\windows\\Profiles\\Administrator"
1510 "GraphicsDriver" = "x11drv"
1511 ;"ShowDirSymlinks" = "1"
1512 ;"ShowDotFiles" = "1"
1513 "ShellLinker" = "wineshelllink"
1515 [Version]
1516 ; Windows version to imitate (win95,win98,winme,nt351,nt40,win2k,winxp,win20,win30,win31)
1517 ;"Windows" = "win98"
1518 ; DOS version to imitate
1519 ;"DOS" = "6.22"
1521 ; Be careful here, wrong DllOverrides settings have the potential
1522 ; to pretty much kill your setup.
1523 [DllOverrides]
1524 ; some dlls you may want to change
1525 "oleaut32" = "builtin, native"
1526 "ole32" = "builtin, native"
1527 "commdlg" = "builtin, native"
1528 "comdlg32" = "builtin, native"
1529 "shell" = "builtin, native"
1530 "shell32" = "builtin, native"
1531 "shfolder" = "builtin, native"
1532 "shlwapi" = "builtin, native"
1533 "shdocvw" = "builtin, native"
1534 "advapi32" = "builtin, native"
1535 "msvcrt" = "native, builtin"
1536 "mciavi.drv" = "native, builtin"
1537 "mcianim.drv" = "native, builtin"
1538 ; you can specify applications too
1539 ; this one will apply for all notepad.exe
1540 ;"*notepad.exe" = "native, builtin"
1541 ; this one will apply only for a particular file
1542 ;"C:\\windows\\regedit.exe" = "native, builtin"
1543 ; default for all other dlls
1544 "*" = "builtin, native"
1546 [x11drv]
1547 ; Number of colors to allocate from the system palette
1548 "AllocSystemColors" = "100"
1549 ; Use a private color map
1550 "PrivateColorMap" = "N"
1551 ; Favor correctness over speed in some graphics operations
1552 "PerfectGraphics" = "N"
1553 ; Color depth to use on multi-depth screens
1554 ;;"ScreenDepth" = "16"
1555 ; Name of X11 display to use
1556 ;;"Display" = ":0.0"
1557 ; Allow the window manager to manage created windows
1558 "Managed" = "Y"
1559 ; Use a desktop window of 640x480 for Wine
1560 ;"Desktop" = "640x480"
1561 ; Use XFree86 DGA extension if present
1562 ; (make sure /dev/mem is accessible by you !)
1563 "UseDGA" = "Y"
1564 ; Use XShm extension if present
1565 "UseXShm" = "Y"
1566 ; Use XVidMode extension if present
1567 "UseXVidMode" = "Y"
1568 ; Use the take focus protocol
1569 "UseTakeFocus" = "Y"
1570 ; Enable DirectX mouse grab
1571 "DXGrab" = "N"
1572 ; Create the desktop window with a double-buffered visual
1573 ; (useful to play OpenGL games)
1574 "DesktopDoubleBuffered" = "N"
1575 ; Code page used for captions in managed mode
1576 ; 0 means default ANSI code page (CP_ACP == 0)
1577 "TextCP" = "0"
1578 ; Use this if you have more than one port for video on your setup
1579 ; (Wine uses for now the first 'input image' it finds).
1580 ;; "XVideoPort" = "43"
1581 ; Run in synchronous mode (useful for debugging X11 problems)
1582 ;;"Synchronous" = "Y"
1584 ; Use the Render extension to render client side fonts (default "Y")
1585 ;;"ClientSideWithRender" = "Y"
1586 ; Fallback on X core requests to render client side fonts (default "Y")
1587 ;;"ClientSideWithCore" = "Y"
1588 ; Set both of the previous two to "N" in order to force X11 server side fonts
1590 ; Anti-alias fonts if using the Render extension (default "Y")
1591 ;;"ClientSideAntiAliasWithRender" = "Y"
1592 ; Anti-alias fonts if using core requests fallback (default "Y")
1593 ;;"ClientSideAntiAliasWithCore" = "Y"
1596 [fonts]
1597 ;Read the Fonts topic in the Wine User Guide before adding aliases
1598 ;See a couple of examples for russian users below
1599 "Resolution" = "96"
1600 "Default" = "-adobe-helvetica-"
1601 "DefaultFixed" = "fixed"
1602 "DefaultSerif" = "-adobe-times-"
1603 "DefaultSansSerif" = "-adobe-helvetica-"
1605 ;; default TrueType fonts with russian koi8-r encoding
1606 ;"Default" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1607 ;"DefaultFixed" = "-monotype-courier new-*-*-*--*-*-*-*-*-*-koi8-r"
1608 ;"DefaultSerif" = "-monotype-times new roman-*-*-*--*-*-*-*-*-*-koi8-r"
1609 ;"DefaultSansSerif" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1610 ;; default cyrillic bitmap X fonts
1611 ;"Default" = "-cronyx-helvetica-"
1612 ;"DefaultFixed" = "fixed"
1613 ;"DefaultSerif" = "-cronyx-times-"
1614 ;"DefaultSansSerif" = "-cronyx-helvetica-"
1616 ; the TrueType font dirs you want to make accessible to wine
1617 [FontDirs]
1618 ;"dir1" = "/usr/X11R6/lib/X11/fonts/TrueType"
1619 ;"dir2" = "/usr/share/fonts/truetype"
1620 ;"dir3" = "/usr/X11R6/lib/X11/fonts/TT"
1621 ;"dir4" = "/usr/share/fonts/TT"
1623 [serialports]
1624 "Com1" = "/dev/ttyS0"
1625 "Com2" = "/dev/ttyS1"
1626 "Com3" = "/dev/ttyS2"
1627 "Com4" = "/dev/modem"
1629 [parallelports]
1630 "Lpt1" = "/dev/lp0"
1632 [ppdev]
1633 ;; key: io-base of the emulated port
1634 ;; value : parport-device{,timeout}
1635 ;; timeout for auto closing an open device ( not yet implemented)
1636 ;"378" = "/dev/parport0"
1637 ;"278" = "/dev/parport1"
1638 ;"3bc" = "/dev/parport2"
1640 [spooler]
1641 "FILE:" = "tmp.ps"
1642 "LPT1:" = "|lpr"
1643 "LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"
1644 "LPT3:" = "/dev/lp3"
1646 [ports]
1647 ;"read" = "0x779,0x379,0x280-0x2a0"
1648 ;"write" = "0x779,0x379,0x280-0x2a0"
1650 [Debug]
1651 ;"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1652 ;"RelayInclude" = "user32.CreateWindowA"
1653 ;"SnoopExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1654 ;"SpyExclude" = "WM_SIZE;WM_TIMER;"
1656 [registry]
1657 ;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
1658 ;Defaults are read all, write to Home
1659 ; Where to find the global registries
1660 ;"GlobalRegistryDir" = "/etc";
1661 ; Global registries (stored in /etc)
1662 "LoadGlobalRegistryFiles" = "Y"
1663 ; Home registries (stored in ~user/.wine/)
1664 "LoadHomeRegistryFiles" = "Y"
1665 ; Load Windows registries from the Windows directory
1666 "LoadWindowsRegistryFiles" = "Y"
1667 ; TRY to write all changes to home registries
1668 "WritetoHomeRegistryFiles" = "Y"
1669 ; Registry periodic save timeout in seconds
1670 ; "PeriodicSave" = "600"
1671 ; Save only modified keys
1672 "SaveOnlyUpdatedKeys" = "Y"
1674 [Tweak.Layout]
1675 ;; supported styles are 'Win31'(default), 'Win95', 'Win98'
1676 ;; this has *nothing* to do with the windows version Wine returns:
1677 ;; set the "Windows" value in the [Version] section if you want that.
1678 "WineLook" = "Win95"
1680 [Console]
1681 ;"Drivers" = "tty"
1682 ;"XtermProg" = "nxterm"
1683 ;"InitialRows" = "25"
1684 ;"InitialColumns" = "80"
1685 ;"TerminalType" = "nxterm"
1687 [Clipboard]
1688 "ClearAllSelections" = "0"
1689 "PersistentSelection" = "1"
1691 ; List of all directories directly contain .AFM files
1692 [afmdirs]
1693 "1" = "/usr/share/ghostscript/fonts"
1694 "2" = "/usr/share/a2ps/afm"
1695 "3" = "/usr/share/enscript"
1696 "4" = "/usr/X11R6/lib/X11/fonts/Type1"
1698 [WinMM]
1699 #"Drivers" = "winearts.drv"
1700 #"Drivers" = "winejack.drv"
1701 "Drivers" = "wineoss.drv"
1702 "WaveMapper" = "msacm.drv"
1703 "MidiMapper" = "midimap.drv"
1705 [dsound]
1706 ;; HEL only: Number of waveOut fragments ahead to mix in new buffers.
1707 ;"HELmargin" = "5"
1708 ;; HEL only: Number of waveOut fragments ahead to queue to driver.
1709 ;"HELqueue" = "5"
1710 ;; Max number of fragments to prebuffer
1711 ;"SndQueueMax" = "28"
1712 ;; Min number of fragments to prebuffer
1713 ;"SndQueueMin" = "12"
1715 [Network]
1716 ;; Use the DNS (Unix) host name always as NetBIOS "ComputerName" (boolean, default "Y").
1717 ;; Set to N if you need a persistent NetBIOS ComputerName that possibly differs
1718 ;; from the Unix host name. You'll need to set ComputerName in
1719 ;; HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName, too.
1720 ;"UseDnsComputerName" = "N"
1722 ;; sample AppDefaults entries
1723 ;[AppDefaults\\iexplore.exe\\DllOverrides]
1724 ;"shlwapi" = "native"
1725 ;"rpcrt4" = "native"
1726 ;"ole32" = "native"
1727 ;"shdocvw" = "native"
1728 ;"wininet" = "native"
1729 ;"shfolder" = "native"
1730 ;"shell32" = "native"
1731 ;"shell" = "native"
1732 ;"comctl32" = "native"
1734 ;[AppDefaults\\setup.exe\\x11drv]
1735 ;"Desktop" = "800x600"
1737 ;[AppDefaults\\sol.exe\\Version]
1738 ;"Windows" = "nt40"
1740 ;; Some games (Quake 2, UT) refuse to accept emulated dsound devices.
1741 ;; You can add an AppDefault entry like this for such cases.
1742 ;[AppDefaults\\pickygame.exe\\dsound]
1743 ;"EmulDriver" = "N"
1745 </para>
1746 </sect1>
1748 </chapter>
1753 <chapter id="pkg-implementation"> <title>Implementation</title>
1755 <sect1 id="pkg-openlinux"><title>RedHat 8.0 Sample</title>
1757 <orderedlist inheritnum="inherit">
1758 <listitem>
1759 <para>Building the package</para>
1760 <para>
1761 Wine is configured the usual way (depending on your
1762 build environment). The "prefix" is chosen using your
1763 application placement policy
1764 (<filename>/usr/</filename>,
1765 <filename>/usr/X11R6/</filename>,
1766 <filename>/opt/wine/</filename> or similar). The
1767 configuration files (<filename>wine.conf</filename>,
1768 <filename>wine.userreg</filename>,
1769 <filename>wine.systemreg</filename>) are targeted for
1770 <filename>/etc/wine/</filename> (rationale: FHS 2.2,
1771 multiple readonly configuration files of a package).
1772 </para>
1773 <para>
1774 Example (split this into <literal>%build</literal> and
1775 <literal>%install</literal> section for
1776 <command>rpm</command>):
1777 </para>
1778 <screen>
1779 CFLAGS=$RPM_OPT_FLAGS \
1780 ./configure --prefix=/usr/X11R6 --sysconfdir=/etc/wine/ --enable-dll
1781 make
1782 BR=$RPM_BUILD_ROOT
1783 make install prefix=$BR/usr/X11R6/ sysconfdir=$BR/etc/wine/
1784 install -d $BR/etc/wine/
1785 install -m 644 wine.ini $BR/etc/wine/wine.conf
1787 # Put all our dlls in a seperate directory. (this works only if
1788 # you have a buildroot)
1789 install -d $BR/usr/X11R6/lib/wine
1790 mv $BR/usr/X11R6/lib/lib* $BR/usr/X11R6/lib/wine/
1792 # the clipboard server is started on demand.
1793 install -m 755 dlls/x11drv/wineclipsrv $BR/usr/X11R6/bin/
1795 # The Wine server is needed.
1796 install -m 755 server/wineserver $BR/usr/X11R6/bin/
1797 </screen>
1798 <para>
1799 Here we unfortunately do need to create
1800 <filename>wineuser.reg</filename> and
1801 <filename>winesystem.reg</filename> from the Wine
1802 distributed <filename>winedefault.reg</filename>. This
1803 can be done using <command>./regedit</command> once for
1804 one example user and then reusing his
1805 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/user.reg</filename> and
1806 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/system.reg</filename> files.
1807 <note>
1808 <title>FIXME</title>
1809 <para>this needs to be done better</para>
1810 </note>
1811 </para>
1812 <screen>
1813 install -m 644 wine.sytemreg $BR/etc/wine/
1814 install -m 644 wine.userreg $BR/etc/wine/
1815 </screen>
1816 <para>
1817 There are now a lot of libraries generated by the
1818 build process, so a seperate library directory should
1819 be used.
1820 </para>
1821 <screen>
1822 install -d 755 $BR/usr/X11R6/lib/
1823 mv $BR/
1824 </screen>
1825 <para>
1826 You will need to package the files:
1827 </para>
1828 <screen>
1829 $prefix/bin/wine, $prefix/bin/dosmod, $prefix/lib/wine/*
1830 $prefix/man/man1/wine.1, $prefix/include/wine/*,
1831 $prefix/bin/wineserver, $prefix/bin/wineclipsrv
1833 %config /etc/wine/*
1834 %doc ... choose from the toplevel directory and documentation/
1835 </screen>
1836 <para>
1837 The post-install script:
1838 </para>
1839 <screen>
1840 if ! grep -q /usr/X11R6/lib/wine /etc/ld.so.conf; then
1841 echo "/usr/X11R6/lib/wine" &gt;&gt; /etc/ld.so.conf
1843 /sbin/ldconfig
1844 </screen>
1845 <para>
1846 The post-uninstall script:
1847 </para>
1848 <screen>
1849 if [ "$1" = 0 ]; then
1850 perl -ni -e 'print unless m:/usr/X11R6/lib/wine:;' /etc/ld.so.conf
1852 /sbin/ldconfig
1853 </screen>
1854 </listitem>
1855 <listitem>
1856 <para>Creating a good default configuration file</para>
1857 <para>
1858 For the rationales of needing as less input from the
1859 user as possible arises the need for a very good
1860 configuration file. The one supplied with Wine is
1861 currently lacking. We need:
1862 </para>
1863 <itemizedlist>
1864 <listitem>
1865 <para>
1866 [Drive X]:
1867 </para>
1868 <itemizedlist>
1869 <listitem>
1870 <para>
1871 A for the floppy. Specify your distribution's
1872 default floppy mountpoint here.
1873 </para>
1874 <programlisting>
1875 Path=/auto/floppy
1876 </programlisting>
1877 </listitem>
1878 <listitem>
1879 <para>
1880 C for the <filename>C:\</filename> directory.
1881 Here we use the user's home directory, for most
1882 applications do see <filename>C:\</filename>
1883 as root-writeable directory of every windows
1884 installation and this basically is it in the
1885 UNIX-user context.
1886 </para>
1887 <programlisting>
1888 Path=${HOME}
1889 </programlisting>
1890 </listitem>
1891 <listitem>
1892 <para>
1893 R for the CD-Rom drive. Specify your
1894 distribution's default CD-ROM drives mountpoint
1895 here.
1896 </para>
1897 <programlisting>
1898 Path=/auto/cdrom
1899 </programlisting>
1900 </listitem>
1901 <listitem>
1902 <para>
1903 T for temporary storage. We do use
1904 <filename>/tmp/</filename> (rationale: between
1905 process temporary data belongs to
1906 <filename>/tmp/</filename>, FHS 2.0)
1907 </para>
1908 </listitem>
1909 <listitem>
1910 <para>
1911 W for the original Windows installation. This
1912 drive points to the
1913 <filename>windows\</filename> subdirectory of
1914 the original windows installation. This avoids
1915 problems with renamed
1916 <filename>windows</filename> directories (as
1917 for instance <filename>lose95</filename>,
1918 <filename>win</filename> or
1919 <filename>sys\win95</filename>). During
1920 compile/package/install we leave this to be
1921 <filename>/</filename>, it has to be
1922 configured after the package install.
1923 </para>
1924 </listitem>
1925 <listitem>
1926 <para>
1927 Z for the UNIX Root directory. This avoids any
1928 problems with "could not find drive for
1929 current directory" users occasionally complain
1930 about in the newsgroup and the irc channel. It
1931 also makes the whole directory structure
1932 browseable. The type of Z should be network,
1933 so applications expect it to be readonly.
1934 </para>
1935 <programlisting>
1936 Path=/
1937 </programlisting>
1938 </listitem>
1939 </itemizedlist>
1940 </listitem>
1941 <listitem>
1942 <para>
1943 [wine]:
1944 </para>
1945 <screen>
1946 Windows=c:\windows\ (the windows/ subdirectory in the user's
1947 home directory)
1948 System=c:\windows\system\ (the windows/system subdirectory in the user's
1949 home directory)
1950 Path=c:\windows;c:\windows\system;c:\windows\system32;w:\;w:\system;w:\system32;
1951 ; Using this trick we have in fact two windows installations in one, we
1952 ; get the stuff from the readonly installation and can write to our own.
1953 Temp=t:\ (the TEMP directory)
1954 </screen>
1955 </listitem>
1956 <listitem>
1957 <para>[Tweak.Layout]</para>
1958 <screen>
1959 WineLook=win95 (just the coolest look ;)
1960 </screen>
1961 </listitem>
1962 <listitem>
1963 <para>
1964 Possibly modify the [spooler], [serialports] and
1965 [parallelports] sections.
1966 </para>
1967 <note>
1968 <title>FIXME</title>
1969 <para>possibly more, including printer stuff.</para>
1970 </note>
1971 </listitem>
1972 </itemizedlist>
1974 <para>Add this prepared configuration file to the package.</para>
1975 </listitem>
1976 <listitem>
1977 <para>Installing Wine for the system administrator</para>
1978 <para>
1979 Install the package using the usual packager
1980 <command>rpm -i wine.rpm</command>. You may edit
1981 <filename>/etc/wine/wine.conf</filename>, [Drive W],
1982 to point to a possible windows installation right
1983 after the install. That's it.
1984 </para>
1985 <para>
1986 Note that on Linux you should somehow try to add the
1987 <option>unhide</option> mount option (see <command>man
1988 mount</command>) to the CD-ROM entry in
1989 <filename>/etc/fstab</filename> during package
1990 install, as several stupid Windows programs mark some
1991 setup (!) files as hidden (ISO9660) on CD-ROMs, which
1992 will greatly confuse users as they won't find their
1993 setup files on the CD-ROMs as they were used on
1994 Windows systems when <option>unhide</option> is not
1995 set ;-\ And of course the setup program will complain
1996 that <filename>setup.ins</filename> or some other mess
1997 is missing... If you choose to do so, then please make
1998 this change verbose to the admin.
1999 Also make sure that the kernel you use includes the Joliet
2000 CD-ROM support, for the very same reasons as given above
2001 (no long filenames due to missing Joliet, files not found).
2002 </para>
2003 </listitem>
2004 <listitem>
2005 <para>Installing Wine for the user</para>
2006 <para>
2007 The user will need to run a setup script before the
2008 first invocation of Wine. This script should:
2009 </para>
2012 <itemizedlist>
2013 <listitem>
2014 <para>
2015 Copy <filename>/etc/wine/wine.conf</filename> for
2016 user modification.
2017 </para>
2018 </listitem>
2019 <listitem>
2020 <para>
2021 Allow specification of the original windows
2022 installation to use (which modifies the copied
2023 <filename>wine.conf</filename> file).
2024 </para>
2025 </listitem>
2026 <listitem>
2027 <para>
2028 Create the windows directory structure
2029 (<filename>c:\windows</filename>,
2030 <filename>c:\windows\system</filename>,
2031 <filename>c:\windows\Start Menu\Programs</filename>,
2032 <filename>c:\Program Files</filename>,
2033 <filename>c:\Desktop</filename>, etc.)
2034 </para>
2035 </listitem>
2036 <listitem>
2037 <para>
2038 Symlink all <filename>.dll</filename> and
2039 <filename>.exe</filename> files from the original
2040 windows installation to the
2041 <filename>windows</filename> directory. Why? Some
2042 programs reference "%windowsdir%/file.dll" or
2043 "%systemdir%/file.dll" directly and fail if they
2044 are not present.
2045 </para>
2046 <para>
2047 This will give a huge number of symlinks, yes.
2048 However, if an installer later overwrites one of
2049 those files, it will overwrite the symlink (so
2050 that the file now lies in the
2051 <filename>windows/</filename> subdirectory).
2052 </para>
2053 <note>
2054 <title>FIXME</title>
2055 <para>Not sure this is needed for all files.</para>
2056 </note>
2057 </listitem>
2058 <listitem>
2059 <para>
2060 On later invocation the script might want to
2061 compare regular files in the user's windows
2062 directories and in the global windows directories
2063 and replace same files by symlinks (to avoid
2064 diskspace problems).
2065 </para>
2066 </listitem>
2067 </itemizedlist>
2070 </listitem>
2071 </orderedlist>
2074 <sect2 id=sample><title>Sample RedHat 8.0 .spec file for review purposes</title>
2077 <programlisting>
2079 %define DATE 20030115
2080 Summary: A Windows 16/32 bit emulator.
2081 Name: wine
2082 Version: %{DATE}
2083 Release: 1rh8winehq
2084 Group: Applications/Emulators
2085 License: LGPL
2086 URL: http://www.winehq.com/
2087 Source: ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.bz2
2088 Source1: wine.init
2089 Patch: wine-%{version}-initial.patch
2090 Patch1: wine-%{version}-kde2.patch
2091 Patch2: wine-%{version}-winelauncher.patch
2092 Patch3: wine-%{version}-defaultcfg.patch
2093 Patch4: wine-%{version}-stabs+.patch
2094 Buildroot: %{_tmppath}/%{name}-root
2095 ExclusiveArch: %{ix86}
2096 Prereq: shadow-utils
2097 Conflicts: kdebase < 2.0
2098 Requires: cups-libs >= 1.1.12
2099 BuildRequires: docbook-utils, cups-devel >= 1.1.12, autoconf253, perl
2101 %description
2102 While Wine is usually thought of as a Windows(TM) emulator, the Wine
2103 developers would prefer that users thought of Wine as a Windows
2104 compatibility layer for UNIX. This package includes a program loader,
2105 which allows unmodified Windows 3.1/95/NT binaries to run under Intel
2106 Unixes. Wine does not require MS Windows, but it can use native system
2107 .dll files if they are available.
2109 %package devel
2110 Summary: Wine development environment.
2111 Group: System Environment/Libraries
2112 Requires: wine = %{version}
2114 %description devel
2115 Header and include files for developing applications with the Wine
2116 Windows(TM) emulation libraries.
2118 %prep
2119 %setup -q -n wine-%{version}
2120 find . -type d -name CVS |xargs rm -rf
2121 %patch -p1 -b .initial
2122 %patch1 -p1 -b .kde2
2123 %patch2 -p1 -b .wl
2124 %patch3 -p1 -b .defcfg
2125 %patch4 -p1 -b .stabs+
2127 %build
2128 export CFLAGS="$RPM_OPT_FLAGS"
2129 autoconf || autoconf-2.53
2130 %configure \
2131 --with-x \
2132 --libdir=%{_libdir}/wine \
2133 --includedir=%{_includedir}/wine \
2134 --sysconfdir=%{_sysconfdir}/wine
2136 make depend
2137 make
2138 make -C documentation doc
2140 %install
2141 rm -rf $RPM_BUILD_ROOT
2143 %makeinstall \
2144 includedir=%{?buildroot:%{buildroot}}%{_includedir}/wine \
2145 libdir=%{?buildroot:%{buildroot}}%{_libdir}/wine \
2146 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir}/wine \
2147 dlldir=%{?buildroot:%{buildroot}}%{_libdir}/wine/wine \
2148 LDCONFIG=/bin/true
2150 for i in system "Start Menu/Programs/Startup" Profiles/Administrator Fonts \
2151 Desktop Favorites NetHood Recent SendTo ShellNew; do
2152 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/windows/$i"
2153 done
2154 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/My Documents"
2155 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/Program Files/Common Files"
2157 # Take care of wine and windows configuration files...
2158 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/wine
2159 mv documentation/samples/config documentation/samples/config.orig
2160 sed "s/\"GraphicsDriver\" = .*/\"GraphicsDriver\" = \"ttydrv\"/" documentation/samples/config.orig |\
2161 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"$RPM_BUILD_ROOT%{_datadir}/wine-c\"|" |\
2162 sed "s|\"Path\" = \"\${HOME}\"$|\"Path\" = \"%{_builddir}/%{buildsubdir}\"|" -> documentation/samples/config
2163 WINEPREFIX=%{_builddir}/%{buildsubdir}/documentation/samples programs/regedit/regedit winedefault.reg > /dev/null
2164 # Wait until wineserver finishes and closes those files
2165 sleep 5
2166 install -c -m 0644 documentation/samples/system.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/system.reg
2167 install -c -m 0644 documentation/samples/user.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/user.reg
2168 install -c -m 0644 documentation/samples/userdef.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/userdef.reg
2169 rm -f documentation/samples/system.reg
2170 rm -f documentation/samples/user.reg
2171 rm -f documentation/samples/userdef.reg
2173 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"%{_datadir}/wine-c\"|" documentation/samples/config.orig > documentation/samples/config.rh
2174 install -c -m 0644 documentation/samples/config.rh $RPM_BUILD_ROOT%{_sysconfdir}/wine/wine.conf
2175 rm -f documentation/samples/config
2176 rm -f documentation/samples/config.rh
2177 mv documentation/samples/config.orig documentation/samples/config
2179 # Install link to windows applications replacements
2180 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/notepad.exe
2181 ln -sf %{_libdir}/wine/regedit.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/regedit.exe
2182 ln -sf %{_libdir}/wine/rundll32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/rundll32.exe
2183 ln -sf %{_libdir}/wine/wcmd.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/cmd.exe
2184 ln -sf %{_libdir}/wine/control.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/control.exe
2185 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/help.exe
2186 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/notepad.exe
2187 ln -sf %{_libdir}/wine/progman.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/progman.exe
2188 ln -sf %{_libdir}/wine/regsvr32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/regsvr32.exe
2189 ln -sf %{_libdir}/wine/winemine.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winmine.exe
2190 ln -sf %{_libdir}/wine/winver.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winver.exe
2191 ln -sf %{_libdir}/wine/uninstaller.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/uninstaller.exe
2192 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhelp.exe
2193 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhlp32.exe
2195 for i in shell.dll shell32.dll winsock.dll wnsock32.dll; do
2196 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/$i
2197 done
2198 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/autoexec.bat
2199 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/config.sys
2200 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/win.ini
2201 install -c -m 0644 documentation/samples/system.ini $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system.ini
2203 cat >RedHat &lt;&lt;EOF
2204 Wine directory structure used in Red Hat Linux:
2205 ===============================================
2207 %{_datadir}/wine-c is the root directory (aka C: drive) wine looks for
2208 by default. It contains (empty) C:\windows and C:\windows\system
2209 directories, needed to operate Wine without an existing Windows installation.
2211 If you want to use Wine with an existing Windows installation that is mounted,
2212 for example, in /mnt/windows-c, edit /etc/wine.conf to say
2214 [Drive C]
2215 Path=/mnt/windows-c
2216 Type=hd
2217 Label=Whatever
2218 Filesystem=win95
2220 instead of the defaults set by installation.
2222 If you do this, you can safely remove %{_datadir}/wine-c.
2223 (Alternatively, just mount your Windows partition to %{_datadir}/wine-c.)
2226 # Allow users to launch Windows programs by just clicking on the .exe file...
2227 mkdir -p $RPM_BUILD_ROOT%{_initrddir}
2228 install -c -m 755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/wine
2230 %clean
2231 rm -rf $RPM_BUILD_ROOT
2233 %pre
2234 /usr/sbin/groupadd -g 66 -r wine &>/dev/null || :
2236 %post
2237 if ! grep -q "^/usr/lib/wine$" /etc/ld.so.conf; then
2238 echo "/usr/lib/wine" >>/etc/ld.so.conf
2240 /sbin/ldconfig
2241 /sbin/chkconfig --add wine
2242 /sbin/chkconfig --level 2345 wine on
2243 /sbin/service wine start &>/dev/null || :
2245 %preun
2246 if test "$1" = "0"; then
2247 /sbin/chkconfig --del wine
2250 %postun
2251 if test "$1" = "0"; then
2252 perl -pi -e "s,^/usr/lib/wine$,,g" /etc/ld.so.conf
2253 /usr/sbin/groupdel wine &>/dev/null || :
2255 /sbin/ldconfig
2257 %files
2258 %defattr(-,root,root)
2259 %attr(0775, root, wine) %dir %{_datadir}/wine-c
2260 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows
2261 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/system
2262 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu"
2263 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs"
2264 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs/Startup"
2265 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles
2266 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles/Administrator
2267 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Fonts
2268 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Desktop
2269 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Favorites
2270 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/NetHood
2271 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Recent
2272 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/SendTo
2273 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/ShellNew
2274 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/My Documents"
2275 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files"
2276 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files/Common Files"
2277 %{_libdir}/wine
2278 %{_bindir}/*
2279 %{_mandir}/man?/*
2280 %{_datadir}/wine-c/windows/system/*.dll
2281 %{_datadir}/wine-c/windows/*.exe
2282 %config %{_datadir}/wine-c/autoexec.bat
2283 %config %{_datadir}/wine-c/config.sys
2284 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/win.ini
2285 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/system.ini
2286 %config %{_sysconfdir}/wine/*
2287 %config %{_initrddir}/*
2288 %doc ANNOUNCE BUGS COPYING.LIB ChangeLog DEVELOPERS-HINTS LICENSE LICENSE.OLD README VERSION
2289 %doc AUTHORS RedHat
2290 %doc documentation/ChangeLog.OLD documentation/HOWTO-winelib documentation/README.fr
2291 %doc documentation/wine-devel documentation/wine-user documentation/winelib-user documentation/samples
2293 %files devel
2294 %defattr(-,root,root)
2295 %{_includedir}/*
2298 </programlisting>
2300 </sect2>
2301 </sect1>
2303 </chapter>
2305 <chapter id="pkg-todo"><Title>Work to be done</title>
2307 <para>
2308 In preparing this document, it became clear that there were
2309 still a range of action items to be done in Wine
2310 that would improve this packaging process.
2311 For lack of a better place, I record them here.
2312 <emphasis>This list is almost certain to be obsolete;
2313 check bugzilla for a better list.</emphasis>
2314 </para>
2316 <orderedlist>
2317 <listitem>
2318 <para>
2319 Remove duplication of code between winesetup and
2320 wineconf/wineinstall.
2321 </para>
2322 <para>
2323 Currently, winesetup duplicates all of the code contained
2324 in wineconf.
2325 </para>
2326 <para>
2327 Instead, wineconf should be improved to generate
2328 the new style config file, and then winesetup should
2329 rely on wineconf to generate the default
2330 configuration file.
2331 </para>
2332 <para>
2333 Similarly, there is functionality such as creating
2334 the default registry files that is now done by
2335 both winesetup and wineinstall.
2336 </para>
2337 <para>
2338 At this time, it seems like the right thing to do
2339 is to break up or parameterize wineinstall, so that
2340 it can be used for single function actions,
2341 and then have winesetup call those functions.
2342 </para>
2343 </listitem>
2345 <listitem>
2346 <para>
2347 Enhance winesetup to support W: drive generation.
2348 </para>
2349 <para>
2350 The best practices convention now seems to be
2351 to generate a set of drives from M: through W:.
2352 At this point, winesetup does not generate
2353 a default wine config file that follows
2354 these conventions. It should.
2355 </para>
2356 </listitem>
2358 <listitem>
2359 <para>
2360 Enhance Wine to allow more dynamic switching
2361 between the use of a real Windows partition
2362 and an empty one.
2363 </para>
2364 </listitem>
2366 <listitem>
2367 <para>
2368 Write a winelauncher utility application.
2369 </para>
2370 <para>
2371 Currently, Wine really requires a user to launch it
2372 from a command line, so that the user can look for
2373 error messages and warnings. However, eventually, we will
2374 want users to be able to launch Wine from a more
2375 friendly GUI launcher. The launcher should have the
2376 ability to allow the end user to turn on debugging
2377 messages and capture those traces for bug reporting
2378 purposes. Also, if we make it possible to
2379 switch between use of a Windows partition or not
2380 automatically, that option should be controlled here.
2381 </para>
2382 </listitem>
2384 <listitem>
2385 <para>
2386 Get Marcus's winesetup facilities into CVS
2387 </para>
2388 <para>
2389 Along the lines of the changes to winesetup,
2390 and the consolidation of wineconf and wineinstall,
2391 we should extract the good stuff from Marcus's
2392 winesetup script, and get it into CVS.
2393 Again, perhaps we should have a set of scripts
2394 that perform discrete functions, or maybe
2395 one script with parameters.
2396 </para>
2397 </listitem>
2399 <listitem>
2400 <para>
2401 Finish this document
2402 </para>
2403 <para>
2404 This document is pretty rough itself. Many hard
2405 things aren't addressed, and lots of stuff was missed.
2406 </para>
2407 </listitem>
2408 </orderedlist>
2409 </chapter>
2412 <!-- Keep this comment at the end of the file
2413 Local variables:
2414 mode: sgml
2415 sgml-parent-document:("wine-doc.sgml" "book" "part" "chapter" "")
2416 End: