summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SConstruct40
-rw-r--r--core/SCsub16
-rw-r--r--core/input/SCsub2
-rw-r--r--doc/classes/CollisionObject2D.xml8
-rw-r--r--editor/SCsub21
-rw-r--r--editor/icons/SCsub10
-rw-r--r--main/SCsub13
-rw-r--r--methods.py13
-rw-r--r--modules/SCsub18
-rw-r--r--modules/bullet/godot_result_callbacks.cpp2
-rw-r--r--modules/denoise/SCsub1
-rw-r--r--modules/gdnative/SCsub3
-rw-r--r--modules/gdscript/gdscript_analyzer.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_assembly.cpp2
-rw-r--r--platform/android/export/export.cpp172
-rw-r--r--platform_methods.py11
-rw-r--r--scene/main/scene_tree.cpp8
-rw-r--r--scene/main/viewport.cpp14
-rw-r--r--servers/physics_2d/space_2d_sw.cpp7
-rw-r--r--servers/physics_3d/space_3d_sw.cpp6
20 files changed, 222 insertions, 151 deletions
diff --git a/SConstruct b/SConstruct
index 7ec926f99b..96d2f1abe7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -84,6 +84,7 @@ env_base.__class__.add_shared_library = methods.add_shared_library
env_base.__class__.add_library = methods.add_library
env_base.__class__.add_program = methods.add_program
env_base.__class__.CommandNoCache = methods.CommandNoCache
+env_base.__class__.Run = methods.Run
env_base.__class__.disable_warnings = methods.disable_warnings
env_base.__class__.module_check_dependencies = methods.module_check_dependencies
@@ -627,27 +628,24 @@ if selected_platform in platform_list:
methods.no_verbose(sys, env)
if not env["platform"] == "server":
- env.Append(
- BUILDERS={
- "GLES2_GLSL": env.Builder(
- action=run_in_subprocess(gles_builders.build_gles2_headers), suffix="glsl.gen.h", src_suffix=".glsl"
- )
- }
- )
- env.Append(
- BUILDERS={
- "RD_GLSL": env.Builder(
- action=run_in_subprocess(gles_builders.build_rd_headers), suffix="glsl.gen.h", src_suffix=".glsl"
- )
- }
- )
- env.Append(
- BUILDERS={
- "GLSL_HEADER": env.Builder(
- action=run_in_subprocess(gles_builders.build_raw_headers), suffix="glsl.gen.h", src_suffix=".glsl"
- )
- }
- )
+ GLSL_BUILDERS = {
+ "GLES2_GLSL": env.Builder(
+ action=env.Run(gles_builders.build_gles2_headers, 'Building GLES2_GLSL header: "$TARGET"'),
+ suffix="glsl.gen.h",
+ src_suffix=".glsl",
+ ),
+ "RD_GLSL": env.Builder(
+ action=env.Run(gles_builders.build_rd_headers, 'Building RD_GLSL header: "$TARGET"'),
+ suffix="glsl.gen.h",
+ src_suffix=".glsl",
+ ),
+ "GLSL_HEADER": env.Builder(
+ action=env.Run(gles_builders.build_raw_headers, 'Building GLSL header: "$TARGET"'),
+ suffix="glsl.gen.h",
+ src_suffix=".glsl",
+ ),
+ }
+ env.Append(BUILDERS=GLSL_BUILDERS)
scons_cache_path = os.environ.get("SCONS_CACHE")
if scons_cache_path != None:
diff --git a/core/SCsub b/core/SCsub
index 80a5f6b623..d08f17c60a 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -149,28 +149,34 @@ env.Depends(
env.CommandNoCache(
"#core/io/certs_compressed.gen.h",
"#thirdparty/certs/ca-certificates.crt",
- run_in_subprocess(core_builders.make_certs_header),
+ env.Run(core_builders.make_certs_header, "Building ca-certificates header."),
)
# Make binders
env.CommandNoCache(
["method_bind.gen.inc", "method_bind_ext.gen.inc", "method_bind_free_func.gen.inc"],
"make_binders.py",
- run_in_subprocess(make_binders.run),
+ env.Run(make_binders.run, "Generating method binders."),
)
# Authors
env.Depends("#core/authors.gen.h", "../AUTHORS.md")
-env.CommandNoCache("#core/authors.gen.h", "../AUTHORS.md", run_in_subprocess(core_builders.make_authors_header))
+env.CommandNoCache(
+ "#core/authors.gen.h", "../AUTHORS.md", env.Run(core_builders.make_authors_header, "Generating authors header."),
+)
# Donors
env.Depends("#core/donors.gen.h", "../DONORS.md")
-env.CommandNoCache("#core/donors.gen.h", "../DONORS.md", run_in_subprocess(core_builders.make_donors_header))
+env.CommandNoCache(
+ "#core/donors.gen.h", "../DONORS.md", env.Run(core_builders.make_donors_header, "Generating donors header."),
+)
# License
env.Depends("#core/license.gen.h", ["../COPYRIGHT.txt", "../LICENSE.txt"])
env.CommandNoCache(
- "#core/license.gen.h", ["../COPYRIGHT.txt", "../LICENSE.txt"], run_in_subprocess(core_builders.make_license_header)
+ "#core/license.gen.h",
+ ["../COPYRIGHT.txt", "../LICENSE.txt"],
+ env.Run(core_builders.make_license_header, "Generating license header."),
)
# Chain load SCsubs
diff --git a/core/input/SCsub b/core/input/SCsub
index c641819698..f40978911b 100644
--- a/core/input/SCsub
+++ b/core/input/SCsub
@@ -16,7 +16,7 @@ env.Depends("#core/input/default_controller_mappings.gen.cpp", controller_databa
env.CommandNoCache(
"#core/input/default_controller_mappings.gen.cpp",
controller_databases,
- run_in_subprocess(input_builders.make_default_controller_mappings),
+ env.Run(input_builders.make_default_controller_mappings, "Generating default controller mappings."),
)
env.add_source_files(env.core_sources, "*.cpp")
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index bf82e921fb..e8f7a59e4c 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -217,7 +217,7 @@
</methods>
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true">
- If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events.
+ If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set.
</member>
</members>
<signals>
@@ -229,17 +229,17 @@
<argument index="2" name="shape_idx" type="int">
</argument>
<description>
- Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code]. See [method _input_event] for details.
+ Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details.
</description>
</signal>
<signal name="mouse_entered">
<description>
- Emitted when the mouse pointer enters any of this object's shapes.
+ Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set.
</description>
</signal>
<signal name="mouse_exited">
<description>
- Emitted when the mouse pointer exits all this object's shapes.
+ Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set.
</description>
</signal>
</signals>
diff --git a/editor/SCsub b/editor/SCsub
index 651dd5fffd..a976c4ed12 100644
--- a/editor/SCsub
+++ b/editor/SCsub
@@ -7,7 +7,6 @@ env.editor_sources = []
import os
import os.path
import glob
-from platform_methods import run_in_subprocess
import editor_builders
@@ -61,7 +60,11 @@ if env["tools"]:
docs = sorted(docs)
env.Depends("#editor/doc_data_compressed.gen.h", docs)
- env.CommandNoCache("#editor/doc_data_compressed.gen.h", docs, run_in_subprocess(editor_builders.make_doc_header))
+ env.CommandNoCache(
+ "#editor/doc_data_compressed.gen.h",
+ docs,
+ env.Run(editor_builders.make_doc_header, "Generating documentation header."),
+ )
path = env.Dir(".").abspath
@@ -69,14 +72,18 @@ if env["tools"]:
tlist = glob.glob(path + "/translations/*.po")
env.Depends("#editor/editor_translations.gen.h", tlist)
env.CommandNoCache(
- "#editor/editor_translations.gen.h", tlist, run_in_subprocess(editor_builders.make_editor_translations_header)
+ "#editor/editor_translations.gen.h",
+ tlist,
+ env.Run(editor_builders.make_editor_translations_header, "Generating editor translations header."),
)
# Documentation translations
tlist = glob.glob(env.Dir("#doc").abspath + "/translations/*.po")
env.Depends("#editor/doc_translations.gen.h", tlist)
env.CommandNoCache(
- "#editor/doc_translations.gen.h", tlist, run_in_subprocess(editor_builders.make_doc_translations_header)
+ "#editor/doc_translations.gen.h",
+ tlist,
+ env.Run(editor_builders.make_doc_translations_header, "Generating translations header."),
)
# Fonts
@@ -84,7 +91,11 @@ if env["tools"]:
flist.extend(glob.glob(path + "/../thirdparty/fonts/*.otf"))
flist.sort()
env.Depends("#editor/builtin_fonts.gen.h", flist)
- env.CommandNoCache("#editor/builtin_fonts.gen.h", flist, run_in_subprocess(editor_builders.make_fonts_header))
+ env.CommandNoCache(
+ "#editor/builtin_fonts.gen.h",
+ flist,
+ env.Run(editor_builders.make_fonts_header, "Generating builtin fonts header."),
+ )
env.add_source_files(env.editor_sources, "*.cpp")
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index e143276259..dd4243d750 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -4,14 +4,14 @@ Import("env")
import os
-from platform_methods import run_in_subprocess
import editor_icons_builders
-make_editor_icons_builder = Builder(
- action=run_in_subprocess(editor_icons_builders.make_editor_icons_action), suffix=".h", src_suffix=".svg"
-)
-env["BUILDERS"]["MakeEditorIconsBuilder"] = make_editor_icons_builder
+env["BUILDERS"]["MakeEditorIconsBuilder"] = Builder(
+ action=env.Run(editor_icons_builders.make_editor_icons_action, "Generating editor icons header."),
+ suffix=".h",
+ src_suffix=".svg",
+)
# Editor's own icons
icon_sources = Glob("*.svg")
diff --git a/main/SCsub b/main/SCsub
index 97f77840f1..ebadefd450 100644
--- a/main/SCsub
+++ b/main/SCsub
@@ -2,7 +2,6 @@
Import("env")
-from platform_methods import run_in_subprocess
import main_builders
env.main_sources = []
@@ -15,15 +14,21 @@ if env["tests"]:
env_main.Append(CPPDEFINES=["TESTS_ENABLED"])
env_main.Depends("#main/splash.gen.h", "#main/splash.png")
-env_main.CommandNoCache("#main/splash.gen.h", "#main/splash.png", run_in_subprocess(main_builders.make_splash))
+env_main.CommandNoCache(
+ "#main/splash.gen.h", "#main/splash.png", env.Run(main_builders.make_splash, "Building splash screen header."),
+)
env_main.Depends("#main/splash_editor.gen.h", "#main/splash_editor.png")
env_main.CommandNoCache(
- "#main/splash_editor.gen.h", "#main/splash_editor.png", run_in_subprocess(main_builders.make_splash_editor)
+ "#main/splash_editor.gen.h",
+ "#main/splash_editor.png",
+ env.Run(main_builders.make_splash_editor, "Building editor splash screen header."),
)
env_main.Depends("#main/app_icon.gen.h", "#main/app_icon.png")
-env_main.CommandNoCache("#main/app_icon.gen.h", "#main/app_icon.png", run_in_subprocess(main_builders.make_app_icon))
+env_main.CommandNoCache(
+ "#main/app_icon.gen.h", "#main/app_icon.png", env.Run(main_builders.make_app_icon, "Building application icon."),
+)
lib = env_main.add_library("main", env.main_sources)
env.Prepend(LIBS=[lib])
diff --git a/methods.py b/methods.py
index fe93db4797..65b0e2dd6b 100644
--- a/methods.py
+++ b/methods.py
@@ -4,6 +4,11 @@ import glob
import subprocess
from collections import OrderedDict
+# We need to define our own `Action` method to control the verbosity of output
+# and whenever we need to run those commands in a subprocess on some platforms.
+from SCons.Script import Action
+from platform_methods import run_in_subprocess
+
def add_source_files(self, sources, files, warn_duplicates=True):
# Convert string to list of absolute paths (including expanding wildcard)
@@ -621,6 +626,14 @@ def CommandNoCache(env, target, sources, command, **args):
return result
+def Run(env, function, short_message, subprocess=True):
+ output_print = short_message if not env["verbose"] else ""
+ if not subprocess:
+ return Action(function, output_print)
+ else:
+ return Action(run_in_subprocess(function), output_print)
+
+
def detect_darwin_sdk_path(platform, env):
sdk_name = ""
if platform == "osx":
diff --git a/modules/SCsub b/modules/SCsub
index 2d774306e4..edfc4ed9c6 100644
--- a/modules/SCsub
+++ b/modules/SCsub
@@ -10,14 +10,28 @@ env_modules = env.Clone()
Export("env_modules")
# Header with MODULE_*_ENABLED defines.
-env.CommandNoCache("modules_enabled.gen.h", Value(env.module_list), modules_builders.generate_modules_enabled)
+env.CommandNoCache(
+ "modules_enabled.gen.h",
+ Value(env.module_list),
+ env.Run(
+ modules_builders.generate_modules_enabled,
+ "Generating enabled modules header.",
+ # NOTE: No need to run in subprocess since this is still executed serially.
+ subprocess=False,
+ ),
+)
# Header to be included in `tests/test_main.cpp` to run module-specific tests.
if env["tests"]:
env.CommandNoCache(
"modules_tests.gen.h",
Value(env.module_list),
- Action(modules_builders.generate_modules_tests, "Generating modules tests header."),
+ env.Run(
+ modules_builders.generate_modules_tests,
+ "Generating modules tests header.",
+ # NOTE: No need to run in subprocess since this is still executed serially.
+ subprocess=False,
+ ),
)
env.AlwaysBuild("modules_tests.gen.h")
diff --git a/modules/bullet/godot_result_callbacks.cpp b/modules/bullet/godot_result_callbacks.cpp
index e1f950dad1..f82648d6ff 100644
--- a/modules/bullet/godot_result_callbacks.cpp
+++ b/modules/bullet/godot_result_callbacks.cpp
@@ -57,7 +57,7 @@ bool GodotFilterCallback::needBroadphaseCollision(btBroadphaseProxy *proxy0, btB
bool GodotClosestRayResultCallback::needsCollision(btBroadphaseProxy *proxy0) const {
const bool needs = GodotFilterCallback::test_collision_filters(m_collisionFilterGroup, m_collisionFilterMask, proxy0->m_collisionFilterGroup, proxy0->m_collisionFilterMask);
- if (m_pickRay || needs) {
+ if (needs) {
btCollisionObject *btObj = static_cast<btCollisionObject *>(proxy0->m_clientObject);
CollisionObjectBullet *gObj = static_cast<CollisionObjectBullet *>(btObj->getUserPointer());
diff --git a/modules/denoise/SCsub b/modules/denoise/SCsub
index 0fa65c6296..bf3bd7d073 100644
--- a/modules/denoise/SCsub
+++ b/modules/denoise/SCsub
@@ -1,7 +1,6 @@
#!/usr/bin/env python
import resource_to_cpp
-from platform_methods import run_in_subprocess
Import("env")
Import("env_modules")
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index cab05549d2..0e2291c1f9 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -22,13 +22,12 @@ SConscript("pluginscript/SCsub")
SConscript("videodecoder/SCsub")
-from platform_methods import run_in_subprocess
import gdnative_builders
_, gensource = env_gdnative.CommandNoCache(
["include/gdnative_api_struct.gen.h", "gdnative_api_struct.gen.cpp"],
"gdnative_api.json",
- run_in_subprocess(gdnative_builders.build_gdnative_api_struct),
+ env.Run(gdnative_builders.build_gdnative_api_struct, "Generating GDNative API."),
)
env_gdnative.add_source_files(env.modules_sources, [gensource])
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp
index 0843a54106..4098425518 100644
--- a/modules/gdscript/gdscript_analyzer.cpp
+++ b/modules/gdscript/gdscript_analyzer.cpp
@@ -1430,6 +1430,12 @@ void GDScriptAnalyzer::reduce_assignment(GDScriptParser::AssignmentNode *p_assig
}
void GDScriptAnalyzer::reduce_await(GDScriptParser::AwaitNode *p_await) {
+ if (p_await->to_await == nullptr) {
+ GDScriptParser::DataType await_type;
+ await_type.kind = GDScriptParser::DataType::VARIANT;
+ p_await->set_datatype(await_type);
+ return;
+ }
if (p_await->to_await->type == GDScriptParser::Node::CALL) {
reduce_call(static_cast<GDScriptParser::CallNode *>(p_await->to_await), true);
} else {
diff --git a/modules/mono/mono_gd/gd_mono_assembly.cpp b/modules/mono/mono_gd/gd_mono_assembly.cpp
index a170fd36e7..9dbeee57ce 100644
--- a/modules/mono/mono_gd/gd_mono_assembly.cpp
+++ b/modules/mono/mono_gd/gd_mono_assembly.cpp
@@ -425,7 +425,7 @@ GDMonoClass *GDMonoAssembly::get_object_derived_class(const StringName &p_class)
while (!nested_classes.empty()) {
GDMonoClass *current_nested = nested_classes.front()->get();
- nested_classes.pop_back();
+ nested_classes.pop_front();
void *iter = nullptr;
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index 8d3257a365..6f8a968c82 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -2080,6 +2080,93 @@ public:
return OK;
}
+ Error sign_apk(const Ref<EditorExportPreset> &p_preset, bool p_debug, String apk_path, EditorProgress ep) {
+ String release_keystore = p_preset->get("keystore/release");
+ String release_username = p_preset->get("keystore/release_user");
+ String release_password = p_preset->get("keystore/release_password");
+
+ String jarsigner = EditorSettings::get_singleton()->get("export/android/jarsigner");
+ if (!FileAccess::exists(jarsigner)) {
+ EditorNode::add_io_error("'jarsigner' could not be found.\nPlease supply a path in the Editor Settings.\nThe resulting APK is unsigned.");
+ return OK;
+ }
+
+ String keystore;
+ String password;
+ String user;
+ if (p_debug) {
+ keystore = p_preset->get("keystore/debug");
+ password = p_preset->get("keystore/debug_password");
+ user = p_preset->get("keystore/debug_user");
+
+ if (keystore.empty()) {
+ keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
+ password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
+ user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
+ }
+
+ if (ep.step("Signing debug APK...", 103)) {
+ return ERR_SKIP;
+ }
+
+ } else {
+ keystore = release_keystore;
+ password = release_password;
+ user = release_username;
+
+ if (ep.step("Signing release APK...", 103)) {
+ return ERR_SKIP;
+ }
+ }
+
+ if (!FileAccess::exists(keystore)) {
+ EditorNode::add_io_error("Could not find keystore, unable to export.");
+ return ERR_FILE_CANT_OPEN;
+ }
+
+ List<String> args;
+ args.push_back("-digestalg");
+ args.push_back("SHA-256");
+ args.push_back("-sigalg");
+ args.push_back("SHA256withRSA");
+ String tsa_url = EditorSettings::get_singleton()->get("export/android/timestamping_authority_url");
+ if (tsa_url != "") {
+ args.push_back("-tsa");
+ args.push_back(tsa_url);
+ }
+ args.push_back("-verbose");
+ args.push_back("-keystore");
+ args.push_back(keystore);
+ args.push_back("-storepass");
+ args.push_back(password);
+ args.push_back(apk_path);
+ args.push_back(user);
+ int retval;
+ OS::get_singleton()->execute(jarsigner, args, true, NULL, NULL, &retval);
+ if (retval) {
+ EditorNode::add_io_error("'jarsigner' returned with error #" + itos(retval));
+ return ERR_CANT_CREATE;
+ }
+
+ if (ep.step("Verifying APK...", 104)) {
+ return ERR_SKIP;
+ }
+
+ args.clear();
+ args.push_back("-verify");
+ args.push_back("-keystore");
+ args.push_back(keystore);
+ args.push_back(apk_path);
+ args.push_back("-verbose");
+
+ OS::get_singleton()->execute(jarsigner, args, true, NULL, NULL, &retval);
+ if (retval) {
+ EditorNode::add_io_error("'jarsigner' verification of APK failed. Make sure to use a jarsigner from OpenJDK 8.");
+ return ERR_CANT_CREATE;
+ }
+ return OK;
+ }
+
virtual Error export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0) override {
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
@@ -2249,10 +2336,6 @@ public:
bool apk_expansion = p_preset->get("apk_expansion/enable");
String apk_expansion_pkey = p_preset->get("apk_expansion/public_key");
- String release_keystore = p_preset->get("keystore/release");
- String release_username = p_preset->get("keystore/release_user");
- String release_password = p_preset->get("keystore/release_password");
-
Vector<String> enabled_abis = get_enabled_abis(p_preset);
// Prepare images to be resized for the icons. If some image ends up being uninitialized, the default image from the export template will be used.
@@ -2404,84 +2487,9 @@ public:
}
if (_signed) {
- String jarsigner = EditorSettings::get_singleton()->get("export/android/jarsigner");
- if (!FileAccess::exists(jarsigner)) {
- EditorNode::add_io_error("'jarsigner' could not be found.\nPlease supply a path in the Editor Settings.\nThe resulting APK is unsigned.");
- CLEANUP_AND_RETURN(OK);
- }
-
- String keystore;
- String password;
- String user;
- if (p_debug) {
- keystore = p_preset->get("keystore/debug");
- password = p_preset->get("keystore/debug_password");
- user = p_preset->get("keystore/debug_user");
-
- if (keystore.empty()) {
- keystore = EditorSettings::get_singleton()->get("export/android/debug_keystore");
- password = EditorSettings::get_singleton()->get("export/android/debug_keystore_pass");
- user = EditorSettings::get_singleton()->get("export/android/debug_keystore_user");
- }
-
- if (ep.step("Signing debug APK...", 103)) {
- CLEANUP_AND_RETURN(ERR_SKIP);
- }
-
- } else {
- keystore = release_keystore;
- password = release_password;
- user = release_username;
-
- if (ep.step("Signing release APK...", 103)) {
- CLEANUP_AND_RETURN(ERR_SKIP);
- }
- }
-
- if (!FileAccess::exists(keystore)) {
- EditorNode::add_io_error("Could not find keystore, unable to export.");
- CLEANUP_AND_RETURN(ERR_FILE_CANT_OPEN);
- }
-
- List<String> args;
- args.push_back("-digestalg");
- args.push_back("SHA-256");
- args.push_back("-sigalg");
- args.push_back("SHA256withRSA");
- String tsa_url = EditorSettings::get_singleton()->get("export/android/timestamping_authority_url");
- if (tsa_url != "") {
- args.push_back("-tsa");
- args.push_back(tsa_url);
- }
- args.push_back("-verbose");
- args.push_back("-keystore");
- args.push_back(keystore);
- args.push_back("-storepass");
- args.push_back(password);
- args.push_back(tmp_unaligned_path);
- args.push_back(user);
- int retval;
- OS::get_singleton()->execute(jarsigner, args, true, nullptr, nullptr, &retval);
- if (retval) {
- EditorNode::add_io_error("'jarsigner' returned with error #" + itos(retval));
- CLEANUP_AND_RETURN(ERR_CANT_CREATE);
- }
-
- if (ep.step("Verifying APK...", 104)) {
- CLEANUP_AND_RETURN(ERR_SKIP);
- }
-
- args.clear();
- args.push_back("-verify");
- args.push_back("-keystore");
- args.push_back(keystore);
- args.push_back(tmp_unaligned_path);
- args.push_back("-verbose");
-
- OS::get_singleton()->execute(jarsigner, args, true, nullptr, nullptr, &retval);
- if (retval) {
- EditorNode::add_io_error("'jarsigner' verification of APK failed. Make sure to use a jarsigner from OpenJDK 8.");
- CLEANUP_AND_RETURN(ERR_CANT_CREATE);
+ err = sign_apk(p_preset, p_debug, tmp_unaligned_path, ep);
+ if (err != OK) {
+ CLEANUP_AND_RETURN(err);
}
}
diff --git a/platform_methods.py b/platform_methods.py
index 805d7de82a..ec394d76d8 100644
--- a/platform_methods.py
+++ b/platform_methods.py
@@ -44,11 +44,12 @@ def run_in_subprocess(builder_function):
json.dump(data, json_file, indent=2)
json_file_size = os.stat(json_path).st_size
- print(
- "Executing builder function in subprocess: "
- "module_path=%r, parameter_file=%r, parameter_file_size=%r, target=%r, source=%r"
- % (module_path, json_path, json_file_size, target, source)
- )
+ if env["verbose"]:
+ print(
+ "Executing builder function in subprocess: "
+ "module_path=%r, parameter_file=%r, parameter_file_size=%r, target=%r, source=%r"
+ % (module_path, json_path, json_file_size, target, source)
+ )
try:
exit_code = subprocess.call([sys.executable, module_path, json_path], env=subprocess_env)
finally:
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 75b3d7a73d..2449b3bd35 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -875,8 +875,12 @@ void SceneTree::_call_input_pause(const StringName &p_group, const StringName &p
continue;
}
- n->call(p_method, (const Variant **)v, 1);
- //ERR_FAIL_COND(node_count != g.nodes.size());
+ Callable::CallError err;
+ // Call both script and native method.
+ if (n->get_script_instance()) {
+ n->get_script_instance()->call(p_method, (const Variant **)v, 1, err);
+ }
+ n->call(p_method, (const Variant **)v, 1, err);
}
call_lock--;
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 16d0325881..d962171555 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1607,7 +1607,17 @@ void Viewport::_gui_call_input(Control *p_control, const Ref<InputEvent> &p_inpu
}
if (control->data.mouse_filter != Control::MOUSE_FILTER_IGNORE) {
- control->call(SceneStringNames::get_singleton()->_gui_input, ev);
+ // Call both script and native methods.
+ Callable::CallError error;
+ Variant event = ev;
+ const Variant *args[1] = { &event };
+ if (control->get_script_instance()) {
+ control->get_script_instance()->call(SceneStringNames::get_singleton()->_gui_input, args, 1, error);
+ }
+ MethodBind *method = ClassDB::get_method(control->get_class_name(), SceneStringNames::get_singleton()->_gui_input);
+ if (method) {
+ method->call(control, args, 1, error);
+ }
}
if (!control->is_inside_tree() || control->is_set_as_toplevel()) {
@@ -2989,10 +2999,8 @@ void Viewport::unhandled_input(const Ref<InputEvent> &p_event, bool p_local_coor
}
get_tree()->_call_input_pause(unhandled_input_group, "_unhandled_input", ev, this);
- //call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_input","_unhandled_input",ev);
if (!is_input_handled() && Object::cast_to<InputEventKey>(*ev) != nullptr) {
get_tree()->_call_input_pause(unhandled_key_input_group, "_unhandled_key_input", ev, this);
- //call_group(GROUP_CALL_REVERSE|GROUP_CALL_REALTIME|GROUP_CALL_MULIILEVEL,"unhandled_key_input","_unhandled_key_input",ev);
}
if (physics_object_picking && !is_input_handled()) {
diff --git a/servers/physics_2d/space_2d_sw.cpp b/servers/physics_2d/space_2d_sw.cpp
index 2083caf4c3..966dcbd651 100644
--- a/servers/physics_2d/space_2d_sw.cpp
+++ b/servers/physics_2d/space_2d_sw.cpp
@@ -34,9 +34,8 @@
#include "core/os/os.h"
#include "core/pair.h"
#include "physics_server_2d_sw.h"
-
-_FORCE_INLINE_ static bool _can_collide_with(CollisionObject2DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_ignore_layers = false) {
- if (!p_ignore_layers && !(p_object->get_collision_layer() & p_collision_mask)) {
+_FORCE_INLINE_ static bool _can_collide_with(CollisionObject2DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
+ if (!(p_object->get_collision_layer() & p_collision_mask)) {
return false;
}
@@ -65,7 +64,7 @@ int PhysicsDirectSpaceState2DSW::_intersect_point_impl(const Vector2 &p_point, S
int cc = 0;
for (int i = 0; i < amount; i++) {
- if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas, p_filter_by_canvas)) {
+ if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas)) {
continue;
}
diff --git a/servers/physics_3d/space_3d_sw.cpp b/servers/physics_3d/space_3d_sw.cpp
index aa4cb894dd..48f250ba35 100644
--- a/servers/physics_3d/space_3d_sw.cpp
+++ b/servers/physics_3d/space_3d_sw.cpp
@@ -34,8 +34,8 @@
#include "core/project_settings.h"
#include "physics_server_3d_sw.h"
-_FORCE_INLINE_ static bool _can_collide_with(CollisionObject3DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas, bool p_ignore_layers = false) {
- if (!p_ignore_layers && !(p_object->get_collision_layer() & p_collision_mask)) {
+_FORCE_INLINE_ static bool _can_collide_with(CollisionObject3DSW *p_object, uint32_t p_collision_mask, bool p_collide_with_bodies, bool p_collide_with_areas) {
+ if (!(p_object->get_collision_layer() & p_collision_mask)) {
return false;
}
@@ -117,7 +117,7 @@ bool PhysicsDirectSpaceState3DSW::intersect_ray(const Vector3 &p_from, const Vec
real_t min_d = 1e10;
for (int i = 0; i < amount; i++) {
- if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas, p_pick_ray)) {
+ if (!_can_collide_with(space->intersection_query_results[i], p_collision_mask, p_collide_with_bodies, p_collide_with_areas)) {
continue;
}