summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml55
-rw-r--r--.github/workflows/main.yml20
-rw-r--r--.travis.yml58
-rw-r--r--core/bind/core_bind.cpp4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp14
-rwxr-xr-xmisc/ci/android-tools-linux.sh (renamed from misc/travis/android-tools-linux.sh)0
-rw-r--r--misc/ci/sources.list4
-rwxr-xr-xmisc/travis/ccache-osx.sh43
-rw-r--r--scene/gui/tree.cpp8
-rw-r--r--thirdparty/README.md3
-rw-r--r--thirdparty/misc/stb_vorbis.c15
11 files changed, 49 insertions, 175 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
deleted file mode 100644
index 0173657e80..0000000000
--- a/.appveyor.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-image: Visual Studio 2019
-
-platform: x64
-
-environment:
- HOME: "%HOMEDRIVE%%HOMEPATH%"
- PYTHON: C:\Python38
- SCONS_CACHE_ROOT: "%HOME%\\scons_cache"
- SCONS_CACHE_LIMIT: 1024
- OPTIONS: "debug_symbols=no verbose=yes progress=no"
- EXTRA_ARGS: "warnings=all werror=yes"
- matrix:
- - GD_PLATFORM: windows
- TARGET: release_debug
- TOOLS: yes
-# Disabled for performance reasons until master is more stable.
-# - GD_PLATFORM: windows
-# TARGET: release
-# TOOLS: no
-
-matrix:
- fast_finish: true
-
-init:
- - ps: if ($env:APPVEYOR_REPO_BRANCH -ne "master") { $env:APPVEYOR_CACHE_SKIP_SAVE = "true" }
-
-cache:
- - "%SCONS_CACHE_ROOT%"
-
-install:
- - SET "PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
- - pip install -U wheel # needed for pip install scons to work, otherwise a flag is missing
- - pip install scons # use stable scons
- - if defined VS call "%VS%" %ARCH% # if defined - so we can also use mingw
-
-before_build:
- - echo %GD_PLATFORM%
- - python --version
- - scons --version
- - set "SCONS_CACHE=%SCONS_CACHE_ROOT%\%APPVEYOR_REPO_BRANCH%"
-
-build_script:
- - scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% %OPTIONS% %EXTRA_ARGS%
-
-after_build:
- - git rev-parse --short=9 HEAD > VERSION_HASH.txt
- - set /P VERSION_HASH= < VERSION_HASH.txt
- - cd bin
- - mv godot.windows.opt.tools.64.exe godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.exe
- - 7z a -mx9 godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.zip *.exe
-
-artifacts:
- - path: bin/godot_${APPVEYOR_REPO_BRANCH}-${VERSION_HASH}_win64.zip
- name: Win64 release_debug editor build
- type: zip
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index da597a9706..77554ea0ef 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -87,7 +87,7 @@ jobs:
${{runner.os}}-template
${{runner.os}}
- # Use python 3.x release (works cross platform)
+ # Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
@@ -216,7 +216,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- # install all packages (except scons)
+ # Azure repositories are not reliable, we need to prevent azure giving us packages.
+ - name: Make apt sources.list use the default Ubuntu repositories
+ run: |
+ sudo cp -f misc/ci/sources.list /etc/apt/sources.list
+ sudo apt-get update
+
+ # Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
@@ -267,7 +273,13 @@ jobs:
steps:
- uses: actions/checkout@v2
- # install all packages (except scons)
+ # Azure repositories are not reliable, we need to prevent azure giving us packages.
+ - name: Make apt sources.list use the default Ubuntu repositories
+ run: |
+ sudo cp -f misc/ci/sources.list /etc/apt/sources.list
+ sudo apt-get update
+
+ # Install all packages (except scons)
- name: Configure dependencies
run: |
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
@@ -287,7 +299,7 @@ jobs:
${{runner.os}}-template
${{runner.os}}
- # Use python 3.x release (works cross platform)
+ # Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
diff --git a/.travis.yml b/.travis.yml
index 9c085d4ce0..2ade6a1a12 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,7 +11,6 @@ env:
- SCONS_CACHE=$HOME/.scons_cache/$TRAVIS_BRANCH
- SCONS_CACHE_LIMIT=1024
- OPTIONS="debug_symbols=no verbose=yes progress=no"
- - secure: "uch9QszCgsl1qVbuzY41P7S2hWL2IiNFV4SbAYRCdi0oJ9MIu+pVyrQdpf3+jG4rH6j4Rffl+sN17Zz4dIDDioFL1JwqyCqyCyswR8uACC0Rr8gr4Mi3+HIRbv+2s2P4cIQq41JM8FJe84k9jLEMGCGh69w+ibCWoWs74CokYVA="
cache:
directories:
@@ -19,32 +18,6 @@ cache:
matrix:
include:
- - name: Linux editor (debug, GCC 9, with Mono)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-mono-gcc-9 MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" EXTRA_ARGS="module_mono_enabled=yes mono_glue=no warnings=extra werror=yes"
- os: linux
- compiler: gcc-9
- addons:
- apt:
- sources:
- - sourceline: "deb https://download.mono-project.com/repo/ubuntu stable-bionic main"
- key_url: "https://raw.githubusercontent.com/travis-ci/apt-source-safelist/master/keys/mono.asc"
- - sourceline: "ppa:ubuntu-toolchain-r/test"
- packages:
- - &gcc9_deps [gcc-9, g++-9]
- - &linux_deps [libasound2-dev, libgl1-mesa-dev, libglu1-mesa-dev, libx11-dev, libxcursor-dev, libxi-dev, libxinerama-dev, libxrandr-dev]
- - &linux_mono_deps [mono-devel, msbuild, nuget]
-
- - name: Linux export template (release, Clang 7)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
- os: linux
- compiler: clang
- addons:
- apt:
- packages:
- - *linux_deps
-
- name: Android export template (release_debug, Clang)
stage: build
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
@@ -55,18 +28,6 @@ matrix:
packages:
- openjdk-8-jdk
- - name: macOS editor (debug, Clang)
- stage: build
- env: PLATFORM=osx TOOLS=yes TARGET=debug CACHE_NAME=${PLATFORM}-tools-clang EXTRA_ARGS="warnings=extra werror=yes"
- os: osx
- osx_image: xcode11.5
- compiler: clang
- addons:
- homebrew:
- packages:
- - scons
- update: true
-
# TODO: iOS MoltenVK support
# - name: iOS export template (debug, Clang)
@@ -80,16 +41,6 @@ matrix:
# packages:
# - scons
- - name: Linux export template (release_debug, GCC 7, without 3D support)
- stage: build
- env: PLATFORM=linuxbsd TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-gcc-7 EXTRA_ARGS="disable_3d=yes"
- os: linux
- compiler: gcc
- addons:
- apt:
- packages:
- - *linux_deps
-
- name: JavaScript export template (release, emscripten latest)
stage: build
env: PLATFORM=javascript TOOLS=no TARGET=release CACHE_NAME=${PLATFORM}-emcc-latest EXTRA_ARGS="use_closure_compiler=yes"
@@ -113,7 +64,7 @@ install:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64;
export PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin:${PATH};
java -version;
- misc/travis/android-tools-linux.sh;
+ misc/ci/android-tools-linux.sh;
fi
- if [ "$PLATFORM" = "javascript" ]; then
git clone --depth 1 "https://github.com/emscripten-core/emsdk.git";
@@ -128,9 +79,4 @@ before_script:
fi
script:
- - scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS &&
- if [ "$TEST_PROJECT" = "yes" ]; then
- git clone --depth 1 "https://github.com/godotengine/godot-tests.git";
- sed -i "s:custom_template/release=\"\":custom_template/release=\"$(readlink -e bin/godot_server.linuxbsd.opt.tools.64)\":" godot-tests/tests/project_export/export_presets.cfg;
- godot-tests/tests/project_export/test_project.sh "bin/godot_server.linuxbsd.opt.tools.64";
- fi
+ - scons -j2 CC=$CC CXX=$CXX platform=$PLATFORM tools=$TOOLS target=$TARGET $OPTIONS $EXTRA_ARGS
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp
index 94da74cbda..2f8b11652b 100644
--- a/core/bind/core_bind.cpp
+++ b/core/bind/core_bind.cpp
@@ -1690,7 +1690,7 @@ String _Directory::get_current_dir() {
}
Error _Directory::make_dir(String p_dir) {
- ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
+ ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir(p_dir);
@@ -1701,7 +1701,7 @@ Error _Directory::make_dir(String p_dir) {
}
Error _Directory::make_dir_recursive(String p_dir) {
- ERR_FAIL_COND_V_MSG(!is_open(), ERR_UNCONFIGURED, "Directory must be opened before use.");
+ ERR_FAIL_COND_V_MSG(!d, ERR_UNCONFIGURED, "Directory is not configured properly.");
if (!p_dir.is_rel_path()) {
DirAccess *d = DirAccess::create_for_path(p_dir);
Error err = d->make_dir_recursive(p_dir);
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 44913abe8b..3c6556a310 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2045,10 +2045,10 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
if ((b->get_alt() && !b->get_control()) || tool == TOOL_MOVE) {
List<CanvasItem *> selection = _get_edited_canvas_items();
- // Remove not movable nodes
+ drag_selection.clear();
for (int i = 0; i < selection.size(); i++) {
- if (!_is_node_movable(selection[i], true)) {
- selection.erase(selection[i]);
+ if (_is_node_movable(selection[i], true)) {
+ drag_selection.push_back(selection[i]);
}
}
@@ -2073,7 +2073,6 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
}
drag_from = transform.affine_inverse().xform(b->get_position());
- drag_selection = selection;
_save_canvas_item_state(drag_selection);
}
return true;
@@ -2395,16 +2394,15 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
// Drag the node(s) if requested
List<CanvasItem *> selection2 = _get_edited_canvas_items();
- // Remove not movable nodes
+ drag_selection.clear();
for (int i = 0; i < selection2.size(); i++) {
- if (!_is_node_movable(selection2[i], true)) {
- selection2.erase(selection2[i]);
+ if (_is_node_movable(selection2[i], true)) {
+ drag_selection.push_back(selection2[i]);
}
}
if (selection2.size() > 0) {
drag_type = DRAG_MOVE;
- drag_selection = selection2;
drag_from = click;
_save_canvas_item_state(drag_selection);
}
diff --git a/misc/travis/android-tools-linux.sh b/misc/ci/android-tools-linux.sh
index 6114551861..6114551861 100755
--- a/misc/travis/android-tools-linux.sh
+++ b/misc/ci/android-tools-linux.sh
diff --git a/misc/ci/sources.list b/misc/ci/sources.list
new file mode 100644
index 0000000000..4d8f94f35c
--- /dev/null
+++ b/misc/ci/sources.list
@@ -0,0 +1,4 @@
+deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
diff --git a/misc/travis/ccache-osx.sh b/misc/travis/ccache-osx.sh
deleted file mode 100755
index 5ce7a80cbc..0000000000
--- a/misc/travis/ccache-osx.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-
-echo
-echo "Download and install ccache ..."
-echo
-
-echo "Downloading sources ..."
-curl -L -O https://www.samba.org/ftp/ccache/ccache-3.3.4.tar.gz # latest version available here: https://ccache.samba.org/download.html
-
-echo "Extracting to build directory ..."
-tar xzf ccache-3.3.4.tar.gz
-cd ccache-3.3.4
-
-echo "Compiling sources ..."
-./configure --prefix=/usr/local --with-bundled-zlib > /dev/null
-make
-
-echo "Installing ..."
-
-mkdir /usr/local/opt/ccache
-
-mkdir /usr/local/opt/ccache/bin
-cp ccache /usr/local/opt/ccache/bin
-ln -s /usr/local/opt/ccache/bin/ccache /usr/local/bin/ccache
-
-mkdir /usr/local/opt/ccache/libexec
-links=(
- clang
- clang++
- cc
- gcc gcc2 gcc3 gcc-3.3 gcc-4.0 gcc-4.2 gcc-4.3 gcc-4.4 gcc-4.5 gcc-4.6 gcc-4.7 gcc-4.8 gcc-4.9 gcc-5 gcc-6 gcc-7
- c++ c++3 c++-3.3 c++-4.0 c++-4.2 c++-4.3 c++-4.4 c++-4.5 c++-4.6 c++-4.7 c++-4.8 c++-4.9 c++-5 c++-6 c++-7
- g++ g++2 g++3 g++-3.3 g++-4.0 g++-4.2 g++-4.3 g++-4.4 g++-4.5 g++-4.6 g++-4.7 g++-4.8 g++-4.9 g++-5 g++-6 g++-7
-)
-for link in "${links[@]}"; do
- ln -s ../bin/ccache /usr/local/opt/ccache/libexec/$link
-done
-#/usr/local/bin/ccache -M 2G
-cd $TRAVIS_BUILD_DIR
-
-echo
-echo "Done!"
-echo
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 47761d724e..eeb7f9430d 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -3419,6 +3419,8 @@ void Tree::scroll_to_item(TreeItem *p_item) {
TreeItem *Tree::_search_item_text(TreeItem *p_at, const String &p_find, int *r_col, bool p_selectable, bool p_backwards) {
TreeItem *from = p_at;
+ TreeItem *loop = nullptr; // Safe-guard against infinite loop.
+
while (p_at) {
for (int i = 0; i < columns.size(); i++) {
if (p_at->get_text(i).findn(p_find) == 0 && (!p_selectable || p_at->is_selectable(i))) {
@@ -3438,6 +3440,12 @@ TreeItem *Tree::_search_item_text(TreeItem *p_at, const String &p_find, int *r_c
if ((p_at) == from) {
break;
}
+
+ if (!loop) {
+ loop = p_at;
+ } else if (loop == p_at) {
+ break;
+ }
}
return nullptr;
diff --git a/thirdparty/README.md b/thirdparty/README.md
index 43cd448a00..392abea85e 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -426,9 +426,8 @@ Collection of single-file libraries used in Godot components.
* License: zlib
- `stb_vorbis.c`
* Upstream: https://github.com/nothings/stb
- * Version: 1.19
+ * Version: 1.20
* License: Public Domain (Unlicense) or MIT
- * Modifications: `f->temp_offset += (sz+3)&~3;` changed to `f->temp_offset += (sz+7)&~7;` (needed until fixed upstream)
## nanosvg
diff --git a/thirdparty/misc/stb_vorbis.c b/thirdparty/misc/stb_vorbis.c
index 52c9c666a2..a8cbfa6c23 100644
--- a/thirdparty/misc/stb_vorbis.c
+++ b/thirdparty/misc/stb_vorbis.c
@@ -1,4 +1,4 @@
-// Ogg Vorbis audio decoder - v1.19 - public domain
+// Ogg Vorbis audio decoder - v1.20 - public domain
// http://nothings.org/stb_vorbis/
//
// Original version written by Sean Barrett in 2007.
@@ -31,9 +31,11 @@
// Phillip Bennefall Rohit Thiago Goulart
// github:manxorist saga musix github:infatum
// Timur Gagiev Maxwell Koo Peter Waller
-// github:audinowho Dougall Johnson
+// github:audinowho Dougall Johnson David Reid
+// github:Clownacy Pedro J. Estebanez Remi Verschelde
//
// Partial history:
+// 1.20 - 2020-07-11 - several small fixes
// 1.19 - 2020-02-05 - warnings
// 1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc warnings etc.
// 1.17 - 2019-07-08 - fix CVE-2019-13217..CVE-2019-13223 (by ForAllSecure)
@@ -577,7 +579,7 @@ enum STBVorbisError
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <malloc.h>
#endif
- #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__)
+ #if defined(__linux__) || defined(__linux) || defined(__EMSCRIPTEN__) || defined(__NEWLIB__)
#include <alloca.h>
#endif
#else // STB_VORBIS_NO_CRT
@@ -599,7 +601,9 @@ enum STBVorbisError
#undef __forceinline
#endif
#define __forceinline
+ #ifndef alloca
#define alloca __builtin_alloca
+ #endif
#elif !defined(_MSC_VER)
#if __GNUC__
#define __forceinline inline
@@ -1600,7 +1604,8 @@ static uint32 get_bits(vorb *f, int n)
f->valid_bits += 8;
}
}
- if (f->valid_bits < 0) return 0;
+
+ assert(f->valid_bits >= n);
z = f->acc & ((1 << n)-1);
f->acc >>= n;
f->valid_bits -= n;
@@ -4256,7 +4261,7 @@ static void vorbis_init(stb_vorbis *p, const stb_vorbis_alloc *z)
memset(p, 0, sizeof(*p)); // NULL out all malloc'd pointers to start
if (z) {
p->alloc = *z;
- p->alloc.alloc_buffer_length_in_bytes = (p->alloc.alloc_buffer_length_in_bytes+3) & ~3;
+ p->alloc.alloc_buffer_length_in_bytes &= ~7;
p->temp_offset = p->alloc.alloc_buffer_length_in_bytes;
}
p->eof = 0;