Last active
December 25, 2020 12:55
-
-
Save iczero/fa8204aff0304e17b4c887cb92a42630 to your computer and use it in GitHub Desktop.
this script will probably not build proton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build Proton. Hopefully. | |
# Note: DO NOT ACTUALLY RUN THIS SCRIPT. Copy/paste each command so if something goes wrong this thing | |
# doesn't murder your system by accident. | |
# You should probably run this in a container. | |
# If you decide to stop it when it is building wine32, make sure you reinstall the 64-bit versions of | |
# the libraries so you don't have a massive headache while trying to build 64-bit things later on. | |
git clone --depth 10 https://github.com/ValveSoftware/Proton ./proton --recursive --shallow-submodule | |
cd proton | |
# reset all the submodules, no clue why this is needed | |
git submodule foreach git reset --hard | |
# common dependencies | |
sudo apt install git ca-certificates curl gnupg2 software-properties-common gpgv2 gnupg2 gcc g++ g++-multilib mingw-w64 meson | |
# from Vagrantfile, needed for dxvk | |
sudo update-alternatives --set x86_64-w64-mingw32-gcc $(which x86_64-w64-mingw32-gcc-posix) | |
sudo update-alternatives --set x86_64-w64-mingw32-g++ $(which x86_64-w64-mingw32-g++-posix) | |
sudo update-alternatives --set i686-w64-mingw32-gcc $(which i686-w64-mingw32-gcc-posix) | |
sudo update-alternatives --set i686-w64-mingw32-g++ $(which i686-w64-mingw32-g++-posix) | |
# wine build dependencies | |
# NOTE: if apt complains that it can't find :i386 packages, do sudo dpkg --add-architecture i386 | |
# if updating a previous build, start here and run the following commented out commands: | |
# $ rm -rf proton-build | |
# $ git pull | |
# $ git checkout <new tag> | |
# $ git submodule update --remote | |
# NOTE: proton 4.2 does not set the correct branch for the wine submodule, if that is the case, add | |
# "branch = proton_4.2" to the wine entry in .gitmodules, then run git submodule update --remote again | |
sudo apt install autoconf autotools-dev bison flex fontforge gawk gettext libacl1-dev libasound2-dev libavcodec-dev libcapi20-dev libdbus-1-dev libfontconfig1-dev libfreetype6-dev libgl1-mesa-dev libglu1-mesa-dev libgphoto2-dev libgsm1-dev libice-dev libjpeg-dev libkrb5-dev liblcms2-dev libldap2-dev libmpg123-dev libopenal-dev libosmesa6-dev libpng-dev libpulse-dev libsane-dev libssl-dev libudev-dev libv4l-dev libva-dev libvulkan-dev libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxi-dev libxrandr-dev libxrender-dev libxt-dev libpango1.0-dev libicu-dev libharfbuzz-dev libgnutls28-dev libasound2-dev:i386 libavcodec-dev:i386 libcapi20-dev:i386 libdbus-1-dev:i386 libfontconfig1-dev:i386 libfreetype6-dev:i386 libgl1-mesa-dev:i386 libglu1-mesa-dev:i386 libgphoto2-dev:i386 libgsm1-dev:i386 libice-dev:i386 libjpeg-dev:i386 libkrb5-dev:i386 liblcms2-dev:i386 libldap2-dev:i386 libmpg123-dev:i386 libopenal-dev:i386 libosmesa6-dev:i386 libpng-dev:i386 libpulse-dev:i386 libsane-dev:i386 libssl-dev:i386 libudev-dev:i386 libv4l-dev:i386 libva-dev:i386 libvulkan-dev:i386 libx11-dev:i386 libxcomposite-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxi-dev:i386 libxrandr-dev:i386 libxrender-dev:i386 libxt-dev:i386 libgnutls28-dev:i386 | |
mkdir proton-build | |
cd proton-build | |
../configure.sh --no-steam-runtime | |
# these are required by wine32 | |
sudo apt install libsdl2-dev:i386 libcups2-dev:i386 libtiff-dev:i386 libxml2-dev:i386 libxslt-dev:i386 libicu-dev:i386 libgtk-3-dev:i386 | |
# if the above command fails, add libmirclient-dev:i386, then run the below command | |
# sudo apt remove libmirclient-dev:amd64 | |
# build faudio32, required by wine32 | |
make faudio32 | |
# build wine32 | |
make wine32 | |
# dxvk wants to make sure windows executables run | |
export PATH=$(realpath .)/obj-wine32:$PATH | |
export WINEPREFIX=$(realpath .)/temp-wineprefix32 | |
# build dxvk | |
make dxvk32 | |
rm -rf $WINEPREFIX | |
# build vrclient | |
make vrclient32 | |
# clean up the mess and build wine64 and the rest of proton | |
sudo apt install libsdl2-dev libcups2-dev libtiff-dev libxml2-dev libxslt1-dev libicu-dev libgtk-3-dev | |
# only run the following command if the above command complains about libmirclient | |
# sudo apt remove libmirclient-dev:i386 | |
make faudio64 | |
make wine64 | |
export PATH=$(realpath .)/obj-wine64:$PATH | |
export WINEPREFIX=$(realpath .)/temp-wineprefix64 | |
make dxvk64 | |
rm -rf $WINEPREFIX | |
# build the rest of proton | |
make vrclient64 | |
make dist | |
# the output will be in the dist folder | |
# hopefully it worked | |
# to run: | |
# mkdir ~/.proton | |
# STEAM_COMPAT_DATA_PATH=$HOME/.proton ./proton run ~/.proton/pfx/drive_c/windows/notepad.exe | |
# the proton executable should be in proton-build/dist |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment