Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# Make sure you have bbe (binary block editor) installed.
# Run this from inside the Outlaws install directory.
files_to_patch=(
glide2x.dll
glide3x.dll
glide.dll
lecaur3d.dll
LECDP3.DLL
LECDSND.DLL
LECMUSIC.DLL
LECSMUSH.DLL
lecwave.dll
lecwsock.dll
Oljstick.dll
Olmouse.dll
)
backup_dir="winmm-backup"
patches_dir="patches.tmp"
mkdir $backup_dir
mkdir $patches_dir
echo "** backing up and patching..."
cp -v winmm.dll ${backup_dir}/
mv -v winmm.dll __nmm.dll
for src in ${files_to_patch[@]}
do
cp -v $src ${backup_dir}/
bbe -e "s/WINMM.dll/__NMM.dll/" $src -o ${patches_dir}/${src}
echo "'${src}' -> '${patches_dir}/${src}'"
done
echo "** enabling patches"
mv -v ${patches_dir}/* .
rmdir -v ${patches_dir}
echo "** All done. Backups are found in ${backup_dir}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.