WineHQ

OpenSUSE: Difference between revisions

(→‎Installing distro packages: add note about restricted codecs)
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NUMBEREDHEADINGS__
{{DISPLAYTITLE:openSUSE}}
{{DISPLAYTITLE:openSUSE}}
{{wip}}
==Installing distro packages==
==Installing distro packages==
New versions of openSUSE ship with the Wine development release that was current at the time packages were frozen for release.  
New versions of openSUSE ship with the Wine development release that was current at the time packages were frozen for release.  
Line 8: Line 8:
Some notes about the openSUSE Wine packages:
Some notes about the openSUSE Wine packages:


* Due to patent issues, the Wine packages on the OBS are built without mp3 support. Packages for <tt>wine-mp3</tt> and its dependencies (<tt>libmpg123</tt>) are available in the [https://en.opensuse.org/Additional_package_repositories#Packman Packman repository].
* The packages include winetricks, installed to /usr/bin/.  
* The packages include winetricks, installed to /usr/bin/.  
* The packages include .desktop files for Wine's builtin programs (winecfg, notepad, etc.), which are not part of vanilla Wine. Report any problems with them to the package maintainer.
* The packages include .desktop files for Wine's builtin programs (winecfg, notepad, etc.), which are not part of vanilla Wine. Report any problems with them to the package maintainer.
* The distro does not package the stable branch; however, packages for the stable releases may be available from personal projects on the OBS. Note that these packages are not supported by either WineHQ or the distro package maintainer.
* The distro does not package the stable branch; however, packages for the stable releases may be available from personal projects on the OBS. Note that these packages are not supported by either WineHQ or the distro package maintainer.
* Restricted codecs needed by winegstreamer are available in the [http://packman.links2linux.org/ Packman] repository.


==Building Wine==
==Building Wine==
===On the OBS===
===On the OBS===
If you merely wish to recreate the distro package with minor modifications (e.g., adding custom patches), the easiest way to do that is by branching the Emulators:Wine package on the OBS, applying whatever changes you wish to make to the spec file, and building from that. See the [https://en.opensuse.org/openSUSE:Build_Service_Tutorial openSUSE Build Service Tutorial] for information on how to use the OBS.
If you merely wish to recreate the distro package with minor modifications (e.g., adding custom patches), the easiest way to do that is by branching the [https://build.opensuse.org/project/show/Emulators:Wine Emulators:Wine] package on the OBS, applying whatever changes you wish to make to the spec file, and building from that. See the [https://en.opensuse.org/openSUSE:Build_Service_Tutorial openSUSE Build Service Tutorial] for information on how to use the OBS.
 
===From Git===
===From Git===
Building from git is necessary to run regression tests or test patches.  Follow the instructions in [[Git_Wine_Tutorial#Set_up_your_Git_repository|the Git Wine Tutorial]] for cloning the Wine git repository.
Building from git is necessary to run regression tests or test patches.   
====Cloning the Wine Git Repository====
Follow the instructions in [[Git_Wine_Tutorial#Set_up_your_Git_repository|the Git Wine Tutorial]] for cloning the Wine git repository.
 
====Build Tools and Dependencies====
====Build Tools and Dependencies====
{{warning}} ''The information in this section is based on openSUSE 13.1 and Wine 1.9.6.  Exact package names may vary depending on your version of openSUSE, and new dependencies may be added in future Wine versions. Always check the output of ./configure to verify that you have all dependencies installed.''
{{warning}} ''The information in this section is based on openSUSE Leap 42.2 and Wine 3.0-rc3.  Exact package names may vary depending on your version of openSUSE, and new dependencies may be added in future Wine versions. Always check the output of ./configure to verify that you have all needed dependencies installed.''




Line 25: Line 29:
*[https://en.opensuse.org/Package_repositories#OSS OSS] (the main repository; this one is required, and should already be set up on your system)
*[https://en.opensuse.org/Package_repositories#OSS OSS] (the main repository; this one is required, and should already be set up on your system)
*[https://en.opensuse.org/Package_repositories#Update Update] (recommended in order to have the most up-to-date versions;  for most people, this should also already be set up)
*[https://en.opensuse.org/Package_repositories#Update Update] (recommended in order to have the most up-to-date versions;  for most people, this should also already be set up)
*[https://en.opensuse.org/Additional_package_repositories#Wine Wine] (recommended, as installing a distro package will pull in the runtime dependencies)
*[https://en.opensuse.org/Additional_package_repositories#Wine Wine] (recommended, as installing a distro package will pull in Wine's runtime dependencies)
*[https://en.opensuse.org/Additional_package_repositories#Packman Packman] (required for mp3 support)
*[http://download.opensuse.org/repositories/Education Education] (required to build with OpenCL support)
*[http://download.opensuse.org/repositories/Education Education] (required for OpenCL support)




'''Basic Build Tools'''
'''Basic Build Tools'''


The meta-package <tt>patterns-openSUSE-devel_basis</tt> will install the basic tools needed for building (gcc, make, flex, bison, etc.); on a 64 bit system, you will also need to install the <tt>patterns-openSUSE-devel_basis-32bit</tt> meta-package. You will also need to install <tt>git</tt>.  
The meta-package <tt>patterns-openSUSE-devel_basis</tt> will install the basic tools needed for building (gcc, make, flex, bison, etc.); on a 64 bit system, you will also need to install the <tt>patterns-openSUSE-32bit</tt> meta-package. You will also need to install <tt>git</tt>.  


'''Dependencies'''  
'''Dependencies'''  


{{warning}} '''NOTE: This section is still very incomplete.'''
Installing the distro wine, wine-snapshot, or wine-staging package is the easiest way to install the libraries Wine depends on, as zypper or Yast2 will automatically pull them in.  
 
Since the distro packages are built without SANE support, you will need to install the following package yourself:
* <tt>sane-backends</tt> (if you want scanner support)
 
 
On a 64 bit system, you will also need to install
* <tt>sane-backends-32bit</tt> (if you want scanner support)


Installing the distro wine, wine-snapshot, or wine-staging package is the easiest way to install many of the libraries Wine depends on, as zypper or Yast2 will automatically pull them in. On a 64 bit system, installing the <tt>wine-32bit-build-deps</tt> package will install many of the 32 bit libraries needed to compile 32 bit Wine on a 64 bit system.


In addition to the runtime dependencies, the following development packages are needed:
In addition to the runtime dependencies, the following development packages are needed:
<pre>alsa-devel capi4linux-devel dbus-1-devel fontconfig-devel freeglut-devel freetype2-devel giflib-devel glib2-devel glibc-devel glu-devel gstreamer-devel gstreamer-plugins-base-devel krb5-devel libcom_err-devel libexif-devel libgnutls-devel libgphoto2-devel libgsm-devel libjpeg8-devel liblcms2-devel libmpg123-devel libOSMesa-devel libpcap-devel libpng16-compat-devel libpulse-devel libtiff-devel libudev-devel libv4l-devel libX11-devel libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel libXi-devel libXinerama-devel libXxf86vm-devel libxml2-devel libXrandr-devel libXrender-devel libxslt-devel Mesa-libGL-devel mpg123-devel ncurses-devel openal-soft-devel opencl-headers openldap2-devel libopenssl-devel sane-backends-devel unixODBC-devel xorg-x11-devel xz-devel zlib-devel</pre>
(Some of these packages will be installed by the patterns-openSUSE-devel_basis package.)
On a 64 bit system, you will also need to install the following -32bit packages:
<pre>alsa-devel-32bit capi4linux-devel-32bit dbus-1-devel-32bit fontconfig-devel-32bit freeglut-devel-32bit freetype2-devel-32bit giflib-devel-32bit glib2-devel-32bit glibc-devel-32bit glu-devel-32bit krb5-devel-32bit libcom_err-devel-32bit libgnutls-devel-32bit libgphoto2-devel-32bit libgsm-devel-32bit libjpeg8-devel-32bit liblcms2-devel-32bit libOSMesa-devel-32bit libpcap-devel-32bit libpng16-compat-devel-32bit libpulse-devel-32bit libtiff-devel-32bit libv4l-devel-32bit libX11-devel-32bit libXcomposite-devel-32bit libXcursor-devel-32bit libXext-devel-32bit libXfixes-devel-32bit libXi-devel-32bit libXinerama-devel-32bit libXxf86vm-devel-32bit libxml2-devel-32bit libXrandr-devel-32bit libXrender-devel-32bit libxslt-devel-32bit Mesa-libGL-devel-32bit mpg123-devel-32bit ncurses-devel-32bit openal-soft-devel-32bit openldap2-devel-32bit libopenssl-devel-32bit unixODBC-devel-32bit xz-devel-32bit zlib-devel-32bit</pre>
(Installing the <tt>wine-32bit-build-deps</tt> package will install most of the -32bit packages listed above.)
{{warning}} The glib2-devel-32bit packages for openSUSE versions 13.1, 13.2, and Leap 42.1 were missing the 32 bit header and pkgconfig files needed to compile 32 bit Wine with gstreamer support on a 64 bit system. The workaround was to extract the missing files from the i586 glib2-devel package and manually place the needed files in <tt>/usr/include</tt> and <tt>/usr/lib/pkgconfig</tt>. This problem has been fixed in Leap 42.2 and later.  (See bug [https://bugzilla.opensuse.org/show_bug.cgi?id=973217 973217])
After installing the above, you may need to make the following symlinks in <tt>/usr/lib</tt> (needed for libraries that do not have a -devel-32bit package):
<pre>ln -s libasound.so.2.0.0 libasound.so
ln -s libfreetype.so.6 libfreetype.so
ln -s libgphoto2.so.6 libgphoto2.so
ln -s libgphoto2_port.so.10 libgphoto2_port.so
ln -s libgnutls.so.28 libgnutls.so
ln -s libgstreamer-1.0.so.0 libgstreamer-1.0.so
ln -s libgstapp-1.0.so.0 libgstapp-1.0.so
ln -s libgstbase-1.0.so.0 libgstbase-1.0.so
ln -s libsane.so.1 libsane.so
ln -s libexif.so.12 libexif.so
ln -s libudev.so.1 libudev.so</pre>
The targets of the above symlinks may need to be adjusted depending on what version of the library you have installed.
{{info}} Packages needed to build with HAL and OSSv4 support are not available from any of the openSUSE repositories, and ./configure will complain about it. Neither is needed on current versions of openSUSE; if those are the only things ./configure complains about, you are good to go.
====Building 32 bit Wine====
'''On a 32 bit system'''
After cloning the git repository, cd to the wine-git directory and run
CC="ccache gcc"  ./configure  --disable-tests
Check the output of ./configure to make sure there are no missing dependencies for features that you need. If there are, install them. Assuming all is well, just run
make
'''On a 64 bit system'''


After cloning the git repository, cd to the wine-git directory and run
CC="ccache gcc -m32" PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure  --disable-tests


To be continued...
Check the output of ./configure to make sure there are no missing dependencies for features that you need. If there are, install them. Assuming all is well, just run
make


Since the distro packages are built without mp3, SANE, or OpenCL support, you will need to install the following packages yourself:
====Building Shared WoW64====
* <tt>libmpg123-0</tt> (from Packman)
{{info}} If all your apps/games are 32 bit, there is no need to build 64 bit Wine at all unless you are interested in helping with testing. Simply follow the instructions in the preceding section to build 32 bit Wine on a 64 bit system.
* <tt>sane-backends</tt> (from OSS)
* <tt>opencl-headers</tt> (from Education)


On a 64 bit system, you will also need to install
Pure 64 bit Wine is not a supported configuration (and is generally useless, as most Windows apps are still 32 bit). For 64 bit support, you must build both 64 bit and 32 bit Wine in a [[Building_Wine#Shared_WoW64|shared WoW64]] setup. This does not require a container or chroot on openSUSE, but the builds must be done out of tree, and in the order specified below.
* <tt>libmpg123-0-32bit</tt> (from Packman)
 
* <tt>sane-backends-32bit</tt> (from OSS)
'''1. Build the 64 bit side'''
 
Create a directory for the 64 bit build and run configure from within that directory:
cd $HOME
mkdir wine64
cd wine64
CC="ccache gcc" ../wine-git/configure  --enable-win64 --disable-tests
Double check the output of configure for any missing 64 bit dependencies and install any that are needed. If all is well, run
make
from within the wine64 directory.
 
'''2. Build the 32 bit side'''
 
Create a directory for the 32 bit build and run configure from within that directory:
cd ..
mkdir wine32
cd wine32
CC="ccache gcc -m32" PKG_CONFIG_PATH=/usr/lib/pkgconfig ../wine-git/configure  --with-wine64=../wine64 --disable-tests
Double check the output of configure for any missing 32 bit dependencies and install any that are needed. If all is well, run
make
from within the wine32 directory.
 
===From a Source Tarball===
Building from a source tarball offers less flexibility than git while requiring the same amount of work
 
If you prefer to build from a source tarball rather than git, follow the instructions above for building from git, but instead of cloning the git repository, download the tarball for the version you want from http://dl.winehq.org/wine/source/ and extract it. Substitute the source directory for the wine-git directory when following the instructions.
 
{{warning}} The tools directory contains an obsolete script called <tt>wineinstall</tt>. Do not use this script, as it has not been updated in years and cannot build 64 bit Wine.
 
==See Also==
[[Building Wine]]
 
[[Category:Distributions]]

Revision as of 20:15, 26 December 2017

__NUMBEREDHEADINGS__

Installing distro packages

New versions of openSUSE ship with the Wine development release that was current at the time packages were frozen for release.

Up-to-date Wine packages are available through the Wine repository on the OBS. The package maintainer is Marcus Meissner. The repository includes packages for the biweekly releases of both Wine and Wine-staging, daily "snapshot" packages of git, and packages for wine-gecko and wine-mono. Simply add the repository to Yast2 or zypper and install as you would any other package.

Some notes about the openSUSE Wine packages:

  • The packages include winetricks, installed to /usr/bin/.
  • The packages include .desktop files for Wine's builtin programs (winecfg, notepad, etc.), which are not part of vanilla Wine. Report any problems with them to the package maintainer.
  • The distro does not package the stable branch; however, packages for the stable releases may be available from personal projects on the OBS. Note that these packages are not supported by either WineHQ or the distro package maintainer.
  • Restricted codecs needed by winegstreamer are available in the Packman repository.

Building Wine

On the OBS

If you merely wish to recreate the distro package with minor modifications (e.g., adding custom patches), the easiest way to do that is by branching the Emulators:Wine package on the OBS, applying whatever changes you wish to make to the spec file, and building from that. See the openSUSE Build Service Tutorial for information on how to use the OBS.

From Git

Building from git is necessary to run regression tests or test patches.

Cloning the Wine Git Repository

Follow the instructions in the Git Wine Tutorial for cloning the Wine git repository.

Build Tools and Dependencies

The information in this section is based on openSUSE Leap 42.2 and Wine 3.0-rc3. Exact package names may vary depending on your version of openSUSE, and new dependencies may be added in future Wine versions. Always check the output of ./configure to verify that you have all needed dependencies installed.


The following repositories should be enabled to obtain basic build tools and Wine's build dependencies:

  • OSS (the main repository; this one is required, and should already be set up on your system)
  • Update (recommended in order to have the most up-to-date versions; for most people, this should also already be set up)
  • Wine (recommended, as installing a distro package will pull in Wine's runtime dependencies)
  • Education (required to build with OpenCL support)


Basic Build Tools

The meta-package patterns-openSUSE-devel_basis will install the basic tools needed for building (gcc, make, flex, bison, etc.); on a 64 bit system, you will also need to install the patterns-openSUSE-32bit meta-package. You will also need to install git.

Dependencies

Installing the distro wine, wine-snapshot, or wine-staging package is the easiest way to install the libraries Wine depends on, as zypper or Yast2 will automatically pull them in.

Since the distro packages are built without SANE support, you will need to install the following package yourself:

  • sane-backends (if you want scanner support)


On a 64 bit system, you will also need to install

  • sane-backends-32bit (if you want scanner support)


In addition to the runtime dependencies, the following development packages are needed:

alsa-devel capi4linux-devel dbus-1-devel fontconfig-devel freeglut-devel freetype2-devel giflib-devel glib2-devel glibc-devel glu-devel gstreamer-devel gstreamer-plugins-base-devel krb5-devel libcom_err-devel libexif-devel libgnutls-devel libgphoto2-devel libgsm-devel libjpeg8-devel liblcms2-devel libmpg123-devel libOSMesa-devel libpcap-devel libpng16-compat-devel libpulse-devel libtiff-devel libudev-devel libv4l-devel libX11-devel libXcomposite-devel libXcursor-devel libXext-devel libXfixes-devel libXi-devel libXinerama-devel libXxf86vm-devel libxml2-devel libXrandr-devel libXrender-devel libxslt-devel Mesa-libGL-devel mpg123-devel ncurses-devel openal-soft-devel opencl-headers openldap2-devel libopenssl-devel sane-backends-devel unixODBC-devel xorg-x11-devel xz-devel zlib-devel

(Some of these packages will be installed by the patterns-openSUSE-devel_basis package.)

On a 64 bit system, you will also need to install the following -32bit packages:

alsa-devel-32bit capi4linux-devel-32bit dbus-1-devel-32bit fontconfig-devel-32bit freeglut-devel-32bit freetype2-devel-32bit giflib-devel-32bit glib2-devel-32bit glibc-devel-32bit glu-devel-32bit krb5-devel-32bit libcom_err-devel-32bit libgnutls-devel-32bit libgphoto2-devel-32bit libgsm-devel-32bit libjpeg8-devel-32bit liblcms2-devel-32bit libOSMesa-devel-32bit libpcap-devel-32bit libpng16-compat-devel-32bit libpulse-devel-32bit libtiff-devel-32bit libv4l-devel-32bit libX11-devel-32bit libXcomposite-devel-32bit libXcursor-devel-32bit libXext-devel-32bit libXfixes-devel-32bit libXi-devel-32bit libXinerama-devel-32bit libXxf86vm-devel-32bit libxml2-devel-32bit libXrandr-devel-32bit libXrender-devel-32bit libxslt-devel-32bit Mesa-libGL-devel-32bit mpg123-devel-32bit ncurses-devel-32bit openal-soft-devel-32bit openldap2-devel-32bit libopenssl-devel-32bit unixODBC-devel-32bit xz-devel-32bit zlib-devel-32bit

(Installing the wine-32bit-build-deps package will install most of the -32bit packages listed above.)

The glib2-devel-32bit packages for openSUSE versions 13.1, 13.2, and Leap 42.1 were missing the 32 bit header and pkgconfig files needed to compile 32 bit Wine with gstreamer support on a 64 bit system. The workaround was to extract the missing files from the i586 glib2-devel package and manually place the needed files in /usr/include and /usr/lib/pkgconfig. This problem has been fixed in Leap 42.2 and later. (See bug 973217)

After installing the above, you may need to make the following symlinks in /usr/lib (needed for libraries that do not have a -devel-32bit package):

ln -s libasound.so.2.0.0 libasound.so
ln -s libfreetype.so.6 libfreetype.so
ln -s libgphoto2.so.6 libgphoto2.so
ln -s libgphoto2_port.so.10 libgphoto2_port.so
ln -s libgnutls.so.28 libgnutls.so
ln -s libgstreamer-1.0.so.0 libgstreamer-1.0.so
ln -s libgstapp-1.0.so.0 libgstapp-1.0.so
ln -s libgstbase-1.0.so.0 libgstbase-1.0.so
ln -s libsane.so.1 libsane.so
ln -s libexif.so.12 libexif.so
ln -s libudev.so.1 libudev.so

The targets of the above symlinks may need to be adjusted depending on what version of the library you have installed.

Packages needed to build with HAL and OSSv4 support are not available from any of the openSUSE repositories, and ./configure will complain about it. Neither is needed on current versions of openSUSE; if those are the only things ./configure complains about, you are good to go.

Building 32 bit Wine

On a 32 bit system

After cloning the git repository, cd to the wine-git directory and run

CC="ccache gcc"  ./configure  --disable-tests

Check the output of ./configure to make sure there are no missing dependencies for features that you need. If there are, install them. Assuming all is well, just run

make

On a 64 bit system

After cloning the git repository, cd to the wine-git directory and run

CC="ccache gcc -m32" PKG_CONFIG_PATH=/usr/lib/pkgconfig ./configure  --disable-tests

Check the output of ./configure to make sure there are no missing dependencies for features that you need. If there are, install them. Assuming all is well, just run

make

Building Shared WoW64

If all your apps/games are 32 bit, there is no need to build 64 bit Wine at all unless you are interested in helping with testing. Simply follow the instructions in the preceding section to build 32 bit Wine on a 64 bit system.

Pure 64 bit Wine is not a supported configuration (and is generally useless, as most Windows apps are still 32 bit). For 64 bit support, you must build both 64 bit and 32 bit Wine in a shared WoW64 setup. This does not require a container or chroot on openSUSE, but the builds must be done out of tree, and in the order specified below.

1. Build the 64 bit side

Create a directory for the 64 bit build and run configure from within that directory:

cd $HOME 
mkdir wine64
cd wine64
CC="ccache gcc" ../wine-git/configure  --enable-win64 --disable-tests

Double check the output of configure for any missing 64 bit dependencies and install any that are needed. If all is well, run

make

from within the wine64 directory.

2. Build the 32 bit side

Create a directory for the 32 bit build and run configure from within that directory:

cd ..
mkdir wine32
cd wine32
CC="ccache gcc -m32" PKG_CONFIG_PATH=/usr/lib/pkgconfig ../wine-git/configure  --with-wine64=../wine64 --disable-tests

Double check the output of configure for any missing 32 bit dependencies and install any that are needed. If all is well, run

make

from within the wine32 directory.

From a Source Tarball

Building from a source tarball offers less flexibility than git while requiring the same amount of work

If you prefer to build from a source tarball rather than git, follow the instructions above for building from git, but instead of cloning the git repository, download the tarball for the version you want from http://dl.winehq.org/wine/source/ and extract it. Substitute the source directory for the wine-git directory when following the instructions.

The tools directory contains an obsolete script called wineinstall. Do not use this script, as it has not been updated in years and cannot build 64 bit Wine.

See Also

Building Wine

This page was last edited on 26 December 2017, at 20:15.