2000-12-13 22:52:37 +01:00
|
|
|
<chapter id="getting-wine">
|
|
|
|
<title>Getting Wine</title>
|
|
|
|
|
|
|
|
<sect1>
|
|
|
|
<title>The Many Forms of Wine</title>
|
|
|
|
<para>
|
|
|
|
The standard Wine distribution includes quite a few different
|
|
|
|
executables, libraries, and configuration files. All of these
|
|
|
|
must be set up properly for Wine to work well. This chapter
|
|
|
|
will guide you through the necessary steps to get Wine
|
|
|
|
installed on your system.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If you are running a distribution of Linux that uses packages
|
|
|
|
to keep track of installed software, you may be in luck: A
|
|
|
|
prepackaged version of Wine may already exist for your system.
|
|
|
|
The first three sections will tell you how to find the latest
|
|
|
|
Wine packages and get them installed. You should be careful,
|
|
|
|
though, about mixing packages between different distributions,
|
|
|
|
and even from different versions of the same distribution.
|
|
|
|
Often a package will only work on the distribution it's
|
2002-11-12 03:15:45 +01:00
|
|
|
compiled for. We'll cover
|
|
|
|
<link linkend="getting-dist-debian">Debian</link>,
|
|
|
|
<link linkend="getting-dist-redhat">Redhat</link>, and
|
|
|
|
<link linkend="getting-dist-other">other</link> distributions.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
2002-07-24 05:00:02 +02:00
|
|
|
If you're not lucky enough to have a package available for
|
2000-12-13 22:52:37 +01:00
|
|
|
your operating system, or if you'd prefer a newer version of
|
|
|
|
Wine than already exists as a package, you may have to
|
|
|
|
download the Wine source code and compile it yourself on your
|
|
|
|
own machine. Don't worry, it's not too hard to do this,
|
|
|
|
especially with the many helpful tools that come with Wine.
|
|
|
|
You don't need any programming experience to compile and
|
|
|
|
install Wine, although it might be nice to have some minor
|
2002-07-24 05:00:02 +02:00
|
|
|
UNIX administrative skills. We'll cover how to retrieve and
|
2000-12-13 22:52:37 +01:00
|
|
|
compile the official source releases from the <link
|
|
|
|
linkend="getting-source-ftp">FTP archives</link>, and also how
|
|
|
|
to get the cutting edge up-to-the-minute fresh Wine source
|
|
|
|
code from <link linkend="getting-source-cvs">CVS (Concurrent
|
|
|
|
Versions System)</link>. Both processes of source code
|
|
|
|
installation are similar, and once you master one, you should
|
|
|
|
have no trouble dealing with the other one.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Finally, you may someday need to know how to apply a source
|
|
|
|
code patch to your version of Wine. Perhaps you've uncovered
|
|
|
|
a bug in Wine, reported it to the <ulink
|
|
|
|
url="mailto:wine-devel@winehq.com">Wine mailing list</ulink>,
|
|
|
|
and received a patch from a developer to hopefully fix the
|
|
|
|
bug. The last section in this chapter will show you how to
|
|
|
|
<link linkend="getting-upgrading">safely apply the
|
|
|
|
patch</link> and revert it if the patch doesn't work.
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-dist-debian">
|
|
|
|
<title>Getting Wine for a Debian System</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
In most cases on a Debian system, you can install Wine with a
|
|
|
|
single command, as root:
|
|
|
|
</para>
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt># </><userinput>apt-get install wine</>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
<para>
|
|
|
|
<command>apt-get</command> will connect to a Debian archive
|
|
|
|
across the Internet (thus, you must be online), then download
|
|
|
|
the Wine package and install it on your system. End of story.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Of course, Debian's pre-packaged version of Wine may not be the
|
|
|
|
most recent release. If you are running the stable version of
|
|
|
|
Debian, you may be able to get a slightly newer version of Wine
|
|
|
|
by grabbing the package from the unstable distribution, although
|
|
|
|
this may be a little risky, depending on how far the unstable
|
|
|
|
distribution has diverged from the stable one. You can find a
|
|
|
|
list of Wine binary packages for the various Debian releases
|
2001-09-27 01:02:31 +02:00
|
|
|
using the package search engine at <ulink url="http://www.debian.org">
|
2000-12-13 22:52:37 +01:00
|
|
|
www.debian.org</ulink>.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
To install a package that's not part of your distribution, you
|
|
|
|
must use <command>dpkg</command> instead of
|
|
|
|
<command>apt-get</command>. Since <command>dpkg</command>
|
|
|
|
doesn't download the file for you, you must do it yourself.
|
|
|
|
Follow the link on the package search engine to the desired
|
|
|
|
package, then click on the <guibutton>Go To Download
|
|
|
|
Page</guibutton> button and follow the instructions. Save the
|
|
|
|
file to your hard drive, then run <command>dpkg</command> on it.
|
|
|
|
For example, if you saved the file to your home directory, you
|
|
|
|
might perform the following actions to install it:
|
|
|
|
</para>
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>su -</>
|
|
|
|
Password:
|
|
|
|
<prompt># </><userinput>cd /home/user</>
|
|
|
|
<prompt># </><userinput>dpkg -i wine_<replaceable>0.0.20021031-1</>.deb</>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
<para>
|
|
|
|
You may also want to install the
|
|
|
|
<systemitem>wine-doc</systemitem> package, and if you are
|
|
|
|
using Wine from the 2.3 distribution (Woody), the
|
|
|
|
<systemitem>wine-utils</systemitem> package as well.
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-dist-redhat">
|
|
|
|
<title>Getting Wine for a Redhat System</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
Redhat/RPM users can use <ulink url="http://rpmfind.net/linux/RPM/">
|
2002-07-24 05:00:02 +02:00
|
|
|
rpmfind.net</ulink> to track down available Wine RPM binaries.
|
2000-12-13 22:52:37 +01:00
|
|
|
<ulink url="http://rpmfind.net/linux/RPM/WByName.html"> This
|
|
|
|
page</ulink> contains a list of all rpmfind packages that start with
|
2002-11-12 03:15:45 +01:00
|
|
|
the letter "W", including a few Wine packages.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
|
2002-11-12 03:15:45 +01:00
|
|
|
<para>
|
|
|
|
Of course now that you have the RPM package, you may be wondering
|
|
|
|
"What in the world do I do with this thing?".
|
|
|
|
</para>
|
2000-12-13 22:52:37 +01:00
|
|
|
|
2002-11-12 03:15:45 +01:00
|
|
|
<para>
|
|
|
|
The easiest way to install an RPM is to make sure that you have not
|
|
|
|
previously installed wine (perhaps, when you installed linux)
|
|
|
|
and then switch to the directory you downloaded the rpm file to.
|
|
|
|
Once there, type this one command as root:
|
|
|
|
</para>
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt># </><userinput>rpm -ivh wine-<replaceable>20020605-2.i386</>.rpm</>
|
|
|
|
</screen>
|
2002-11-12 03:15:45 +01:00
|
|
|
<para>
|
|
|
|
You may also want to install the
|
|
|
|
<systemitem>wine-devel</systemitem> package.
|
|
|
|
</para>
|
2000-12-13 22:52:37 +01:00
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-dist-other">
|
|
|
|
<title>Getting Wine for Other Distributions</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The first place you should look if your system isn't Debian or
|
|
|
|
Redhat is the <ulink
|
2002-05-09 22:37:26 +02:00
|
|
|
url="http://www.winehq.com/download/">WineHQ Download
|
2000-12-13 22:52:37 +01:00
|
|
|
Page</ulink>. This page lists many assorted archives of
|
|
|
|
binary (precompiled) Wine files.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
<ulink url="http://ftpsearch.lycos.com/?form=medium">
|
|
|
|
Lycos FTPSearch</ulink> is another useful resource for
|
|
|
|
tracking down miscellaneous distribution packages.
|
|
|
|
</para>
|
|
|
|
|
2002-11-12 03:15:45 +01:00
|
|
|
<para>
|
|
|
|
NOTE: If you are running a Mandrake system, please see the page
|
|
|
|
on how to get wine for a
|
|
|
|
<link linkend="getting-dist-redhat">Redhat</link> system,
|
|
|
|
as Mandrake is based on Redhat.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<!-- *** Add other distributions, e.g., SUSE, Slackware *** -->
|
2000-12-13 22:52:37 +01:00
|
|
|
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-source-ftp">
|
|
|
|
<title>Getting Wine Source Code from the FTP Archive</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
If the version of Wine you want does not exist in package form,
|
|
|
|
you can download the source code yourself and compile it on your
|
|
|
|
machine. Although this might seem a little intimidating at
|
|
|
|
first if you've never done it, you'll find that it'll often go
|
|
|
|
quite smoothly, especially on the newer Linux distributions.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The safest way to grab the source is from one of the official
|
|
|
|
FTP archives. An up to date listing is in the <ulink
|
2002-07-24 05:00:02 +02:00
|
|
|
url="http://www.winehq.com/source/ANNOUNCE">ANNOUNCE</ulink>
|
2000-12-13 22:52:37 +01:00
|
|
|
file in the Wine distribution (which you would have if you
|
2002-11-12 03:15:45 +01:00
|
|
|
already downloaded it). Here is a list
|
2000-12-13 22:52:37 +01:00
|
|
|
of FTP servers carrying Wine:
|
|
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2002-07-24 05:00:02 +02:00
|
|
|
<ulink url="ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/">
|
|
|
|
ftp://ftp.ibiblio.org/pub/Linux/ALPHA/wine/development/
|
2000-12-13 22:52:37 +01:00
|
|
|
</ulink>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2002-07-24 05:00:02 +02:00
|
|
|
<ulink url="ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/">
|
|
|
|
ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/
|
2000-12-13 22:52:37 +01:00
|
|
|
</ulink>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2002-11-12 03:15:45 +01:00
|
|
|
<ulink url="ftp://ftp.fu-berlin.de/unix/linux/mirrors/sunsite.unc.edu/ALPHA/wine/development/">
|
|
|
|
ftp://ftp.fu-berlin.de/unix/linux/mirrors/sunsite.unc.edu/ALPHA/wine/development/
|
2000-12-13 22:52:37 +01:00
|
|
|
</ulink>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
|
|
|
<ulink url="ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/">
|
|
|
|
ftp://orcus.progsoc.uts.edu.au/pub/Wine/development/
|
|
|
|
</ulink>
|
|
|
|
</para>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
<para>
|
|
|
|
The official releases are tagged by date with the format
|
2002-12-13 01:33:26 +01:00
|
|
|
"Wine-<replaceable>YYYYMMDD</>.tar.gz". Your best bet is to grab
|
|
|
|
the latest one.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-13 01:33:26 +01:00
|
|
|
Once you have downloaded this, you must first compile wine, and then
|
|
|
|
install it. This is not very hard to do. First switch to the
|
|
|
|
directory containing the file you just downloaded. Then extract the
|
|
|
|
source with (e.g.):
|
|
|
|
<screen>
|
|
|
|
<prompt># </><userinput>tar xzvf wine-<replaceable>20021031</>.tar.gz</>
|
|
|
|
</screen>
|
2002-11-12 03:15:45 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Then, switch to the directory that was created and compile it by typing (e.g.):
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt># </><userinput>./tools/wineinstall</>
|
|
|
|
</screen>
|
2002-11-12 03:15:45 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
NOTE: You must make sure that you are not the superuser (root) when doing this,
|
|
|
|
and that you have write permission to the directory that was created by the tar
|
|
|
|
command as well as all of its subdirectories and files..
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-source-cvs">
|
|
|
|
<title>Getting Wine Source Code from CVS</title>
|
|
|
|
|
|
|
|
<para>
|
|
|
|
The official web page for Wine CVS is
|
2002-05-09 22:37:26 +02:00
|
|
|
<ulink url="http://www.winehq.com/development/">
|
2002-12-13 01:33:26 +01:00
|
|
|
http://www.winehq.com/development/</>.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
First, you need to get a copy of the latest Wine sources
|
|
|
|
using CVS. You can tell it where to find the source tree by
|
|
|
|
setting the <envar>CVSROOT</envar> environment variable. You
|
|
|
|
also have to log in anonymously to the wine CVS server. In
|
2002-12-13 01:33:26 +01:00
|
|
|
<command>bash</>, it might look something like this:
|
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>export CVSROOT=:pserver:cvs@cvs.winehq.com:/home/wine</>
|
|
|
|
<prompt>$ </><userinput>cvs login</>
|
|
|
|
Password:
|
|
|
|
<prompt>$ </><userinput>cvs checkout wine</>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
That'll pull down the entire Wine source tree from
|
|
|
|
winehq.com and place it in the current directory (actually
|
|
|
|
in the 'wine' subdirectory). CVS has a million command line
|
|
|
|
parameters, so there are many ways to pull down files, from
|
|
|
|
anywhere in the revision history. Later, you can grab just
|
|
|
|
the updates:
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>cvs -PAd update</>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-13 01:33:26 +01:00
|
|
|
<command>cvs update</> works from inside the source tree.
|
|
|
|
You don't need the <envar>CVSROOT</> environment variable
|
2000-12-13 22:52:37 +01:00
|
|
|
to run it either. You just have to be inside the source tree.
|
2002-12-13 01:33:26 +01:00
|
|
|
The <parameter>-P</>, <parameter>-A</> and <parameter>-d</>
|
2000-12-13 22:52:37 +01:00
|
|
|
options make sure your local Wine tree directory structure stays
|
|
|
|
in sync with the remote repository.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
After you've made changes, you can create a patch with
|
2002-12-13 01:33:26 +01:00
|
|
|
<command>cvs diff -u</>, which sends output to stdout
|
|
|
|
(the <parameter>-u</> controls the format of the
|
|
|
|
patch). So, to create an <filename>my_patch.diff</>
|
2000-12-13 22:52:37 +01:00
|
|
|
file, you would do this:
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>cvs diff -u ><replaceable>my_patch.diff</></>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
You can call <command>cvs diff</command> from anywhere in the
|
|
|
|
tree (just like <command>cvs update</command>), and it will
|
|
|
|
always grab recursively from that point. You can also specify
|
|
|
|
single files or subdirectories:
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>cvs diff -u dlls/winaspi ><replaceable>my_aspi_patch.diff</></>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Experiment around a little. It's fairly intuitive.
|
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
<sect1 id="getting-upgrading">
|
|
|
|
<title>Upgrading Wine with a Patch</title>
|
|
|
|
<para>
|
|
|
|
If you have the Wine source code, as opposed to a binary
|
|
|
|
distribution, you have the option of applying patches to the
|
|
|
|
source tree to fix bugs and add experimental features.
|
|
|
|
Perhaps you've found a bug, reported it to the <ulink
|
2002-12-13 01:33:26 +01:00
|
|
|
url="mailto:wine-devel@winehq.com">Wine mailing list</>,
|
2000-12-13 22:52:37 +01:00
|
|
|
and received a patch file to fix the bug. You can apply the
|
2002-12-13 01:33:26 +01:00
|
|
|
patch with the <command>patch</> command, which takes a
|
|
|
|
streamed patch from <filename>stdin</>:
|
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>cd wine</>
|
|
|
|
<prompt>$ </><userinput>patch -p0 <<replaceable>../patch_to_apply.diff</></>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-13 01:33:26 +01:00
|
|
|
To remove the patch, use the <parameter>-R</> option:
|
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>patch -p0 -R <<replaceable>../patch_to_apply.diff</></>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
If you want to do a test run to see if the patch will apply
|
|
|
|
successfully (e.g., if the patch was created from an older or
|
|
|
|
newer version of the tree), you can use the
|
2002-12-13 01:33:26 +01:00
|
|
|
<parameter>--dry-run</> parameter to run the patch
|
2000-12-13 22:52:37 +01:00
|
|
|
without writing to any files:
|
2002-12-13 01:33:26 +01:00
|
|
|
<screen>
|
|
|
|
<prompt>$ </><userinput>patch -p0 --dry-run <<replaceable>../patch_to_apply.diff</></>
|
|
|
|
</screen>
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-13 01:33:26 +01:00
|
|
|
<command>patch</> is pretty smart about extracting
|
2000-12-13 22:52:37 +01:00
|
|
|
patches from the middle of a file, so if you save an email with
|
|
|
|
an inlined patch to a file on your hard drive, you can invoke
|
|
|
|
patch on it without stripping out the email headers and other
|
2002-12-13 01:33:26 +01:00
|
|
|
text. <command>patch</> ignores everything that doesn't
|
2000-12-13 22:52:37 +01:00
|
|
|
look like a patch.
|
|
|
|
</para>
|
|
|
|
<para>
|
2002-12-13 01:33:26 +01:00
|
|
|
The <parameter>-p0</> option to <command>patch</>
|
2002-07-24 05:00:02 +02:00
|
|
|
tells it to keep the full file name from the patch file. For example,
|
2002-05-16 20:31:57 +02:00
|
|
|
if the file name in the patch file was
|
2002-12-13 01:33:26 +01:00
|
|
|
<filename>wine/programs/clock/main.c</>.
|
|
|
|
Setting the <parameter>-p0</> option would apply the patch
|
2002-05-16 20:31:57 +02:00
|
|
|
to the file of the same name i.e.
|
2002-12-13 01:33:26 +01:00
|
|
|
<filename>wine/programs/clock/main.c </>.
|
|
|
|
Setting the <parameter>-p1</> option would strip off the
|
2002-07-24 05:00:02 +02:00
|
|
|
first part of the file name and apply
|
2002-12-13 01:33:26 +01:00
|
|
|
the patch instead to <filename>programs/clock/main.c </>.
|
|
|
|
The <parameter>-p1</> option would be useful if you named
|
2002-07-24 05:00:02 +02:00
|
|
|
your top level wine directory differently to the person who sent you
|
2002-12-13 01:33:26 +01:00
|
|
|
the patch. For the <parameter>-p1</> option
|
|
|
|
<command>patch</> should be run from the top level wine directory.
|
2000-12-13 22:52:37 +01:00
|
|
|
</para>
|
|
|
|
</sect1>
|
|
|
|
|
|
|
|
</chapter>
|
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-parent-document:("wine-doc.sgml" "set" "book" "chapter" "")
|
|
|
|
End:
|
|
|
|
-->
|