BuildingWineFromSource

Differences between revisions 3 and 37 (spanning 34 versions)
Revision 3 as of 2006-04-25 09:55:54
Size: 1573
Editor: 202-155-165-25
Comment:
Revision 37 as of 2006-06-02 00:29:24
Size: 4452
Editor: cpe-069-134-168-042
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Reasons why one needs to build from source rather than relying on repos: Reasons why one would need to build from source rather than relying on repositories:
Line 3: Line 3:
1 - One needs a more up to date version of Wine 1. One needs a more up to date version of Wine
Line 5: Line 5:
2 - One needs to apply a patch to the stock Wine release 2. One needs to apply a patch to the stock Wine release
Line 7: Line 7:
This guide was written for Breezy, using Wine 0.9.12. This guide works for:

 * Ubuntu 6.06 (Dapper Drake), using Wine 0.9.14

 * Ubuntu 5.10 (Breezy Badger), using Wine 0.9.14


WARNING: The authors of this howto give no guarantees, your mileage may vary.
Line 11: Line 18:
== Enable the Sourceforge source repository == == Enable the relevant source repository ==
Line 13: Line 20:
If not already done, enable the Sourceforge repo. Using synaptic, add the following custom repo Using synaptic, add the following custom repository.
Line 15: Line 22:
'''deb http://wine.sourceforge.net/apt source''' '''Dapper:'''
{{{
deb-src http://wine.budgetdedicated.com/apt dapper main
}}}
Line 17: Line 27:
(see: https://wiki.ubuntu.com/AddingRepositoriesHowto for more details) '''Breezy:'''
{{{
deb-src http://wine.budgetdedicated.com/apt breezy main
}}}

(see https://wiki.ubuntu.com/AddingRepositoriesHowto for help)
Line 23: Line 38:
{{{
Line 24: Line 40:
}}}
Line 27: Line 44:
Create the directory you're going to install Wine into Create a directory for the build process (wine-0.9.14), and download the source into it. You'll need at least 1.4Gig of free disk to install and build successfully.
Line 29: Line 46:
mkdir wine-0.9.12 {{{
mkdir wine-0.9.14
Line 31: Line 49:
cd wine-0.9.12 cd wine-0.9.14
Line 34: Line 52:
}}}

cd to the directory containing the source code (wine-0.9.14~winehq1~ubuntu~6.06), as that's where we'll be working from.

'''Dapper:'''
{{{
cd wine-0.9.14~winehq1~ubuntu~6.06
}}}

'''Breezy:'''
{{{
cd wine-0.9.14~winehq1~ubuntu~5.10
}}}
Line 37: Line 68:
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 39: Line 70:
patch -p0 < wine-patch#1.patch {{{
patch -p1 < wine-patch#1.patch
Line 41: Line 73:
patch -p0 < wine-patch#2.patch patch -p1 < wine-patch#2.patch
Line 44: Line 76:
}}}

eg. Applying the WoW patch

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

{{{
patch -p1 < ~/wow.new.patch.0.9.13-1
}}}

Additional Wine fix:
open the file "dlls/opengl32/wgl.c"
find and delete the line
{{{
glDrawBuffer(GL_FRONT_LEFT)
}}}

== Install additional libraries ==

Add the recommended packages from: http://wiki.winehq.org/Recommended_Packages

'''Breezy:'''
{{{
sudo apt-get install libasound2-dev libarts1-dev libartsc0-dev libaudiofile-dev libesd0-dev libaudio-dev libcapi20-dev liblcms1-dev libcupsys2-dev libsane-dev freeglut3-dev libc6-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libglib1.2-dev libglib2.0-dev libgnutls11-dev libgpg-error-dev libice-dev libieee1284-3-dev libjpeg62-dev libldap2-dev libltdl3-dev libmad0-dev libmng-dev libncurses5-dev libogg-dev libopencdk8-dev libpng12-dev libqt3-mt-dev libsm-dev libtasn1-2-dev libusb-dev libvorbis-dev libx11-dev libxcursor-dev libxext-dev libxft-dev libxi-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libxv-dev render-dev unixodbc-dev x-dev zlib1g-dev xlibs-dev libxxf86dga-dev libxxf86vm-dev libjack0.80.0-dev libicu28-dev libungif4-dev libssl-dev
}}}

'''Dapper:'''
There's a script written by Dan Kegel that will do all the work:

Download and run the script
{{{
wget http://kegel.com/wine/dapper.sh
chmod +x dapper.sh
sudo ./dapper.sh
}}}
Line 47: Line 114:
apt-get build-package -hfakeroot -cu -b {{{
d
pkg-buildpackage -rfakeroot -uc -b
}}}
Line 49: Line 118:
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. The build will take a LONG time, even with a fast machine. An hour or so would be average on a 2 GHz CPU with 1 GB of Ram, so go have a sandwich.
Line 55: Line 124:
First remove the old Wine package First remove the old Wine package.
Line 57: Line 126:
dpkg --purge wine {{{
sudo
dpkg --purge wine
Line 60: Line 130:
}}}
Line 61: Line 132:
sudo dpkg -i wine_0.9.12~winehq1-1_i386.deb Now, install the new Wine package.

'''Dapper:'''
{{{
sudo dpkg -i wine_0.9.14~winehq1~ubuntu~6.06-1_i386.deb
}}}

'''Breezy:'''
{{{
sudo dpkg -i wine-0.9.14~winehq1~ubuntu~5.10-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.

'''Dapper:'''
{{{
cd wine-0.9.14/wine-0.9.14~winehq1~ubuntu~6.06

make distclean
}}}

'''Breezy:'''
{{{
cd wine-0.9.14/wine-0.9.14~winehq1~ubuntu~5.10
make distclean
}}}

Reasons why one would need to build from source rather than relying on repositories:

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 works for:

  • Ubuntu 6.06 (Dapper Drake), using Wine 0.9.14
  • Ubuntu 5.10 (Breezy Badger), using Wine 0.9.14

WARNING: The authors of this howto give no guarantees, your mileage may vary.

The process for building Wine from source is as follows:

Enable the relevant source repository

Using synaptic, add the following custom repository.

Dapper:

deb-src http://wine.budgetdedicated.com/apt dapper main

Breezy:

deb-src http://wine.budgetdedicated.com/apt breezy main

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

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 a directory for the build process (wine-0.9.14), and download the source into it. You'll need at least 1.4Gig of free disk to install and build successfully.

mkdir wine-0.9.14

cd wine-0.9.14

apt-get source wine

cd to the directory containing the source code (wine-0.9.14~winehq1~ubuntu~6.06), as that's where we'll be working from.

Dapper:

cd wine-0.9.14~winehq1~ubuntu~6.06

Breezy:

cd wine-0.9.14~winehq1~ubuntu~5.10

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.14 patch from http://appdb.winehq.org/appview.php?versionId=4031 to your home folder and apply the patch to the Wine code.

patch -p1 < ~/wow.new.patch.0.9.13-1

Additional Wine fix: open the file "dlls/opengl32/wgl.c" find and delete the line

glDrawBuffer(GL_FRONT_LEFT)

Install additional libraries

Add the recommended packages from: http://wiki.winehq.org/Recommended_Packages

Breezy:

sudo apt-get install libasound2-dev  libarts1-dev libartsc0-dev libaudiofile-dev libesd0-dev libaudio-dev libcapi20-dev liblcms1-dev libcupsys2-dev libsane-dev freeglut3-dev libc6-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libglib1.2-dev libglib2.0-dev libgnutls11-dev libgpg-error-dev libice-dev libieee1284-3-dev libjpeg62-dev libldap2-dev libltdl3-dev libmad0-dev libmng-dev libncurses5-dev libogg-dev libopencdk8-dev libpng12-dev libqt3-mt-dev libsm-dev libtasn1-2-dev libusb-dev libvorbis-dev libx11-dev libxcursor-dev libxext-dev libxft-dev libxi-dev libxml2-dev libxmu-dev libxrandr-dev libxrender-dev libxslt1-dev libxt-dev libxv-dev render-dev unixodbc-dev x-dev   zlib1g-dev xlibs-dev libxxf86dga-dev libxxf86vm-dev libjack0.80.0-dev libicu28-dev libungif4-dev libssl-dev

Dapper: There's a script written by Dan Kegel that will do all the work:

Download and run the script

wget  http://kegel.com/wine/dapper.sh
chmod +x dapper.sh
sudo ./dapper.sh

Build Wine

dpkg-buildpackage -rfakeroot -uc -b

The build will take a LONG time, even with a fast machine. An hour or so would be average on a 2 GHz CPU with 1 GB of Ram, so go have a sandwich.

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.

sudo dpkg --purge wine

cd ..

Now, install the new Wine package.

Dapper:

sudo dpkg -i wine_0.9.14~winehq1~ubuntu~6.06-1_i386.deb

Breezy:

sudo dpkg -i wine-0.9.14~winehq1~ubuntu~5.10-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.

Dapper:

cd wine-0.9.14/wine-0.9.14~winehq1~ubuntu~6.06

make distclean

Breezy:

cd wine-0.9.14/wine-0.9.14~winehq1~ubuntu~5.10
make distclean

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