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