aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rwxr-xr-xutil/buildbot/buildwin32.sh40
-rwxr-xr-xutil/buildbot/buildwin64.sh29
-rw-r--r--util/buildbot/toolchain_i586-mingw32msvc.cmake (renamed from util/buildbot/toolchain_mingw.cmake)0
-rw-r--r--util/buildbot/toolchain_i646-w64-mingw32.cmake17
-rw-r--r--util/buildbot/toolchain_x86_64-w64-mingw32.cmake (renamed from util/buildbot/toolchain_mingw64.cmake)0
-rwxr-xr-xutil/travis/before_install.sh10
-rw-r--r--util/travis/clang-format-whitelist.txt15
-rwxr-xr-xutil/travis/clangtidy.sh4
-rw-r--r--util/travis/common.sh12
-rw-r--r--util/travis/lint.sh4
-rwxr-xr-xutil/travis/script.sh2
11 files changed, 87 insertions, 46 deletions
diff --git a/util/buildbot/buildwin32.sh b/util/buildbot/buildwin32.sh
index 1478bc926..a57aa7f3c 100755
--- a/util/buildbot/buildwin32.sh
+++ b/util/buildbot/buildwin32.sh
@@ -1,6 +1,13 @@
#!/bin/bash
set -e
+CORE_GIT=https://github.com/minetest/minetest
+CORE_BRANCH=master
+CORE_NAME=minetest
+GAME_GIT=https://github.com/minetest/minetest_game
+GAME_BRANCH=master
+GAME_NAME=minetest_game
+
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ $# -ne 1 ]; then
echo "Usage: $0 <build directory>"
@@ -12,16 +19,27 @@ builddir="$( cd "$builddir" && pwd )"
packagedir=$builddir/packages
libdir=$builddir/libs
-toolchain_file=$dir/toolchain_mingw.cmake
+# Test which win32 compiler is present
+which i586-mingw32msvc-windres > /dev/null 2>&1 && toolchain_file=$dir/toolchain_i586-mingw32msvc.cmake
+which i686-w64-mingw32-windres > /dev/null 2>&1 && toolchain_file=$dir/toolchain_i646-w64-mingw32.cmake
+
+if [ -z "$toolchain_file" ]
+then
+ echo "Unable to determine which mingw32 compiler to use"
+ exit 1
+else
+ echo "Using $toolchain_file"
+fi
+
irrlicht_version=1.8.4
ogg_version=1.3.2
vorbis_version=1.3.5
-curl_version=7.54.0
+curl_version=7.65.3
gettext_version=0.19.8.1
-freetype_version=2.8
-sqlite3_version=3.19.2
+freetype_version=2.9.1
+sqlite3_version=3.27.2
luajit_version=2.1.0-beta3
-leveldb_version=1.19
+leveldb_version=1.20
zlib_version=1.2.11
mkdir -p $packagedir
@@ -70,22 +88,22 @@ cd $libdir
# Get minetest
cd $builddir
if [ ! "x$EXISTING_MINETEST_DIR" = "x" ]; then
- ln -s $EXISTING_MINETEST_DIR minetest
+ ln -s $EXISTING_MINETEST_DIR $CORE_NAME
else
- [ -d minetest ] && (cd minetest && git pull) || (git clone https://github.com/minetest/minetest)
+ [ -d $CORE_NAME ] && (cd $CORE_NAME && git pull) || (git clone -b $CORE_BRANCH $CORE_GIT)
fi
-cd minetest
+cd $CORE_NAME
git_hash=$(git rev-parse --short HEAD)
# Get minetest_game
cd games
if [ "x$NO_MINETEST_GAME" = "x" ]; then
- [ -d minetest_game ] && (cd minetest_game && git pull) || (git clone https://github.com/minetest/minetest_game)
+ [ -d $GAME_NAME ] && (cd $GAME_NAME && git pull) || (git clone -b $GAME_BRANCH $GAME_GIT)
fi
cd ../..
# Build the thing
-cd minetest
+cd $CORE_NAME
[ -d _build ] && rm -Rf _build/
mkdir _build
cd _build
@@ -149,7 +167,7 @@ cmake .. \
-DLEVELDB_LIBRARY=$libdir/leveldb/lib/libleveldb.dll.a \
-DLEVELDB_DLL=$libdir/leveldb/bin/libleveldb.dll
-make -j2
+make -j$(nproc)
[ "x$NO_PACKAGE" = "x" ] && make package
diff --git a/util/buildbot/buildwin64.sh b/util/buildbot/buildwin64.sh
index 81fbf43fa..92715fa64 100755
--- a/util/buildbot/buildwin64.sh
+++ b/util/buildbot/buildwin64.sh
@@ -1,6 +1,13 @@
#!/bin/bash
set -e
+CORE_GIT=https://github.com/minetest/minetest
+CORE_BRANCH=master
+CORE_NAME=minetest
+GAME_GIT=https://github.com/minetest/minetest_game
+GAME_BRANCH=master
+GAME_NAME=minetest_game
+
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ $# -ne 1 ]; then
echo "Usage: $0 <build directory>"
@@ -12,16 +19,16 @@ builddir="$( cd "$builddir" && pwd )"
packagedir=$builddir/packages
libdir=$builddir/libs
-toolchain_file=$dir/toolchain_mingw64.cmake
+toolchain_file=$dir/toolchain_x86_64-w64-mingw32.cmake
irrlicht_version=1.8.4
ogg_version=1.3.2
vorbis_version=1.3.5
-curl_version=7.54.0
+curl_version=7.65.3
gettext_version=0.19.8.1
-freetype_version=2.8
-sqlite3_version=3.19.2
+freetype_version=2.9.1
+sqlite3_version=3.27.2
luajit_version=2.1.0-beta3
-leveldb_version=1.19
+leveldb_version=1.20
zlib_version=1.2.11
mkdir -p $packagedir
@@ -71,22 +78,22 @@ cd $libdir
# Get minetest
cd $builddir
if [ ! "x$EXISTING_MINETEST_DIR" = "x" ]; then
- ln -s $EXISTING_MINETEST_DIR minetest
+ ln -s $EXISTING_MINETEST_DIR $CORE_NAME
else
- [ -d minetest ] && (cd minetest && git pull) || (git clone https://github.com/minetest/minetest)
+ [ -d $CORE_NAME ] && (cd $CORE_NAME && git pull) || (git clone -b $CORE_BRANCH $CORE_GIT)
fi
-cd minetest
+cd $CORE_NAME
git_hash=$(git rev-parse --short HEAD)
# Get minetest_game
cd games
if [ "x$NO_MINETEST_GAME" = "x" ]; then
- [ -d minetest_game ] && (cd minetest_game && git pull) || (git clone https://github.com/minetest/minetest_game)
+ [ -d $GAME_NAME ] && (cd $GAME_NAME && git pull) || (git clone -b $GAME_BRANCH $GAME_GIT)
fi
cd ../..
# Build the thing
-cd minetest
+cd $CORE_NAME
[ -d _build ] && rm -Rf _build/
mkdir _build
cd _build
@@ -150,7 +157,7 @@ cmake .. \
-DLEVELDB_LIBRARY=$libdir/leveldb/lib/libleveldb.dll.a \
-DLEVELDB_DLL=$libdir/leveldb/bin/libleveldb.dll
-make -j2
+make -j$(nproc)
[ "x$NO_PACKAGE" = "x" ] && make package
diff --git a/util/buildbot/toolchain_mingw.cmake b/util/buildbot/toolchain_i586-mingw32msvc.cmake
index 0eeefb84d..0eeefb84d 100644
--- a/util/buildbot/toolchain_mingw.cmake
+++ b/util/buildbot/toolchain_i586-mingw32msvc.cmake
diff --git a/util/buildbot/toolchain_i646-w64-mingw32.cmake b/util/buildbot/toolchain_i646-w64-mingw32.cmake
new file mode 100644
index 000000000..015baa210
--- /dev/null
+++ b/util/buildbot/toolchain_i646-w64-mingw32.cmake
@@ -0,0 +1,17 @@
+# name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
diff --git a/util/buildbot/toolchain_mingw64.cmake b/util/buildbot/toolchain_x86_64-w64-mingw32.cmake
index 9a7ed82d8..9a7ed82d8 100644
--- a/util/buildbot/toolchain_mingw64.cmake
+++ b/util/buildbot/toolchain_x86_64-w64-mingw32.cmake
diff --git a/util/travis/before_install.sh b/util/travis/before_install.sh
index 19c40ef90..fe9243583 100755
--- a/util/travis/before_install.sh
+++ b/util/travis/before_install.sh
@@ -4,14 +4,14 @@ echo "Preparing for $TRAVIS_COMMIT_RANGE"
. util/travis/common.sh
-if [[ "${LINT}" == "1" ]]; then
+if [[ ! -z "${CLANG_FORMAT}" ]]; then
exit 0
fi
needs_compile || exit 0
-if [[ $PLATFORM == "Unix" ]] || [[ $CLANG_TIDY == "1" ]]; then
- if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ $CLANG_TIDY == "1" ]]; then
+if [[ $PLATFORM == "Unix" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
+ if [[ $TRAVIS_OS_NAME == "linux" ]] || [[ ! -z "${CLANG_TIDY}" ]]; then
install_linux_deps
else
install_macosx_deps
@@ -20,9 +20,7 @@ elif [[ $PLATFORM == "Win32" ]]; then
sudo apt-get update
sudo apt-get install p7zip-full
wget http://minetest.kitsunemimi.pw/mingw-w64-i686_7.1.1_ubuntu14.04.7z -O mingw.7z
- sed -e "s|%PREFIX%|i686-w64-mingw32|" \
- -e "s|%ROOTPATH%|/usr/i686-w64-mingw32|" \
- < util/travis/toolchain_mingw.cmake.in > util/buildbot/toolchain_mingw.cmake
+ # buildwin32.sh detects the installed toolchain automatically
sudo 7z x -y -o/usr mingw.7z
elif [[ $PLATFORM == "Win64" ]]; then
sudo apt-get update
diff --git a/util/travis/clang-format-whitelist.txt b/util/travis/clang-format-whitelist.txt
index e196daf73..0b36dcd57 100644
--- a/util/travis/clang-format-whitelist.txt
+++ b/util/travis/clang-format-whitelist.txt
@@ -155,6 +155,8 @@ src/genericobject.cpp
src/genericobject.h
src/gettext.cpp
src/gettext.h
+src/gui/guiButton.cpp
+src/gui/guiButton.h
src/gui/guiChatConsole.cpp
src/gui/guiChatConsole.h
src/gui/guiConfirmRegistration.cpp
@@ -169,6 +171,9 @@ src/gui/guiMainMenu.h
src/gui/guiPasswordChange.cpp
src/gui/guiPathSelectMenu.cpp
src/gui/guiPathSelectMenu.h
+src/gui/guiScrollBar.cpp
+src/gui/guiSkin.cpp
+src/gui/guiSkin.h
src/gui/guiTable.cpp
src/gui/guiTable.h
src/gui/guiVolumeChange.cpp
@@ -213,14 +218,14 @@ src/mapgen/cavegen.cpp
src/mapgen/cavegen.h
src/mapgen/dungeongen.cpp
src/mapgen/dungeongen.h
+src/mapgen/mapgen.cpp
+src/mapgen/mapgen.h
src/mapgen/mapgen_carpathian.cpp
src/mapgen/mapgen_carpathian.h
-src/mapgen/mapgen.cpp
src/mapgen/mapgen_flat.cpp
src/mapgen/mapgen_flat.h
src/mapgen/mapgen_fractal.cpp
src/mapgen/mapgen_fractal.h
-src/mapgen/mapgen.h
src/mapgen/mapgen_singlenode.cpp
src/mapgen/mapgen_singlenode.h
src/mapgen/mapgen_v5.cpp
@@ -291,9 +296,6 @@ src/porting_android.h
src/porting.cpp
src/porting.h
src/profiler.h
-src/quicktune.cpp
-src/quicktune.h
-src/quicktune_shortcutter.h
src/raycast.cpp
src/raycast.h
src/reflowscan.cpp
@@ -459,6 +461,9 @@ src/util/numeric.h
src/util/pointedthing.cpp
src/util/pointedthing.h
src/util/pointer.h
+src/util/quicktune.h
+src/util/quicktune_shortcutter.h
+src/util/quicktune.cpp
src/util/serialize.cpp
src/util/serialize.h
src/util/sha1.cpp
diff --git a/util/travis/clangtidy.sh b/util/travis/clangtidy.sh
index 7ed555693..5b00115c8 100755
--- a/util/travis/clangtidy.sh
+++ b/util/travis/clangtidy.sh
@@ -3,9 +3,7 @@
needs_compile || exit 0
-if hash clang-tidy-5.0 2>/dev/null; then
- CLANG_TIDY=clang-tidy-5.0
-else
+if [ -z "${CLANG_TIDY}" ]; then
CLANG_TIDY=clang-tidy
fi
diff --git a/util/travis/common.sh b/util/travis/common.sh
index 949540967..b4406866e 100644
--- a/util/travis/common.sh
+++ b/util/travis/common.sh
@@ -7,15 +7,15 @@ set_linux_compiler_env() {
elif [[ "${COMPILER}" == "gcc-6" ]]; then
export CC=gcc-6
export CXX=g++-6
- elif [[ "${COMPILER}" == "gcc-7" ]]; then
- export CC=gcc-7
- export CXX=g++-7
+ elif [[ "${COMPILER}" == "gcc-8" ]]; then
+ export CC=gcc-8
+ export CXX=g++-8
elif [[ "${COMPILER}" == "clang-3.6" ]]; then
export CC=clang-3.6
export CXX=clang++-3.6
- elif [[ "${COMPILER}" == "clang-5.0" ]]; then
- export CC=clang-5.0
- export CXX=clang++-5.0
+ elif [[ "${COMPILER}" == "clang-7" ]]; then
+ export CC=clang-7
+ export CXX=clang++-7
fi
}
diff --git a/util/travis/lint.sh b/util/travis/lint.sh
index 887e621f5..b3027c689 100644
--- a/util/travis/lint.sh
+++ b/util/travis/lint.sh
@@ -1,9 +1,7 @@
#! /bin/bash
function perform_lint() {
echo "Performing LINT..."
- if hash clang-format-5.0 2>/dev/null; then
- CLANG_FORMAT=clang-format-5.0
- else
+ if [ -z "${CLANG_FORMAT}" ]; then
CLANG_FORMAT=clang-format
fi
echo "LINT: Using binary $CLANG_FORMAT"
diff --git a/util/travis/script.sh b/util/travis/script.sh
index 32e8d2e36..19aa2fdf7 100755
--- a/util/travis/script.sh
+++ b/util/travis/script.sh
@@ -4,7 +4,7 @@
needs_compile || exit 0
-if [[ "$LINT" == "1" ]]; then
+if [[ ! -z "${CLANG_FORMAT}" ]]; then
# Lint and exit CI
perform_lint
exit 0