diff options
author | sfan5 <sfan5@live.de> | 2021-12-15 14:36:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-15 14:36:27 +0100 |
commit | 378175497a6a5bb3492f268f71b8d55389e33fc4 (patch) | |
tree | 894330797813be5b94fbdae24e61e97c6ffb1a97 /util | |
parent | fcf86ded8f8f5f0b0da9a59e4e9035838bf19d01 (diff) | |
download | minetest-378175497a6a5bb3492f268f71b8d55389e33fc4.tar.gz minetest-378175497a6a5bb3492f268f71b8d55389e33fc4.tar.bz2 minetest-378175497a6a5bb3492f268f71b8d55389e33fc4.zip |
Fix some issues with buildbot scripts (#11860)
Diffstat (limited to 'util')
-rwxr-xr-x | util/buildbot/buildwin32.sh | 13 | ||||
-rwxr-xr-x | util/buildbot/buildwin64.sh | 13 |
2 files changed, 22 insertions, 4 deletions
diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh index cdf6105d1..696297aed 100755 --- a/util/buildbot/buildwin32.sh +++ b/util/buildbot/buildwin32.sh @@ -31,9 +31,16 @@ fi toolchain_file=$dir/toolchain_${compiler/-gcc/}.cmake echo "Using $toolchain_file" -tmp=$(dirname "$(command -v $compiler)")/../i686-w64-mingw32/bin +# Try to find runtime DLLs in various paths (varies by distribution, sigh) +tmp=$(dirname "$(command -v $compiler)")/.. runtime_dlls= -[ -d "$tmp" ] && runtime_dlls=$(echo $tmp/lib{gcc_,stdc++-,winpthread-}*.dll | tr ' ' ';') +for name in lib{gcc_,stdc++-,winpthread-}'*'.dll; do + for dir in $tmp/i686-w64-mingw32/{bin,lib} $tmp/lib/gcc/i686-w64-mingw32/*; do + [ -d "$dir" ] || continue + file=$(echo $dir/$name) + [ -f "$file" ] && { runtime_dlls+="$file;"; break; } + done +done [ -z "$runtime_dlls" ] && echo "The compiler runtime DLLs could not be found, they might be missing in the final package." @@ -89,10 +96,12 @@ download "http://minetest.kitsunemimi.pw/openal_stripped.zip" '' unzip_nofolder if [ -n "$EXISTING_MINETEST_DIR" ]; then sourcedir="$( cd "$EXISTING_MINETEST_DIR" && pwd )" else + cd $builddir sourcedir=$PWD/$CORE_NAME [ -d $CORE_NAME ] && { pushd $CORE_NAME; git pull; popd; } || \ git clone -b $CORE_BRANCH $CORE_GIT $CORE_NAME if [ -z "$NO_MINETEST_GAME" ]; then + cd $sourcedir [ -d games/$GAME_NAME ] && { pushd games/$GAME_NAME; git pull; popd; } || \ git clone -b $GAME_BRANCH $GAME_GIT games/$GAME_NAME fi diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh index f8ff3cfdd..20d0b3a6a 100755 --- a/util/buildbot/buildwin64.sh +++ b/util/buildbot/buildwin64.sh @@ -31,9 +31,16 @@ fi toolchain_file=$dir/toolchain_${compiler/-gcc/}.cmake echo "Using $toolchain_file" -tmp=$(dirname "$(command -v $compiler)")/../x86_64-w64-mingw32/bin +# Try to find runtime DLLs in various paths (varies by distribution, sigh) +tmp=$(dirname "$(command -v $compiler)")/.. runtime_dlls= -[ -d "$tmp" ] && runtime_dlls=$(echo $tmp/lib{gcc_,stdc++-,winpthread-}*.dll | tr ' ' ';') +for name in lib{gcc_,stdc++-,winpthread-}'*'.dll; do + for dir in $tmp/x86_64-w64-mingw32/{bin,lib} $tmp/lib/gcc/x86_64-w64-mingw32/*; do + [ -d "$dir" ] || continue + file=$(echo $dir/$name) + [ -f "$file" ] && { runtime_dlls+="$file;"; break; } + done +done [ -z "$runtime_dlls" ] && echo "The compiler runtime DLLs could not be found, they might be missing in the final package." @@ -89,10 +96,12 @@ download "http://minetest.kitsunemimi.pw/openal_stripped64.zip" 'openal_stripped if [ -n "$EXISTING_MINETEST_DIR" ]; then sourcedir="$( cd "$EXISTING_MINETEST_DIR" && pwd )" else + cd $builddir sourcedir=$PWD/$CORE_NAME [ -d $CORE_NAME ] && { pushd $CORE_NAME; git pull; popd; } || \ git clone -b $CORE_BRANCH $CORE_GIT $CORE_NAME if [ -z "$NO_MINETEST_GAME" ]; then + cd $sourcedir [ -d games/$GAME_NAME ] && { pushd games/$GAME_NAME; git pull; popd; } || \ git clone -b $GAME_BRANCH $GAME_GIT games/$GAME_NAME fi |