Skip to content

Instantly share code, notes, and snippets.

@elfsternberg
Last active April 17, 2020 22:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elfsternberg/e3794838c2e836c5c6d49494fb78b3e8 to your computer and use it in GitHub Desktop.
Save elfsternberg/e3794838c2e836c5c6d49494fb78b3e8 to your computer and use it in GitHub Desktop.
Quick, hacky shell script to download and install Microsoft Media Framework into Proton 4.11 to support Borderlands on Steam.
#!/usr/bin/env bash
LOCATE=$(command -v locate)
if [ -z "$LOCATE" ]; then
echo "The program 'locate' is not available. Cannot determine location of steam install."
exit 1
fi
STEAMS=$(locate compatdata | grep steam | sed 's/\(steam.*compatdata\).*$/\1/' | sort | uniq | wc -l)
if [ "$STEAMS" -eq 0 ]; then
echo "Could not locate steam install."
exit 1
fi
if [ "$STEAMS" -gt 1 ]; then
echo "More than one installation of steam detected. This script can't know which one to use."
exit 1
fi
STEAMHOME=$(locate compatdata | grep steam | sed 's/\(steam.*compatdata\).*$/\1/' | sort | uniq)
git clone https://github.com/z0z0z/mf-install
git clone https://github.com/z0z0z/mf-installcab
cd mf-install || echo "Could not find mf-install" && exit 1
PROTON="$STEAMHOME/common/Proton 4.11/" WINEPREFIX="$STEAMHOME/compatdata/397540/pfx" ./mf-install.sh -proton
cd ../mf-installcab || echo "Could not find mf-installcab" && exit 1
WINEPREFIX="$STEAMHOME/compatdata/397540/pfx" ./install-mf-64.sh
cp mfplat.dll "$STEAMHOME/common/Borderlands 3/OakGame/Binaries/Win64/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment