Skip to content

Commit

Permalink
Fix some issues with buildbot scripts (#11860)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Dec 15, 2021
1 parent fcf86de commit 3781754
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions util/buildbot/buildwin32.sh
Expand Up @@ -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."

Expand Down Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions util/buildbot/buildwin64.sh
Expand Up @@ -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."

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3781754

Please sign in to comment.