binary patching support

This commit is contained in:
2021-02-22 12:57:13 +03:00
parent b660c5f1b0
commit 7a3eb21954
6 changed files with 39 additions and 24 deletions

View File

@ -60,6 +60,7 @@ function game_update ()
elif updates_aviable; then
instance_stop
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg +exit
apply_patch
instance_start
else
echo "Server is up to date"
@ -96,6 +97,7 @@ function game_validate ()
fi
instance_stop
steamcmd +login $SteamLogin +force_install_dir $InstallDir +app_update $AppServerNum $BetaArg validate +exit
apply_patch
fix_steamclient_so
instance_start
}
@ -200,6 +202,7 @@ function first_install ()
fix_steamclient_so
ln -s "$InstanceConfigDir" "$DefaultConfigDir/instances"
make_default_instance
apply_patch
echo "KF2 succesfully installed"
}
@ -275,6 +278,13 @@ function make_default_instance () # $1: Dir
fix_ini_eol "$InstanceDir"
}
function apply_patch ()
{
if [[ -x "$PatchDir/kf2-ranked-patch" ]]; then
"$PatchDir/kf2-ranked-patch" "$AppBin"
fi
}
function fix_ini_eol () # $1: Dir
{
find "$1" \( -type l -o -type f \) -name '*.ini' | \