1
0

some more fixes

This commit is contained in:
GenZmeY 2022-01-15 05:48:16 +03:00
parent d6fc39d057
commit dd0bf0a09e
4 changed files with 16 additions and 10 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
3rd-party-bin 3rd-party-bin
shellcheck.exe

View File

@ -1 +1,4 @@
# KF2-Builder # KF2-BuildTools
git submodule add https://github.com/GenZmeY/KF2-BuildTools tools
./tools/builder -i

18
builder
View File

@ -164,7 +164,7 @@ function merge_packages () # $1: Mutator name
if [[ -n "$UpkList" ]]; then if [[ -n "$UpkList" ]]; then
ModificationTime=$(stat -c %y "$KFWin64/$1.u") ModificationTime=$(stat -c %y "$KFWin64/$1.u")
CMD //C "cd \"$(cygpath -w "$KFWin64")\" && $(basename \""$KFEditorMergePackages"\") make $UpkList $1.u" & CMD //C "cd /D $(cygpath -w "$KFWin64") && $(basename "$KFEditorMergePackages") make $UpkList $1.u" &
PID="$!" PID="$!"
while ps -p "$PID" &> /dev/null while ps -p "$PID" &> /dev/null
do do
@ -194,9 +194,9 @@ function compile ()
local PID="" local PID=""
read_build_settings read_build_settings
if ! command -v multini &> /dev/null; then if ! command -v multini &> /dev/null; then
get_latest_multini "$ThirdPartyBin" get_latest_multini "$ThirdPartyBin/multini.exe"
fi fi
backup_kfeditorconf backup_kfeditorconf
@ -227,7 +227,7 @@ function compile ()
cp -rf "$MutConfig"/* "$KFUnpublishConfig" cp -rf "$MutConfig"/* "$KFUnpublishConfig"
fi fi
CMD //C "$(cygpath -w "$KFEditor")" make -stripsource -useunpublished & CMD //C "$(cygpath -w "$KFEditor") make -stripsource -useunpublished" &
PID="$!" PID="$!"
while ps -p "$PID" &> /dev/null while ps -p "$PID" &> /dev/null
do do
@ -276,7 +276,7 @@ function brew ()
mkdir -p "$KFPublishBrewedPC" mkdir -p "$KFPublishBrewedPC"
CMD //C "cd \"$(cygpath -w "$KFWin64")\" && \"$(basename "$KFEditor")\" brewcontent -platform=PC $PackageUpload -useunpublished" & CMD //C "cd /D $(cygpath -w "$KFWin64") && $(basename "$KFEditor") brewcontent -platform=PC $PackageUpload -useunpublished" &
PID="$!" PID="$!"
while ps -p "$PID" &> /dev/null while ps -p "$PID" &> /dev/null
do do
@ -355,9 +355,9 @@ function upload ()
\$PackageDirectory \"$(cygpath -w "$PreparedWsDir")\" \$PackageDirectory \"$(cygpath -w "$PreparedWsDir")\"
EOF EOF
cp -rf "$KFPublish"/* "$PreparedWsDir" cp -rf "$KFPublish" "$PreparedWsDir"
CMD //C "$(cygpath -w "$KFWorkshop")" "$(basename "$MutWsInfo")" CMD //C "$(cygpath -w "$KFWorkshop") $(basename "$MutWsInfo")"
rm -rf "$PreparedWsDir" rm -rf "$PreparedWsDir"
rm -f "$MutWsInfo" rm -f "$MutWsInfo"
@ -368,6 +368,8 @@ function init_test ()
local AviableMutators="" local AviableMutators=""
local AviableGamemodes="" local AviableGamemodes=""
read_build_settings
for Package in $PackageUpload for Package in $PackageUpload
do do
# find available mutators # find available mutators
@ -439,7 +441,7 @@ function run_test ()
if ! brewed; then UseUnpublished="-useunpublished"; fi if ! brewed; then UseUnpublished="-useunpublished"; fi
CMD //C "$(cygpath -w "$KFGame")" "$Map?Difficulty=$Difficulty?GameLength=$GameLength?Game=$Game?Mutator=$Mutators?$Args" "$UseUnpublished" -log CMD //C "$(cygpath -w "$KFGame") $Map?Difficulty=$Difficulty?GameLength=$GameLength?Game=$Game?Mutator=$Mutators?$Args $UseUnpublished" -log
} }
export PATH="$PATH:$ThirdPartyBin" export PATH="$PATH:$ThirdPartyBin"

View File

@ -14,7 +14,7 @@ function get_latest () # $1: Reponame, $2: filename, $3: output filename
local LatestTag=$(curl --silent "$ApiUrl" | grep -Po '"tag_name": "\K.*?(?=")') local LatestTag=$(curl --silent "$ApiUrl" | grep -Po '"tag_name": "\K.*?(?=")')
local DownloadUrl="https://github.com/$1/releases/download/$LatestTag/$2" local DownloadUrl="https://github.com/$1/releases/download/$LatestTag/$2"
mkdir -p $(dirname "$3") mkdir -p "$(dirname "$3")/"
curl -LJs "$DownloadUrl" -o "$3" curl -LJs "$DownloadUrl" -o "$3"
} }