Skip to content

Instantly share code, notes, and snippets.

Last active Feb 27, 2022
What would you like to do?
# Modify to get the user folder
export WORKDIR="${HOME}/.faforever/linux"
export WINEPREFIX="${WORKDIR}/prefix"
export GAMEDIR="/mnt/hdd/Games/Supreme Commander Forged Alliance"
export PROTONVERSION="5.13-6-proton"
#export PROTONVERSION="6.3-4-proton"
export DXVKVERSION=1.9.1
# Useful environment variables
export WINEDLLOVERRIDES="mscoree,mshtml="
export DXVK_HUD=fps
export MANGOHUD=1
# Ensure this exists
mkdir -p "${WORKDIR}"
if [ -d "${WORKDIR}/wine" ]; then
echo "Wine already downloaded"
echo "Downloading wine"
# Enter temporary directory
TMP="$(mktemp -d)"
cd "${TMP}"
wget "$PROTONVERSION/wine-$PROTONVERSION-amd64.tar.xz"
tar xf *.tar.xz
rm *.tar.xz
mv "wine-$PROTONVERSION-amd64" "${WORKDIR}/wine"
# Get rid of temporary directory
rm -rf "${TMP}"
export PATH="${WORKDIR}/wine/bin":"${PATH}"
# 2
# Create and prepare wine prefix
if [ -d "${WINEPREFIX}" ]; then
echo "Wine prefix already set up"
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 ""
chmod +x winetricks
./winetricks dlls d3dx9
./winetricks dlls xact
# Download DXVK
wget "$DXVKVERSION/dxvk-$DXVKVERSION.tar.gz"
tar xzf dxvk-$DXVKVERSION.tar.gz
./ install
rm -rf "${TMP}"
# 3
# Run game
cd "${GAMEDIR}"
wine64 "${HOME}/.faforever/bin/ForgedAlliance.exe" "$@"
Copy link

jnorthrup commented Feb 27, 2022

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