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>
9 Written by &name-marcus-meissner; <email>&email-marcus-meissner;</email>
12 Updated by &name-jeremy-white; <email>&email-jeremy-white;</email>
15 Updated by &name-andreas-mohr; <email>&email-andreas-mohr;</email>
18 Updated by &name-tom-wickline; <email>&email-tom-wickline;</email>
22 <sect1 id="pkg-date"> <title>Document Revision Date</title>
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).
37 This document was last revised on January 16, 2003.</para>
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.
49 <listitem id=WINECONFDIR><para id=wineconfdir.id><EnVar>WINECONFDIR</EnVar></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
58 <listitem id=PREFIX><para id=prefix.id><EnVar>PREFIX</EnVar></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.
72 <listitem id=ETCDIR><para id=etcdir.id><EnVar>ETCDIR</EnVar></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.
81 <listitem id=WINDOWSDIR><para id=windowsdir.id><EnVar>WINDOWSDIR</EnVar></para>
83 <envar>WINDOWSDIR</envar> is an important concept
84 to Wine. This directory specifies what directory
85 corresponds to the root Windows directory
89 This directory is specified by the user, in
90 the user's <link linkend=winerc>configuration file</link>.
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.
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
115 <chapter id="pkg-introduction"> <title>Introduction</title>
118 This document attempts to establish guidelines
119 for people making binary packages of Wine.
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.
133 <sect1 id="pkg-goals"> <title>Goals</title>
135 An installation from a Wine package should:
141 Install quickly and simply.
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.
152 Work quickly and simply
155 The user should be able to launch Solitaire
156 within minutes of downloading the Wine package.
162 Comply with Filesystem Hierarchy Standard
165 A Wine installation should, as much as possible, comply
167 <ulink url="http://www.pathname.com/fhs/">FHS standard</ulink>.
176 None of the flexibility built into Wine should
177 be hidden from the end user.
183 Come as preconfigured as possible, so the user does
184 not need to change any configuration files.
189 <para>Use only as much diskspace as needed per user.</para>
194 Reduce support requirements.
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
211 <sect1 id="pkg-requirements"> <title>Requirements</title>
213 Successfully installing Wine requires:
218 <para>Much thought and work from the packager (1x)</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.
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>.
248 An initial set of registry entries.
251 The current Wine standard is to use the regedit tool
252 against the 'winedefault.reg' file to generate
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.
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.
285 <chapter id="pkg-components"><title>Wine Components</title>
288 This section lists all files that pertain to Wine.
291 <sect1 id="pkg-static"><title>Wine Static and Shareable Files</title>
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.
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.
310 <listitem id=binfiles>
311 <variablelist><title>Executable Files</title>
313 <varlistentry><term><filename>wine</filename></term>
316 The main Wine executable. This program will load
317 a Windows binary and run it, relying upon
318 the Wine shared object libraries.
323 <varlistentry><term><filename>wineserver</filename></term>
326 The Wine server is critical to Wine; it is the
327 process that coordinates all shared Windows
333 <varlistentry><term><filename>winebootup</filename></term>
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*,
347 <varlistentry><term><filename>wineclipsrv</filename></term>
350 The Wine Clipboard Server is a standalone XLib
351 application whose purpose is to manage the X selection
357 <varlistentry><term><filename>winedbg</filename></term>
360 Winedbg is the Wine built in debugger.
365 <varlistentry><term><filename>winelauncher</filename></term>
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.
385 <varlistentry><term><filename>winesetup</filename></term>
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.
395 <varlistentry><term><filename>wineshelllink</filename></term>
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
406 <varlistentry><term><filename>winebuild</filename></term>
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.
415 <varlistentry><term><filename>wmc</filename></term>
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.
424 <varlistentry><term><filename>wrc</filename></term>
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.
434 <varlistentry><term><filename>fnt2bdf</filename></term>
437 The fnt2bdf utility extracts fonts from .fnt or
438 .dll files and stores them in .bdf format files.
442 <varlistentry><term><filename>dosmod</filename></term>
450 <varlistentry><term><filename>uninstaller</filename></term>
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.
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</>
652 <listitem id=manfiles>
653 <para> Man Pages</para>
654 <simplelist columns=1>
655 <member>wine.conf.man</>
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</>
674 <member>commctrl.h</>
680 <member>d3dtypes.h</>
681 <member>d3dvec.inl</>
685 <member>digitalv.h</>
698 <member>imagehlp.h</>
700 <member>initguid.h</>
701 <member>instance.h</>
703 <member>lzexpand.h</>
705 <member>mapicode.h</>
706 <member>mapidefs.h</>
709 <member>mediaerr.h</>
710 <member>mediaobj.h</>
713 <member>mmsystem.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</>
748 <member>ntsecapi.h</>
762 <member>pshpack1.h</>
763 <member>pshpack2.h</>
764 <member>pshpack4.h</>
765 <member>pshpack8.h</>
768 <member>richedit.h</>
773 <member>rpcnterr.h</>
774 <member>rpcproxy.h</>
775 <member>servprov.h</>
776 <member>setupapi.h</>
777 <member>shellapi.h</>
783 <member>sqltypes.h</>
786 <member>tlhelp32.h</>
795 <member>wincrypt.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</>
845 <member>winioctl.h</>
846 <member>winnetwk.h</>
851 <member>winresrc.h</>
853 <member>winsock2.h</>
854 <member>winspool.h</>
858 <member>wnaspi32.h</>
861 <member>ws2tcpip.h</>
862 <member>wshisotp.h</>
866 <member>libwine_uuid.a</>
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</>
964 <sect1 id="pkg-nonstatic"><title>Dynamic Wine Files</title>
967 Wine also generates and depends on a number of dynamic
968 files, including user configuration files and registry files.
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.
981 <variablelist><title>Configuration File</title>
982 <varlistentry id=winerc><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/config</filename></term>
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.
993 <filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.conf</filename></term>
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.
1003 Some packagers feel that this file should not
1004 be supplied, and that only a wine.conf.default
1005 should be given here.
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.
1019 This debate is addressed more completely
1020 below, in <link linkend=pkg-strategy endterm=strategy.id></link>.
1030 <para>Registry Files</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
1038 <ulink url="http://www.winehq.com/News/2000-25.html#FTR">
1039 Wine Weekly News feature.</ulink>
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.
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>.
1069 <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/system.reg</filename></term>
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.
1080 <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/user.reg</filename></term>
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.
1091 <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/userdef.reg</filename></term>
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.
1102 <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/wine.userreg</filename></term>
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.
1112 <varlistentry><term><filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.systemreg</filename></term>
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.
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.
1130 <varlistentry><term><filename><link linkend=ETCDIR endterm=etcdir.id></link>/wine.userreg</filename></term>
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.
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>
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.
1160 <varlistentry><term><filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/cachedmetrics.[display]</filename></term>
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.
1179 <sect1 id="pkg-winpartition"><title>Important Files from a Windows Partition</title>
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
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.
1199 <variablelist><title>Registry Files</title>
1200 <varlistentry><term><filename>[WINDOWSDIR]/system32/system.dat</filename></term>
1207 <varlistentry><term><filename>[WINDOWSDIR]/system32/user.dat</filename></term>
1214 <varlistentry><term><filename>[WINDOWSDIR]/win.ini</filename></term>
1227 Windows Dynamic Link Libraries ([WINDOWSDIR]/system32/*.dll)
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.
1243 <chapter id="pkg-strategy"><title id=strategy.id>Packaging Strategies</title>
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.
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.
1258 <sect1 id="pkg-whatfiles"><title>Distribution of Wine into packages</title>
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
1268 At this point, there is no consensus
1269 amongst the wine-devel community on this subject.
1273 <sect1 id="pkg-wherefiles"><title>Where to install files</title>
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>,
1286 all <link linkend=binfiles>binary files</link> go into
1287 <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/bin,
1293 all <link linkend=libfiles>library files</link> go into
1294 <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/lib/wine,
1300 all <link linkend=includefiles>include files</link> go into
1301 <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/include/wine,
1307 all <link linkend=docfiles>documentation files</link> go into
1308 <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/share/doc/wine-VERSION,
1314 and <link linkend=manfiles>man pages</link> go into
1315 <link linkend=PREFIX endterm=prefix.id></link>$PREFIX/share/man,
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.
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
1334 <sect2 id=opt><title>The question of /opt/wine</title>
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).
1345 <sect1 id="pkg-whattomake"><title>What files to create</title>
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.
1353 There are several approaches to this:
1357 Rely completely on user file space - install nothing
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>.
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
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.
1389 Build a reasonable set of defaults for the global wine.conf,
1390 facilitate creation of a user's local Wine configuration.
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
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.
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.
1418 Build a reasonable set of defaults for the global wine.conf,
1419 and ask the user if possible
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.
1440 <sect1 id="pkg-wineconf"><title>What to put into the wine config file</title>
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.
1448 WINE REGISTRY Version 2
1449 ;; All keys relative to \\Machine\\Software\\Wine\\Wine\\Config
1451 ;; If you think it is necessary to show others your complete config for a
1452 ;; bug report, filter out empty lines and comments with
1453 ;; grep -v "^;" ~/.wine/config | grep '.'
1455 ;; MS-DOS drives configuration
1457 ;; Each section has the following format:
1459 ;; "Path"="xxx" (Unix path for drive root)
1460 ;; "Type"="xxx" (supported types are 'floppy', 'hd', 'cdrom' and 'network')
1461 ;; "Label"="xxx" (drive label, at most 11 characters)
1462 ;; "Serial"="xxx" (serial number, 8 characters hexadecimal number)
1463 ;; "Filesystem"="xxx" (supported types are 'msdos'/'dos'/'fat', 'win95'/'vfat', 'unix')
1464 ;; This is the FS Wine is supposed to emulate on a certain
1465 ;; directory structure.
1467 ;; - "win95" for ext2fs, VFAT and FAT32
1468 ;; - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)
1469 ;; DON'T use "unix" unless you intend to port programs using Winelib !
1470 ;; "Device"="/dev/xx" (only if you want to allow raw device access)
1476 "Filesystem" = "win95"
1477 "Serial" = "87654321"
1478 "Device" = "/dev/fd0"
1484 "Filesystem" = "win95"
1490 "Filesystem" = "win95"
1491 ; make sure that device is correct and has proper permissions !
1492 "Device" = "/dev/cdrom"
1497 "Label" = "Tmp Drive"
1498 "Filesystem" = "win95"
1504 "Filesystem" = "win95"
1507 "Windows" = "c:\\windows"
1508 "System" = "c:\\windows\\system"
1510 "Path" = "c:\\windows;c:\\windows\\system;e:\\;e:\\test;f:\\"
1511 "Profile" = "c:\\windows\\Profiles\\Administrator"
1512 "GraphicsDriver" = "x11drv"
1513 ;"ShowDirSymlinks" = "1"
1514 ;"ShowDotFiles" = "1"
1515 "ShellLinker" = "wineshelllink"
1520 ; Windows version to imitate (win95,win98,winme,nt351,nt40,win2k,winxp,win20,win30,win31)
1521 ;"Windows" = "win98"
1522 ; DOS version to imitate
1525 ; Be careful here, wrong DllOverrides settings have the potential
1526 ; to pretty much kill your setup.
1528 ; some dlls you may want to change
1529 "oleaut32" = "builtin, native"
1530 "ole32" = "builtin, native"
1531 "commdlg" = "builtin, native"
1532 "comdlg32" = "builtin, native"
1533 "shell" = "builtin, native"
1534 "shell32" = "builtin, native"
1535 "shfolder" = "builtin, native"
1536 "shlwapi" = "builtin, native"
1537 "shdocvw" = "builtin, native"
1538 "advapi32" = "builtin, native"
1539 "msvcrt" = "native, builtin"
1540 "mciavi.drv" = "native, builtin"
1541 "mcianim.drv" = "native, builtin"
1542 ; you can specify applications too
1543 ; this one will apply for all notepad.exe
1544 ;"*notepad.exe" = "native, builtin"
1545 ; this one will apply only for a particular file
1546 ;"C:\\windows\\regedit.exe" = "native, builtin"
1547 ; default for all other dlls
1548 "*" = "builtin, native"
1551 ; Number of colors to allocate from the system palette
1552 "AllocSystemColors" = "100"
1553 ; Use a private color map
1554 "PrivateColorMap" = "N"
1555 ; Favor correctness over speed in some graphics operations
1556 "PerfectGraphics" = "N"
1557 ; Color depth to use on multi-depth screens
1558 ;;"ScreenDepth" = "16"
1559 ; Name of X11 display to use
1560 ;;"Display" = ":0.0"
1561 ; Allow the window manager to manage created windows
1563 ; Use a desktop window of 640x480 for Wine
1564 ;"Desktop" = "640x480"
1565 ; Use XFree86 DGA extension if present
1566 ; (make sure /dev/mem is accessible by you !)
1568 ; Use XShm extension if present
1570 ; Use XVidMode extension if present
1572 ; Use the take focus protocol
1573 "UseTakeFocus" = "Y"
1574 ; Enable DirectX mouse grab
1576 ; Create the desktop window with a double-buffered visual
1577 ; (useful to play OpenGL games)
1578 "DesktopDoubleBuffered" = "N"
1579 ; Code page used for captions in managed mode
1580 ; 0 means default ANSI code page (CP_ACP == 0)
1582 ; Use this if you have more than one port for video on your setup
1583 ; (Wine uses for now the first 'input image' it finds).
1584 ;; "XVideoPort" = "43"
1585 ; Run in synchronous mode (useful for debugging X11 problems)
1586 ;;"Synchronous" = "Y"
1588 ; Use the Render extension to render client side fonts (default "Y")
1589 ;;"ClientSideWithRender" = "Y"
1590 ; Fallback on X core requests to render client side fonts (default "Y")
1591 ;;"ClientSideWithCore" = "Y"
1592 ; Set both of the previous two to "N" in order to force X11 server side fonts
1594 ; Anti-alias fonts if using the Render extension (default "Y")
1595 ;;"ClientSideAntiAliasWithRender" = "Y"
1596 ; Anti-alias fonts if using core requests fallback (default "Y")
1597 ;;"ClientSideAntiAliasWithCore" = "Y"
1601 ;Read the Fonts topic in the Wine User Guide before adding aliases
1602 ;See a couple of examples for russian users below
1604 "Default" = "-adobe-helvetica-"
1605 "DefaultFixed" = "fixed"
1606 "DefaultSerif" = "-adobe-times-"
1607 "DefaultSansSerif" = "-adobe-helvetica-"
1609 ;; default TrueType fonts with russian koi8-r encoding
1610 ;"Default" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1611 ;"DefaultFixed" = "-monotype-courier new-*-*-*--*-*-*-*-*-*-koi8-r"
1612 ;"DefaultSerif" = "-monotype-times new roman-*-*-*--*-*-*-*-*-*-koi8-r"
1613 ;"DefaultSansSerif" = "-monotype-arial-*-*-*--*-*-*-*-*-*-koi8-r"
1614 ;; default cyrillic bitmap X fonts
1615 ;"Default" = "-cronyx-helvetica-"
1616 ;"DefaultFixed" = "fixed"
1617 ;"DefaultSerif" = "-cronyx-times-"
1618 ;"DefaultSansSerif" = "-cronyx-helvetica-"
1620 ; the TrueType font dirs you want to make accessible to wine
1622 ;"dir1" = "/usr/X11R6/lib/X11/fonts/TrueType"
1623 ;"dir2" = "/usr/share/fonts/truetype"
1624 ;"dir3" = "/usr/X11R6/lib/X11/fonts/TT"
1625 ;"dir4" = "/usr/share/fonts/TT"
1628 "Com1" = "/dev/ttyS0"
1629 "Com2" = "/dev/ttyS1"
1630 "Com3" = "/dev/ttyS2"
1631 "Com4" = "/dev/modem"
1637 ;; key: io-base of the emulated port
1638 ;; value : parport-device{,timeout}
1639 ;; timeout for auto closing an open device ( not yet implemented)
1640 ;"378" = "/dev/parport0"
1641 ;"278" = "/dev/parport1"
1642 ;"3bc" = "/dev/parport2"
1647 "LPT2:" = "|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -"
1648 "LPT3:" = "/dev/lp3"
1651 ;"read" = "0x779,0x379,0x280-0x2a0"
1652 ;"write" = "0x779,0x379,0x280-0x2a0"
1655 ;"RelayExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1656 ;"RelayInclude" = "user32.CreateWindowA"
1657 ;"SnoopExclude" = "RtlEnterCriticalSection;RtlLeaveCriticalSection"
1658 ;"SpyExclude" = "WM_SIZE;WM_TIMER;"
1661 ;These are all booleans. Y/y/T/t/1 are true, N/n/F/f/0 are false.
1662 ;Defaults are read all, write to Home
1663 ; Where to find the global registries
1664 ;"GlobalRegistryDir" = "/etc";
1665 ; Global registries (stored in /etc)
1666 "LoadGlobalRegistryFiles" = "Y"
1667 ; Home registries (stored in ~user/.wine/)
1668 "LoadHomeRegistryFiles" = "Y"
1669 ; Load Windows registries from the Windows directory
1670 "LoadWindowsRegistryFiles" = "Y"
1671 ; TRY to write all changes to home registries
1672 "WritetoHomeRegistryFiles" = "Y"
1673 ; Registry periodic save timeout in seconds
1674 ; "PeriodicSave" = "600"
1675 ; Save only modified keys
1676 "SaveOnlyUpdatedKeys" = "Y"
1679 ;; supported styles are 'Win31'(default), 'Win95', 'Win98'
1680 ;; this has *nothing* to do with the windows version Wine returns:
1681 ;; set the "Windows" value in the [Version] section if you want that.
1682 "WineLook" = "Win95"
1686 ;"XtermProg" = "nxterm"
1687 ;"InitialRows" = "25"
1688 ;"InitialColumns" = "80"
1689 ;"TerminalType" = "nxterm"
1692 "ClearAllSelections" = "0"
1693 "PersistentSelection" = "1"
1695 ; List of all directories directly contain .AFM files
1697 "1" = "/usr/share/ghostscript/fonts"
1698 "2" = "/usr/share/a2ps/afm"
1699 "3" = "/usr/share/enscript"
1700 "4" = "/usr/X11R6/lib/X11/fonts/Type1"
1703 #"Drivers" = "winearts.drv"
1704 #"Drivers" = "winejack.drv"
1705 "Drivers" = "wineoss.drv"
1706 "WaveMapper" = "msacm.drv"
1707 "MidiMapper" = "midimap.drv"
1710 ;; HEL only: Number of waveOut fragments ahead to mix in new buffers.
1712 ;; HEL only: Number of waveOut fragments ahead to queue to driver.
1714 ;; Max number of fragments to prebuffer
1715 ;"SndQueueMax" = "28"
1716 ;; Min number of fragments to prebuffer
1717 ;"SndQueueMin" = "12"
1720 ;; Use the DNS (Unix) host name always as NetBIOS "ComputerName" (boolean, default "Y").
1721 ;; Set to N if you need a persistent NetBIOS ComputerName that possibly differs
1722 ;; from the Unix host name. You'll need to set ComputerName in
1723 ;; HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\ComputerName\ComputerName, too.
1724 ;"UseDnsComputerName" = "N"
1726 ;; sample AppDefaults entries
1728 ; 3 InstallShield versions who like to put their full screen window in front,
1729 ; without any chance to switch to another X11 application.
1730 ; So just catch them in a desktop window.
1732 [AppDefaults\\_INS5576._MP\\x11drv]
1733 "Desktop" = "640x480"
1735 [AppDefaults\\_INS5176._MP\\x11drv]
1736 "Desktop" = "640x480"
1738 [AppDefaults\\_INS0466._MP\\x11drv]
1739 "Desktop" = "640x480"
1741 ;[AppDefaults\\iexplore.exe\\DllOverrides]
1742 ;"shlwapi" = "native"
1743 ;"rpcrt4" = "native"
1745 ;"shdocvw" = "native"
1746 ;"wininet" = "native"
1747 ;"shfolder" = "native"
1748 ;"shell32" = "native"
1750 ;"comctl32" = "native"
1752 ;[AppDefaults\\setup.exe\\x11drv]
1753 ;"Desktop" = "800x600"
1755 ;[AppDefaults\\sol.exe\\Version]
1758 ;; Some games (Quake 2, UT) refuse to accept emulated dsound devices.
1759 ;; You can add an AppDefault entry like this for such cases.
1760 ;[AppDefaults\\pickygame.exe\\dsound]
1773 <chapter id="pkg-implementation"> <title>Implementation</title>
1775 <sect1 id="pkg-openlinux"><title>RedHat 8.0 Sample</title>
1777 <orderedlist inheritnum="inherit">
1779 <para>Building the package</para>
1781 Wine is configured the usual way (depending on your
1782 build environment). The "prefix" is chosen using your
1783 application placement policy
1784 (<filename>/usr/</filename>,
1785 <filename>/usr/X11R6/</filename>,
1786 <filename>/opt/wine/</filename> or similar). The
1787 configuration files (<filename>wine.conf</filename>,
1788 <filename>wine.userreg</filename>,
1789 <filename>wine.systemreg</filename>) are targeted for
1790 <filename>/etc/wine/</filename> (rationale: FHS 2.2,
1791 multiple readonly configuration files of a package).
1794 Example (split this into <literal>%build</literal> and
1795 <literal>%install</literal> section for
1796 <command>rpm</command>):
1799 CFLAGS=$RPM_OPT_FLAGS \
1800 ./configure --prefix=/usr/X11R6 --sysconfdir=/etc/wine/ --enable-dll
1803 make install prefix=$BR/usr/X11R6/ sysconfdir=$BR/etc/wine/
1804 install -d $BR/etc/wine/
1805 install -m 644 wine.ini $BR/etc/wine/wine.conf
1807 # Put all our dlls in a seperate directory. (this works only if
1808 # you have a buildroot)
1809 install -d $BR/usr/X11R6/lib/wine
1810 mv $BR/usr/X11R6/lib/lib* $BR/usr/X11R6/lib/wine/
1812 # the clipboard server is started on demand.
1813 install -m 755 dlls/x11drv/wineclipsrv $BR/usr/X11R6/bin/
1815 # The Wine server is needed.
1816 install -m 755 server/wineserver $BR/usr/X11R6/bin/
1819 Here we unfortunately do need to create
1820 <filename>wineuser.reg</filename> and
1821 <filename>winesystem.reg</filename> from the Wine
1822 distributed <filename>winedefault.reg</filename>. This
1823 can be done using <command>./regedit</command> once for
1824 one example user and then reusing his
1825 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/user.reg</filename> and
1826 <filename><link linkend=WINECONFDIR endterm=wineconfdir.id></link>/system.reg</filename> files.
1828 <title>FIXME</title>
1829 <para>this needs to be done better</para>
1833 install -m 644 wine.sytemreg $BR/etc/wine/
1834 install -m 644 wine.userreg $BR/etc/wine/
1837 There are now a lot of libraries generated by the
1838 build process, so a seperate library directory should
1842 install -d 755 $BR/usr/X11R6/lib/
1846 You will need to package the files:
1849 $prefix/bin/wine, $prefix/bin/dosmod, $prefix/lib/wine/*
1850 $prefix/man/man1/wine.1, $prefix/include/wine/*,
1851 $prefix/bin/wineserver, $prefix/bin/wineclipsrv
1854 %doc ... choose from the toplevel directory and documentation/
1857 The post-install script:
1860 if ! grep -q /usr/X11R6/lib/wine /etc/ld.so.conf; then
1861 echo "/usr/X11R6/lib/wine" >> /etc/ld.so.conf
1866 The post-uninstall script:
1869 if [ "$1" = 0 ]; then
1870 perl -ni -e 'print unless m:/usr/X11R6/lib/wine:;' /etc/ld.so.conf
1876 <para>Creating a good default configuration file</para>
1878 For the rationales of needing as less input from the
1879 user as possible arises the need for a very good
1880 configuration file. The one supplied with Wine is
1881 currently lacking. We need:
1891 A for the floppy. Specify your distribution's
1892 default floppy mountpoint here.
1900 C for the <filename>C:\</filename> directory.
1901 Here we use the user's home directory, for most
1902 applications do see <filename>C:\</filename>
1903 as root-writeable directory of every windows
1904 installation and this basically is it in the
1913 R for the CD-Rom drive. Specify your
1914 distribution's default CD-ROM drives mountpoint
1923 T for temporary storage. We do use
1924 <filename>/tmp/</filename> (rationale: between
1925 process temporary data belongs to
1926 <filename>/tmp/</filename>, FHS 2.0)
1931 W for the original Windows installation. This
1933 <filename>windows\</filename> subdirectory of
1934 the original windows installation. This avoids
1935 problems with renamed
1936 <filename>windows</filename> directories (as
1937 for instance <filename>lose95</filename>,
1938 <filename>win</filename> or
1939 <filename>sys\win95</filename>). During
1940 compile/package/install we leave this to be
1941 <filename>/</filename>, it has to be
1942 configured after the package install.
1947 Z for the UNIX Root directory. This avoids any
1948 problems with "could not find drive for
1949 current directory" users occasionally complain
1950 about in the newsgroup and the irc channel. It
1951 also makes the whole directory structure
1952 browseable. The type of Z should be network,
1953 so applications expect it to be readonly.
1966 Windows=c:\windows\ (the windows/ subdirectory in the user's
1968 System=c:\windows\system\ (the windows/system subdirectory in the user's
1970 Path=c:\windows;c:\windows\system;c:\windows\system32;w:\;w:\system;w:\system32;
1971 ; Using this trick we have in fact two windows installations in one, we
1972 ; get the stuff from the readonly installation and can write to our own.
1973 Temp=t:\ (the TEMP directory)
1977 <para>[Tweak.Layout]</para>
1979 WineLook=win95 (just the coolest look ;)
1984 Possibly modify the [spooler], [serialports] and
1985 [parallelports] sections.
1988 <title>FIXME</title>
1989 <para>possibly more, including printer stuff.</para>
1994 <para>Add this prepared configuration file to the package.</para>
1997 <para>Installing Wine for the system administrator</para>
1999 Install the package using the usual packager
2000 <command>rpm -i wine.rpm</command>. You may edit
2001 <filename>/etc/wine/wine.conf</filename>, [Drive W],
2002 to point to a possible windows installation right
2003 after the install. That's it.
2006 Note that on Linux you should somehow try to add the
2007 <option>unhide</option> mount option (see <command>man
2008 mount</command>) to the CD-ROM entry in
2009 <filename>/etc/fstab</filename> during package
2010 install, as several stupid Windows programs mark some
2011 setup (!) files as hidden (ISO9660) on CD-ROMs, which
2012 will greatly confuse users as they won't find their
2013 setup files on the CD-ROMs as they were used on
2014 Windows systems when <option>unhide</option> is not
2015 set ;-\ And of course the setup program will complain
2016 that <filename>setup.ins</filename> or some other mess
2017 is missing... If you choose to do so, then please make
2018 this change verbose to the admin.
2019 Also make sure that the kernel you use includes the Joliet
2020 CD-ROM support, for the very same reasons as given above
2021 (no long filenames due to missing Joliet, files not found).
2025 <para>Installing Wine for the user</para>
2027 The user will need to run a setup script before the
2028 first invocation of Wine. This script should:
2035 Copy <filename>/etc/wine/wine.conf</filename> for
2041 Allow specification of the original windows
2042 installation to use (which modifies the copied
2043 <filename>wine.conf</filename> file).
2048 Create the windows directory structure
2049 (<filename>c:\windows</filename>,
2050 <filename>c:\windows\system</filename>,
2051 <filename>c:\windows\Start Menu\Programs</filename>,
2052 <filename>c:\Program Files</filename>,
2053 <filename>c:\Desktop</filename>, etc.)
2058 Symlink all <filename>.dll</filename> and
2059 <filename>.exe</filename> files from the original
2060 windows installation to the
2061 <filename>windows</filename> directory. Why? Some
2062 programs reference "%windowsdir%/file.dll" or
2063 "%systemdir%/file.dll" directly and fail if they
2067 This will give a huge number of symlinks, yes.
2068 However, if an installer later overwrites one of
2069 those files, it will overwrite the symlink (so
2070 that the file now lies in the
2071 <filename>windows/</filename> subdirectory).
2074 <title>FIXME</title>
2075 <para>Not sure this is needed for all files.</para>
2080 On later invocation the script might want to
2081 compare regular files in the user's windows
2082 directories and in the global windows directories
2083 and replace same files by symlinks (to avoid
2084 diskspace problems).
2094 <sect2 id=sample><title>Sample RedHat 8.0 .spec file for review purposes</title>
2099 %define DATE 20030115
2100 Summary: A Windows 16/32 bit emulator.
2104 Group: Applications/Emulators
2106 URL: http://www.winehq.com/
2107 Source: ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-%{version}.tar.bz2
2109 Patch: wine-%{version}-initial.patch
2110 Patch1: wine-%{version}-kde2.patch
2111 Patch2: wine-%{version}-winelauncher.patch
2112 Patch3: wine-%{version}-defaultcfg.patch
2113 Patch4: wine-%{version}-stabs+.patch
2114 Buildroot: %{_tmppath}/%{name}-root
2115 ExclusiveArch: %{ix86}
2116 Prereq: shadow-utils
2117 Conflicts: kdebase < 2.0
2118 Requires: cups-libs >= 1.1.12
2119 BuildRequires: docbook-utils, cups-devel >= 1.1.12, autoconf253, perl
2122 While Wine is usually thought of as a Windows(TM) emulator, the Wine
2123 developers would prefer that users thought of Wine as a Windows
2124 compatibility layer for UNIX. This package includes a program loader,
2125 which allows unmodified Windows 3.1/95/NT binaries to run under Intel
2126 Unixes. Wine does not require MS Windows, but it can use native system
2127 .dll files if they are available.
2130 Summary: Wine development environment.
2131 Group: System Environment/Libraries
2132 Requires: wine = %{version}
2135 Header and include files for developing applications with the Wine
2136 Windows(TM) emulation libraries.
2139 %setup -q -n wine-%{version}
2140 find . -type d -name CVS |xargs rm -rf
2141 %patch -p1 -b .initial
2142 %patch1 -p1 -b .kde2
2144 %patch3 -p1 -b .defcfg
2145 %patch4 -p1 -b .stabs+
2148 export CFLAGS="$RPM_OPT_FLAGS"
2149 autoconf || autoconf-2.53
2152 --libdir=%{_libdir}/wine \
2153 --includedir=%{_includedir}/wine \
2154 --sysconfdir=%{_sysconfdir}/wine
2158 make -C documentation doc
2161 rm -rf $RPM_BUILD_ROOT
2164 includedir=%{?buildroot:%{buildroot}}%{_includedir}/wine \
2165 libdir=%{?buildroot:%{buildroot}}%{_libdir}/wine \
2166 sysconfdir=%{?buildroot:%{buildroot}}%{_sysconfdir}/wine \
2167 dlldir=%{?buildroot:%{buildroot}}%{_libdir}/wine/wine \
2170 for i in system "Start Menu/Programs/Startup" Profiles/Administrator Fonts \
2171 Desktop Favorites NetHood Recent SendTo ShellNew; do
2172 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/windows/$i"
2174 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/My Documents"
2175 mkdir -p "$RPM_BUILD_ROOT%{_datadir}/wine-c/Program Files/Common Files"
2177 # Take care of wine and windows configuration files...
2178 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/wine
2179 mv documentation/samples/config documentation/samples/config.orig
2180 sed "s/\"GraphicsDriver\" = .*/\"GraphicsDriver\" = \"ttydrv\"/" documentation/samples/config.orig |\
2181 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"$RPM_BUILD_ROOT%{_datadir}/wine-c\"|" |\
2182 sed "s|\"Path\" = \"\${HOME}\"$|\"Path\" = \"%{_builddir}/%{buildsubdir}\"|" -> documentation/samples/config
2183 WINEPREFIX=%{_builddir}/%{buildsubdir}/documentation/samples programs/regedit/regedit winedefault.reg > /dev/null
2184 # Wait until wineserver finishes and closes those files
2186 install -c -m 0644 documentation/samples/system.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/system.reg
2187 install -c -m 0644 documentation/samples/user.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/user.reg
2188 install -c -m 0644 documentation/samples/userdef.reg $RPM_BUILD_ROOT%{_sysconfdir}/wine/userdef.reg
2189 rm -f documentation/samples/system.reg
2190 rm -f documentation/samples/user.reg
2191 rm -f documentation/samples/userdef.reg
2193 sed "s|\"Path\" = \"/c\"\$|\"Path\" = \"%{_datadir}/wine-c\"|" documentation/samples/config.orig > documentation/samples/config.rh
2194 install -c -m 0644 documentation/samples/config.rh $RPM_BUILD_ROOT%{_sysconfdir}/wine/wine.conf
2195 rm -f documentation/samples/config
2196 rm -f documentation/samples/config.rh
2197 mv documentation/samples/config.orig documentation/samples/config
2199 # Install link to windows applications replacements
2200 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/notepad.exe
2201 ln -sf %{_libdir}/wine/regedit.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/regedit.exe
2202 ln -sf %{_libdir}/wine/rundll32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/rundll32.exe
2203 ln -sf %{_libdir}/wine/wcmd.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/cmd.exe
2204 ln -sf %{_libdir}/wine/control.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/control.exe
2205 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/help.exe
2206 ln -sf %{_libdir}/wine/notepad.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/notepad.exe
2207 ln -sf %{_libdir}/wine/progman.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/progman.exe
2208 ln -sf %{_libdir}/wine/regsvr32.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/regsvr32.exe
2209 ln -sf %{_libdir}/wine/winemine.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winmine.exe
2210 ln -sf %{_libdir}/wine/winver.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/winver.exe
2211 ln -sf %{_libdir}/wine/uninstaller.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/uninstaller.exe
2212 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhelp.exe
2213 ln -sf %{_libdir}/wine/winhelp.exe.so $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/winhlp32.exe
2215 for i in shell.dll shell32.dll winsock.dll wnsock32.dll; do
2216 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system/$i
2218 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/autoexec.bat
2219 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/config.sys
2220 touch $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/win.ini
2221 install -c -m 0644 documentation/samples/system.ini $RPM_BUILD_ROOT%{_datadir}/wine-c/windows/system.ini
2223 cat >RedHat <<EOF
2224 Wine directory structure used in Red Hat Linux:
2225 ===============================================
2227 %{_datadir}/wine-c is the root directory (aka C: drive) wine looks for
2228 by default. It contains (empty) C:\windows and C:\windows\system
2229 directories, needed to operate Wine without an existing Windows installation.
2231 If you want to use Wine with an existing Windows installation that is mounted,
2232 for example, in /mnt/windows-c, edit /etc/wine.conf to say
2240 instead of the defaults set by installation.
2242 If you do this, you can safely remove %{_datadir}/wine-c.
2243 (Alternatively, just mount your Windows partition to %{_datadir}/wine-c.)
2246 # Allow users to launch Windows programs by just clicking on the .exe file...
2247 mkdir -p $RPM_BUILD_ROOT%{_initrddir}
2248 install -c -m 755 %SOURCE1 $RPM_BUILD_ROOT%{_initrddir}/wine
2251 rm -rf $RPM_BUILD_ROOT
2254 /usr/sbin/groupadd -g 66 -r wine &>/dev/null || :
2257 if ! grep -q "^/usr/lib/wine$" /etc/ld.so.conf; then
2258 echo "/usr/lib/wine" >>/etc/ld.so.conf
2261 /sbin/chkconfig --add wine
2262 /sbin/chkconfig --level 2345 wine on
2263 /sbin/service wine start &>/dev/null || :
2266 if test "$1" = "0"; then
2267 /sbin/chkconfig --del wine
2271 if test "$1" = "0"; then
2272 perl -pi -e "s,^/usr/lib/wine$,,g" /etc/ld.so.conf
2273 /usr/sbin/groupdel wine &>/dev/null || :
2278 %defattr(-,root,root)
2279 %attr(0775, root, wine) %dir %{_datadir}/wine-c
2280 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows
2281 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/system
2282 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu"
2283 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs"
2284 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/windows/Start Menu/Programs/Startup"
2285 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles
2286 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Profiles/Administrator
2287 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Fonts
2288 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Desktop
2289 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Favorites
2290 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/NetHood
2291 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/Recent
2292 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/SendTo
2293 %attr(0775, root, wine) %dir %{_datadir}/wine-c/windows/ShellNew
2294 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/My Documents"
2295 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files"
2296 %attr(0775, root, wine) %dir "%{_datadir}/wine-c/Program Files/Common Files"
2300 %{_datadir}/wine-c/windows/system/*.dll
2301 %{_datadir}/wine-c/windows/*.exe
2302 %config %{_datadir}/wine-c/autoexec.bat
2303 %config %{_datadir}/wine-c/config.sys
2304 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/win.ini
2305 %attr(0664, root, wine) %config %{_datadir}/wine-c/windows/system.ini
2306 %config %{_sysconfdir}/wine/*
2307 %config %{_initrddir}/*
2308 %doc ANNOUNCE BUGS COPYING.LIB ChangeLog DEVELOPERS-HINTS LICENSE LICENSE.OLD README VERSION
2310 %doc documentation/ChangeLog.OLD documentation/HOWTO-winelib documentation/README.fr
2311 %doc documentation/wine-devel documentation/wine-user documentation/winelib-user documentation/samples
2314 %defattr(-,root,root)
2325 <chapter id="pkg-todo"><Title>Work to be done</title>
2328 In preparing this document, it became clear that there were
2329 still a range of action items to be done in Wine
2330 that would improve this packaging process.
2331 For lack of a better place, I record them here.
2332 <emphasis>This list is almost certain to be obsolete;
2333 check bugzilla for a better list.</emphasis>
2339 Remove duplication of code between winesetup and
2340 wineconf/wineinstall.
2343 Currently, winesetup duplicates all of the code contained
2347 Instead, wineconf should be improved to generate
2348 the new style config file, and then winesetup should
2349 rely on wineconf to generate the default
2353 Similarly, there is functionality such as creating
2354 the default registry files that is now done by
2355 both winesetup and wineinstall.
2358 At this time, it seems like the right thing to do
2359 is to break up or parameterize wineinstall, so that
2360 it can be used for single function actions,
2361 and then have winesetup call those functions.
2367 Enhance winesetup to support W: drive generation.
2370 The best practices convention now seems to be
2371 to generate a set of drives from M: through W:.
2372 At this point, winesetup does not generate
2373 a default wine config file that follows
2374 these conventions. It should.
2380 Enhance Wine to allow more dynamic switching
2381 between the use of a real Windows partition
2388 Write a winelauncher utility application.
2391 Currently, Wine really requires a user to launch it
2392 from a command line, so that the user can look for
2393 error messages and warnings. However, eventually, we will
2394 want users to be able to launch Wine from a more
2395 friendly GUI launcher. The launcher should have the
2396 ability to allow the end user to turn on debugging
2397 messages and capture those traces for bug reporting
2398 purposes. Also, if we make it possible to
2399 switch between use of a Windows partition or not
2400 automatically, that option should be controlled here.
2406 Get Marcus's winesetup facilities into CVS
2409 Along the lines of the changes to winesetup,
2410 and the consolidation of wineconf and wineinstall,
2411 we should extract the good stuff from Marcus's
2412 winesetup script, and get it into CVS.
2413 Again, perhaps we should have a set of scripts
2414 that perform discrete functions, or maybe
2415 one script with parameters.
2421 Finish this document
2424 This document is pretty rough itself. Many hard
2425 things aren't addressed, and lots of stuff was missed.
2432 <!-- Keep this comment at the end of the file
2435 sgml-parent-document:("wine-doc.sgml" "book" "part" "chapter" "")