2018-04-04 19:29:21 +02:00
|
|
|
---
|
|
|
|
Introduction
|
|
|
|
---
|
|
|
|
Proton is a tool for use with the Steam client which allows games which are
|
|
|
|
exclusive to Windows to run on Linux and macOS operating systems. It uses Wine
|
|
|
|
to facilitate this.
|
|
|
|
|
|
|
|
Most users will prefer to use Proton provided by the Steam client itself. The
|
|
|
|
source code is provided to enable advanced users the ability to alter
|
|
|
|
Proton. For example, some users may wish to use a different version of Wine with
|
|
|
|
a particular title.
|
|
|
|
|
|
|
|
**NOTE:** If you are not comfortable in a command line terminal, or if you find
|
|
|
|
any of the information presented in here strange and uncomfortable, then
|
|
|
|
this is probably not for you. The instructions are likely to be incomplete
|
|
|
|
and require some knowledge and skill on your part, and there is no warranty
|
|
|
|
or guarantee that anyone will help you with this process.
|
|
|
|
|
|
|
|
We strongly recommend that most users use the production build of Proton.
|
|
|
|
|
|
|
|
---
|
|
|
|
Obtaining Proton
|
|
|
|
---
|
|
|
|
The most current source for Proton is here:
|
2018-04-05 15:45:47 +02:00
|
|
|
<https://github.com/ValveSoftware/Proton>
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
Which you can clone to your system with this command:
|
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
git clone https://github.com/ValveSoftware/Proton.git proton
|
2018-04-04 19:29:21 +02:00
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
After cloning the Proton git repository, the next step will be to
|
2018-04-04 19:29:21 +02:00
|
|
|
obtain the various submodules that go into building Proton:
|
|
|
|
|
|
|
|
cd proton
|
2018-04-05 15:45:47 +02:00
|
|
|
#for linux:
|
2018-07-12 16:25:38 +02:00
|
|
|
git submodule update --init wine dxvk ffmpeg openal-soft openvr
|
2018-04-05 15:45:47 +02:00
|
|
|
#for macos:
|
|
|
|
git submodule update --init
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
If you wish to change any subcomponent, now is the time to do so.
|
2018-04-05 15:45:47 +02:00
|
|
|
For example, if you wish make changes to Wine, you would apply those
|
|
|
|
changes to the <tt>wine/</tt> directory.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
Building for Linux
|
|
|
|
---
|
2018-05-31 18:38:54 +02:00
|
|
|
To build Proton for Linux, set up a Debian machine with the Steam runtime and
|
|
|
|
chroots as documented in the Steam Runtime repository:
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
<https://github.com/ValveSoftware/steam-runtime>
|
|
|
|
|
|
|
|
In addition, you will need to install gcc-5 and a long list of dependencies
|
2018-04-05 15:45:47 +02:00
|
|
|
required for Wine. The following set of commands is an example session, and may
|
|
|
|
not be complete.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
cd ~
|
2018-04-04 19:29:21 +02:00
|
|
|
git clone https://github.com/ValveSoftware/steam-runtime.git
|
|
|
|
cd steam-runtime
|
2018-05-31 18:38:54 +02:00
|
|
|
#install the end-user steam runtime:
|
|
|
|
./build-runtime.py
|
2018-04-05 15:45:47 +02:00
|
|
|
#install the 32-bit scout_beta runtime:
|
2018-04-04 19:29:21 +02:00
|
|
|
./setup_chroot.sh --beta --i386
|
2018-04-05 15:45:47 +02:00
|
|
|
#enter the 32-bit runtime:
|
2018-04-04 19:29:21 +02:00
|
|
|
schroot --chroot steamrt_scout_beta_i386
|
|
|
|
|
|
|
|
This will enter the chroot environment, where you would issue the following commands:
|
|
|
|
|
2018-06-25 17:54:55 +02:00
|
|
|
sudo apt-get install gcc-5 g++-5 g++-5-multilib flex bison libosmesa6-dev libpcap-dev libhal-dev libsane-dev libv4l-dev libgphoto2-2-dev libcapi20-dev libgsm1-dev libmpg123-dev libvulkan-dev libxslt1-dev nasm yasm
|
2018-04-04 19:29:21 +02:00
|
|
|
sudo update-alternatives --install `which gcc` gcc `which gcc-5` 50
|
|
|
|
sudo update-alternatives --set gcc `which gcc-5`
|
|
|
|
sudo update-alternatives --install `which g++` g++ `which g++-5` 50
|
|
|
|
sudo update-alternatives --set g++ `which g++-5`
|
|
|
|
sudo update-alternatives --install `which cpp` cpp-bin `which cpp-5` 50
|
|
|
|
sudo update-alternatives --set cpp-bin `which cpp-5`
|
|
|
|
exit
|
|
|
|
|
|
|
|
Next, you need to repeat the process, but for amd64:
|
|
|
|
|
|
|
|
./setup_chroot.sh --beta --amd64
|
|
|
|
schroot --chroot steamrt_scout_beta_amd64
|
|
|
|
|
2018-05-10 17:06:25 +02:00
|
|
|
And then repeat all of the commands to install gcc and Wine dependencies again.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
2018-05-23 19:36:50 +02:00
|
|
|
In addition, your host system will need to be able to run Wine in both 64- and
|
|
|
|
32-bit modes in order to create the default prefix. It is recommended to
|
|
|
|
install Wine from your package manager, including its optional dependencies.
|
2018-06-11 17:47:25 +02:00
|
|
|
|
|
|
|
The openal-soft build system requires cmake 3.0.2 or later, which is newer than
|
|
|
|
the Steam runtime SDK provides. You will need to build and install a newer
|
|
|
|
cmake into each of the runtimes. For convenience, the build_proton.sh script
|
|
|
|
will attempt to use cmake from ~/opt32/bin/ and ~/opt64/bin/, if available.
|
2018-05-23 19:36:50 +02:00
|
|
|
|
2018-06-25 17:58:37 +02:00
|
|
|
The following example session obtained and built cmake:
|
|
|
|
cd /tmp
|
|
|
|
wget https://cmake.org/files/v3.11/cmake-3.11.4.tar.gz
|
|
|
|
schroot --chroot steamrt_scout_beta_i386
|
|
|
|
tar -xzf cmake-3.11.4.tar.gz
|
|
|
|
cd cmake-3.11.4
|
|
|
|
./configure --parallel=4 --prefix=~/opt32
|
|
|
|
make -j 4 && make install
|
|
|
|
exit
|
|
|
|
rm -rf cmake-3.11.4
|
|
|
|
schroot --chroot steamrt_scout_beta_amd64
|
|
|
|
tar -xzf cmake-3.11.4.tar.gz
|
|
|
|
cd cmake-3.11.4
|
|
|
|
./configure --parallel=4 --prefix=~/opt64
|
|
|
|
make -j 4 && make install
|
|
|
|
exit
|
|
|
|
|
|
|
|
|
2018-04-04 19:29:21 +02:00
|
|
|
Finally, change your directory back to proton, and run:
|
|
|
|
|
|
|
|
cd ../proton
|
|
|
|
./build_proton.sh
|
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
That should configure and build Wine, and then package the result up into
|
|
|
|
<tt>dist/</tt>. It is important to examine the output near the end of
|
|
|
|
<tt>build/wine.win{64,32}/config.log</tt> to ensure that you have all of the relevant
|
|
|
|
libraries in each chroot. Search for '<tt>executing Makefile commands</tt>' in
|
|
|
|
<tt>config.log</tt> to find messages about missing libraries. It is normal to be missing
|
|
|
|
a few libraries, including OpenCL, OSS, and libav.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
**NOTE:** For now, dxvk requires build-time components that are too new for
|
|
|
|
Debian 9. It's recommended to build the DLLs on Arch Linux, where dxvk is
|
|
|
|
actively being developed. This may be resolved in dxvk in the future, or may
|
|
|
|
be worked around by using a newer Debian release. See comments in <tt>build_proton.sh</tt>.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
Building for macOS
|
|
|
|
---
|
|
|
|
To build Proton for macOS, install the latest Xcode command line tools, as
|
|
|
|
well as cmake (for openal-soft) and a recent nasm (for libjpeg-turbo). You can
|
|
|
|
use a packager like Homebrew to find these packages. Then run:
|
|
|
|
|
|
|
|
./build_proton.sh
|
|
|
|
|
|
|
|
TODO - Surely there are other dependencies we have not listed there.
|
|
|
|
|
|
|
|
It is important to examine the output near the end of
|
2018-04-05 15:45:47 +02:00
|
|
|
<tt>build/wine.win{64,32}/config.log</tt> to ensure that you have all of the
|
2018-04-04 19:29:21 +02:00
|
|
|
relevant libraries required to build Wine properly.
|
|
|
|
|
|
|
|
---
|
|
|
|
Deploying
|
|
|
|
---
|
2018-04-05 15:45:47 +02:00
|
|
|
Once built, the <tt>dist/</tt> directory will contain the files which can be distributed
|
2018-04-04 19:29:21 +02:00
|
|
|
through Steam. For testing purposes, you should be able to clear out the files
|
2018-04-05 15:45:47 +02:00
|
|
|
in your <tt>steamapps/common/Proton</tt> directory and replace them with the contents of
|
|
|
|
<tt>dist/</tt>. The <tt>proton</tt> script will unpack the files on first run. Note that if you
|
2018-04-04 19:29:21 +02:00
|
|
|
use the Steam client to verify local files, it will restore the production version
|
|
|
|
of Proton.
|
|
|
|
|
|
|
|
Each component of this software is used under the terms of their licenses.
|
2018-04-05 15:45:47 +02:00
|
|
|
See the <tt>LICENSE</tt> files here, as well as the <tt>LICENSE</tt>, <tt>COPYING</tt>, etc files in each
|
2018-04-04 19:29:21 +02:00
|
|
|
submodule and directory for details.
|
|
|
|
|
|
|
|
|
|
|
|
----
|
|
|
|
Runtime Config Options
|
|
|
|
----
|
2018-05-17 23:37:43 +02:00
|
|
|
Proton can be tuned at runtime to help certain games run. The Steam client sets
|
|
|
|
some options for known games using the <tt>STEAM_COMPAT_CONFIG</tt> variable.
|
|
|
|
You can override these options using the environment variables described below.
|
2018-06-21 16:09:10 +02:00
|
|
|
The best way to set these environment overrides is by renaming
|
|
|
|
"user_settings.sample.py" to "user_settings.py" and modifying it appropriately.
|
|
|
|
|
2018-05-17 23:37:43 +02:00
|
|
|
To enable an option, set the variable to a non-<tt>0</tt> value. To disable an
|
2018-06-21 16:09:10 +02:00
|
|
|
option, set the variable to <tt>0</tt>. To use Steam's default configuration, do
|
|
|
|
not specify the variable at all.
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
All of the below are runtime options. They do not effect permanent changes to
|
|
|
|
the Wine prefix. Removing the option will revert to the previous behavior.
|
|
|
|
|
2018-04-05 15:45:47 +02:00
|
|
|
| Compat config string | Environment Variable | Description |
|
|
|
|
| :-------------------- | :----------------------------- | :----------- |
|
2018-05-17 23:37:43 +02:00
|
|
|
| <tt>wined3d11</tt> | <tt>PROTON_USE_WINED3D11</tt> | Use OpenGL-based wined3d instead of Vulkan-based DXVK for d3d11. |
|
|
|
|
| <tt>nod3d11</tt> | <tt>PROTON_NO_D3D11</tt> | Disable <tt>d3d11.dll</tt>, for games which can fall back to and run better with d3d9. |
|
2018-06-18 16:02:55 +02:00
|
|
|
| <tt>noesync</tt> | <tt>PROTON_NO_ESYNC</tt> | Do not use eventfd-based in-process synchronization primitives. |
|
2018-04-04 19:29:21 +02:00
|
|
|
|
|
|
|
<!-- Target: GitHub Flavor Markdown. To test locally: pandoc -f markdown_github -t html README.md -->
|