API file update.
[wine/multimedia.git] / documentation / getting.sgml
blob4c4f93d1569901bff09282905ff44484dfe6adf9
1 <chapter id="getting-wine">
2 <title>Getting Wine</title>
4 <sect1>
5 <title>The Many Forms of Wine</title>
6 <para>
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.
12 </para>
13 <para>
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.
26 </para>
27 <para>
28 If you're not lucky enough to have a package available 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 skills. 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.
44 </para>
45 <para>
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.
54 </para>
55 </sect1>
57 <sect1 id="getting-dist-debian">
58 <title>Getting Wine for a Debian System</title>
60 <para>
61 In most cases on a Debian system, you can install Wine with a
62 single command, as root:
63 </para>
64 <screen>
65 # apt-get install wine
66 </screen>
67 <para>
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.
71 </para>
73 <para>
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
81 using the package search engine at <ulink url="http://www.debian.org">
82 www.debian.org</ulink>.
83 </para>
85 <para>
86 To install a package that's not part of your distribution, you
87 must use <command>dpkg</command> instead of
88 <command>apt-get</command>. Since <command>dpkg</command>
89 doesn't download the file for you, you must do it yourself.
90 Follow the link on the package search engine to the desired
91 package, then click on the <guibutton>Go To Download
92 Page</guibutton> button and follow the instructions. Save the
93 file to your hard drive, then run <command>dpkg</command> on it.
94 For example, if you saved the file to your home directory, you
95 might perform the following actions to install it:
96 </para>
97 <screen>
98 $ su -
99 <emphasis>&lt;Type in root password></emphasis>
100 # cd /home/user
101 # dpkg -i wine_0.0.20000109-3.deb
102 </screen>
103 <para>
104 You may also want to install the
105 <systemitem>wine-doc</systemitem> package, and if you are
106 using Wine from the 2.3 distribution (Woody), the
107 <systemitem>wine-utils</systemitem> package as well.
108 </para>
109 </sect1>
111 <sect1 id="getting-dist-redhat">
112 <title>Getting Wine for a Redhat System</title>
114 <para>
115 Redhat/RPM users can use <ulink url="http://rpmfind.net/linux/RPM/">
116 rpmfind.net</ulink> to track down available Wine RPM binaries.
117 <ulink url="http://rpmfind.net/linux/RPM/WByName.html"> This
118 page</ulink> contains a list of all rpmfind packages that start with
119 the letter "W", including a few Wine packages
120 </para>
122 <!-- *** Should really flesh this out more! Any Redhat-running
123 *** volunteers?
126 </sect1>
128 <sect1 id="getting-dist-other">
129 <title>Getting Wine for Other Distributions</title>
131 <para>
132 The first place you should look if your system isn't Debian or
133 Redhat is the <ulink
134 url="http://www.winehq.com/download/">WineHQ Download
135 Page</ulink>. This page lists many assorted archives of
136 binary (precompiled) Wine files.
137 </para>
139 <para>
140 <ulink url="http://ftpsearch.lycos.com/?form=medium">
141 Lycos FTPSearch</ulink> is another useful resource for
142 tracking down miscellaneous distribution packages.
143 </para>
145 <!-- *** Add other distributions, e.g., Mandrake, SUSE, Slackware *** -->
147 </sect1>
149 <sect1 id="getting-source-ftp">
150 <title>Getting Wine Source Code from the FTP Archive</title>
152 <para>
153 If the version of Wine you want does not exist in package form,
154 you can download the source code yourself and compile it on your
155 machine. Although this might seem a little intimidating at
156 first if you've never done it, you'll find that it'll often go
157 quite smoothly, especially on the newer Linux distributions.
158 </para>
160 <para>
161 The safest way to grab the source is from one of the official
162 FTP archives. An up to date listing is in the <ulink
163 url="http://www.winehq.com/source/ANNOUNCE">ANNOUNCE</ulink>
164 file in the Wine distribution (which you would have if you
165 already downloaded it). Here is a (possibly out of date) list
166 of FTP servers carrying Wine:
167 </para>
168 <itemizedlist>
169 <listitem>
170 <para>
171 <ulink url="ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/">
172 ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/
173 </ulink>
174 </para>
175 </listitem>
176 <listitem>
177 <para>
178 <ulink url="ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/">
179 ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/
180 </ulink>
181 </para>
182 </listitem>
183 <listitem>
184 <para>
185 <ulink url="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/sunsite.unc.edu/ALPHA/wine/development/">
186 ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/sunsite.unc.edu/ALPHA/wine/development/
187 </ulink>
188 </para>
189 </listitem>
190 <listitem>
191 <para>
192 <ulink url="ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/">
193 ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/
194 </ulink>
195 </para>
196 </listitem>
197 </itemizedlist>
198 <para>
199 The official releases are tagged by date with the format
200 "Wine-YYYYMMDD.tar.gz". Your best bet is to grab the latest
201 one.
202 </para>
203 <para>
204 FIXME: Explain how to un-tar, compile, and install Wine from a tarball.
205 </para>
207 <para></para>
208 </sect1>
210 <sect1 id="getting-source-cvs">
211 <title>Getting Wine Source Code from CVS</title>
213 <para>
214 The official web page for Wine CVS is
215 <ulink url="http://www.winehq.com/development/">
216 http://www.winehq.com/development/</ulink>.
217 </para>
218 <para>
219 First, you need to get a copy of the latest Wine sources
220 using CVS. You can tell it where to find the source tree by
221 setting the <envar>CVSROOT</envar> environment variable. You
222 also have to log in anonymously to the wine CVS server. In
223 <command>bash</command>, it might look something like this:
224 </para>
225 <screen>
226 $ export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine
227 $ cvs login
228 Password: cvs
229 $ cvs checkout wine
230 </screen>
231 <para>
232 That'll pull down the entire Wine source tree from
233 winehq.com and place it in the current directory (actually
234 in the 'wine' subdirectory). CVS has a million command line
235 parameters, so there are many ways to pull down files, from
236 anywhere in the revision history. Later, you can grab just
237 the updates:
238 </para>
239 <screen>
240 $ cvs -PAd update
241 </screen>
242 <para>
243 <command>cvs update</command> works from inside the source tree.
244 You don't need the <envar>CVSROOT</envar> environment variable
245 to run it either. You just have to be inside the source tree.
246 The <parameter>-P</parameter>, <parameter>-A</parameter> and <parameter>-d</parameter>
247 options make sure your local Wine tree directory structure stays
248 in sync with the remote repository.
249 </para>
250 <para>
251 After you've made changes, you can create a patch with
252 <command>cvs diff -u</command>, which sends output to stdout
253 (the <parameter>-u</parameter> controls the format of the
254 patch). So, to create an <filename>my_patch.diff</filename>
255 file, you would do this:
256 </para>
257 <screen>
258 $ cvs diff -u > my_patch.diff
259 </screen>
260 <para>
261 You can call <command>cvs diff</command> from anywhere in the
262 tree (just like <command>cvs update</command>), and it will
263 always grab recursively from that point. You can also specify
264 single files or subdirectories:
265 </para>
266 <screen>
267 $ cvs diff -u dlls/winaspi > my_aspi_patch.diff
268 </screen>
269 <para>
270 Experiment around a little. It's fairly intuitive.
271 </para>
272 </sect1>
274 <sect1 id="getting-upgrading">
275 <title>Upgrading Wine with a Patch</title>
276 <para>
277 If you have the Wine source code, as opposed to a binary
278 distribution, you have the option of applying patches to the
279 source tree to fix bugs and add experimental features.
280 Perhaps you've found a bug, reported it to the <ulink
281 url="mailto:wine-devel@winehq.com">Wine mailing list</ulink>,
282 and received a patch file to fix the bug. You can apply the
283 patch with the <command>patch</command> command, which takes a
284 streamed patch from <filename>stdin</filename>:
285 </para>
286 <screen>
287 $ cd wine
288 $ patch -p0 < ../patch_to_apply.diff
289 </screen>
290 <para>
291 To remove the patch, use the <parameter>-R</parameter> option:
292 </para>
293 <screen>
294 $ patch -p0 -R < ../patch_to_apply.diff
295 </screen>
296 <para>
297 If you want to do a test run to see if the patch will apply
298 successfully (e.g., if the patch was created from an older or
299 newer version of the tree), you can use the
300 <parameter>--dry-run</parameter> parameter to run the patch
301 without writing to any files:
302 </para>
303 <screen>
304 $ patch -p0 --dry-run < ../patch_to_apply.diff
305 </screen>
306 <para>
307 <command>patch</command> is pretty smart about extracting
308 patches from the middle of a file, so if you save an email with
309 an inlined patch to a file on your hard drive, you can invoke
310 patch on it without stripping out the email headers and other
311 text. <command>patch</command> ignores everything that doesn't
312 look like a patch.
313 </para>
314 <para>
315 The <parameter>-p0</parameter> option to <command>patch</command>
316 tells it to keep the full file name from the patch file. For example,
317 if the file name in the patch file was
318 <filename>wine/programs/clock/main.c</filename>.
319 Setting the <parameter>-p0</parameter> option would apply the patch
320 to the file of the same name i.e.
321 <filename>wine/programs/clock/main.c </filename>.
322 Setting the <parameter>-p1</parameter> option would strip off the
323 first part of the file name and apply
324 the patch instead to <filename>programs/clock/main.c </filename>.
325 The <parameter>-p1</parameter> option would be useful if you named
326 your top level wine directory differently to the person who sent you
327 the patch. For the <parameter>-p1</parameter> option
328 <command>patch</command> should be run from the top level wine directory.
330 </para>
331 </sect1>
333 </chapter>
335 <!-- Keep this comment at the end of the file
336 Local variables:
337 mode: sgml
338 sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
339 End: