特殊:Badtitle/NS100:BuildingWineFromSource
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/BuildingWineFromSource }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/af | • {{#if: UbuntuHelp:BuildingWineFromSource|Afrikaans| [[::BuildingWineFromSource/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ar | • {{#if: UbuntuHelp:BuildingWineFromSource|العربية| [[::BuildingWineFromSource/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/az | • {{#if: UbuntuHelp:BuildingWineFromSource|azərbaycanca| [[::BuildingWineFromSource/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/bcc | • {{#if: UbuntuHelp:BuildingWineFromSource|جهلسری بلوچی| [[::BuildingWineFromSource/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/bg | • {{#if: UbuntuHelp:BuildingWineFromSource|български| [[::BuildingWineFromSource/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/br | • {{#if: UbuntuHelp:BuildingWineFromSource|brezhoneg| [[::BuildingWineFromSource/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ca | • {{#if: UbuntuHelp:BuildingWineFromSource|català| [[::BuildingWineFromSource/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/cs | • {{#if: UbuntuHelp:BuildingWineFromSource|čeština| [[::BuildingWineFromSource/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/de | • {{#if: UbuntuHelp:BuildingWineFromSource|Deutsch| [[::BuildingWineFromSource/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/el | • {{#if: UbuntuHelp:BuildingWineFromSource|Ελληνικά| [[::BuildingWineFromSource/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/es | • {{#if: UbuntuHelp:BuildingWineFromSource|español| [[::BuildingWineFromSource/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/fa | • {{#if: UbuntuHelp:BuildingWineFromSource|فارسی| [[::BuildingWineFromSource/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/fi | • {{#if: UbuntuHelp:BuildingWineFromSource|suomi| [[::BuildingWineFromSource/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/fr | • {{#if: UbuntuHelp:BuildingWineFromSource|français| [[::BuildingWineFromSource/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/gu | • {{#if: UbuntuHelp:BuildingWineFromSource|ગુજરાતી| [[::BuildingWineFromSource/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/he | • {{#if: UbuntuHelp:BuildingWineFromSource|עברית| [[::BuildingWineFromSource/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/hu | • {{#if: UbuntuHelp:BuildingWineFromSource|magyar| [[::BuildingWineFromSource/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/id | • {{#if: UbuntuHelp:BuildingWineFromSource|Bahasa Indonesia| [[::BuildingWineFromSource/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/it | • {{#if: UbuntuHelp:BuildingWineFromSource|italiano| [[::BuildingWineFromSource/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ja | • {{#if: UbuntuHelp:BuildingWineFromSource|日本語| [[::BuildingWineFromSource/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ko | • {{#if: UbuntuHelp:BuildingWineFromSource|한국어| [[::BuildingWineFromSource/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ksh | • {{#if: UbuntuHelp:BuildingWineFromSource|Ripoarisch| [[::BuildingWineFromSource/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/mr | • {{#if: UbuntuHelp:BuildingWineFromSource|मराठी| [[::BuildingWineFromSource/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ms | • {{#if: UbuntuHelp:BuildingWineFromSource|Bahasa Melayu| [[::BuildingWineFromSource/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/nl | • {{#if: UbuntuHelp:BuildingWineFromSource|Nederlands| [[::BuildingWineFromSource/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/no | • {{#if: UbuntuHelp:BuildingWineFromSource|norsk| [[::BuildingWineFromSource/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/oc | • {{#if: UbuntuHelp:BuildingWineFromSource|occitan| [[::BuildingWineFromSource/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/pl | • {{#if: UbuntuHelp:BuildingWineFromSource|polski| [[::BuildingWineFromSource/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/pt | • {{#if: UbuntuHelp:BuildingWineFromSource|português| [[::BuildingWineFromSource/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ro | • {{#if: UbuntuHelp:BuildingWineFromSource|română| [[::BuildingWineFromSource/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/ru | • {{#if: UbuntuHelp:BuildingWineFromSource|русский| [[::BuildingWineFromSource/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/si | • {{#if: UbuntuHelp:BuildingWineFromSource|සිංහල| [[::BuildingWineFromSource/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/sq | • {{#if: UbuntuHelp:BuildingWineFromSource|shqip| [[::BuildingWineFromSource/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/sr | • {{#if: UbuntuHelp:BuildingWineFromSource|српски / srpski| [[::BuildingWineFromSource/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/sv | • {{#if: UbuntuHelp:BuildingWineFromSource|svenska| [[::BuildingWineFromSource/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/th | • {{#if: UbuntuHelp:BuildingWineFromSource|ไทย| [[::BuildingWineFromSource/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/tr | • {{#if: UbuntuHelp:BuildingWineFromSource|Türkçe| [[::BuildingWineFromSource/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/vi | • {{#if: UbuntuHelp:BuildingWineFromSource|Tiếng Việt| [[::BuildingWineFromSource/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/yue | • {{#if: UbuntuHelp:BuildingWineFromSource|粵語| [[::BuildingWineFromSource/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/zh | • {{#if: UbuntuHelp:BuildingWineFromSource|中文| [[::BuildingWineFromSource/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/zh-hans | • {{#if: UbuntuHelp:BuildingWineFromSource|中文(简体)| [[::BuildingWineFromSource/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:BuildingWineFromSource | UbuntuHelp:BuildingWineFromSource | {{#if: | :}}BuildingWineFromSource}}/zh-hant | • {{#if: UbuntuHelp:BuildingWineFromSource|中文(繁體)| [[::BuildingWineFromSource/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:BuildingWineFromSource|:BuildingWineFromSource|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :BuildingWineFromSource/zh | | {{#ifexist: BuildingWineFromSource/zh | | {{#ifeq: {{#titleparts:BuildingWineFromSource|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:BuildingWineFromSource|1|-1|}} | zh | | }}
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 7.04 (Feisty Fawn), Using Wine 0.9.39
- Ubuntu 6.06 (Dapper Drake), using Wine 0.9.21
- Ubuntu 5.10 (Breezy Badger), using Wine 0.9.21
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
Feisty:
deb-src http://wine.budgetdedicated.com/apt feisty main
(see https://wiki.ubuntu.com/AddingRepositoriesHowto for help) Also, see http://www.winehq.org/site/download-deb for most current repository adding method.
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 sudo apt-get install fakeroot
Download the Wine source
Create a directory for the build process (wine-0.9.38), 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.39 cd wine-0.9.39 apt-get source wine
cd to the directory containing the source code, as that's where we'll be working from. Dapper:
cd wine-0.9.21~winehq0~ubuntu~6.06
Breezy:
cd wine-0.9.21~winehq0~ubuntu~5.10
Feisty:
cd wine-0.9.39~winehq0~ubuntu~7.04
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 the 0.9.21 patch from http://appdb.winehq.org/appview.php?versionId=5109 to your home folder and apply the patch to the Wine code.
patch -p0 < ~/wow-patch-0.9.21.patch
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
Feisty: Run this command:
sudo apt-get install libasound2-dev libaudiofile-dev libesd0-dev libaudio-dev libcapi20-dev liblcms1-dev libcupsys2-dev libsane-dev libhal-dev libdbus-1-dev freeglut3-dev libc6-dev libexpat1-dev libfontconfig1-dev libfreetype6-dev libgcrypt11-dev libglib1.2-dev libglib2.0-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 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.100.0-dev libicu34-dev libungif4-dev libssl-dev lib32ncurses5-dev
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.21~winehq0~ubuntu~6.06-1_i386.deb
Breezy:
sudo dpkg -i wine_0.9.21~winehq0~ubuntu~5.10-1_i386.deb
Feisty:
sudo dpkg -i wine_0.9.39~winehq0~ubuntu~7.04-3_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.21/wine-0.9.21~winehq0~ubuntu~6.06 make distclean
Breezy:
cd wine-0.9.21/wine-0.9.21~winehq0~ubuntu~5.10 make distclean