Skip to content

Commit fa0b4af

Browse files
committed
2 parents e2a601f + a7a2a12 commit fa0b4af

File tree

746 files changed

+15796
-4644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

746 files changed

+15796
-4644
lines changed

.github/workflows/linux_builds.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,18 @@ jobs:
140140
python-version: 3.8
141141
scons-version: 4.0
142142

143+
- name: Force remove preinstalled .NET SDKs
144+
if: matrix.build-mono
145+
run: |
146+
sudo rm -rf /usr/share/dotnet/sdk/*
147+
148+
- name: Setup older .NET SDK as baseline
149+
if: matrix.build-mono
150+
uses: actions/setup-dotnet@v4
151+
with:
152+
# Targeting the oldest version we want to support to ensure it still builds.
153+
dotnet-version: '8.0.100'
154+
143155
- name: Compilation
144156
uses: ./.github/actions/godot-build
145157
with:
@@ -163,7 +175,8 @@ jobs:
163175
- name: Build .NET solutions
164176
if: matrix.build-mono
165177
run: |
166-
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
178+
dotnet --info
179+
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd --werror
167180
168181
- name: Prepare artifact
169182
if: matrix.artifact

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ repos:
9898
name: doc-status
9999
language: python
100100
entry: python doc/tools/doc_status.py
101-
args: [doc/classes, modules/*/doc_classes, platform/*/doc_classes]
101+
args: [doc/classes, modules/*/doc_classes, platform/*/doc_classes, -c]
102102
pass_filenames: false
103103
files: ^(doc/classes|.*/doc_classes)/.*\.xml$
104104

COPYRIGHT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Comment: Intel ASSAO and related files
160160
Copyright: 2016, Intel Corporation
161161
License: Expat
162162

163-
Files: ./servers/rendering/renderer_rd/shaders/taa_resolve.glsl
163+
Files: ./servers/rendering/renderer_rd/shaders/effects/taa_resolve.glsl
164164
Comment: Temporal Anti-Aliasing resolve implementation
165165
Copyright: 2016, Panos Karabelas
166166
License: Expat

SConstruct

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,31 +58,13 @@ import gles3_builders
5858
import glsl_builders
5959
import methods
6060
import scu_builders
61-
from methods import print_error, print_warning
61+
from methods import Ansi, print_error, print_info, print_warning
6262
from platform_methods import architecture_aliases, architectures, compatibility_platform_aliases
6363

6464
if ARGUMENTS.get("target", "editor") == "editor":
6565
_helper_module("editor.editor_builders", "editor/editor_builders.py")
6666
_helper_module("editor.template_builders", "editor/template_builders.py")
6767

68-
# Enable ANSI escape code support on Windows 10 and later (for colored console output).
69-
# <https://github.com/python/cpython/issues/73245>
70-
if sys.stdout.isatty() and sys.platform == "win32":
71-
try:
72-
from ctypes import WinError, byref, windll # type: ignore
73-
from ctypes.wintypes import DWORD # type: ignore
74-
75-
stdout_handle = windll.kernel32.GetStdHandle(DWORD(-11))
76-
mode = DWORD(0)
77-
if not windll.kernel32.GetConsoleMode(stdout_handle, byref(mode)):
78-
raise WinError()
79-
mode = DWORD(mode.value | 4)
80-
if not windll.kernel32.SetConsoleMode(stdout_handle, mode):
81-
raise WinError()
82-
except Exception as e:
83-
methods._colorize = False
84-
print_error(f"Failed to enable ANSI escape code support, disabling color output.\n{e}")
85-
8668
# Scan possible build platforms
8769

8870
platform_list = [] # list of platforms
@@ -635,7 +617,7 @@ detect.configure(env)
635617

636618
print(f'Building for platform "{env["platform"]}", architecture "{env["arch"]}", target "{env["target"]}".')
637619
if env.dev_build:
638-
print("NOTE: Developer build, with debug optimization level and debug symbols (unless overridden).")
620+
print_info("Developer build, with debug optimization level and debug symbols (unless overridden).")
639621

640622
# Enforce our minimal compiler version requirements
641623
cc_version = methods.get_compiler_version(env)
@@ -1111,10 +1093,10 @@ def print_elapsed_time():
11111093
time_centiseconds = round((elapsed_time_sec % 1) * 100)
11121094
print(
11131095
"{}[Time elapsed: {}.{:02}]{}".format(
1114-
methods.ANSI.GRAY,
1096+
Ansi.GRAY,
11151097
time.strftime("%H:%M:%S", time.gmtime(elapsed_time_sec)),
11161098
time_centiseconds,
1117-
methods.ANSI.RESET,
1099+
Ansi.RESET,
11181100
)
11191101
)
11201102

core/config/engine.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,14 @@ void Engine::set_freeze_time_scale(bool p_frozen) {
468468
freeze_time_scale = p_frozen;
469469
}
470470

471+
void Engine::set_embedded_in_editor(bool p_enabled) {
472+
embedded_in_editor = p_enabled;
473+
}
474+
475+
bool Engine::is_embedded_in_editor() const {
476+
return embedded_in_editor;
477+
}
478+
471479
Engine::Engine() {
472480
singleton = this;
473481
}

core/config/engine.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#include "core/os/main_loop.h"
3737
#include "core/string/ustring.h"
3838
#include "core/templates/list.h"
39-
#include "core/templates/vector.h"
4039

4140
template <typename T>
4241
class TypedArray;
@@ -89,6 +88,7 @@ class Engine {
8988
bool editor_hint = false;
9089
bool project_manager_hint = false;
9190
bool extension_reloading = false;
91+
bool embedded_in_editor = false;
9292

9393
bool _print_header = true;
9494

@@ -206,6 +206,8 @@ class Engine {
206206
bool notify_frame_server_synced();
207207

208208
void set_freeze_time_scale(bool p_frozen);
209+
void set_embedded_in_editor(bool p_enabled);
210+
bool is_embedded_in_editor() const;
209211

210212
Engine();
211213
virtual ~Engine();

core/config/project_settings.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include "core/io/marshalls.h"
4242
#include "core/io/resource_uid.h"
4343
#include "core/object/script_language.h"
44-
#include "core/os/keyboard.h"
4544
#include "core/templates/rb_set.h"
4645
#include "core/variant/typed_array.h"
4746
#include "core/variant/variant_parser.h"
@@ -900,7 +899,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S
900899

901900
if (!p_custom_features.is_empty()) {
902901
// Store how many properties are saved, add one for custom features, which must always go first.
903-
file->store_32(count + 1);
902+
file->store_32(uint32_t(count + 1));
904903
String key = CoreStringName(_custom_features);
905904
file->store_pascal_string(key);
906905

@@ -913,12 +912,12 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S
913912

914913
err = encode_variant(p_custom_features, buff.ptrw(), len, false);
915914
ERR_FAIL_COND_V(err != OK, err);
916-
file->store_32(len);
915+
file->store_32(uint32_t(len));
917916
file->store_buffer(buff.ptr(), buff.size());
918917

919918
} else {
920919
// Store how many properties are saved.
921-
file->store_32(count);
920+
file->store_32(uint32_t(count));
922921
}
923922

924923
for (const KeyValue<String, List<String>> &E : p_props) {
@@ -945,7 +944,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S
945944

946945
err = encode_variant(value, buff.ptrw(), len, true);
947946
ERR_FAIL_COND_V_MSG(err != OK, ERR_INVALID_DATA, "Error when trying to encode Variant.");
948-
file->store_32(len);
947+
file->store_32(uint32_t(len));
949948
file->store_buffer(buff.ptr(), buff.size());
950949
}
951950
}

core/config/project_settings.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,8 @@ class ProjectSettings : public Object {
4949
typedef HashMap<String, Variant> CustomMap;
5050
static const String PROJECT_DATA_DIR_NAME_SUFFIX;
5151

52-
enum {
53-
// Properties that are not for built in values begin from this value, so builtin ones are displayed first.
54-
NO_BUILTIN_ORDER_BASE = 1 << 16
55-
};
52+
// Properties that are not for built in values begin from this value, so builtin ones are displayed first.
53+
constexpr static const int32_t NO_BUILTIN_ORDER_BASE = 1 << 16;
5654

5755
#ifdef TOOLS_ENABLED
5856
const static PackedStringArray get_required_features();

core/core_bind.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@
3737
#include "core/crypto/crypto_core.h"
3838
#include "core/debugger/engine_debugger.h"
3939
#include "core/debugger/script_debugger.h"
40-
#include "core/io/file_access_compressed.h"
41-
#include "core/io/file_access_encrypted.h"
4240
#include "core/io/marshalls.h"
4341
#include "core/math/geometry_2d.h"
4442
#include "core/math/geometry_3d.h"
@@ -426,6 +424,10 @@ String OS::get_version() const {
426424
return ::OS::get_singleton()->get_version();
427425
}
428426

427+
String OS::get_version_alias() const {
428+
return ::OS::get_singleton()->get_version_alias();
429+
}
430+
429431
Vector<String> OS::get_video_adapter_driver_info() const {
430432
return ::OS::get_singleton()->get_video_adapter_driver_info();
431433
}
@@ -682,6 +684,7 @@ void OS::_bind_methods() {
682684
ClassDB::bind_method(D_METHOD("get_name"), &OS::get_name);
683685
ClassDB::bind_method(D_METHOD("get_distribution_name"), &OS::get_distribution_name);
684686
ClassDB::bind_method(D_METHOD("get_version"), &OS::get_version);
687+
ClassDB::bind_method(D_METHOD("get_version_alias"), &OS::get_version_alias);
685688
ClassDB::bind_method(D_METHOD("get_cmdline_args"), &OS::get_cmdline_args);
686689
ClassDB::bind_method(D_METHOD("get_cmdline_user_args"), &OS::get_cmdline_user_args);
687690

@@ -1917,6 +1920,10 @@ bool Engine::is_editor_hint() const {
19171920
return ::Engine::get_singleton()->is_editor_hint();
19181921
}
19191922

1923+
bool Engine::is_embedded_in_editor() const {
1924+
return ::Engine::get_singleton()->is_embedded_in_editor();
1925+
}
1926+
19201927
String Engine::get_write_movie_path() const {
19211928
return ::Engine::get_singleton()->get_write_movie_path();
19221929
}
@@ -1997,6 +2004,7 @@ void Engine::_bind_methods() {
19972004
ClassDB::bind_method(D_METHOD("get_script_language", "index"), &Engine::get_script_language);
19982005

19992006
ClassDB::bind_method(D_METHOD("is_editor_hint"), &Engine::is_editor_hint);
2007+
ClassDB::bind_method(D_METHOD("is_embedded_in_editor"), &Engine::is_embedded_in_editor);
20002008

20012009
ClassDB::bind_method(D_METHOD("get_write_movie_path"), &Engine::get_write_movie_path);
20022010

core/core_bind.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636
#include "core/debugger/engine_profiler.h"
3737
#include "core/io/resource_loader.h"
3838
#include "core/io/resource_saver.h"
39-
#include "core/object/script_language.h"
40-
#include "core/os/os.h"
4139
#include "core/os/semaphore.h"
4240
#include "core/os/thread.h"
4341
#include "core/templates/safe_refcount.h"
@@ -210,6 +208,7 @@ class OS : public Object {
210208
String get_name() const;
211209
String get_distribution_name() const;
212210
String get_version() const;
211+
String get_version_alias() const;
213212
Vector<String> get_cmdline_args();
214213
Vector<String> get_cmdline_user_args();
215214

@@ -590,6 +589,8 @@ class Engine : public Object {
590589
void set_editor_hint(bool p_enabled);
591590
bool is_editor_hint() const;
592591

592+
bool is_embedded_in_editor() const;
593+
593594
// `set_write_movie_path()` is not exposed to the scripting API as changing it at run-time has no effect.
594595
String get_write_movie_path() const;
595596

0 commit comments

Comments
 (0)