1 <chapter id=
"getting-wine">
2 <title>Getting Wine
</title>
5 <title>The Many Forms of Wine
</title>
7 The standard Wine distribution includes quite a few different
8 executables, libraries, and configuration files. All of these
9 must be set up properly for Wine to work well. This chapter
10 will guide you through the necessary steps to get Wine
11 installed on your system.
14 If you are running a distribution of Linux that uses packages
15 to keep track of installed software, you may be in luck: A
16 prepackaged version of Wine may already exist for your system.
17 The first three sections will tell you how to find the latest
18 Wine packages and get them installed. You should be careful,
19 though, about mixing packages between different distributions,
20 and even from different versions of the same distribution.
21 Often a package will only work on the distribution it's
22 compiled for. We'll cover
<link
23 linkend=
"getting-dist-debian">Debian
</link>,
<link
24 linkend=
"getting-dist-redhat">Redhat
</link>, and
<link
25 linkend=
"getting-dist-other">other
</link> distributions.
28 If you're not lucky enough to have an available package for
29 your operating system, or if you'd prefer a newer version of
30 Wine than already exists as a package, you may have to
31 download the Wine source code and compile it yourself on your
32 own machine. Don't worry, it's not too hard to do this,
33 especially with the many helpful tools that come with Wine.
34 You don't need any programming experience to compile and
35 install Wine, although it might be nice to have some minor
36 UNIX administrative skill. We'll cover how to retrieve and
37 compile the official source releases from the
<link
38 linkend=
"getting-source-ftp">FTP archives
</link>, and also how
39 to get the cutting edge up-to-the-minute fresh Wine source
40 code from
<link linkend=
"getting-source-cvs">CVS (Concurrent
41 Versions System)
</link>. Both processes of source code
42 installation are similar, and once you master one, you should
43 have no trouble dealing with the other one.
46 Finally, you may someday need to know how to apply a source
47 code patch to your version of Wine. Perhaps you've uncovered
48 a bug in Wine, reported it to the
<ulink
49 url=
"mailto:wine-devel@winehq.com">Wine mailing list
</ulink>,
50 and received a patch from a developer to hopefully fix the
51 bug. The last section in this chapter will show you how to
52 <link linkend=
"getting-upgrading">safely apply the
53 patch
</link> and revert it if the patch doesn't work.
57 <sect1 id=
"getting-dist-debian">
58 <title>Getting Wine for a Debian System
</title>
61 In most cases on a Debian system, you can install Wine with a
62 single command, as root:
65 # apt-get install wine
68 <command>apt-get
</command> will connect to a Debian archive
69 across the Internet (thus, you must be online), then download
70 the Wine package and install it on your system. End of story.
74 Of course, Debian's pre-packaged version of Wine may not be the
75 most recent release. If you are running the stable version of
76 Debian, you may be able to get a slightly newer version of Wine
77 by grabbing the package from the unstable distribution, although
78 this may be a little risky, depending on how far the unstable
79 distribution has diverged from the stable one. You can find a
80 list of Wine binary packages for the various Debian releases
82 <ulink url=
"http://cgi.debian.org/cgi-bin/search_packages.pl?keywords=wine&searchon=names&version=all&release=all">
83 package search engine
</ulink> at
<ulink url=
"http://www.debian.org">
84 www.debian.org
</ulink>.
88 To install a package that's not part of your distribution, you
89 must use
<command>dpkg
</command> instead of
90 <command>apt-get
</command>. Since
<command>dpkg
</command>
91 doesn't download the file for you, you must do it yourself.
92 Follow the link on the package search engine to the desired
93 package, then click on the
<guibutton>Go To Download
94 Page
</guibutton> button and follow the instructions. Save the
95 file to your hard drive, then run
<command>dpkg
</command> on it.
96 For example, if you saved the file to your home directory, you
97 might perform the following actions to install it:
101 <emphasis><Type in root password
></emphasis>
103 # dpkg -i wine_0.0
.20000109-
3.deb
106 You may also want to install the
107 <systemitem>wine-doc
</systemitem> package, and if you are
108 using Wine from the
2.3 distribution (Woody), the
109 <systemitem>wine-utils
</systemitem> package as well.
113 <sect1 id=
"getting-dist-redhat">
114 <title>Getting Wine for a Redhat System
</title>
117 Redhat/RPM users can use
<ulink url=
"http://rpmfind.net/linux/RPM/">
118 rpmfind.net
</ulink> to track down available Wine RPM binaries.
119 <ulink url=
"http://rpmfind.net/linux/RPM/WByName.html"> This
120 page
</ulink> contains a list of all rpmfind packages that start with
121 the letter
"W", including a few Wine packages
124 <!-- *** Should really flesh this out more! Any Redhat-running
130 <sect1 id=
"getting-dist-other">
131 <title>Getting Wine for Other Distributions
</title>
134 The first place you should look if your system isn't Debian or
136 url=
"http://www.winehq.com/download.html">WineHQ Download
137 Page
</ulink>. This page lists many assorted archives of
138 binary (precompiled) Wine files.
142 <ulink url=
"http://ftpsearch.lycos.com/?form=medium">
143 Lycos FTPSearch
</ulink> is another useful resource for
144 tracking down miscellaneous distribution packages.
147 <!-- *** Add other distributions, e.g., Mandrake, SUSE, Slackware *** -->
151 <sect1 id=
"getting-source-ftp">
152 <title>Getting Wine Source Code from the FTP Archive
</title>
155 If the version of Wine you want does not exist in package form,
156 you can download the source code yourself and compile it on your
157 machine. Although this might seem a little intimidating at
158 first if you've never done it, you'll find that it'll often go
159 quite smoothly, especially on the newer Linux distributions.
163 The safest way to grab the source is from one of the official
164 FTP archives. An up to date listing is in the
<ulink
165 url=
"http://www.winehq.com/source/ANNOUNCE">ANNOUNCE
</ulink>
166 file in the Wine distribution (which you would have if you
167 already downloaded it). Here is a (possibly out of date) list
168 of FTP servers carrying Wine:
173 <ulink url=
"ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/">
174 ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/
180 <ulink url=
"ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/">
181 ftp://tsx-
11.mit.edu/pub/linux/ALPHA/Wine/development/
187 <ulink url=
"ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/">
188 ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/
194 <ulink url=
"ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/">
195 ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/
201 The official releases are tagged by date with the format
202 "Wine-YYYYMMDD.tar.gz". Your best bet is to grab the latest
206 FIXME: Explain how to un-tar, compile, and install Wine from a tarball.
212 <sect1 id=
"getting-source-cvs">
213 <title>Getting Wine Source Code from CVS
</title>
216 The official web page for Wine CVS is
217 <ulink url=
"http://www.winehq.com/dev.html">
218 http://www.winehq.com/dev.html
</ulink>.
221 First, you need to get a copy of the latest Wine sources
222 using CVS. You can tell it where to find the source tree by
223 setting the
<envar>CVSROOT
</envar> environment variable. You
224 also have to log in anonymously to the wine CVS server. In
225 <command>bash
</command>, it might look something like this:
228 $ export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine
234 That'll pull down the entire Wine source tree from
235 winehq.com and place it in the current directory (actually
236 in the 'wine' subdirectory). CVS has a million command line
237 parameters, so there are many ways to pull down files, from
238 anywhere in the revision history. Later, you can grab just
245 <command>cvs update
</command> works from inside the source tree.
246 You don't need the
<envar>CVSROOT
</envar> environment variable
247 to run it either. You just have to be inside the source tree.
248 The
<parameter>-d
</parameter> and
<parameter>-P
</parameter>
249 options make sure your local Wine tree directory structure stays
250 in sync with the remote repository.
253 After you've made changes, you can create a patch with
254 <command>cvs diff -u
</command>, which sends output to stdout
255 (the
<parameter>-u
</parameter> controls the format of the
256 patch). So, to create an
<filename>my_patch.diff
</filename>
257 file, you would do this:
260 $ cvs diff -u
> my_patch.diff
263 You can call
<command>cvs diff
</command> from anywhere in the
264 tree (just like
<command>cvs update
</command>), and it will
265 always grab recursively from that point. You can also specify
266 single files or subdirectories:
269 $ cvs diff -u dlls/winaspi
> my_aspi_patch.diff
272 Experiment around a little. It's fairly intuitive.
276 <sect1 id=
"getting-upgrading">
277 <title>Upgrading Wine with a Patch
</title>
279 If you have the Wine source code, as opposed to a binary
280 distribution, you have the option of applying patches to the
281 source tree to fix bugs and add experimental features.
282 Perhaps you've found a bug, reported it to the
<ulink
283 url=
"mailto:wine-devel@winehq.com">Wine mailing list
</ulink>,
284 and received a patch file to fix the bug. You can apply the
285 patch with the
<command>patch
</command> command, which takes a
286 streamed patch from
<filename>stdin
</filename>:
290 $ patch -p0 < ../patch_to_apply.diff
293 To remove the patch, use the
<parameter>-R
</parameter> option:
296 $ patch -p0 -R < ../patch_to_apply.diff
299 If you want to do a test run to see if the patch will apply
300 successfully (e.g., if the patch was created from an older or
301 newer version of the tree), you can use the
302 <parameter>--dry-run
</parameter> parameter to run the patch
303 without writing to any files:
306 $ patch -p0 --dry-run < ../patch_to_apply.diff
309 <command>patch
</command> is pretty smart about extracting
310 patches from the middle of a file, so if you save an email with
311 an inlined patch to a file on your hard drive, you can invoke
312 patch on it without stripping out the email headers and other
313 text.
<command>patch
</command> ignores everything that doesn't
317 FIXME: Go into more depth about the -p0 option...
323 <!-- Keep this comment at the end of the file
326 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")