1
0

add checks for build dependencies

This commit is contained in:
GenZmeY 2023-04-03 05:08:57 +03:00
parent fbd47e013d
commit afd68517f9

18
builder
View File

@ -63,8 +63,10 @@ SteamLibFoldersVdf="$SteamPath/steamapps/libraryfolders.vdf"
# Usefull KF2 executables / Paths / Configs # Usefull KF2 executables / Paths / Configs
KFDoc="$DocumentsPath/My Games/KillingFloor2" KFDoc="$DocumentsPath/My Games/KillingFloor2"
KFPath="$(steamlib_by_steamid "232090")/steamapps/common/killingfloor2" KFSteamLibraryFolder="$(steamlib_by_steamid "232090")"
KFSDKPath="$(steamlib_by_steamid "232150")/steamapps/common/killingfloor2" KFSDKSteamLibraryFolder="$(steamlib_by_steamid "232150")"
KFPath="$KFSteamLibraryFolder/steamapps/common/killingfloor2"
KFSDKPath="$KFSDKSteamLibraryFolder/steamapps/common/killingfloor2"
KFDev="$KFSDKPath/Development/Src" KFDev="$KFSDKPath/Development/Src"
KFWin64="$KFSDKPath/Binaries/Win64" KFWin64="$KFSDKPath/Binaries/Win64"
KFEditor="$KFWin64/KFEditor.exe" KFEditor="$KFWin64/KFEditor.exe"
@ -1067,7 +1069,17 @@ function main ()
export PATH="$PATH:$ThirdPartyBin" export PATH="$PATH:$ThirdPartyBin"
# Checks # Checks
if [[ "$KFPath" != "$KFSDKPath" ]]; then if [[ -z "$KFSteamLibraryFolder" ]]; then
err "\"Killing Floor 2\" not found"
fi
if [[ -z "$KFSDKSteamLibraryFolder" ]]; then
err "\"Killing Floor 2 - SDK\" not found"
fi
if [[ -z "$KFSteamLibraryFolder" ]] || [[ -z "$KFSDKSteamLibraryFolder" ]]; then
die "" 1
elif [[ "$KFPath" != "$KFSDKPath" ]]; then
warn "\"Killing Floor 2\" and \"Killing Floor 2 - SDK\" installed in different steam library folders." warn "\"Killing Floor 2\" and \"Killing Floor 2 - SDK\" installed in different steam library folders."
warn "If you get errors, install them in the same steam library folder." warn "If you get errors, install them in the same steam library folder."
fi fi