Skip to content

Commit 49dd453

Browse files
committed
Merge pull request godotengine#75916 from KoBeWi/hot_new_version_in_your_area
Add automatic checking for engine updates
2 parents b8fa48b + 49e69fa commit 49dd453

File tree

7 files changed

+483
-2
lines changed

7 files changed

+483
-2
lines changed

SConstruct

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ opts.Add(
228228
opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise epsilon (debug option)", False))
229229
opts.Add(BoolVariable("scu_build", "Use single compilation unit build", False))
230230
opts.Add("scu_limit", "Max includes per SCU file when using scu_build (determines RAM use)", "0")
231+
opts.Add(BoolVariable("engine_update_check", "Enable engine update checks in the Project Manager", True))
231232

232233
# Thirdparty libraries
233234
opts.Add(BoolVariable("builtin_brotli", "Use the built-in Brotli library", True))
@@ -474,6 +475,9 @@ if methods.get_cmdline_bool("fast_unsafe", env_base.dev_build):
474475
if env_base["use_precise_math_checks"]:
475476
env_base.Append(CPPDEFINES=["PRECISE_MATH_CHECKS"])
476477

478+
if env_base["engine_update_check"]:
479+
env_base.Append(CPPDEFINES=["ENGINE_UPDATE_CHECK_ENABLED"])
480+
477481
if not env_base.File("#main/splash_editor.png").exists():
478482
# Force disabling editor splash if missing.
479483
env_base["no_editor_splash"] = True

doc/classes/EditorSettings.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,8 +866,16 @@
866866
Specify the multiplier to apply to the scale for the editor gizmo handles to improve usability on touchscreen devices.
867867
[b]Note:[/b] Defaults to [code]1[/code] on non-touchscreen devices.
868868
</member>
869+
<member name="network/connection/engine_version_update_mode" type="int" setter="" getter="">
870+
Specifies how the engine should check for updates.
871+
- [b]Disable Update Checks[/b] will block the engine from checking updates (see also [member network/connection/network_mode]).
872+
- [b]Check Newest Preview[/b] (default for preview versions) will check for the newest available development snapshot.
873+
- [b]Check Newest Stable[/b] (default for stable versions) will check for the newest available stable version.
874+
- [b]Check Newest Patch[/b] will check for the latest available stable version, but only within the same minor version. E.g. if your version is [code]4.3.stable[/code], you will be notified about [code]4.3.1.stable[/code], but not [code]4.4.stable[/code].
875+
All update modes will ignore builds with different major versions (e.g. Godot 4 -&gt; Godot 5).
876+
</member>
869877
<member name="network/connection/network_mode" type="int" setter="" getter="">
870-
Determines whether online features are enabled in the editor, such as the Asset Library. Setting this property to "Offline" is recommended to limit editor's internet activity, especially if privacy is a concern.
878+
Determines whether online features are enabled in the editor, such as the Asset Library or update checks. Disabling these online features helps alleviate privacy concerns by preventing the editor from making HTTP requests to the Godot website, GitHub, or third-party platforms hosting assets from the Asset Library.
871879
</member>
872880
<member name="network/debug/remote_host" type="String" setter="" getter="">
873881
The address to listen to when starting the remote debugger. This can be set to [code]0.0.0.0[/code] to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from [code]localhost[/code]).

editor/editor_settings.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
#include "editor/editor_paths.h"
5050
#include "editor/editor_property_name_processor.h"
5151
#include "editor/editor_translation.h"
52+
#include "editor/engine_update_label.h"
5253
#include "scene/gui/color_picker.h"
5354
#include "scene/main/node.h"
5455
#include "scene/main/scene_tree.h"
@@ -413,6 +414,14 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
413414
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/editor_screen", -2, ed_screen_hints)
414415
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/project_manager_screen", -2, ed_screen_hints)
415416

417+
{
418+
EngineUpdateLabel::UpdateMode default_update_mode = EngineUpdateLabel::UpdateMode::NEWEST_UNSTABLE;
419+
if (String(VERSION_STATUS) == String("stable")) {
420+
default_update_mode = EngineUpdateLabel::UpdateMode::NEWEST_STABLE;
421+
}
422+
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "network/connection/engine_version_update_mode", int(default_update_mode), "Disable Update Checks,Check Newest Preview,Check Newest Stable,Check Newest Patch"); // Uses EngineUpdateLabel::UpdateMode.
423+
}
424+
416425
_initial_set("interface/editor/debug/enable_pseudolocalization", false);
417426
set_restart_if_changed("interface/editor/debug/enable_pseudolocalization", true);
418427
// Use pseudolocalization in editor.

0 commit comments

Comments
 (0)