1 <chapter id=
"getting-wine">
2 <title>Getting Wine
</title>
4 If you decided that you can use and want to use Wine (e.g. after
5 having read the
<link linkend=
"introduction">introductory
6 chapter
</link>), then as a first step you need to find a good
7 compatible Wine version that you like and that works on your
8 system, and after you found one, the next step is to transfer its
9 files to your system somehow.
10 This chapter is here to tell you what you need to take care of
11 in order to successfully accomplish these two steps.
14 <sect1 id=
"getting-download">
15 <title>How to download Wine?
</title>
17 There are three different methods of how the files
18 belonging to Wine may be brought (downloaded) to your system:
22 Getting a single Wine
<glossterm>package
</glossterm> file
23 (specifically adapted to your particular system), which
24 contains various
<glossterm>binary
</glossterm> files of Wine
29 Getting a single compressed archive file (usually .tar.gz), which contains
30 all
<glossterm>source code
</glossterm> files of a standard Wine
36 Downloading from a
<glossterm>CVS
</glossterm> server,
37 which contains the very latest development source code files
44 <sect2 id=
"getting-which-wine">
45 <title>Which Wine form should I pick?
</title>
48 Now that we told you about the different Wine distribution
49 methods available, let's discuss the advantages and
50 disadvantages of the various methods.
54 <title>Wine distribution methods
</title>
56 <term><emphasis>Wine package file
</emphasis></term>
60 Intended user level: Beginner to Advanced
64 Using Wine package files is easy for three
66 They install everything else that's needed for their
67 operation, they usually preconfigure a lot, and you
68 don't need to worry about compiling anything or so.
69 You can get the official wine packages from
70 <ulink url=
"http://sourceforge.net/project/showfiles.php?group_id=6241">
71 the sourceforge.net Wine download page
</ulink>
77 <term><emphasis>Wine source code via archive file
</emphasis></term>
82 Intended user level: Advanced to Expert
86 A Wine source code archive file can be used
87 if you want to compile your own standard Wine release.
88 By using differential patch files to newer Wine versions,
89 you can easily upgrade your outdated Wine directory.
90 However, as you need to manually download patch files
91 and you're only able to download the most current
92 standard Wine release, this is not necessarily the
94 The only advantage a Wine source archive has is that it
95 is a standard Wine release with less development
96 "quirks" than current CVS code. Except for that, CVS
97 source code is much preferred and almost as easy.
102 <term><emphasis>Wine source code via CVS checkout
</emphasis></term>
105 Intended user level: Advanced to Expert/Developer
109 The Wine CVS checkout offers the best way to take
110 part in bleeding edge Wine capabilities and
111 development, since you'll be able to download every
112 single CVS commit even
<emphasis>beyond
</emphasis> the
113 last official Wine release.
114 As upgrading a Wine CVS checkout tree to the latest
115 version is very easy, this is a recommended method
117 Plus, by carefully following the instructions in this
118 Guide, you'll be able to gain the very best Wine
119 environment compatibility.
126 If you are running a distribution of Linux or some other
127 system that uses packages to keep track of installed software,
128 you should be in luck: A prepackaged version of Wine
129 should already exist for your system.
130 The following sections will tell you how to find the latest
131 Wine packages and get them installed. You should be careful,
132 though, about mixing system packages between different distributions,
133 and even from different versions of the same distribution.
134 Often a package will only work on the distribution which it
135 has been compiled for. We'll cover
136 <link linkend=
"getting-dist-debian">Debian Linux
</link>,
137 <link linkend=
"getting-dist-linux">Red Hat, Mandrake, SUSE and Slackware Linux
</link>,
138 <link linkend=
"getting-freebsd">FreeBSD
</link>, and
139 <link linkend=
"getting-other">other
</link> distributions.
142 If you're not lucky enough to have a package available for
143 your operating system, or if you'd prefer a newer version of
144 Wine than already exists as a package, you will need to
145 download the Wine source code and compile it yourself on your
146 own machine. Don't worry, it's not too hard to do this,
147 especially with the many helpful tools that come with Wine.
148 You don't need any programming experience to compile and
149 install Wine, although it might be nice to have some minor
150 UNIX administrative skills. Working from the source is
151 covered in the Wine Developer's Guide.
157 <sect1 id=
"getting-wine-package">
158 <title>Getting a Wine package
</title>
159 <sect2 id=
"getting-dist-debian">
160 <title>Debian Linux
</title>
163 In most cases on a Debian system (or any other distribution that
164 uses packages that use the file name ending .deb, for that
165 matter), you can download and install Wine with a
166 single command, as
<glossterm>root
</glossterm>:
169 <prompt># <
/><userinput>apt-get install wine<
/>
172 <command>apt-get
</command> will connect to a Debian archive
173 across the Internet (thus, you must be online), then download
174 the Wine package and install it on your system. End of story.
175 You might first need to properly update your package setup,
176 though, by using an
<glossterm>editor
</glossterm> as
177 <glossterm>root
</glossterm> to add an entry to
178 <filename>/etc/apt/sources.list
</filename> to point to an active
179 package server and then running
<command>apt-get
183 Once you're done with that step, you may skip the Wine
184 installation chapter, since apt-get has not only downloaded,
185 but also installed the Wine files already.
186 Thus you can now go directly to the
<link
187 linkend=
"config-wine-main">Configuration section
</link>.
191 However, if you don't want to or cannot use the automatic
192 download method for .deb packages that
193 <command>apt-get
</command> provides, then please read on.
196 Of course, Debian's pre-packaged version of Wine may not be
197 the most recent release. If you are running the stable
198 version of Debian, you may be able to get a slightly newer
199 version of Wine by grabbing the package from the so-called
200 "unstable" Debian distribution, although this may be a little
201 risky, depending on how far the unstable distribution has
202 diverged from the stable one. You can find a list of Wine
203 binary packages for the various Debian releases using the
204 package search engine at
<ulink
205 url=
"http://www.debian.org">www.debian.org
</ulink>.
209 If you downloaded a separate .deb package file (e.g. a newer
210 Wine release as stated above) that's not part of your
211 distribution and thus cannot be installed via
212 <command>apt-get
</command>, you must use
<command>dpkg
</command> instead.
213 For instructions on how to do this, please proceed to the
214 <link linkend=
"installing">Installation section
</link>.
218 <sect2 id=
"getting-dist-linux">
219 <title>Linux Red Hat, Mandrake, SUSE, and Slackware
</title>
222 Red Hat, Mandrake, SUSE and Slackware users can download
223 a wine binary from the
224 <ulink url=
"http://sourceforge.net/project/showfiles.php?group_id=6241">
225 sourceforge.net Wine download page
</ulink>
229 <sect2 id=
"getting-freebsd">
230 <title>FreeBSD
</title>
233 In order to use Wine you need to build and install a new kernel
234 with options USER_LDT, SYSVSHM, SYSVSEM, and SYSVMSG.
238 If you want to install Wine using the FreeBSD port system, run
239 in a
<glossterm>terminal
</glossterm>:
242 <prompt>$ <
/><userinput>su -<
/>
243 <prompt># <
/><userinput>cd /usr/ports/emulators/wine/<
/>
244 <prompt># <
/><userinput>make<
/>
245 <prompt># <
/><userinput>make install<
/>
246 <prompt># <
/><userinput>make clean<
/>
249 This process will get wine source from the Internet,
250 then download the Wine package and install it on your system.
254 If you want to install Wine from the FreeBSD CD-ROM, run in a
255 <glossterm>terminal
</glossterm>:
258 <prompt>$ <
/><userinput>su -<
/>
259 <prompt># <
/><userinput>mount /cdrom<
/>
260 <prompt># <
/><userinput>cd /cdrom/packages/All<
/>
261 <prompt># <
/><userinput>pkg_add wine_.X.X.X.tgz<
/>
266 These FreeBSD install instructions completely install the
267 Wine files on your system; you may then proceed to the
<link
268 linkend=
"config-wine-main">Configuration section
</link>.
271 You can also download a FreeBSD package of wine from the
272 <ulink url=
"http://sourceforge.net/project/showfiles.php?group_id=6241">
273 sourceforge.net Wine download page
</ulink>
277 <sect2 id=
"getting-other">
278 <title>Other systems
</title>
281 The first place you should look if your system isn't
282 specifically mentioned above is the
<ulink
283 url=
"http://www.winehq.org/download/">WineHQ Download
284 Page
</ulink>. This page lists many assorted archives of
285 binary (precompiled) Wine files.
289 You could also try to use
290 <ulink url=
"http://www.google.com/search?q=wine+package+download">
291 Google
</ulink> to track down miscellaneous distribution packages.
295 <!-- *** Add other distributions, e.g., Lindows, Lycoris, Xandros *** -->
299 <sect1 id=
"getting-wine-source">
300 <title>Getting Wine source code
</title>
303 If you are going to compile Wine (instead of installing binary
304 Wine files), either to use the most recent code possible or to
305 improve it, then the first thing to do is to obtain a copy of
306 the source code. We'll cover how to retrieve and compile the
307 source releases from the
<link
308 linkend=
"getting-source">official archives
</link>, and also how
309 to get the cutting edge up-to-the-minute fresh Wine source code
310 from
<link linkend=
"getting-source-cvs">CVS (Concurrent Versions
315 Once you have downloaded Wine source code according to the
316 instructions below, there are two ways to proceed: If you want
317 to manually install and configure Wine, then go to the
<link
318 linkend=
"compiling">Compiling
</link> section. If instead you
319 want automatic installation, then go straight to the
<link
320 linkend=
"config-wine-main">Configuration section
</link> to make
321 use of
<command>wineinstall
</command> to automatically install
326 You may also need to know how to apply a source code patch to
327 your version of Wine. Perhaps you've uncovered
328 a bug in Wine, reported it to the
329 <ulink url=
"http://bugs.winehq.org">Wine Bugzilla
</ulink>
331 <ulink url=
"mailto:wine-devel@winehq.org">Wine mailing list
</ulink>,
332 and received a patch from a developer to hopefully fix the
333 bug. We will show you how to
334 <link linkend=
"getting-upgrading-patch">safely apply the
335 patch
</link> and revert it if it doesn't work.
338 <sect2 id=
"getting-source">
339 <title>Getting Wine Source Code from the official archives
</title>
342 The safest way to grab the source is from one of the official
343 archives. An up to date listing is in the
<ulink
344 url=
"http://www.winehq.org/source/ANNOUNCE">ANNOUNCE
</ulink>
345 file in the Wine distribution (which you would have if you
346 already downloaded it). Here is a list
347 of servers carrying Wine:
352 <ulink url=
"ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/">
353 ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/
359 <ulink url=
"http://sourceforge.net/project/showfiles.php?group_id=6241&package_id=77449">
360 sourceforge.net download page
366 The official releases are tagged by date with the format
367 "Wine-<replaceable>YYYYMMDD</>.tar.gz". Your best bet is to grab
371 I'd recommend placing the Wine archive file that you chose
372 into the directory where you intend to extract Wine. In this
373 case, let's just assume that it is your home directory.
376 Once you have downloaded a Wine archive file, we need to
377 extract the archive file. This is not very hard to do. First
378 switch to the directory containing the file you just
379 downloaded. Then extract the source in a
380 <glossterm>terminal
</glossterm> with (e.g.):
382 <prompt>$ <
/><userinput>tar xvzf wine-
<replaceable>20030115<
/>.tar.gz<
/>
386 Just in case you happen to get a Wine archive that uses
387 <filename>.tar.bz2
</filename> extension instead of
388 <filename>.tar.gz
</filename>:
389 Simply use
<command>tar xvjf
</command> in that case instead.
392 Since you now have a fully working Wine source tree by
393 having followed the steps above, you're now well-prepared to
394 go to the Wine installation and configuration steps that follow.
398 <sect2 id=
"getting-source-cvs">
399 <title>Getting Wine Source Code from CVS
</title>
402 This part is intended to be quick and easy, showing the bare minimum
403 of what is needed to download Wine source code via CVS.
404 If you're interested in a very verbose explanation of CVS or
405 advanced CVS topics (configuration settings, CVS mirror servers,
406 other CVS modules on WineHQ, CVSWeb, ...), then please read
407 the full CVS chapter in the Wine Developer's Guide.
411 <title>CVS installation check
</title>
413 First you need to make sure that you have
<command>cvs
</command>
415 To check whether this is the case, please run in a
416 <glossterm>terminal
</glossterm>:
419 <prompt>$ <
/><userinput>cvs<
/>
422 If this was successful, then you should have gotten a nice CVS
423 "Usage" help output. Otherwise (e.g. an error
"cvs: command
424 not found") you still need to install a CVS package for your
425 particular operating system, similar to the instructions given
426 in the chapters for getting and installing a Wine package on
432 <title>Downloading the Wine CVS tree
</title>
435 Once CVS is installed, you can now do a login on our CVS
436 server and checkout (download) the Wine source code.
437 First, let's do the server login, to connect to the US server:
440 <prompt>$ <
/><userinput> export CVSROOT=:pserver:cvs@cvs.winehq.org:/home/wine<
/>
441 <prompt>$ <
/><userinput> cvs login<
/>
444 To connect to the EU server:
447 <prompt>$ <
/><userinput>export CVSROOT=:pserver:cvs@rhlx01.fht-esslingen.de:/home/wine<
/>
448 <prompt>$ <
/><userinput>cvs login<
/>
451 If
<command>cvs
</command> successfully connects to the CVS server,
452 then you will get a
"CVS password:" prompt.
453 Simply enter
"cvs" as the password (the password is
454 <emphasis>case sensitive
</emphasis>: no capital letters!).
458 After login, we are able to download the Wine source code tree.
459 Please make sure that you are in the directory that you want
460 to have the Wine source code in (the Wine source code will
461 use the subdirectory
<filename>wine/
</filename> in this
462 directory, since the subdirectory is named after the CVS module
463 that we want to check out). We assume that your current directory
464 might be your user's home directory.
465 To download the Wine tree into the subdirectory
<filename>wine/
</filename>, run:
468 <prompt>$ <
/><userinput> cvs -z3 checkout wine<
/>
471 Downloading the CVS tree might take a while (some minutes
472 to few hours), depending on your connection speed.
473 Once the download is finished, you should keep a note of
474 which directory the newly downloaded
475 <filename>wine/
</filename> directory is in, by running
476 <command>pwd
</command> (Print Working Directory):
479 <prompt>$ <
/><userinput>pwd<
/>
482 Later, you will be able to change to this directory by
486 <prompt>$ <
/><userinput>cd
<replaceable><some_dir
><
/><
/>
489 where
<some_dir
> is the directory that
490 <command>pwd
</command> gave you.
494 <prompt>$ <
/><userinput>cd wine<
/>
497 you can now change to the directory of the Wine CVS tree
498 you just downloaded. Since you now have a fully working Wine
499 source tree by having followed the steps above, you're now
500 well-prepared to go to the Wine installation and configuration
506 <sect2 id=
"getting-updating-cvs">
507 <title>Updating the Wine CVS tree
</title>
510 After a while, you might want to update your Wine CVS tree to
512 Before updating the Wine tree, it might also be a good idea
513 to run
<command>make uninstall
</command> as root in order to
514 uninstall the installation of the previous Wine version.
517 To proceed with updating Wine, simply
<command>cd
</command>
518 to the Wine CVS tree directory, then run, if you're using the US server:
521 <prompt>$ <
/><userinput>make distclean<
/>
522 <prompt>$ <
/><userinput>cvs update -PAd<
/>
525 The
<command>make distclean
</command> part is optional, but
526 it's a good idea to remove old build and compile configuration
527 files before updating to a newer Wine version. Once the CVS
528 update is finished, you can proceed with installing Wine again
533 <sect2 id=
"getting-upgrading-patch">
534 <title>Updating Wine with a Patch
</title>
536 If you got Wine source code (e.g. via a tar archive file), you
537 have the option of applying patches to the source tree to
538 update to a newer Wine release or to fix bugs and add
539 experimental features. Perhaps you've found a bug, reported
540 it to the
<ulink url=
"mailto:wine-devel@winehq.org">Wine
541 mailing list<
/>, and received a patch file to fix the bug.
542 You can apply the patch with the
<command>patch<
/> command,
543 which takes a streamed patch from
<filename>stdin<
/>:
545 <prompt>$ <
/><userinput>cd wine<
/>
546 <prompt>$ <
/><userinput>patch -p0
<<replaceable>../patch_to_apply.diff<
/><
/>
550 To remove the patch, use the
<parameter>-R<
/> option:
552 <prompt>$ <
/><userinput>patch -p0 -R
<<replaceable>../patch_to_apply.diff<
/><
/>
556 If you want to do a test run to see if the patch will apply
557 successfully (e.g., if the patch was created from an older or
558 newer version of the tree), you can use the
559 <parameter>--dry-run<
/> parameter to run the patch
560 without writing to any files:
562 <prompt>$ <
/><userinput>patch -p0 --dry-run
<<replaceable>../patch_to_apply.diff<
/><
/>
566 <command>patch<
/> is pretty smart about extracting
567 patches from the middle of a file, so if you save an email with
568 an inlined patch to a file on your hard drive, you can invoke
569 patch on it without stripping out the email headers and other
570 text.
<command>patch<
/> ignores everything that doesn't
574 The
<parameter>-p0<
/> option to
<command>patch<
/>
575 tells it to keep the full file name from the patch file. For example,
576 if the file name in the patch file was
577 <filename>wine/programs/clock/main.c<
/>.
578 Setting the
<parameter>-p0<
/> option would apply the patch
579 to the file of the same name i.e.
580 <filename>wine/programs/clock/main.c <
/>.
581 Setting the
<parameter>-p1<
/> option would strip off the
582 first part of the file name and apply
583 the patch to
<filename>programs/clock/main.c<
/>.
584 The
<parameter>-p1<
/> option would be useful if you named your
585 top level wine directory differently than the person who sent
586 you the patch. For the
<parameter>-p1<
/> option
587 <command>patch<
/> should be run from the top level wine
595 <!-- Keep this comment at the end of the file
598 sgml-parent-document:("wine-user.sgml" "set" "book" "chapter" "")