Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@p4block
Last active March 4, 2023 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p4block/8d947f85fa707b433af359a699b367fb to your computer and use it in GitHub Desktop.
Save p4block/8d947f85fa707b433af359a699b367fb to your computer and use it in GitHub Desktop.
FAF
# Modify to get the user folder
export WORKDIR="${HOME}/.faforever/linux-prefix"
export WINEPREFIX="${WORKDIR}/prefix"
export DXVKVERSION=2.1
# Useful environment variables
export WINEDLLOVERRIDES="mscoree,mshtml="
export DXVK_HUD=fps,api
export MANGOHUD=1
# Ensure this exists
mkdir -p "${WORKDIR}"
if [ -d "${WORKDIR}/wine" ]; then
echo "Wine already downloaded"
else
echo "Downloading wine"
# Enter temporary directory
TMP="$(mktemp -d)"
cd "${TMP}"
#wget "https://github.com/GloriousEggroll/wine-ge-custom/releases/download/GE-Proton7-36/wine-lutris-GE-Proton7-36-x86_64.tar.xz"
#wget "https://github.com/Kron4ek/Wine-Builds/releases/download/7.22/wine-7.22-amd64.tar.xz"
wget "https://github.com/Kron4ek/Wine-Builds/releases/download/7.0-6-proton/wine-7.0-6-proton-amd64.tar.xz"
tar xf *.tar.xz
rm *.tar.xz
mv * "${WORKDIR}/wine"
# Get rid of temporary directory
rm -rf "${TMP}"
fi
export PATH="${WORKDIR}/wine/bin":"${PATH}"
# 2
# Create and prepare wine prefix
if [ ! -d "${WINEPREFIX}" ]; then
echo "Wine prefix already set up"
else
echo "Setting up wine prefix"
mkdir -p "${WINEPREFIX}"
# Enter temporary directory
TMP="$(mktemp -d)"
cd "${TMP}"
# Download winetricks and install dx9, even though it is unused due to dxvk
# This game is just weird
# Please reimplement in Spring engine
wget "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"
chmod +x winetricks
./winetricks dlls d3dx9
./winetricks dlls xact
#Download DXVK
wget "https://github.com/doitsujin/dxvk/releases/download/v$DXVKVERSION/dxvk-$DXVKVERSION.tar.gz"
tar xzf dxvk-$DXVKVERSION.tar.gz
cd dxvk-$DXVKVERSION
wget "https://raw.githubusercontent.com/doitsujin/dxvk/6335f065c3ead7047f6a68832917e24df9d44a81/setup_dxvk.sh"
./setup_dxvk.sh install
rm -rf "${TMP}"
fi
# 3
# Run game
wine winecfg
wine "${HOME}/.faforever/bin/ForgedAlliance.exe" /nomovie "$@"
@jnorthrup
Copy link

if this works there's no reason to spend any time doing the exact same things in proton-tricks. i haven't peeked at whatever run-scripts came iwth my FAF install, i just recognized bash could not parse the windows executable and went for a spot fix in the java code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment