In case you want to compile Wine Staging or create a package for it, you
should follow these instructions. Please note that simply applying all
patches inside the patches
folder won't work. Even when using the
script it is still possible to exclude patches if desired, take a look
at the end of this document for more details.
Compiling Wine Staging
Before you can start compiling Wine Staging, you need to make sure that you have all necessary dependencies installed. The easiest way to find the appropriate packages for your distribution (especially if you want to create a package) is to take a look at an existing Wine source packages. In case you are using a 64 bit system, you can optionally decide to compile Wine for 32 and 64 bit to create a "WOW64" build, but you will always need at least the 32 bit part. Depending on the Distribution you are using, this can be a bit complicated and you can find some tips in Building Wine.
Wine Staging also supports the following optional dependencies:
Library | Functionality |
---|---|
libpulse | PulseAudio support |
libattr | Windows ACL support |
libtxc_dxtn | DXTn software decoding / encoding support (*) |
libva-x11 | GPU video decoding via X11 |
libva-drm | GPU video decoding via DRM |
libgtk-3 | GTK3 theming support |
(*) Since 1.7.37 it is not necessary anymore to have this library
available at build time, if it is called either libtxc_dxtn.so
or
libtxc_dxtn_s2tc.so.0
. If your distro uses a library with a
different name, you still need it. This change was done to simplify
building Wine Staging on distros where libtxc_dxtn
is not available
in the official repositories.
The compilation will also continue without these libraries installed, though you may want to provide as many features as possible if you are creating a package.
Instructions
The following instructions (based on the Gentoo Wiki) will explain how to compile Wine Staging. If you encounter any problems, feel free to join our IRC channel #wine-staging.
As the first step please grab the latest Wine source (or use the git repos for development):
$ wget https://prdownloads.sourceforge.net/wine/wine-1.7.38.tar.bz2
$ wget https://github.com/wine-compholio/wine-staging/archive/v1.7.38.tar.gz
Extract the archives:
$ tar xvjf wine-1*.tar.bz2
$ cd wine-1*
$ tar xvzf ../v1.7.38.tar.gz --strip-components 1
And apply the patches:
$ ./patches/patchinstall.sh DESTDIR="$(pwd)" --all
Afterwards run configure (you can also specify a prefix if you don't
want to install Wine Staging system-wide:
--prefix=$HOME/staging-test
):
$ ./configure --with-xattr
Before you continue you should make sure that ./configure
doesn't show
any warnings (look at the end of the output). If there are any warnings,
this most likely means that you're missing some important header files.
Install them and repeat the ./configure
step until all problems are
fixed.
Afterwards compile everything (and grab a cup of coffee):
$ make
And install it (you only need sudo for a system-wide installation):
$ sudo make install
Failure to apply all patches
When trying to build the current git version of Wine Staging (and not a
release tag), it can happen from time to time that patchinstall.sh
will fail because of a failure to apply all patches. This happens either
when patches get upstream into the development branch (and have to be
deleted from Wine Staging), or when changes in the development branch
conflict with Wine Staging patchsets. In both cases we will try to fix
the problem as soon as possible, and there is usually no need to open a
separate bug report for it.
To workaround this issue, you can run:
$ ./patches/patchinstall.sh --upstream-commit
It will return a git commit hash like
d04a54857cc84f881393e4bc794185650a302084
. By checking out exactly this
commit in the Wine git repository, you should be able to apply all
patches without issues. Alternatively you can also wait until we push a
commit to rebase Wine Staging against the current development branch.
Excluding patches
It is also possible to apply only a subset of the patches, for example if you're compiling for a distribution where PulseAudio is not installed, or if you just don't like a specific patchset. Please note that some patchsets depend on each other, and requesting an impossible situation might result in a failure to apply all patches.
Lets assume you want to exclude the patchset in directory DIRNAME
,
then just invoke the script like this:
$ ./patches/patchinstall.sh DESTDIR="$(pwd)" --all -W DIRNAME
Using the same method its also possible to exclude multiple patchsets.
If you want to exclude a very large number of patches, it is easier to
do specify a list of patches which should be included instead. To apply
for example only the patchsets in directory DIRNAME1
and DIRNAME2
,
you can use:
$ ./patches/patchinstall.sh DESTDIR="$(pwd)" DIRNAME1 DIRNAME2
Additional notes for package maintainers
Some applications and games require fonts like Arial or Courier to run properly. In order to fix this problem Wine Staging contains some open source replacement fonts which use the same metrics as the original fonts by Microsoft. These fonts are licensed under different terms than Wine and you will need to ship the according license files.
By applying the font patches the LICENSE file is being updated to
reflect which files are covered by which license. Moreover you will also
get the following new files containing the individual licenses:
COPYING.arial
, COPYING.cour
and COPYING.msyh
. Simply add these
files to your package.