aboutsummaryrefslogtreecommitdiff
path: root/util/buildbot
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-10-25 22:33:13 +0200
committerrubenwardy <rw@rubenwardy.com>2021-10-31 22:32:48 +0000
commit0b95da7ad3f36ad49e3dfb9d7e919d5f9fc8f57a (patch)
treed87b74739863c6931a3b95f91c7155645baa7878 /util/buildbot
parentea1396f85693ee1f752219d91adcacb32041fc84 (diff)
downloadminetest-0b95da7ad3f36ad49e3dfb9d7e919d5f9fc8f57a.tar.gz
minetest-0b95da7ad3f36ad49e3dfb9d7e919d5f9fc8f57a.tar.bz2
minetest-0b95da7ad3f36ad49e3dfb9d7e919d5f9fc8f57a.zip
Automatically package MinGW runtime in buildbot
Diffstat (limited to 'util/buildbot')
-rwxr-xr-xutil/buildbot/buildwin32.sh16
-rwxr-xr-xutil/buildbot/buildwin64.sh16
2 files changed, 24 insertions, 8 deletions
diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh
index c1edbfa1f..66f299a6a 100755
--- a/util/buildbot/buildwin32.sh
+++ b/util/buildbot/buildwin32.sh
@@ -20,16 +20,24 @@ libdir=$builddir/libs
# Test which win32 compiler is present
command -v i686-w64-mingw32-gcc >/dev/null &&
- toolchain_file=$dir/toolchain_i686-w64-mingw32.cmake
+ compiler=i686-w64-mingw32-gcc
command -v i686-w64-mingw32-gcc-posix >/dev/null &&
- toolchain_file=$dir/toolchain_i686-w64-mingw32-posix.cmake
+ compiler=i686-w64-mingw32-gcc-posix
-if [ -z "$toolchain_file" ]; then
+if [ -z "$compiler" ]; then
echo "Unable to determine which mingw32 compiler to use"
exit 1
fi
+toolchain_file=$dir/toolchain_${compiler%-gcc}.cmake
echo "Using $toolchain_file"
+tmp=$(dirname "$(command -v $compiler)")/../i686-w64-mingw32/bin
+runtime_dlls=
+[ -d "$tmp" ] && runtime_dlls=$(echo $tmp/lib{gcc_,stdc++-,winpthread-}*.dll | tr ' ' ';')
+[ -z "$runtime_dlls" ] &&
+ echo "The compiler runtime DLLs could not be found, they might be missing in the final package."
+
+# Get stuff
irrlicht_version=1.9.0mt3
ogg_version=1.3.4
vorbis_version=1.3.7
@@ -63,7 +71,6 @@ download () {
fi
}
-# Get stuff
cd $libdir
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win32.zip" irrlicht-$irrlicht_version.zip
download "http://minetest.kitsunemimi.pw/zlib-$zlib_version-win32.zip"
@@ -108,6 +115,7 @@ cmake -S $sourcedir -B . \
-DCMAKE_INSTALL_PREFIX=/tmp \
-DVERSION_EXTRA=$git_hash \
-DBUILD_CLIENT=1 -DBUILD_SERVER=0 \
+ -DEXTRA_DLL="$runtime_dll" \
\
-DENABLE_SOUND=1 \
-DENABLE_CURL=1 \
diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh
index 134bc08de..e9b17c420 100755
--- a/util/buildbot/buildwin64.sh
+++ b/util/buildbot/buildwin64.sh
@@ -20,16 +20,24 @@ libdir=$builddir/libs
# Test which win64 compiler is present
command -v x86_64-w64-mingw32-gcc >/dev/null &&
- toolchain_file=$dir/toolchain_x86_64-w64-mingw32.cmake
+ compiler=x86_64-w64-mingw32
command -v x86_64-w64-mingw32-gcc-posix >/dev/null &&
- toolchain_file=$dir/toolchain_x86_64-w64-mingw32-posix.cmake
+ compiler=x86_64-w64-mingw32-posix
-if [ -z "$toolchain_file" ]; then
+if [ -z "$compiler" ]; then
echo "Unable to determine which mingw32 compiler to use"
exit 1
fi
+toolchain_file=$dir/toolchain_${compiler%-gcc}.cmake
echo "Using $toolchain_file"
+tmp=$(dirname "$(command -v $compiler)")/../x86_64-w64-mingw32/bin
+runtime_dlls=
+[ -d "$tmp" ] && runtime_dlls=$(echo $tmp/lib{gcc_,stdc++-,winpthread-}*.dll | tr ' ' ';')
+[ -z "$runtime_dlls" ] &&
+ echo "The compiler runtime DLLs could not be found, they might be missing in the final package."
+
+# Get stuff
irrlicht_version=1.9.0mt3
ogg_version=1.3.4
vorbis_version=1.3.7
@@ -63,7 +71,6 @@ download () {
fi
}
-# Get stuff
cd $libdir
download "https://github.com/minetest/irrlicht/releases/download/$irrlicht_version/win64.zip" irrlicht-$irrlicht_version.zip
download "http://minetest.kitsunemimi.pw/zlib-$zlib_version-win64.zip"
@@ -108,6 +115,7 @@ cmake -S $sourcedir -B . \
-DCMAKE_INSTALL_PREFIX=/tmp \
-DVERSION_EXTRA=$git_hash \
-DBUILD_CLIENT=1 -DBUILD_SERVER=0 \
+ -DEXTRA_DLL="$runtime_dll" \
\
-DENABLE_SOUND=1 \
-DENABLE_CURL=1 \