Skip to content

Instantly share code, notes, and snippets.

@Aposhian
Created January 6, 2022 02:14
Show Gist options
  • Save Aposhian/f3ab71a617047fb4c538d0611294ab9e to your computer and use it in GitHub Desktop.
Save Aposhian/f3ab71a617047fb4c538d0611294ab9e to your computer and use it in GitHub Desktop.
Age of Empires II: Definitive Edition Proton Trick
#!/usr/bin/env bash
set -ex
STEAM_DIR=/data/steam/steamapps
AOE2DE_DIR=$STEAM_DIR/compatdata/813780
AOE2DE_WIN_DIR=$AOE2DE_DIR/pfx/drive_c/windows
AOE2DE_WIN_SYS32_DIR=$AOE2DE_WIN_DIR/system32
AOE2DE_WIN_SYS64_DIR=$AOE2DE_WIN_DIR/syswow64
function cleanup() {
local arch=$1
rm -f vc_redist.$arch.exe
rm -rf 0 a{0..11} u{0..31}
}
function backup() {
local timestamp=$(date +%s)
mv ucrtbase.dll ucrtbase.dll.bak-$timestamp
mv concrt140.dll concrt140.dll.bak-$timestamp
mv msvcp140.dll msvcp140.dll.bak-$timestamp
mv vcamp140.dll vcamp140.dll.bak-$timestamp
mv vccorlib140.dll vccorlib140.dll.bak-$timestamp
mv vcomp140.dll vcomp140.dll.bak-$timestamp
mv vcruntime140.dll vcruntime140.dll.bak-$timestamp
}
function download_and_replace() {
local arch=$1
wget https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.$arch.exe
cabextract vc_redist.$arch.exe
cabextract a10
}
function replace_dlls() {
local dir=$1
local arch=$2
cd $dir
backup
cleanup $arch
download_and_replace $arch
cleanup $arch
}
replace_dlls $AOE2DE_WIN_SYS32_DIR x64
replace_dlls $AOE2DE_WIN_SYS64_DIR x86
rm -rf $STEAM_DIR/common/AoE2DE/resources/_common/movies
rm -rf $STEAM_DIR/common/AoE2DE/resources/en/campaign/movies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment