BuildingWineFromSource

Differences between revisions 2 and 12 (spanning 10 versions)
Revision 2 as of 2006-04-25 09:55:20
Size: 1571
Editor: 202-155-165-25
Comment: First draft
Revision 12 as of 2006-04-25 10:46:54
Size: 2526
Editor: 202-155-165-25
Comment: First draft complete
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
Line 12: Line 13:
If not already done, enable the Sourceforge repo. Using synaptic, add the following custom repo Enable the Sourceforge source repo. Using synaptic, add the following custom repo
Line 14: Line 15:
'''deb http://wine.sourceforge.net/apt source''' {{{
deb http://wine.sourceforge.net/apt source
}}}
Line 22: Line 25:
{{{
Line 23: Line 27:
}}}
Line 26: Line 31:
Create the directory you're going to install Wine into Create the directory you're going to install Wine into (wine-0.9.12), and download the source into it. You'll need at least 1.4Gig of free disk to install and build successfully. Last, cd to the directory containing the source code (wine-0.9.12~winehq1), as that's where we'll be working from.
Line 28: Line 33:
{{{
Line 34: Line 40:
cd wine-0.9.12~winehq1
}}}
Line 36: Line 45:
Sometimes the reason you're building from source is because you need to patch the stock release. Sometimes the reason you're building from source is because you need to patch the stock release. (eg to apply the WoW patch)
Line 38: Line 47:
patch -p0 < wine-patch#1.patch {{{
patch -p1 < wine-patch#1.patch
Line 40: Line 50:
patch -p0 < wine-patch#2.patch patch -p1 < wine-patch#2.patch
Line 43: Line 53:
}}}

eg. Applying the WoW patch

Wine needs to be patched for WoW to work properly. Download 0.9.12 patch from http://appdb.winehq.org/appview.php?versionId=4031 and apply the patch to the Wine code.

{{{
patch -p1 < wow.patch.preloader.and.mmap.0.9.12
}}}
Line 46: Line 65:
apt-get build-package -hfakeroot -cu -b {{{
d
pkg-buildpackage -rfakeroot -uc -b
}}}
Line 56: Line 77:
{{{
Line 61: Line 83:
}}}

== Clean up ==

Once you're satisfied that Wine is working properly, you can now clean up the files used for building Wine, as this frees up quite a bit of disk. Of course, deleting make's working files will mean that if you need to rebuild, make will have to start right from the beginning.

{{{
cd wine-0.9.12/wine-0.9.12~winehq1

make distclean
}}}

Reasons why one needs to build from source rather than relying on repos:

1 - One needs a more up to date version of Wine

2 - One needs to apply a patch to the stock Wine release

This guide was written for Breezy, using Wine 0.9.12.

The process for building Wine from source is as follows:

Enable the Sourceforge source repository

Enable the Sourceforge source repo. Using synaptic, add the following custom repo

deb http://wine.sourceforge.net/apt source

(see: https://wiki.ubuntu.com/AddingRepositoriesHowto for more details)

Install the Wine build dependencies

The purpose of this step is to install any dependencies necessary to the build process.

sudo apt-get build-dep wine

Download the Wine source

Create the directory you're going to install Wine into (wine-0.9.12), and download the source into it. You'll need at least 1.4Gig of free disk to install and build successfully. Last, cd to the directory containing the source code (wine-0.9.12~winehq1), as that's where we'll be working from.

mkdir wine-0.9.12

cd wine-0.9.12

apt-get source wine

cd wine-0.9.12~winehq1 

Apply patches, if necessary

Sometimes the reason you're building from source is because you need to patch the stock release. (eg to apply the WoW patch)

patch -p1 < wine-patch#1.patch

patch -p1 < wine-patch#2.patch

etc.

eg. Applying the WoW patch

Wine needs to be patched for WoW to work properly. Download 0.9.12 patch from http://appdb.winehq.org/appview.php?versionId=4031 and apply the patch to the Wine code.

patch -p1 < wow.patch.preloader.and.mmap.0.9.12

Build Wine

dpkg-buildpackage -rfakeroot -uc -b

The build will take a LONG time, even with a fast machine, around an hour or so on a 2Gig CPU with 1Gig of Ram, so take a break.

Install the new Wine deb

The build process, once it's complete, will create a .deb in the parent directory. This is your new Wine package.

First remove the old Wine package

dpkg --purge wine

cd ..

sudo dpkg -i wine_0.9.12~winehq1-1_i386.deb

Clean up

Once you're satisfied that Wine is working properly, you can now clean up the files used for building Wine, as this frees up quite a bit of disk. Of course, deleting make's working files will mean that if you need to rebuild, make will have to start right from the beginning.

cd wine-0.9.12/wine-0.9.12~winehq1

make distclean

BuildingWineFromSource (last edited 2008-08-06 16:41:12 by localhost)